ci: set least-privilege workflow permissions - #551
Conversation
The conforma org default workflow token permission is now `read` (EC-2145). This workflow declared no `permissions:` block, so it relied on the implicit default token. Add an explicit least-privilege `permissions:` block granting only `contents: read` — the single scope `actions/checkout` needs (uploads and test steps require no token scopes) — so its intent is explicit and robust regardless of the org default. Co-Authored-By: Claude <noreply@anthropic.com> Ref: EC-2171
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe build workflow now explicitly grants read-only access to repository contents. ChangesWorkflow Permissions
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to The workflow now explicitly limits its token to contents read, matching its checkout-only use; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR |
PR Summary by QodoSet least-privilege permissions for the build workflow
AI Description
High-Level Assessment
Files changed (1)
|
|
🤖 Finished Review · ✅ Success · Started 9:35 PM UTC · Completed 9:54 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.75 |
|
🚀 Preview is available at https://fa9800bf.enterprise-contract.pages.dev |
|
Risk Assessment: moderate (2/5) DetailsSingle CI workflow config change (.github/workflows/build.yaml, 2 lines) adding explicit least-privilege permissions block. Elevated signals from CI workflow change (score 4) and protected path (score 3) are offset by minimal change size, no dependency changes, and clean git history. Tier 1 composite 1.75, Tier 2 composite 1.33, weighted 1.59 rounds to 2 (moderate). |
ReviewFindingsMedium
|
|
🤖 Finished Retro · ✅ Success · Started 1:42 PM UTC · Completed 1:53 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.68 |
Retro: PR #551 — ci: set least-privilege workflow permissionsThis was a human-authored 2-line PR (by What went well
Observation: review pipeline depth vs. change sizeThe primary review run (33442008873) cost $4.75 and took ~20 minutes at No duplicate issues foundSearched Proposals skipped (target repo not allowed)File manually or update
|
What
Add an explicit least-privilege
permissions:block (contents: read) tothis workflow.
Why
Follow-up to EC-2145 (conforma org default workflow permissions set to
read). This workflow had nopermissions:block and relied on the implicitdefault token.
contents: readis the only scope it needs (actions/checkout);uploads and test steps require no
GITHUB_TOKENscopes. Scoping it explicitlyfollows least-privilege and addresses the review feedback that
read-allisbroader than necessary.
Co-Authored-By: Claude noreply@anthropic.com
Ref: EC-2171