feat: enable npm Trusted Publishers#56
Merged
Merged
Conversation
Contributor
Greptile SummaryThis PR enables npm Trusted Publishers for secure, token-free package publishing using OIDC authentication. The workflow now uses GitHub's OIDC provider to authenticate with npm instead of requiring manual Key Changes:
Security Impact:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant GHA as GitHub Actions
participant OIDC as GitHub OIDC Provider
participant NPM as NPM Registry
participant PKG as Package
Note over GHA: Release workflow triggered
GHA->>GHA: Checkout code
GHA->>GHA: Setup Node 24 with npm registry
GHA->>GHA: Install dependencies & build
Note over GHA,NPM: Trusted Publisher Authentication
GHA->>OIDC: Request OIDC token (id-token: write)
OIDC->>GHA: Return signed JWT token
GHA->>NPM: Publish with --provenance flag + OIDC token
NPM->>NPM: Verify OIDC token signature
NPM->>NPM: Check repository is configured as Trusted Publisher
NPM->>NPM: Generate cryptographic provenance attestation
NPM->>PKG: Publish package with provenance
PKG-->>GHA: Success
|
e767e79 to
74e8ffc
Compare
gcarvelli
approved these changes
Dec 19, 2025
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.
Enables npm Trusted Publishers for secure publishing without manual token management.
Changes:
id-token: writepermission for OIDC authentication--provenanceflag to publish commandsNODE_AUTH_TOKENenvironment variable (no longer needed)Benefits: