Skip to content

Commit 54bf2fc

Browse files
committed
fix(ci): accept the five reviewed secret findings that live in history
Repairing the gitleaks ruleset made CI red, correctly: gitleaks scans every commit, not just the working tree, so correcting the files does not remove what was committed. Five findings remain reachable in history. Each was reviewed. Two are the ntfy placeholder from 2025-12, two are a truncated JWT header used as an Authorization example, one is a curl auth header in the security docs. None is a live credential; if one had been, the answer would be rotation rather than an ignore entry, since a rewrite of public history is not a remedy anyone can rely on. Verified that this silences only those five: a freshly planted Slack token is still reported (leaks found: 1) with the ignore file in place, and the tree is clean again once it is removed. Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
1 parent b103227 commit 54bf2fc

1 file changed

Lines changed: 20 additions & 11 deletions

File tree

.gitleaksignore

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1-
# Ignore test constants and non-sensitive values - these are not actual secrets
2-
# but rather test constants used in unit tests
1+
# Findings accepted in history. Gitleaks scans every commit, so a value that
2+
# was committed once stays reportable even after the file is corrected — the
3+
# only way to remove it from history is a rewrite, which is not worth it for
4+
# documentation examples.
5+
#
6+
# Each entry below was reviewed individually. If any of these had been a live
7+
# credential the answer would be rotation, not an ignore entry.
38

4-
# File-level ignores (specific files that contain test secrets)
5-
web/missing_coverage_test.go
6-
web/jwt_auth_test.go
7-
web/auth_test.go
9+
# Placeholder token in the ntfy webhook docs and preset example. Replaced in
10+
# the working tree with tk_REPLACE_WITH_YOUR_NTFY_TOKEN; the original shape was
11+
# indistinguishable from a real ntfy access token, which is why it tripped the
12+
# scanner once the ruleset was repaired.
13+
df6d07e2545e1cb6acbedb6d69a122d01d1237a6:docs/webhooks.md:generic-api-key:171
14+
df6d07e2545e1cb6acbedb6d69a122d01d1237a6:docs/webhooks.md:generic-api-key:180
815

9-
# Pattern-based ignores for test constants
10-
test-secret-for-testing
11-
test-secret-key
12-
test-secret-key-that-is-long-enough-for-jwt
13-
testSecretKey
16+
# Truncated JWT header (the standard {"alg":"HS256","typ":"JWT"} prefix
17+
# followed by "...") used as an Authorization-header example.
18+
06d254ff97a013c9d307ef55b911e05e85dc0a7a:docs/API.md:generic-api-key:25
19+
06d254ff97a013c9d307ef55b911e05e85dc0a7a:docs/API.md:generic-api-key:45
20+
21+
# curl example in the security docs showing the shape of an auth header.
22+
053a2527b5004a61e1bae7a32e616e822eb444ba:docs/SECURITY.md:curl-auth-header:392

0 commit comments

Comments
 (0)