Skip to content

Commit d2fbf1c

Browse files
aram-devdocsclaude
andcommitted
ci: allowlist hook fixtures for gitleaks and GitGuardian
The secret-scanner fixtures carry deliberately fake AWS/GitHub-shaped tokens so the hook has something to catch. Path-based allowlisting via .gitleaks.toml (the .gitleaksignore path entries were invalid — gitleaks expects fingerprints) and a .gitguardian.yaml ignored-paths entry so both scanners skip them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 7628f16 commit d2fbf1c

3 files changed

Lines changed: 25 additions & 9 deletions

File tree

.gitguardian.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
3+
# The hook fixtures under .claude/hooks/fixtures/ carry deliberately fake
4+
# AWS/GitHub-shaped tokens so the secret-scanner hook has something to catch.
5+
# They are not real credentials — exclude them from secret scanning.
6+
secret:
7+
ignored-paths:
8+
- ".claude/hooks/fixtures/**"

.gitleaks.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
title = "GoudEngine gitleaks config"
2+
3+
# Use the full default gitleaks ruleset, then allowlist the intentional test
4+
# fixtures below.
5+
[extend]
6+
useDefault = true
7+
8+
[allowlist]
9+
description = "Hook fixtures carry deliberately fake AWS/GitHub-shaped tokens to exercise the secret-scanner hook; they are not real credentials."
10+
paths = [
11+
'''\.claude/hooks/fixtures/.*''',
12+
]

.gitleaksignore

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
# Allowlist for gitleaks. Each entry is a fingerprint (commit:path:rule:line)
2-
# or a path/rule the scanner should ignore. Add only vetted false positives —
3-
# test fixtures with fake credentials, documentation examples — never real
4-
# secrets. Keep each entry commented with why it is safe.
5-
6-
# Hook fixtures deliberately contain fake AWS/GitHub-shaped tokens to exercise
7-
# the secret-scanner; they are not real credentials.
8-
.claude/hooks/fixtures/secret-scanner/write-secret.expect2.json
9-
.claude/hooks/fixtures/secret-scanner/multiedit-secret.expect2.json
1+
# gitleaks fingerprint allowlist (commit:path:rule:line entries).
2+
#
3+
# Path-based allowlisting for the intentional hook fixtures lives in
4+
# .gitleaks.toml ([allowlist].paths) instead, which is stable across commits.
5+
# Add fingerprints here only for one-off vetted findings.

0 commit comments

Comments
 (0)