ci: add gitleaks secret-scan job to ci.yml - #124
Conversation
Adds the required `secret-scan` job per the push-protection standard (petry-projects/.github/standards/push-protection.md#required-ci-job). - Uses `gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7` (v2.3.9) — compliance audit checks for `uses: gitleaks/gitleaks-action@` pattern - SHA-pinned per Action Pinning Policy (ci-standards.md) - `fetch-depth: 0` to scan full git history - `--redact` to prevent leaked values appearing in workflow logs - `--exit-code 1` to fail the build on any finding - Adds `.gitleaksignore` with fingerprints for 7 confirmed false-positive findings in commit 865de69 (documentation paths containing "api-key") Closes #96 Co-authored-by: don-petry <don-petry@users.noreply.github.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ 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 (2)
✨ 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 |
gitleaks-action v2 requires GITLEAKS_LICENSE for organization repos. Add it as a secret reference so the job passes once the secret is configured at org or repo level. Co-authored-by: don-petry <don-petry@users.noreply.github.com>
CI Status: Action RequiredThe What's neededSet the
What this PR does
Once |
There was a problem hiding this comment.
Pull request overview
Adds a required CI secret-scanning job to bring the repository in line with the org push-protection standard and suppresses known historical false positives.
Changes:
- Added a new
secret-scanjob in CI using SHA-pinnedgitleaks/gitleaks-actionand full-history checkout. - Added
.gitleaksignoreentries to suppress 7 reviewed false positives from a historical commit.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Introduces the secret-scan job running gitleaks in CI (full history, fail on findings). |
.gitleaksignore |
Adds fingerprints to ignore known false-positive matches in historical content. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Auto-rebase blocked — the base branch contains Please rebase this branch manually: |
|
@claude Please address all open review comments on this PR from CodeRabbit and Copilot. |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: LOW
Reviewed commit: c9e7d0d07f5fc73ce1d04e99150c8daab9e45fa6
Review mode: triage-approved (single reviewer)
Summary
Adds a secret-scan job to ci.yml using gitleaks/gitleaks-action@ff98106e (v2.3.9, SHA-pinned per org policy). The job runs with scoped permissions (contents: read, security-events: write), full-history checkout, and --redact to prevent secret values from appearing in logs. A .gitleaksignore file suppresses 7 confirmed false-positive generic-api-key findings from historical commit 865de69b — all are documentation file paths containing the substring "api-key", not actual credentials.
Linked issue analysis
Closes #96 (secret_scan_ci_job_present compliance finding). The PR adds exactly the required gitleaks/gitleaks-action@ pattern that the compliance audit checks for. The PR body also documents why two prior attempts (#107, #119) did not close the issue.
Findings
Security
- Action is SHA-pinned ✓
- Permissions are scoped to minimum required ✓
--redactflag prevents secret leakage in logs ✓GITHUB_TOKENandGITLEAKS_LICENSEare referenced viasecretscontext (not hardcoded) ✓.gitleaksignoreentries are all from a single historical commit on documentation files — confirmed false positives ✓
Minor note (non-blocking)
- Copilot flagged that the inline comment
ci-standards.md#action-pinning-policyreferences a path that doesn't exist in this repo. Consider using the full URL to the org-level doc:https://github.com/petry-projects/.github/blob/main/ci-standards.md#action-pinning-policy. This is a documentation-comment quality issue, not a functional concern.
CI status
All checks passed:
- Secret scan (gitleaks): ✓ SUCCESS
- CodeQL (actions): ✓ SUCCESS
- SonarCloud: ✓ SUCCESS (0 new issues, Quality Gate passed)
- AgentShield: ✓ SUCCESS
- CodeRabbit: ✓ SUCCESS
- All other checks: ✓ SUCCESS or SKIPPED (expected)
Reviewed automatically by the don-petry PR-review agent (single-reviewer). Reply with @don-petry if you need a human.
|
|
@dev-lead - please fix this PR |
|
* ci: add gitleaks secret-scan job to ci.yml Adds the required `secret-scan` job per the push-protection standard (petry-projects/.github/standards/push-protection.md#required-ci-job). - Uses `gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7` (v2.3.9) — compliance audit checks for `uses: gitleaks/gitleaks-action@` pattern - SHA-pinned per Action Pinning Policy (ci-standards.md) - `fetch-depth: 0` to scan full git history - `--redact` to prevent leaked values appearing in workflow logs - `--exit-code 1` to fail the build on any finding - Adds `.gitleaksignore` with fingerprints for 7 confirmed false-positive findings in commit 865de69 (documentation paths containing "api-key") Closes #96 Co-authored-by: don-petry <don-petry@users.noreply.github.com> * ci: add GITLEAKS_LICENSE env var to secret-scan job gitleaks-action v2 requires GITLEAKS_LICENSE for organization repos. Add it as a secret reference so the job passes once the secret is configured at org or repo level. Co-authored-by: don-petry <don-petry@users.noreply.github.com> * test: verify gitleaks with license secret --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: don-petry <don-petry@users.noreply.github.com> Co-authored-by: Claude <claude@anthropic.com>



Summary
secret-scanjob toci.ymlper the push-protection standardgitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7(v2.3.9), SHA-pinned per Action Pinning Policyfetch-depth: 0to scan full git history;--redactto keep secrets out of logs;--exit-code 1to fail the build on findings.gitleaksignorewith fingerprints for 7 confirmed false-positive findings in historical commit865de69b(documentation paths containing "api-key" substring, not real credentials)Why previous PRs did not close the issue
uses: gitleaks/gitleaks-action@gitleaks-actionbut wasn't merged before the next compliance audit ranTest plan
secret-scanjob passes (gitleaks finds no real secrets).gitleaksignoresuppresses the 7 known false positives from commit865de69bsecret_scan_ci_job_presentpasses on next runCloses #96
Generated with Claude Code