Repository navigation
fix(ignore): prevent case-insensitive ignore rule bypass - #5
Merged
Merged
Conversation
Repository owner
locked and limited conversation to collaborators
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prevent ignored files from being accessed through alternate casing on case-insensitive filesystems.
Problem
Ignore rules could be bypassed by changing the capitalization of a file or directory path on Windows and macOS. This could allow file tools to access files that should remain ignored.
Changes
Verification
go test ./internal/ignore -v -count=1go test ./internal/tools -run "^TestTools_IgnoreRules" -v -count=1go vet ./...gofmt -l .The full Windows tools test suite has known file-sharing violation failures in tests involving file writes. The affected write implementation is unchanged by this PR; the issue is being addressed separately.
Scope
This PR addresses ignore-rule enforcement only. It does not include the separate Windows file-sharing retry fix.