Repository navigation
ci(ENG-4207): publish an existing release tag to npm on demand #161
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
🟠 High - Manual publish accepts attacker-created release tags
A repository user with write access can create an unprotected
defender-vX.Y.Ztag on an arbitrary commit, set itspackage.jsonversion to match, and dispatch this workflow. The job then runs that tag's package-defined build and publish scripts withNPM_TOKEN, allowing unauthorized publication of attacker-controlled package contents and potentially disclosure or misuse of the npm credential.Show fix
Restrict this recovery path to release tags whose commits are authenticated and reachable from the protected release history, or require an approval-gated environment and an explicit allowlist of release actors. Do not rely only on the tag spelling and package version; independently verify tag provenance/immutability and consider replacing the long-lived npm token with a narrowly scoped, approval-protected publishing credential.
More info - Reply on this comment to give feedback or ignore the issue.