Repository navigation
chore: move the gitleaks allowlist to the repository root - #3747
Conversation
The managed secret-scan workflow runs betterleaks from the repository root, and betterleaks reads .gitleaks.toml only from there. The file in .github/workflows/utils had no reader. Refs: PFM-8051 Assisted-by: Claude Code Signed-off-by: Jose I. Paris <jiparis@chainloop.dev> Chainloop-Trace-Sessions: 6ef5e9f5-dc0c-45cf-8b3f-70d112a87b7e
PR validation — ✅ 3 passing
AI Session Checks — 🟢 90% ·
|
| Avg score | Sessions | Failing policies | Attribution | Files | Lines | Total Duration |
|---|---|---|---|---|---|---|
| 🟢 90% | 1 | 100% AI / 0% Human | 1 | +2 / -0 | 7h0m2s |
🟢 90% — 100% AI — ⚠️ 2 policies failing
-
Oct 28, 2026 09:50 UTC · 7h0m2s · $83.21 · 1.5k in / 637.2k out · claude-code 2.1.312 (claude-opus-5-5)
Change Summary
-
- Moves the secret-scan allowlist from
.github/workflows/utils/.gitleaks.tomlto root.gitleaks.toml. - Adds a short comment explaining that managed
betterleaksreads the root config.
- Moves the secret-scan allowlist from
AI Session Overall Score
-
🟢 90% — Focused fix, strong root-cause work, and real local validation for the landed change.
AI Session Analysis Breakdown
-
🟢 96% · scope-discipline
-
🟢 The landed change is one file move plus two explanatory lines. · High Impact
🟢 94% · alignment
-
No notes.
🟢 93% · solution-quality
-
🟢 The fix moves the allowlist to the path the managed scanner actually reads. · High Impact
🟢 88% · context-and-planning
-
No notes.
🟢 87% · user-trust-signal
-
🟡 One earlier "report before fixing" redirect interrupted the flow, but it did not recur. · Low Severity
🟢 84% · verification
-
🟢 Post-change runs showed zero policy violations and no git-history leaks. · High Impact
-
File Attribution
████████████████████100% AI / 0% HumanStatus Attribution File Lines renamed ai .gitleaks.toml+2 / -0
Policies (4, 2 failing)
Status Policy Material Messages ✅ Passed ai-config-ai-agents-allowedai-coding-session-6ef5e9- ⚠️ Failedai-config-no-dangerous-commandsai-coding-session-6ef5e9- Forbidden bash pattern /curl[^|\n]\|\s(?:bash|sh)\b/ matched command: cd /Users/jiparis/projects/chainloop/.github/workflows && python3 -I - <<'EOF' CL_OLD = " run: |\n curl -sfL https://dl.chainloop.dev/cli/instal...
- Forbidden bash pattern /wget[^|\n]\|\s(?:bash|sh)\b/ matched command: cd /Users/jiparis/projects/chainloop/.github/workflows && python3 -I - <<'EOF' CL_OLD = " run: |\n curl -sfL https://dl.chainloop.dev/cli/instal...
⚠️ Failedai-config-no-secretsai-coding-session-6ef5e9- Secret (generic-api-key) detected in session content [turn=1469, source=tool_result, line=10]: < checksum/secret-config: [CHAINLOOP_TRACE_REDACTED:generic-api-key]
- Secret (generic-api-key) detected in session content [turn=1469, source=tool_result, line=12]: > checksum/secret-config: [CHAINLOOP_TRACE_REDACTED:generic-api-key]
- Secret (generic-api-key) detected in session content [turn=2691, source=tool_result, line=13]: |
⚠️ Failed |ai-config-no-secrets| [ai-coding-session-6ef5e9](https://app.chainloop.dev/u/chainloop/projects/chainloop-platf... - Secret (generic-password) detected in session content [turn=1204, source=tool_result, line=6]: |
⚠️ Failed |ai-config-no-secrets| [ai-coding-session-6ef5e9](https://app.chainloop.dev/u/chainloop/projects/chainloop-platf... - Secret (generic-password) detected in session content [turn=1207, source=assistant-text, line=3]: The failing check is "Chainloop AI Policies":
ai-config-no-secretsflags this session's trace (ai-coding-session-6ef5e9). The bot comment lists the same messages. Most of them are the[CHAINLOOP_...</li><li>Secret (generic-password) detected in session content [turn=1207, source=assistant-text, line=4]: - **Copies of the triage text:** my own report quotes the identifier[CHAINLOOP_TRACE_REDACTED:generic-password], and the CLI redacts it as a password.</li><li>Secret (generic-password) detected in session content [turn=1260, source=tool_result, line=13]: | ⚠️ Failed | [ai-config-no-secrets](https://docs.chainloop.dev/reference/policies#ai-config-no-secrets) | [ai-coding-session-6ef5e9](https://app.chainloop.dev/u/chainloop/projects/chainloop-platf...</li><li>Secret (generic-password) detected in session content [turn=1263, source=assistant-text, line=4]: - **Chainloop AI Policies:** the sameai-config-no-secretsfailure as before, from this session's own trace. The CLI redacts the Go identifier[CHAINLOOP_TRACE_REDACTED:generic-password]as a pass...</li><li>Secret (generic-password) detected in session content [turn=2691, source=tool_result, line=13]: | ⚠️ Failed | [ai-config-no-secrets](https://docs.chainloop.dev/reference/policies#ai-config-no-secrets) | [ai-coding-session-6ef5e9](https://app.chainloop.dev/u/chainloop/projects/chainloop-platf...</li><li>Secret (generic-password) detected in session content [turn=2710, source=assistant-text, line=18]: -ai-config-no-secrets: redaction placeholders, such as the[CHAINLOOP_TRACE_REDACTED:generic-password]identifier and the CAS download URL token, and the session reading its own violations. These...</li><li>Secret (generic-password) detected in session content [turn=395, source=user-message, line=12]: | G1: turn 44, tool_result (Read of a Go CLI file) | 1-6 (6) | A Go identifier, not a secret. The rule matchedRegistryPassword: [CHAINLOOP_TRACE_REDACTED:generic-password],(line 112) and took t...</li><li>Secret (generic-password) detected in session content [turn=403, source=assistant-text, line=10]: | The Go variable[CHAINLOOP_TRACE_REDACTED:generic-password]was taken as a password and replaced everywhere | 6 | False positive (the CLI redacts too much) | Chainloop repo: allowlist bare identif...</li><li>Secret (generic-password) detected in session content [turn=403, source=assistant-text, line=2]: - Thegeneric-passwordallowlist ininternal/redaction/betterleaks.toml:42-56covers dotted property access only, such ase.password. It does not cover bare identifiers such as[CHAINLOOP_TRACE... - Secret (generic-password) detected in session content [turn=403, source=assistant-text, line=3]: -
redaction.go:580usesstrings.ReplaceAllwithout word boundaries, so it also changes longer names such as[CHAINLOOP_TRACE_REDACTED:generic-password]EnvVarName. - Secret (generic-password) detected in session content [turn=413, source=assistant-tool_use:Write, line=1]: {"content":"## Triage of policy violations in v1.128.1+next\n\nThis comment adds the failures of v1.128.1+next (
58967a46-bf29-47c8-b15d-77950188b174). It records the findings only. It changes no cod... - Secret (generic-password) detected in session content [turn=423, source=assistant-text, line=9]: |
ai-config-no-secrets(14) | 6 come from the CLI redacting the Go variable[CHAINLOOP_TRACE_REDACTED:generic-password]. 7 come from a Rego bug: the session read its own violation messages back. |... - Secret (generic-password) detected in session content [turn=442, source=tool_result, line=179]: 179 | Turn 44, Read of a Go CLI file | 6 | The Go identifier
[CHAINLOOP_TRACE_REDACTED:generic-password]inRegistryPassword: [CHAINLOOP_TRACE_REDACTED:generic-password],. The CLI then replaced th... - Secret (generic-password) detected in session content [turn=442, source=tool_result, line=185]: 185 * Chainloop repository: in
internal/redaction/betterleaks.toml:42-56, add ageneric-passwordallowlist for bare code identifiers (for example[CHAINLOOP_TRACE_REDACTED:generic-password]). To... - Secret (jwt) detected in session content [turn=1204, source=tool_result, line=6]: |
⚠️ Failed |ai-config-no-secrets| [ai-coding-session-6ef5e9](https://app.chainloop.dev/u/chainloop/projects/chainloop-platf... - Secret (jwt) detected in session content [turn=1260, source=tool_result, line=13]: |
⚠️ Failed |ai-config-no-secrets| [ai-coding-session-6ef5e9](https://app.chainloop.dev/u/chainloop/projects/chainloop-platf... - … and 7 more — view all ↗
✅ Passed ai-config-mcp-servers-allowedai-coding-session-6ef5e9- -
Security Checks — ✅ 5 passing
✅ secret-scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | secrets-detection |
- |
✅ sast-scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | owasp-top10-2025 |
- |
| ✅ Passed | sast |
- |
| ✅ Passed | cwe-top25 |
- |
| ✅ Passed | cwe-top26-40-cusp |
- |
Scans not applied (3)
| Scan | Reason |
|---|---|
vulnerability-scan |
no manifest/lockfile changed |
github-actions-scan |
no workflow files changed |
iac-scan |
no IaC files changed |
Security context
✅ Nothing this change touches has a recorded security-fix history.
View in Chainloop ↗ · How this works ↗
Powered by Chainloop and Chainloop Trace
The managed
secret-scanworkflow reports 43secrets-detectionviolations. All of them are in test files, test data, development keys and the development values of the Helm chart.The repository already has an allowlist for these paths, in
.github/workflows/utils/.gitleaks.toml. No workflow reads this file now. The managed scan runs betterleaks from the repository root, and betterleaks reads.gitleaks.tomlonly from the root.This change moves the allowlist to
.gitleaks.tomlat the root. The allowlist does not change. The PR validation scan also reads the file.Refs PFM-8051.
AI disclosure: Claude Code helped to write this change.