fix: grant PR attestation workflow permissions - #9
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0ce37e597d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| id-token: write | ||
| attestations: write |
There was a problem hiding this comment.
Keep attestation authority out of PR validation
For same-repository pull requests, this grants the checked-out PR code both an OIDC token and permission to publish repository attestations; the quality workflow subsequently executes branch-controlled npm scripts and shell commands, so a compromised internal branch can mint arbitrary attestations even though the built-in attestation step is skipped for pull_request. This also contradicts the documented boundary that PR checks are read-only and attestations come only from trusted pushes. Split the attestation work into a trusted-event job/workflow rather than delegating these write permissions to the PR caller.
Useful? React with 👍 / 👎.
Summary\n- grant the pull-request caller the id-token and attestations permissions required by the reusable provenance gate\n- record the PR attestation permission boundary in the project README\n\n## Verification\n- npm test\n- git diff --check\n- static workflow permission assertions\n\nThis is a workflow-only correction for the historical startup failure in run 32871809589.