Repository navigation
fix: scope CI tokens and validate releases before npm publish - #91
Merged
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
CI jobs currently inherit the repository's write-default
GITHUB_TOKEN, and checkout persists credentials before running repository code. Setcontents: readin all five workflows, disable checkout credential persistence, and pin the existing v4 actions to commit SHAs.Before npm publication, check out the release event's exact commit, verify it is an ancestor of
origin/main, and require lint and unit tests to succeed. Pin the publishing runtime to Node.js 24. Tests build the package before the npm token is supplied; publish with--ignore-scriptsto avoid rebuilding with the token. Update the release guide accordingly. Release creation remains the maintainer authorization step; this does not introduce an environment approval gate or change repository settings.Validation:
npm pack --dry-run --ignore-scriptsincludes the built distribution, andgit diff --checkpasses.