Skip to content

CI: scope OIDC id-token to the publish job#37

Merged
arv merged 1 commit into
mainfrom
arv/harden-oidc
May 19, 2026
Merged

CI: scope OIDC id-token to the publish job#37
arv merged 1 commit into
mainfrom
arv/harden-oidc

Conversation

@arv
Copy link
Copy Markdown
Contributor

@arv arv commented May 19, 2026

Moves `permissions` (including `id-token: write`) from workflow-level to the publish job so only that job can mint an OIDC token for npm trusted publishing.

Least-privilege hardening per the npm trusted-publishing / OIDC supply-chain guidance (Snyk advisory, Step 4). Functionally identical (single job) but tightens the OIDC blast radius.

Note: the registry-side trusted-publisher config (npmjs.com) should also be pinned to this specific repo + workflow file (`publish.yml`) and ideally a GitHub Environment — that part is an npm settings change, not in this repo.

🤖 Generated with Claude Code

Move permissions (incl. id-token: write) from workflow-level to
the publish job so only that job can mint an OIDC token for npm
trusted publishing (least privilege; supply-chain hardening).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@arv arv merged commit dfd96a4 into main May 19, 2026
7 checks passed
@arv arv deleted the arv/harden-oidc branch May 19, 2026 14:34
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