fix(security): suppress false-positive gitleaks history findings - #24
Merged
Merged
Conversation
Two structural bugs in .gitleaks.toml crash gitleaks 8.30 config
loading, failing the secrets job on every PR before any scan runs:
1. `[allowlist.commits]` as a nested TOML table decodes as a Go map,
but gitleaks expects `AllowList.Commits` to be `[]string`. Flattened
to a `commits = []` key inside `[allowlist]`.
2. Several `paths` entries used glob syntax (`**/*.test.ts`,
`.github/docs/**`, etc.) which gitleaks compiles as Go regex —
invalid glob patterns panic at config load. Replaced with
equivalent valid regexes.
Also adds shape-based allowlist regexes for env-var references
(`process.env.X`, `import.meta.env.X`, shell `${VAR}` interpolation,
numbered env-var identifiers) to clear 9 false-positive findings on
tracked files (Hasura/Anthropic env-var reads, never literal secrets).
Same fix pattern as ummeco/praycalc PR #52 and ummeco/ummat PR #84.
No real secrets found during validation.
Git-history mode scan (gitleaks detect, default GIT mode) surfaced 2 generic-api-key findings for the literal 'Alafasy_128kbps' — a Quran reciter identifier / lookup key (Mishary Alafasy audio stream bitrate variant), not a credential. Confirmed present in current HEAD source (useAudioPlayer.ts, SettingsForm.tsx) as legitimate TypeScript union type values, not a leaked secret. Added a shape-based allowlist regex matching the '<Name>_<N>kbps' reciter-key pattern so history-mode CI scans stop flagging it.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
🟢 Rampart Security Gate — CLEAN
Totals: 0 critical · 0 high · 0 medium · 0 low Mode: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remaining commit from the gitleaks config repair branch not yet merged via #22 (which only landed the scanner-panic fix). Adds shape-based allowlist regexes for env-var reference patterns (no real secrets).