Skip to content

feat: use npm trusted publishing with OIDC#21

Merged
jaseemjaskp merged 1 commit intomainfrom
feat/npm-trusted-publishing
Dec 12, 2025
Merged

feat: use npm trusted publishing with OIDC#21
jaseemjaskp merged 1 commit intomainfrom
feat/npm-trusted-publishing

Conversation

@jaseemjaskp
Copy link
Contributor

Summary

This PR updates the publish workflow to use npm Trusted Publishing with OIDC instead of long-lived access tokens.

Changes

  • Add id-token: write permission at workflow level (required for OIDC)
  • Remove NODE_AUTH_TOKEN environment variable (not needed with trusted publishing)
  • Simplified npm publish command (provenance is auto-generated with trusted publishing)

Benefits

  • Enhanced Security: No more storing, rotating, or risking exposure of npm tokens
  • Automatic Provenance: Trusted publishing auto-generates provenance attestations
  • Short-lived Credentials: Each publish uses workflow-specific credentials that cannot be exfiltrated

Requirements

Before merging, ensure the trusted publisher is configured on npmjs.com:

  1. Navigate to package settings on npmjs.com
  2. Add a trusted publisher with:
    • Organization: Zipstack
    • Repository: n8n-nodes
    • Workflow: publish.yml

References

- Add id-token: write permission at workflow level for OIDC
- Remove NODE_AUTH_TOKEN dependency (not needed with trusted publishing)
- Trusted publishing provides automatic provenance attestation
- Requires npm >= v11.5.1 and trusted publisher config on npmjs.com
@jaseemjaskp jaseemjaskp merged commit 3e330d9 into main Dec 12, 2025
1 check passed
@jaseemjaskp jaseemjaskp deleted the feat/npm-trusted-publishing branch December 12, 2025 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant