Repository navigation
release: fix the credentials preflight (E403 on npm access list packages) - #116
Merged
Merged
Conversation
… user's package list 'npm access list packages' without a scope lists the logged-in user's own packages (GET /-/org/<user>/package), which a granular token may not read: the preflight failed with E403 on its first run although the token is valid (npm whoami succeeded). It now reads each @CheckGate package's collaborators and requires read-write for the token's identity, for all nine packages (all exist since 0.2.0).
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.
The release dry run's Preflight — publishing credentials job failed on its first-ever run (run 46436331024):
The token is valid (
npm whoamisucceeded, and this token published 0.2.0). The failure is in the check itself.npm access list packageswithout a scope argument lists the logged-in user's packages, and a granular token isn't allowed to read that endpoint.The fix: for each of the nine
@checkgatepackages, readnpm access list collaborators @checkgate/<pkg>and requireread-writefor the token's identity. Since 0.2.0, all nine packages exist, so the "does not exist yet" branch and the org-role probe are gone. A notice remains: a granular token's own package scope can't be verified without publishing.Tested locally against the registry: all nine packages report
read-writeforakongasidencio, and an unknown identity is reported asno access. Workflow-only change; publish jobs are untouched.