Repository navigation
sec(scripts): anchor .gitallowed placeholder entries - #57
Conversation
…nchored entry The 18 bare account-ID and UUID entries matched anywhere in the scanner's path:line:content line, exempting that line from every detector (a key or password beside 123456789012 scanned clean). Only tools/purchase_test.go trips the account-ID detector, so allow just that line, anchored on path and whole line. Self-test gains must-catch cases that fail on the old file. Closes #24 (part 1; DSN detector audit tracked separately) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Gate finding 1 (blocking): self-test does not guard against restoring the other 16 bare entries Mutation run at
The new must-catch cases ( Suggested fix: one structural case instead of more literals, e.g. assert every non-comment, non-blank line of Non-blocking, same area:
Everything else verified so far: fail-before (old |
|
Gate verdict at Mutation run finished. Additional survivors: restore bare Pre-existing, not from this PR (same on |
Fail when any .gitallowed entry is not anchored ^...:[0-9]+:...$ (proven against each of the 18 removed bare entries), and exercise the purchase_test.go entry through a working-tree scan: it fails without the entry or in any other path. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Note: on origin/main, the full setup-script pattern set also flags README.md:8, SECURITY.md:31 and test-script line 123 under |
|
Gate verdict at Delta since Local evidence (macOS, git-secrets 1.3.0, throwaway repos, fake AKIA/AIza fixtures only,
Non-blocking: the structural guard ( |
Summary
.gitallowed. git-secrets matches an allowed regex against the wholepath:line:contentline and exempts the line from every detector, so a key or password beside one of them scanned clean.tools/purchase_test.goAccount: "123456789012",..gitallowedheader, adds a CHANGELOG line.Closes #24 (part 1). The DSN detector audit (part 2) is a separate issue.
Evidence
password = "..."beside one; a GCP-shaped key beside the UUID.--register-awspatterns (CI's setup) and.gitallowedemptied: the only placeholder-related hit istools/purchase_test.go:138. No other bare entry matches a scanner hit, including the Archera tool (feat(tools): add read-only Archera comparison tool #55) fixtures and env names (ARCHERA_API_KEY,test-archera-key-0000,222222222222in testdata); nothing is newly allow-listed.bash scripts/test-git-secrets-allowlist.sh: 50 PASS, 0 FAIL. Against the old.gitallowedthe new must-catch cases fail (8 FAIL lines).pre-commit run git-secrets --all-filespasses with the new file..github/workflows/pre-commit.yml"Run git-secrets allowlist self-test" step.Sibling repos (go, platform, cli) carry the same bare entries; follow-ups are tracked separately.
🤖 Generated with Claude Code
Summary by CodeRabbit