From d1d2809e22cf74a088064093415718f4f2bd4fd2 Mon Sep 17 00:00:00 2001 From: Cristian Magherusan-Stanciu Date: Fri, 16 Oct 2026 03:37:44 +0200 Subject: [PATCH] sec(pre-commit): scan Go test files for private keys detect-private-key excluded every _test.go file (and a frontend file this repo does not have), so a PEM key pasted into a test fixture passed the local and CI gate. No tracked file carries a key marker, so the exclusion is dropped entirely. Verified: a key planted in a _test.go file is skipped with the old config and caught with the new one. .gitleaksignore is removed: its only entry named internal/secrets/aws_resolver_httptest_test.go, which does not exist in this repository, and nothing here runs gitleaks. Closes #13 Co-Authored-By: Claude Opus 5.5 --- .gitleaksignore | 3 --- .pre-commit-config.yaml | 5 ----- 2 files changed, 8 deletions(-) delete mode 100644 .gitleaksignore diff --git a/.gitleaksignore b/.gitleaksignore deleted file mode 100644 index 6718577..0000000 --- a/.gitleaksignore +++ /dev/null @@ -1,3 +0,0 @@ -# AWS official example credentials used in tests -# See: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-creds.html#sec-access-keys-and-secret-access-keys -internal/secrets/aws_resolver_httptest_test.go diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c074845..02f67e8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -61,11 +61,6 @@ repos: name: Check for merge conflicts - id: detect-private-key name: Detect private keys - # Audit (PR5): internal/credentials/resolver.go contains zero - # private-key-shaped patterns (verified by grep). The exclusion - # was a historical artifact; removing it tightens the gate - # without breaking any legitimate code. - exclude: '(_test\.go|frontend/src/index\.html)$' - id: check-case-conflict name: Check for case conflicts