fix(ci): repair unparseable scorecard.yml and restore the missing contents: read - #120
hyperpolymath wants to merge 2 commits into
Conversation
…tents: read Two defects, and fixing only the first would look like a cure while changing nothing. 1. `permissions: read-all` is a SCALAR, so the indented `actions: read` beneath it is a mapping entry under a scalar: invalid YAML. GitHub never parsed the file, the run emitted zero jobs, and the Scorecard check never appeared. The gate was ABSENT, not red. 2. The `analysis` job declares its own `permissions:` block naming only `security-events` and `id-token`. A job-level block REPLACES the workflow-level one rather than merging with it, so the reusable workflow was being called without `contents: read` and could not check out. Deleting the orphan key alone would yield a file that parses and still emits no check. Adds `contents: read` to the job block, matching aerie#76 (merged 2026-09-13), which carries exactly these three job permissions. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0178nN4Nm3neFRy5K9StZKnB
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details
|
| Layer / File(s) | Summary |
|---|---|
Analysis job permissions and workflow call .github/workflows/scorecard.yml |
The analysis job declares actions: read and contents: read at job level. security-events: write, id-token: write, and the reusable workflow call remain unchanged. |
Priority: ⬇️ Low
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Bug fix
Suggested reviewers: metadatastician
Merge Risk: ⚪ Minimal · up to 11e4f
The Scorecard workflow permission update is narrowly scoped and presents no identified merge-blocking risk.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title clearly identifies the CI workflow repair and the restoration of the missing contents: read permission. |
| Description check | ✅ Passed | The description directly explains the YAML parsing defect, the job-level permission issue, the changes made, and the verification performed. |
| Docstring Coverage | ✅ Passed | 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… |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
❌ Error running CI fixer.
- Create stacked PR
- Commit on current branch
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.
A rabbit checks the workflow gate
Permissions now sit in the proper state
Actions can read, contents too
Scorecards run as they should do
The reuse call stays in view
Hop, hop, the patch is through!
Comment @coderabbitai help to get the list of available commands.
The job-level `permissions:` block REPLACES the workflow-level block, so the reusable workflow's own `actions: read` cannot elevate the caller's token. Without it the caller's effective `actions` permission is `none`, and Scorecard's Packaging check (Actions.ListWorkflowRunsByFileName) can error. Caught by CodeRabbit on palimpsest-license#151; verified against the whole family: 11 of 13 scorecard.yml callers omit it, including aerie which is already on main. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0178nN4Nm3neFRy5K9StZKnB
|
|
✅ Coding Agent task started: View task and status The task will inspect the CI failures, validate its fix, and open a stacked fix pull request automatically.
⏭️ 5 check(s) skipped — already failing on `main` (not caused by this PR)
|
Rate Limit Exceeded
|
scorecard.yml is already repaired on branch fix/repair-startup-dead-scorecard-yml (PR #120), which re-indents `actions: read` INTO the analysis job's own permissions block. That is the correct cure: job-level permissions REPLACE the top-level map, so the analysis job never inherited `read-all` and Scorecard was running without `actions: read`. Deleting the stray line made the file parse but left the job functionally short. Restoring this file from main so PR #120 owns it uncontested. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0178nN4Nm3neFRy5K9StZKnB




Two defects. Fixing only the first would look like a cure while changing nothing.
An orphan
actions: readsits indented beneath the scalarpermissions: read-all.A mapping entry under a scalar is invalid YAML, so GitHub has never parsed this workflow.
The
analysisjob declares its ownpermissions:block naming onlysecurity-eventsand
id-token. A job-level block replaces the workflow-level one rather than mergingwith it — so the reusable workflow was being called with no
contents: readand could notcheck out. Deleting the orphan key alone yields a file that parses and still emits no check.
This adds
contents: readto the job block, matching aerie#76 (merged 2026-09-13), whichcarries exactly these three job permissions.
Why this was never noticed
A workflow that fails to parse does not go red. GitHub emits zero jobs, so the
Scorecard check run is never created and the context is absent from the rollup.
required ∩ failingis satisfied vacuously, and the board reads clean.An unrepaired repo therefore looks greener than a repaired one. When this merges
you will see checks appear where there were none before. That is the gate arming, not
this PR introducing failures.
Verification
yq e '.'— parses (it did not before)actionlint— cleansecrets: inheritunchanged; no other file touched.Merging nothing — this is for your review.
🤖 Generated with Claude Code
https://claude.ai/code/session_0178nN4Nm3neFRy5K9StZKnB