ci: secure npm publishing with OIDC - #52
Merged
Merged
Conversation
Signed-off-by: Sri Aradhyula <sraradhy@cisco.com>
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.
Summary
NPM_TOKENpublish path with npm Trusted Publishing over GitHub Actions OIDCactions/setup-nodeby commit SHA; disable release caching and add a publish timeoutcaipe-io/caipe-cliURL required by npm trust validationSecurity properties
contentsremains read-only andid-token: writeis scoped to the publish jobValidation
actionlint .github/workflows/release.ymlnpm test -- --run(237 tests passed)git diff --checkRegistry follow-up
The npm account must enable 2FA and each package must be bootstrapped once before npm permits Trusted Publisher configuration. Then configure
caipe,caipe-darwin-arm64,caipe-darwin-x64,caipe-linux-arm64, andcaipe-linux-x64to trustcaipe-io/caipe-cli, workflowrelease.yml, environmentnpm-publish, actionnpm publish, and disallow token publishing.