Repository navigation
Extend boundary scan with history mode and five more credential markers - #8
Merged
Merged
Conversation
The tracked-file scan missed JWTs, test payment keys, Azure storage keys, credentials in URLs and *_SECRET/*_TOKEN assignments, and never looked at history, so a credential committed then deleted passed CI. Add those markers, a --history mode over every blob reachable from HEAD, a full-depth CI checkout and two regressions (named assignments, deleted secret in history). Still standard library only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ARKFEnTCNfYUYyr8gCqdNZ
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.
Requested by Zach · project thread
Before: the public boundary scan read only the current tracked files. On a seeded synthetic corpus it missed JWTs,
sk_test_keys, Azure storageAccountKey=values, credentials embedded in URLs and*_SECRET/*_TOKENassignments (gitleaks caught 4 of these 5). A credential committed and later deleted passed CI, because the scan never looked at history.After: the scan flags all 14 seeded cases (11 credentials, 3 private paths), and a new
--historymode checks every file version reachable from the checked-out commit. CI runs both scans with a full-depth checkout. The scanner is still standard library only, so it adds no dependency or downloaded binary.How: five new
CONTENT_MARKERSentries and a widened assignment rule.scan_history()lists objects withgit rev-list --objects HEADand reads blobs in a singlegit cat-file --batchpass, scanning each blob once. Its result reportsshallowso a partial clone isn't mistaken for a full audit. Two new regressions cover named assignments and a deleted secret in history, and placeholder URLs and${VAR}values stay clean.docs/ADOPTING-AEOS.mdnow says nine tests, not seven.Verified locally: 9/9 scanner regressions and 8/8
tests/pass, and the tracked scan (264 files) and history scan (159 blobs) of this branch are clean. Windows package validation was not run locally.Generated by Claude Code