Skip to content

fix(security): suppress false-positive gitleaks history findings - #24

Merged
acamarata merged 2 commits into
mainfrom
fix/T-P0-SECURITY-01-gitleaks-config-repair
Jul 4, 2026
Merged

acamarata merged 2 commits into
mainfrom
fix/T-P0-SECURITY-01-gitleaks-config-repair

Conversation

@acamarata

Copy link
Copy Markdown
Contributor

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).

acamarata added 2 commits July 1, 2026 18:31
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.
@vercel

vercel Bot commented Jul 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
islamwiki Ready Ready Preview, Comment Jul 4, 2026 2:02pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ummat-islamwiki Ignored Ignored Jul 4, 2026 2:02pm

Request Review

@acamarata
acamarata merged commit c8bfd22 into main Jul 4, 2026
17 of 23 checks passed
@acamarata
acamarata deleted the fix/T-P0-SECURITY-01-gitleaks-config-repair branch July 4, 2026 14:02
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

🟢 Rampart Security Gate — CLEAN

Tool CRITICAL HIGH MEDIUM LOW
(no findings)

Totals: 0 critical · 0 high · 0 medium · 0 low

Mode: RAMPART_ENFORCE=warn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant