ci: sha-pin actions, least-privilege tokens, add renovate (openssf scorecard) - #211
Conversation
…orecard) Cheap-batch supply-chain hardening lifting three OpenSSF Scorecard checks that were at 0: - Pinned-Dependencies: every `uses:` ref across all 9 workflows is pinned to a full 40-char commit SHA with a trailing `# vX` comment. dtolnay/ rust-toolchain is pinned to a SHA and grows an explicit `toolchain: stable` input (a SHA pin disables its ref-name channel detection); the cargo-llvm-cov install grows an explicit `tool:` input for the same reason. - Token-Permissions: ci.yml and commitlint.yml gain a top-level least-privilege `permissions: contents: read`. The coverage job keeps its job-level `contents: write` (badge branch) and docs keeps `contents: read`. - Dependency-Update-Tool: add .github/renovate.json (config:best-practices, which enables helpers:pinGitHubActionDigests so Renovate maintains the SHA pins + version comments going forward). Renovate, not Dependabot. Deferred by design (premature pre-release): Signed-Releases, Fuzzing, CII-Best-Practices. Code-Review stays 0 — an artifact of admin-squash-merge, not negligence. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 51 minutes and 19 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ 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: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a new ChangesSupply Chain Hardening
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Pull request overview
This PR hardens the repository’s CI supply chain and permissions to improve OpenSSF Scorecard results, without changing any Rust/crate code.
Changes:
- Pin GitHub Actions across workflows to full 40‑char commit SHAs (with version comments).
- Add least-privilege default
permissionswhere missing (notablyci.ymlandcommitlint.yml), keeping job-level escalation where required. - Introduce Renovate configuration (
.github/renovate.json) to support automated dependency updates and action digest pin maintenance.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/scorecard.yml | SHA-pin Scorecard-related actions used for SARIF publishing and analysis. |
| .github/workflows/release.yml | SHA-pin release workflow actions used for changelog + GitHub Release creation. |
| .github/workflows/query-bench.yml | SHA-pin actions and explicitly set toolchain input for the pinned rust-toolchain action. |
| .github/workflows/pr-title.yml | SHA-pin PR title lint action. |
| .github/workflows/pages.yml | SHA-pin Pages build/deploy actions. |
| .github/workflows/commitlint.yml | Add explicit least-privilege permissions and SHA-pin checkout + commitlint actions. |
| .github/workflows/ci.yml | Add workflow-level least-privilege permissions; SHA-pin actions; add explicit toolchain / tool inputs where needed. |
| .github/workflows/capture-otel-demo-corpus.yml | SHA-pin checkout and upload-artifact actions. |
| .github/workflows/bench.yml | SHA-pin actions and explicitly set toolchain input for the pinned rust-toolchain action. |
| .github/renovate.json | Add Renovate config enabling dependency update automation and grouping/pinning behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release.yml:
- Around line 13-15: The actions/checkout action in the release workflow is
keeping credentials persisted in .git/config by default, which increases
security risk. Add persist-credentials: false to the with section of the
actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 step to disable
credential persistence, since the release job does not need to push commits and
this reduces token exposure to subsequent steps.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 68ed514a-5a6f-43de-a84b-7d5e1b2f2f1a
📒 Files selected for processing (10)
.github/renovate.json.github/workflows/bench.yml.github/workflows/capture-otel-demo-corpus.yml.github/workflows/ci.yml.github/workflows/commitlint.yml.github/workflows/pages.yml.github/workflows/pr-title.yml.github/workflows/query-bench.yml.github/workflows/release.yml.github/workflows/scorecard.yml
a573656 to
5a98d5f
Compare
What
Cheap-batch supply-chain hardening that lifts three OpenSSF Scorecard checks currently scoring 0 (aggregate 4.5). Pure CI/config — no crate code touched.
# vXcommentpermissions: contents: readonci.yml+commitlint.yml(the only two without one).github/renovate.jsonNotes
toolchain: stableinput on all 8 blocks — SHA-pinning disables the action's ref-name channel detection, so the channel must be stated. Thecargo-llvm-covinstall likewise gains an explicittool:input (the@cargo-llvm-covmagic tag is gone once SHA-pinned tov2).config:best-practicesenableshelpers:pinGitHubActionDigests, so Renovate maintains these SHA pins and their version comments going forward rather than letting them rot.coveragekeeps its job-levelcontents: write(badge branch) anddocskeepscontents: read; everything else drops to read.Deferred (by design, premature pre-release)
Signed-Releases (cosign/SLSA provenance), Fuzzing (OSS-Fuzz), CII-Best-Practices registration — these belong at the first shipping milestone. Code-Review stays 0; it's an artifact of the admin-squash-merge workflow, not negligence.
Invariants
No §3 invariant or §4 hazard touched — CI/supply-chain config only. The gating
testjob andci-successaggregate are unchanged.🤖 Generated with Claude Code
Summary by CodeRabbit