Repository navigation
ci: gate the pnpr release publish and docker jobs behind the release environment - #12640
Conversation
…environment pnpr-release-to-npm.yml can be triggered via workflow_dispatch. Its publish job uses npm OIDC trusted publishing to publish the `@pnpm/pnpr` package, and its docker job pushes the mutable ghcr.io/pnpm/pnpr:latest tag. Neither had an environment gate, so any collaborator with write access could publish to npm and overwrite the mutable Docker tag without reviewer approval. Add an environment: release gate to the publish and docker jobs (the build job produces no externally visible artifacts and is intentionally left ungated), matching the protection used by release.yml. Co-authored-by: Claude <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe release-to-npm workflow now assigns the ChangesRelease workflow environment declarations
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested labels
✨ 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 |
PR Summary by QodoGate pnpr npm publish and Docker push behind GitHub Actions release environment Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1. Untrusted ref release risk
|
|
Code review by qodo was updated up to the latest commit 08f60fd |
|
Thanks @qodo — re: Untrusted ref release risk (no ref validation on Written by an agent (Claude Code, claude-opus-4-8). |
Yes — I agree with that framing.
So I’m comfortable treating ref validation as a follow-up and keeping this PR scoped to adding the approval gate. If you want, I can also help draft a short comment in the workflow or PR description to make that scope explicit. |
|
You could have combined this with the previous pr. |
Summary
pnpr-release-to-npm.ymlcan be triggered viaworkflow_dispatch. Itspublishjob uses npmOIDC trusted publishing to publish the
@pnpm/pnprpackage, and itsdockerjob pushes themutable
ghcr.io/pnpm/pnpr:latesttag. Neither job had anenvironment: releasegate, so anycollaborator with write access could publish to npm and overwrite the mutable Docker tag via a
manual dispatch without reviewer approval — unlike
release.yml, which gates its publishing job.This adds
environment: releaseto thepublishanddockerjobs. Thebuildjob produces noexternally visible artifacts and is intentionally left ungated so the matrix legs are not blocked
on approval.
Squash Commit Body
Checklist
(No changeset: no published package changes. CI-only change.)
Written by an agent (Claude Code, claude-opus-4-8).
Summary by CodeRabbit