Files
claudeandClaude Opus 5.5 ef693ffd97 G9: reusable gitleaks secret scan, config and docs
Add a reusable workflow that downloads a pinned, checksum-verified gitleaks
and scans the pushed commits, the PR's commits, or the current tree. Logs
show only a count, never the rule, file, line or value, because the logs
are public. This repo's caller is manual-only until S8 passes.

.gitleaks.toml extends the default rules and allowlists Helm checksum/*
annotations. docs/ci-cd/secret-scanning.md covers usage, what to do when it
fails, and the policy for history scans (done privately, not in CI).

Tested locally by running the step verbatim in a container against
throwaway repos: a planted fake token fails on push, new-branch push and PR;
clean ranges, checksum annotations and this repo's tree pass; a bad
checksum fails; the value never appears in the output. actionlint and
yamllint pass.

Refs DevOps/software-infrastructure#57

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 18:44:40 -05:00

12 lines
427 B
TOML

# gitleaks configuration. DevOps/software-infrastructure#57 (G9).
# Default rules, plus allowlists for known false positives.
# Policy and how to add an entry: docs/ci-cd/secret-scanning.md.
[extend]
useDefault = true
[[allowlists]]
description = "Helm checksum/* annotations are SHA-256 hashes of rendered manifests, not secrets"
regexTarget = "line"
regexes = ['''checksum/[A-Za-z0-9._-]+:\s*["']?[0-9a-f]{64}["']?\s*$''']