Repository navigation
Fix history scanner coverage of shared-blob filenames - #9
Merged
Merged
Conversation
Zacharon
marked this pull request as ready for review
October 21, 2026 07:59
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A deleted sensitive filename could pass the history scan when its contents were shared with an ordinary filename:
git rev-list --objectsretained only one name for that blob. Reproduced with the actual scanner on main22b50dbusing harmlessdocs/notes.txt,.envand deletion; the history result was clean. The new duplicate-blob regression fails on that unchanged scanner and passes with this correction.The history scanner now collects NUL-delimited raw Git diff associations, including roots, merge parents, deletions and renames represented as delete/add. It checks every distinct historical blob/path pair, reads each blob once through one streaming cat-file process, and scans content once per ZIP/text interpretation. Findings and existing source exemptions are applied per path. Credential patterns and archive bounds are unchanged. A related existing basename defect is also corrected: ZIP members are scanned under their own names before the archive display prefix is added, so root-level sensitive members are detected and still reported with their full archive paths.
Added 11 synthetic regressions (20 total): deleted sensitive names, duplicate blobs, unchanged-content renames, ordinary names, deduplicated content scanning, per-path exemptions, ZIP aliases, root-level sensitive members and member/byte bounds, Unicode/space-containing paths, merged side history, shallow-clone reporting and an empty root tree. Documentation now distinguishes default/history coverage and states memory, per-archive, ref and pattern limitations accurately.
Validation at head
d080eeaa1ebf2ab47b703b9ca9a0a9709daee7a4(tree verified equal to tested local tree):git diff --checkpassed. Only scanner, scanner tests and adoption documentation changed; distribution/site/package bytes are untouched.validate_candidate.pyrefused the unsupported platform as intended: it requires Windows CPython 3.14.5.4beeec8e2697e729d757aef8886a66f4ef05cfd4; its treee8c16c0ab018a979c3ca5711b08c42c60e0e2ca4matches the tested PR head exactly.Draft pending independent review and owner-controlled integration. Implementer verification is not independent H3. This remains a bounded marker/name scanner, not an exhaustive security audit. No merge, release or deployment is requested by this change.