Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Migrate to OIDC on publishing npm packages in GitHub Actions

Open
#998 10 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
github-actions

Research direction

Start with the unchecked workflow files listed in the issue, especially nodejs/node-core-test and nodejs/caritat, and compare them with the checked migrations. Verify the npm trusted-publisher requirements and existing workflow permissions first. Done means the remaining npm publishing workflows no longer use NPM_TOKEN and have the required OIDC configuration.

Written by the indexing model from the issue text.

Description

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

[!note]
Trusted publishing requires npm CLI version 11.5.1 or later.

TL;DR: add the following section in the workflow file to replace ${secrets.NPM_TOKEN}, and create OICD connection on https://www.npmjs.com/package/<package-name>/access:

permissions:
  id-token: write  # Required for OIDC
  contents: read

This should help us get rid of npm tokens in GitHub Actions for publishing packages.

Quick search on npm token usages: https://github.com/search?q=org%3Anodejs+path%3A%22.github%2Fworkflows%22+%22npm+publish%22&type=code

Dominant language
JavaScript
Stars
202
Forks
183
Avg merge
13d 12h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nodejs/admin

All issues in nodejs/admin

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.