Commit 8c7d8ed
[SVLS-8660] ci: add gitleaks secrets scanning (#1134)
## Summary
- Adds \`gitleaks\` secrets scanning workflow
(\`.github/workflows/secrets-scan.yml\`) triggered on every PR and push
to \`main\`
- Pins \`gitleaks-action\` to commit SHA (v2.3.9) consistent with repo
convention
- Adds \`.gitleaks.toml\` with documented allowlist structure for paths,
regexes, and historical commits — includes maintenance guidance for
future contributors
- Addressed Copilot review feedback: add \`permissions: contents:
read\`, enable \`--redact\` to prevent secrets appearing in CI logs, fix
allowlist key reference in comments
## Why
Secrets accidentally committed to a public repo (API keys, tokens,
credentials) are the highest-severity risk for a public repository.
Neither \`cargo audit\` nor Copilot catch this category. \`gitleaks\`
uses pattern matching to block merges before a credential lands in
\`main\`.
## Test plan
- [ ] Verify \`Secrets Scan\` job passes on this PR (no secrets in
changed files)
- [ ] After merging: add \`Secrets Scan\` as a required status check
under \`Repository Settings → Branches → main → Branch protection
rules\`
- [ ] Optional smoke test: add a fake credential (e.g.,
\`AKIAIOSFODNN7EXAMPLE\`) to a comment on a test branch, confirm the job
blocks it, then remove it
## Related
- JIRA: https://datadoghq.atlassian.net/browse/SVLS-8660
- Part of Phase 1 CI security scanning — see
\`.github/docs/ci-security-scanning-strategy.md\`
- Companion PR: #1133 (Copilot instructions for PII/security review)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 2ee4912 commit 8c7d8ed
2 files changed
+68
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
0 commit comments