Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat(cli): parametrized staging release environment with dedicated release tag and package-manager coverage #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
feat(cli): parametrized staging release environment with dedicated release tag and package-manager coverage #90
Changes from all commits
be6505a2e6049696ef78f4e29b17dc4231ccb8df4536ec269File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Protect the staging-v tag namespace before adding the publish trigger*
.github/workflows/publish-cli.yml:10adds- "staging-v*.*.*"to the tag triggers of a workflow whose jobs holdcontents: writeandid-token: write(npm OIDC trusted publishing and GitHub release creation).The repository's only tag-scoped ruleset —
production release tags(verified viagh api repos/Kong/volcano-cli/rulesets/17333957) — includesrefs/tags/v*.*.*(excluding nightly) and restricts create/update/delete to the Admin role and the Release Please integration.staging-v*matches no tag ruleset, so any account with Write access can push astaging-vX.Y.Ztag pointing at an arbitrary crafted commit.Because a tag-triggered run executes the workflow file at the tagged commit, that commit can carry a modified
publish-cli.yml(thevalidate-release-refancestry check is itself part of the attacker-controlled workflow and can be removed). Such a run can mint the npm OIDC token and publish arbitrary code to@volcano.dev/cli— under@stagingby default, or@latestif the attacker drops--tag staging— and create GitHub releases viacontents: write, forging cosign signatures accepted by the new staging identity regex.Condition to trigger: an actor with Write access (or a compromised write-scoped token/integration). This is the same privileged publish surface production tags already have, but the PR grants it to an unprotected namespace, removing the admin-only gate. Extend the tag ruleset to cover
staging-v*(or otherwise restrict who can push these tags) before merging the trigger.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] Serialize staging-alias updates across concurrent staging releases
.github/workflows/publish-cli.yml:386-388force-moves the sharedstagingtag and republishes thestagingalias release on every staging build:The workflow
concurrency.groupispublish-cli-${{ github.ref_name }}withcancel-in-progress: false, so two differentstaging-vX.Y.Ztags land in separate groups and can run concurrently. Their--forcetag pushes and--clobberasset uploads can interleave, leaving the movingstagingrelease (consumed by the curlstagingselector and thevolcano-stagingHomebrew formula) pointing at mixed assets/checksums or an older build. The immutablestaging-vX.Y.Zreleases are unaffected, so the corruption is invisible to the per-tag asset verification.Unlike the existing
nightlyalias — which only ever runs frommainunder the singlepublish-cli-maingroup and therefore serializes — staging tags do not serialize with each other. Condition: two staging releases cut close together. Consider a fixed concurrency group (e.g.publish-cli-staging-alias) for the alias update, or otherwise guard the moving-tag move.Uh oh!
There was an error while loading. Please reload this page.