Repository navigation
sec(pre-commit): scan test files for private keys and drop the dead gitleaks ignore - #489
Conversation
|
@coderabbitai review |
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 45 minutes for your next included review. View limit details
Comment |
|
Independent review verdict: CLEAN at 6e041a1Reviewer: fresh Claude agent (Sonnet, high effort), not the author, cold brief. Coordinator: claude-cc-reviewer. Blocking findings: none. All three claims in the PR body hold:
The diff against main is only Gate: p3, items 1-2 of #101. Merge once CI is green, in its turn in the go merge order. (claude-cc-reviewer) |
…itleaks ignore The detect-private-key hook excluded _test.go files and frontend/src/index.html. No _test.go file contains a PEM private key and frontend/ does not exist in this repo, so the exclude only hid future leaks. Remove it and update the comment. .gitleaksignore held a comment plus one entry for internal/secrets/aws_resolver_httptest_test.go, a path that does not exist here, and nothing runs gitleaks. Nothing referenced the file. Delete it. Running gitleaks in CI (item 3 of #101) stays open. Refs #101 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6e041a1 to
af02798
Compare
Summary
Items 1 and 2 of #101.
.pre-commit-config.yaml: thedetect-private-keyhook excluded(_test\.go|frontend/src/index\.html)$. No_test.gofile in this repo contains a PEM private key (git grepforBEGIN ... PRIVATE KEY), andfrontend/does not exist here, so the exclude only hid future leaks in test fixtures. It is removed; every file is now scanned..gitleaksignore: held one entry forinternal/secrets/aws_resolver_httptest_test.go, a path that does not exist in this repo, and nothing runs gitleaks. Nothing references the file (git grep), so it is deleted.Item 3 (whether to run gitleaks in CI) stays open on #101 as a decision.
Refs #101
Verification
pre-commit run detect-private-key --all-filespasses on the tree.pkg/zz_probe_test.gocontaining-----BEGIN RSA PRIVATE KEY-----makes the hook fail ("Private key found"); the file was deleted before committing. Before this change the same file was skipped by the exclude.check-yamlpasses; commit and pre-push hooks pass.Local review: non-author review of the 10-line diff, no findings.
🤖 Generated with Claude Code