Skip to content

Commit dc81a9f

Browse files
cristimclaude
andauthored
chore(pre-commit): scope the private-key hook exclusion and drop the dead gitleaks ignore (#2218)
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>
1 parent 15a4e8b commit dc81a9f

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

‎.gitleaksignore‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎.pre-commit-config.yaml‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,8 @@ repos:
4848
name: Check for merge conflicts
4949
- id: detect-private-key
5050
name: Detect private keys
51-
# Audit (PR5): internal/credentials/resolver.go contains zero
52-
# private-key-shaped patterns (verified by grep). The exclusion
53-
# was a historical artifact; removing it tightens the gate
54-
# without breaking any legitimate code.
55-
exclude: '(_test\.go|frontend/src/index\.html)$'
51+
# Only these test fixtures embed PEM-shaped dummy keys; any other file is scanned.
52+
exclude: '^(cmd/configure_test\.go|cmd/configure_gcp_test\.go)$'
5653
- id: check-case-conflict
5754
name: Check for case conflicts
5855

0 commit comments

Comments
 (0)