ci: add secret-scan (gitleaks) job for push-protection compliance - #115
ci: add secret-scan (gitleaks) job for push-protection compliance#115don-petry wants to merge 27 commits into
Conversation
Adds the required secret-scan job to ci.yml per Layer 3 of the push-protection standard. Satisfies the secret_scan_ci_job_present compliance check (error severity). Key properties: - Full history checkout (fetch-depth: 0) — scans all commits, not just diff - --redact — leaked values are never written to workflow logs - --exit-code 1 — build fails on any finding - Both actions pinned to commit SHAs per Action Pinning Policy Also applied security_and_analysis settings via API (secret scanning, push protection, and Dependabot security updates now enabled at repo level), addressing the security_and_analysis_unavailable warning. Closes #95 Supersedes #106 Co-authored-by: don-petry <don-petry@users.noreply.github.com>
|
Warning Review limit reached
More reviews will be available in 58 minutes and 29 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy 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 |
|
@don-petry — this PR addresses issue #95 by:
This supersedes PR #106 (same fix, on a stale branch). Remaining items requiring human admin action:
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a dedicated CI job to run gitleaks secret scanning to satisfy push-protection compliance requirements and fail CI on detected leaks.
Changes:
- Introduces a new
secret-scanjob in CI that checks out full git history and runsgitleaks detect. - Pins the
actions/checkoutandgitleaks/gitleaks-actionactions to commit SHAs. - Configures gitleaks to redact findings and exit non-zero on detections.
💡 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: |
The gitleaks/gitleaks-action requires a paid license for GitHub org repos. Switch to direct CLI install via wget + sha256 verification instead.
|
CI fix: replaced The
Also removed the now-unnecessary |
|
|
@claude Please address all open review comments on this PR from CodeRabbit and Copilot. |
|
Claude finished @don-petry's task in 4m 41s —— View job Review Comments Analysis
Copilot Comment 1 —
|
| Job | SHA | Comment |
|---|---|---|
detect, backend, frontend |
34e114876b0b11c390a56381ad16ebd13914f8d5 |
# v4 |
secret-scan (current) |
de0fac2e4500dabe0009e67214ff5f5447ce83dd |
# v6.0.2 ← incorrect; v6 doesn't exist |
The fix is included in the snippet above — use 34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 consistently.
Copilot Comment 4 — Repo-level security settings not auditable in PR diff
Status: Documentation only — no code change needed
This is a PR description concern. The settings were applied via the GitHub API outside the diff. The explanation already lives in the PR description and in @don-petry's comment. Nothing to change in code.
SonarCloud — 1 Security Hotspot / C Security Rating
Status: Needs SonarCloud UI action — cannot suppress via code
The GITLEAKS_CHECKSUM env value (551f6fc8…) is a SHA256 binary integrity checksum, but SonarCloud's hardcoded-credentials detector is flagging the long hex string as a potential secret. This is a false positive.
Security hotspots in SonarCloud cannot be suppressed via sonar-project.properties properties — they must be resolved through the UI:
- Go to the SonarCloud PR analysis
- Open the flagged hotspot
- Click Review → Safe with justification: "This is a SHA256 integrity checksum for a public binary download, not a credential or secret."
Once marked Safe, the quality gate will pass without any code change.
CodeRabbit
Status: No actionable comments — rate-limited during review
CodeRabbit hit its hourly commit review limit and did not produce specific code comments on this PR. No items to address.
Summary
| Comment | Status |
|---|---|
security-events: write unused |
✅ Already fixed (commit 0b8cd62) |
fetch-depth: 0 compliance comment |
|
Incorrect checkout SHA # v6.0.2 |
|
| Repo settings not in PR diff | ℹ️ Documentation only |
| SonarCloud security hotspot | |
| CodeRabbit | ℹ️ Rate-limited, no items |
Two workflow changes and one SonarCloud UI action are needed manually — I'm unable to modify .github/workflows/ files directly. The two changes are combined into a single snippet in Comment 2 above.
|
@dev-lead - please fix this PR |
Dev-Lead Fix CI — failedPR: #115 | SHA: |
|
|
Auto-rebase failed — merge conflict — this branch has conflicts with Please resolve the conflicts and push: |
|
Auto-rebase failed — merge conflict — this branch has conflicts with dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |
|
Auto-rebase failed — merge conflict — this branch has conflicts with dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |
|
Auto-rebase failed — merge conflict — this branch has conflicts with dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |
|
Auto-rebase failed — merge conflict — this branch has conflicts with dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |
|
Auto-rebase failed — merge conflict — this branch has conflicts with dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |
Review — fix requested (cycle 1/3)The automated review identified the following issues. Please address each one: Findings to fixAutomated review — NEEDS HUMAN REVIEWRisk: MEDIUM SummaryForensic verification dismisses the deep review's CRITICAL claim of a secret in git history: commit fd24ebb is a verified empty commit (0 files/0 additions per /compare API) — likely a CI-trigger no-op, not a leaked credential. Likewise, actions/checkout v6.0.2 (SHA de0fac2) and golangci-lint-action v6.5.2 (SHA 55c2c14) are confirmed as official release commits, and the gitleaks 8.30.1 SHA256 matches the GitHub Release asset digest. However, audit uncovered a defect both prior tiers missed: the merged ci.yml at the PR head contains TWO jobs with the id Findings
Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: sonnet 4.6 + duck: o4-mini → audit: opus 4.7). Reply if you need a human review. Additional tasks
The review cascade will automatically re-review after new commits are pushed. |
|
Closing due to merge conflict that cannot be auto-rebased. Re-implementing from fresh main via dev-lead. |
Pull request was closed




Summary
secret-scanjob to.github/workflows/ci.ymlper Layer 3 of the push-protection standard. This satisfies thesecret_scan_ci_job_presentcompliance check (error severity).security_and_analysissettings via the GitHub API: secret scanning, push protection, and Dependabot security updates are now enabled at the repo level. This addresses the root cause of thesecurity_and_analysis_unavailablecompliance warning.Job properties:
fetch-depth: 0) — scans all commits, not just the PR diff--redact— leaked values are never written to workflow logs--exit-code 1— build fails on any findingSupersedes: #106 (same secret-scan job, on a stale branch — that PR can be closed)
Remaining human-action items (cannot be done in code)
The following settings could not be enabled via API (likely plan limitations):
secret_scanning_ai_detection— not returned by the API (may require a paid plan)secret_scanning_non_provider_patterns— returned asdisabledafter our PATCHAn org admin should verify in GitHub Settings → Code security whether these features are available on the current plan and enable them if possible.
Test plan
security_and_analysis_unavailableCloses #95
Generated with Claude Code