Skip to content

chore: move the gitleaks allowlist to the repository root - #3747

Merged
jiparis merged 1 commit into
chainloop-dev:mainfrom
jiparis:jiparis/pfm-8051-gitleaks-root
Oct 28, 2026
Merged

jiparis merged 1 commit into
chainloop-dev:mainfrom
jiparis:jiparis/pfm-8051-gitleaks-root

Conversation

@jiparis

@jiparis jiparis commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

The managed secret-scan workflow reports 43 secrets-detection violations. 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.toml only from the root.

This change moves the allowlist to .gitleaks.toml at 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.

View guided diff

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
@chainloop-platform

chainloop-platform Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

PR validation — ✅ 3 passing

Status Policy Material Messages
✅ Passed pr-min-approvals pr-info -
✅ Passed pr-description-required pr-info -
✅ Passed pr-user-story-linked pr-info -

View attestation ↗

AI Session Checks — 🟢 90% · ⚠️ 2 failing

Avg score Sessions Failing policies Attribution Files Lines Total Duration
🟢 90% 1 ⚠️ 2 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)

View session details ↗

Change Summary

  • Moves the secret-scan allowlist from .github/workflows/utils/.gitleaks.toml to root .gitleaks.toml.
  • Adds a short comment explaining that managed betterleaks reads the root config.

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% Human

Status Attribution File Lines
renamed ai .gitleaks.toml +2 / -0

Policies (4, 2 failing)

Status Policy Material Messages
✅ Passed ai-config-ai-agents-allowed ai-coding-session-6ef5e9 -
⚠️ Failed ai-config-no-dangerous-commands ai-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...
⚠️ Failed ai-config-no-secrets ai-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-secrets flags 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 same ai-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:580 uses strings.ReplaceAll without 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] in RegistryPassword: [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 a generic-password allowlist 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-allowed ai-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

View attestation ↗

Security context

✅ Nothing this change touches has a recorded security-fix history.

View in Chainloop ↗ · How this works ↗


Powered by Chainloop and Chainloop Trace

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

View guided diff | Re-trigger cubic

@jiparis
jiparis requested a review from a team October 28, 2026 17:11
@jiparis
jiparis merged commit 3e125db into chainloop-dev:main Oct 28, 2026
17 of 18 checks passed
@jiparis
jiparis deleted the jiparis/pfm-8051-gitleaks-root branch October 28, 2026 17:27
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.

2 participants