Repository navigation
chore(pre-commit): scope the private-key hook exclusion and drop the dead gitleaks ignore - #2218
Conversation
…dead gitleaks ignore The detect-private-key hook skipped every *_test.go file and a frontend path that does not exist in this repo, so a real key committed in any test file went unchecked. Exclude only the two files that embed PEM-shaped dummy keys (cmd/configure_test.go, cmd/configure_gcp_test.go), found by running the hook with no exclude. .gitleaksignore is removed: nothing here runs gitleaks and its only entry points at a file that does not exist in this repo. Closes #448 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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 35 minutes for your next included review. View limit details
Comment |
Independent review verdict: CLEAN at 5b7283dReviewer: fresh Claude agent (Sonnet, high effort), not the author. The PR body was treated as a claim. Coordinator: claude-cc-reviewer. Blocking findings: none. What was attacked and how (local macOS):
Non-blocking note: that ad-hoc gitleaks run flags 4 unrelated, ungated findings: Gate:
|
Closes #448
Summary
This PR applies the cloud-commitments-cli copy of the 2026-09-02 audit finding A14-036. It changes config only, with no Go code.
.gitleaksignore. Its only entry pointed atinternal/secrets/aws_resolver_httptest_test.go, which doesn't exist in this repo. Nothing here runs gitleaks: a case-insensitive grep finds no reference in CI, the Makefile, scripts or docs. So the file read as an active suppression while doing nothing. This also covers chore: prune monorepo residue left after the CLI split (lint/gitleaks/pre-commit config, NOTICE, docs) #2097 item 2. Wiring gitleaks into CI is still a separate decision, as the issue says.detect-private-keyexclusion. It was(_test\.go|frontend/src/index\.html)$, which skipped every Go test file and afrontend/path that no longer exists. It is now exactly^(cmd/configure_test\.go|cmd/configure_gcp_test\.go)$. Those are the only two tracked files that embed PEM-shaped dummy keys.Evidence (local, macOS; pre-commit 4.7.0)
git grepfor all 10 of the hook's substring patterns (RSA, DSA, EC, OPENSSH, plain PRIVATE KEY, PuTTY, SSH2 ENCRYPTED, PGP, ENCRYPTED, OpenVPN). Both checks matched only these two files._test.gofile with a PEM header is now caught ("Private key found").docs/probe.txtand a PGP header in a new_test.gofile are caught too.pre-commit run detect-private-key --all-filespasses.pre-commit run check-yaml --all-filespasses.pre-commit run --all-filespasses.scripts/test-git-secrets-allowlist.shis 44/44..github/workflows/pre-commit.yml:177) runspre-commit run --all-filesagainst the same config, so it behaves the same as the local run.check-yamlexclude, which is recorded on chore: prune monorepo residue left after the CLI split (lint/gitleaks/pre-commit config, NOTICE, docs) #2097 rather than widened here.🤖 Generated with Claude Code