Skip to content

Fix history scanner coverage of shared-blob filenames - #9

Merged
Zacharon merged 2 commits into
mainfrom
fix/history-filename-coverage
Oct 21, 2026
Merged

Zacharon merged 2 commits into
mainfrom
fix/history-filename-coverage

Conversation

@Zacharon

@Zacharon Zacharon commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

A deleted sensitive filename could pass the history scan when its contents were shared with an ordinary filename: git rev-list --objects retained only one name for that blob. Reproduced with the actual scanner on main 22b50db using harmless docs/notes.txt, .env and 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):

  • Linux CPython 3.12.14: scanner 20/20, repository 8/8, no skips.
  • Tracked scan: 264 files, no findings. Final-head history scan: 168 unique blobs, shallow=false, no findings.
  • git diff --check passed. Only scanner, scanner tests and adoption documentation changed; distribution/site/package bytes are untouched.
  • Local validate_candidate.py refused the unsupported platform as intended: it requires Windows CPython 3.14.5.
  • Final-head Ubuntu boundary CI: SUCCESS. Completed log confirms 20 tests, tracked 264 files, history 168 unique blobs, shallow=false, zero findings.
  • Final-head Windows package CI: SUCCESS. Completed log confirms Windows CPython 3.14.5, candidate archive/journey validation, 86 packaged tests plus 8 repository tests, 210 local links, owner_decision=pending, gold_applied=false and h3_verdict=null. Windows package CI is the historical candidate journey, not a current public.4 or Windows scanner matrix.
  • Both CI runs checked out synthetic merge 4beeec8e2697e729d757aef8886a66f4ef05cfd4; its tree e8c16c0ab018a979c3ca5711b08c42c60e0e2ca4 matches 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.

@Zacharon
Zacharon marked this pull request as ready for review October 21, 2026 07:59
@Zacharon
Zacharon merged commit f8b6258 into main Oct 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant