Commit 00935ab
test: build fake GitHub-PAT fixtures at runtime (clear GitGuardian alert)
pattern_matcher_test.go fed literal `ghp_...`-shaped strings to ScanContentForSecrets
to verify the GitHub-token regex. They are synthetic test inputs, not real
credentials, but the literal form tripped GitGuardian's GitHub-PAT detector on the
PR. Build the token fixtures at runtime (`"ghp_" + strings.Repeat(...)`) so no
token-shaped literal appears in source; the test still exercises the same regex.
No secret to rotate — these were never real tokens.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 65a072b commit 00935ab
1 file changed
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
25 | | - | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | | - | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| |||
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
58 | | - | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
| |||
0 commit comments