fix(ci): remediate .github compliance findings — 2026-04-17 audit#147
fix(ci): remediate .github compliance findings — 2026-04-17 audit#147
Conversation
Addresses all 7 compliance findings for this repository from the 2026-04-17 audit: **SHA pinning (3 findings)** - claude.yml: pin reusable workflow ref from @main → SHA (v1) - agent-shield.yml: pin reusable workflow ref @v1 → SHA - dependency-audit.yml: replace full inline workflow with thin caller stub per template; removes unpinned dtolnay/rust-toolchain@stable **Secret scan CI job (1 finding)** - ci.yml: add secret-scan job using gitleaks/gitleaks-action@SHA **API-applied (3 findings — applied directly via gh CLI)** - Enabled CodeQL default setup (codeql-default-setup-not-configured) - Set allow_auto_merge=true (allow_auto_merge) - Set delete_branch_on_merge=true (delete_branch_on_merge) Note: security_and_analysis_unavailable warnings require GitHub Advanced Security (org plan upgrade) — not actionable at the workflow level. Closes #146 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 49 minutes and 7 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: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ 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/gitleaks-action v2 now requires a paid GITLEAKS_LICENSE for organisation repositories (petry-projects is an org). Replace the action with a direct install of the gitleaks v8.24.0 CLI binary, verified against its published SHA256 checksum. This satisfies the push-protection standard's intent while working on the free plan. Note: the compliance audit's secret_scan_ci_job_present check looks for 'gitleaks/gitleaks-action' in ci.yml. This change satisfies the security requirement (gitleaks full-history scan) but the check pattern may need updating in the audit script to also accept CLI-based scans. Co-authored-by: don-petry <don-petry@users.noreply.github.com>
|
There was a problem hiding this comment.
Pull request overview
Remediates the 2026-04-17 compliance audit findings for the .github repo by tightening GitHub Actions SHA pinning, centralizing dependency-audit logic into the org reusable workflow, and adding a CI secret-scanning job.
Changes:
- Converted
dependency-audit.ymlfrom an inline workflow into a thin caller stub that delegates to the org reusable workflow. - SHA-pinned Tier-1 stub workflow
uses:references (claude.yml,agent-shield.yml,dependency-audit.yml). - Added
secret-scanCI job usinggitleaks/gitleaks-actionwith full-history checkout.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| .github/workflows/dependency-audit.yml | Replaced inline audit implementation with reusable-workflow caller and added “thin stub” header block. |
| .github/workflows/claude.yml | Pinned reusable workflow reference from branch/tag to commit SHA. |
| .github/workflows/ci.yml | Added secret-scan job running gitleaks with fetch-depth: 0. |
| .github/workflows/agent-shield.yml | Pinned reusable workflow reference from tag to commit SHA. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| dependency-audit: | ||
| uses: petry-projects/.github/.github/workflows/dependency-audit-reusable.yml@ae9709f4466dec60a5733c9e7487f69dcd004e05 # v1 |
There was a problem hiding this comment.
This stub claims standards/workflows/dependency-audit.yml as the “SOURCE OF TRUTH”, but that template currently uses @v1 (tag) while this file pins the reusable to a commit SHA. Please reconcile this by updating the standards template (and any related docs) to match the SHA-pinning requirement, otherwise future “copy verbatim” adoptions will drift and/or fail the compliance audit.
| jobs: | ||
| claude-code: | ||
| uses: petry-projects/.github/.github/workflows/claude-code-reusable.yml@main | ||
| uses: petry-projects/.github/.github/workflows/claude-code-reusable.yml@ae9709f4466dec60a5733c9e7487f69dcd004e05 # v1 |
There was a problem hiding this comment.
standards/ci-standards.md describes Tier-1 stub workflows as delegating to reusables via ...@v1, and standards/workflows/claude.yml also uses @v1. This stub is now SHA-pinned instead, which creates a standards/templates mismatch. Please update the standards template/docs (or the audit exemption rules) so adopters can still “copy verbatim” without creating drift.
| uses: petry-projects/.github/.github/workflows/claude-code-reusable.yml@ae9709f4466dec60a5733c9e7487f69dcd004e05 # v1 | |
| uses: petry-projects/.github/.github/workflows/claude-code-reusable.yml@v1 |
| jobs: | ||
| agent-shield: | ||
| uses: petry-projects/.github/.github/workflows/agent-shield-reusable.yml@v1 | ||
| uses: petry-projects/.github/.github/workflows/agent-shield-reusable.yml@ae9709f4466dec60a5733c9e7487f69dcd004e05 # v1 |
There was a problem hiding this comment.
standards/ci-standards.md and standards/workflows/agent-shield.yml currently define the Tier-1 stub as calling the reusable via ...@v1. This file now pins to a SHA, which means the “SOURCE OF TRUTH” template and documentation are out of sync with what compliance requires. Please reconcile by updating the standards template/docs (or the audit script) so downstream repos can adopt verbatim without failing audits.
| steps: | ||
| - name: Checkout (full history) | ||
| # 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' |
There was a problem hiding this comment.
The checkout SHA comment and the “Look up current SHA” command disagree: it says to query refs/tags/v4, but the pinned version comment is # v6.0.2. Please update the lookup command (and/or version comment) so maintainers don’t fetch the wrong ref when refreshing the pin.
| # Look up current SHA: gh api repos/actions/checkout/git/refs/tags/v4 --jq '.object.sha' | |
| # Look up current SHA: gh api repos/actions/checkout/git/refs/tags/v6.0.2 --jq '.object.sha' |
| # Standard: https://github.com/petry-projects/.github/blob/main/standards/dependabot-policy.md#vulnerability-audit-ci-check | ||
| # ───────────────────────────────────────────────────────────────────────────── | ||
| # SOURCE OF TRUTH: petry-projects/.github/standards/workflows/dependency-audit.yml | ||
| # Standard: petry-projects/.github/standards/ci-standards.md#5-dependency-audit-dependency-auditym |
There was a problem hiding this comment.
The header’s “Standard:” link looks incorrect (#5-...dependency-auditym doesn’t match the actual “### 6. Dependency Audit (dependency-audit.yml)” section in standards/ci-standards.md). Please update this anchor so the reference is accurate and doesn’t 404/mislead future adopters.
| # Standard: petry-projects/.github/standards/ci-standards.md#5-dependency-audit-dependency-auditym | |
| # Standard: petry-projects/.github/standards/ci-standards.md#6-dependency-audit-dependency-audityml |
Automated review — APPROVEDRisk: LOW SummaryAll code changes are verified security improvements. SHA pins for reusable workflows resolve to the correct v1 annotated tag commit (ae9709f). The gitleaks binary checksum (cb49b7de...) matches the official v8.24.0 release. The two CI failures are non-security: claude-code/claude is self-referential (the review bot workflow reviewing its own modification), and the SonarCloud Security Hotspot is almost certainly the well-mitigated curl+tar+checksum-verify pattern for binary installation. FindingsMinor
Info
CI statusTwo CI failures noted, both non-blocking from a security perspective:
Reviewed by the don-petry PR-review cascade (triage: haiku 4.5 → deep: sonnet 4.6 + duck: gpt-5.4 → audit: opus 4.6). Reply with |
|
Auto-rebase failed — merge conflict — this branch has conflicts with Please resolve the conflicts and push: |


Summary
Addresses all 7 compliance findings for the
.githubrepository from the 2026-04-17 audit (issue #146).SHA Pinning (3 error findings fixed)
claude.yml: pinned reusable workflow reference from@main→ SHA (ae9709f...= v1)agent-shield.yml: pinned reusable workflow reference from@v1tag → SHAdependency-audit.yml: replaced full inline workflow with canonical thin caller stub perstandards/workflows/dependency-audit.ymltemplate — this eliminates the unpinneddtolnay/rust-toolchain@stablereference (logic now lives in the centralized reusable)Secret Scan CI Job (1 error finding fixed)
ci.yml: addedsecret-scanjob usinggitleaks/gitleaks-action@ff98106...(v2.3.9) with full-history checkout perstandards/push-protection.mdtemplateAPI-Applied Settings (3 findings fixed directly)
codeql-default-setup-not-configured) — triggered run #24189208962allow_auto_merge=trueapplied (allow_auto_mergewarning)delete_branch_on_merge=trueapplied (delete_branch_on_mergewarning)Not Actionable
security_and_analysis_unavailable(2 warnings) — GitHub Advanced Security features require an org plan upgrade; not addressable at the workflow levelTest plan
allow_auto_mergeanddelete_branch_on_mergeenabled.githubrepoCloses #146
Generated with Claude Code