ci: add secret-scan (gitleaks) job for push-protection compliance#123
ci: add secret-scan (gitleaks) job for push-protection compliance#123
Conversation
Adds the required `secret-scan` job to ci.yml per Layer 3 of the push-protection standard (standards/push-protection.md#layer-3). Key properties: - Full-history checkout (fetch-depth: 0) — scans all commits - --redact so leaked values never appear in workflow logs - --exit-code 1 so the build fails on any finding - Both actions pinned to commit SHAs per Action Pinning Policy Addresses the secret_scan_ci_job_present (error severity) compliance check. The security_and_analysis_unavailable warning requires a repo admin to ensure the audit token has admin scope — see PR description. Closes #95 Co-authored-by: don-petry <don-petry@users.noreply.github.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 14 minutes and 54 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
CODEOWNERS review requested. @don-petry — this PR adds the gitleaks job to satisfy the compliance check. Please review and merge when CI is green. |
|
There was a problem hiding this comment.
Pull request overview
Adds a CI-layer secret scanning job to support push-protection compliance by running gitleaks in the main CI workflow.
Changes:
- Adds a new
secret-scanjob to.github/workflows/ci.yml. - Uses full-history checkout (
fetch-depth: 0) and runsgitleaks detectwith--redactand--exit-code 1.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Pin to SHA per Action Pinning Policy (ci-standards.md#action-pinning-policy). | ||
| # Look up current SHA: gh api repos/actions/checkout/git/refs/tags/v4 --jq '.object.sha' | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Run gitleaks | ||
| # Pinned to SHA per Action Pinning Policy (ci-standards.md#action-pinning-policy). |
There was a problem hiding this comment.
The comment references ci-standards.md#action-pinning-policy, but there’s no ci-standards.md (or section anchor) in this repo, so this guidance is currently a dead link. Please update the reference to the actual document/location where action pinning is defined (or remove the reference if it’s not documented here).
| # Pin to SHA per Action Pinning Policy (ci-standards.md#action-pinning-policy). | |
| # Look up current SHA: gh api repos/actions/checkout/git/refs/tags/v4 --jq '.object.sha' | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Run gitleaks | |
| # Pinned to SHA per Action Pinning Policy (ci-standards.md#action-pinning-policy). | |
| # Pin to a commit SHA rather than a mutable tag. | |
| # Look up current SHA: gh api repos/actions/checkout/git/refs/tags/v4 --jq '.object.sha' | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Run gitleaks | |
| # Pin to a commit SHA rather than a mutable tag. |
| # Pin to SHA per Action Pinning Policy (ci-standards.md#action-pinning-policy). | ||
| # Look up current SHA: gh api repos/actions/checkout/git/refs/tags/v4 --jq '.object.sha' | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Run gitleaks | ||
| # Pinned to SHA per Action Pinning Policy (ci-standards.md#action-pinning-policy). |
There was a problem hiding this comment.
This comment also points to ci-standards.md#action-pinning-policy, which doesn’t exist in this repository. Update it to the correct in-repo documentation location so future maintainers can follow the pin-refresh instructions.
| # Pin to SHA per Action Pinning Policy (ci-standards.md#action-pinning-policy). | |
| # Look up current SHA: gh api repos/actions/checkout/git/refs/tags/v4 --jq '.object.sha' | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Run gitleaks | |
| # Pinned to SHA per Action Pinning Policy (ci-standards.md#action-pinning-policy). | |
| # Pin to SHA per Action Pinning Policy (coding-standards.md#action-pinning-policy). | |
| # Look up current SHA: gh api repos/actions/checkout/git/refs/tags/v4 --jq '.object.sha' | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Run gitleaks | |
| # Pinned to SHA per Action Pinning Policy (coding-standards.md#action-pinning-policy). |
|
Auto-rebase blocked — the base branch contains Please rebase this branch manually: |



Summary
secret-scanjob to.github/workflows/ci.ymlper Layer 3 of the push-protection standardfetch-depth: 0) — scans all commits, not just the PR diff--redactso leaked values are never written to workflow logs--exit-code 1so the build fails on any findingThis satisfies the
secret_scan_ci_job_present(error severity) compliance check.What still requires human admin action
The
security_and_analysis_unavailablewarning persists because the compliance audit token lacks admin scope to readsecurity_and_analysissettings. A repo/org admin needs to:admin:repo_hook/ admin scope on this repoTest plan
secret-scanjob on this PRgitleaksscans full history, finds no secretssecret_scan_ci_job_presentresolvedCloses #95
Generated with Claude Code