Skip to content

chore(ci): switch to npm trusted publishing with OIDC#106

Merged
kadel merged 1 commit intoredhat-developer:mainfrom
kadel:chore/npm-trusted-publishing
Apr 28, 2026
Merged

chore(ci): switch to npm trusted publishing with OIDC#106
kadel merged 1 commit intoredhat-developer:mainfrom
kadel:chore/npm-trusted-publishing

Conversation

@kadel
Copy link
Copy Markdown
Member

@kadel kadel commented Apr 28, 2026

Summary

  • Replace long-lived NPM_TOKEN secret authentication with OIDC-based
    npm Trusted Publishing
    for improved supply chain security.
  • Add id-token: write permission to enable GitHub Actions OIDC token generation.
  • Switch from yarn npm publish to npm publish as the npm CLI has
    native OIDC support, while Yarn Berry's support
    has known issues.

Why

npm Trusted Publishing eliminates the need for storing and rotating long-lived
npm access tokens (NPM_TOKEN) in CI. Instead, it uses short-lived,
workflow-specific OIDC credentials that cannot be exfiltrated or reused.
Provenance attestations are also generated automatically.

See: https://docs.npmjs.com/trusted-publishers/

Notes

  • The trusted publisher has already been configured on the npm registry for
    @red-hat-developer-hub/cli.
  • The NPM_TOKEN secret can be removed from the repository settings after
    this change is verified.

Test plan

  • Trigger publish.yaml via workflow_dispatch and verify successful
    publish to npm with OIDC authentication.
  • Confirm provenance attestation appears on the npm package page.

Replace long-lived NPM_TOKEN authentication with OIDC-based trusted
publishing for improved supply chain security.
@sonarqubecloud
Copy link
Copy Markdown

@kadel kadel enabled auto-merge (squash) April 28, 2026 11:19
@davidfestal
Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Apr 28, 2026
@kadel kadel disabled auto-merge April 28, 2026 11:19
@kadel kadel enabled auto-merge (squash) April 28, 2026 11:20
@kadel
Copy link
Copy Markdown
Member Author

kadel commented Apr 28, 2026

no need to wait for e2e, this is ci/cd only change, has no effect on codebase

@kadel kadel disabled auto-merge April 28, 2026 11:21
@kadel kadel merged commit 88ac210 into redhat-developer:main Apr 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants