DashboardcraftCraft npm target OIDC detection via CI …

Craft npm target OIDC detection via CI environment variables

Category: pattern
Confidence: 1.00
ID: 019c9f57-aa11-74f6-9532-7c8a45fe12a5
Project ID: e16af391-c497-4837-b681-c849a5514499
Cross-project: No
Recalled in other projects: 1
Source session: (none)
Created: 2026-06-10 21:07:09
Updated: 2026-06-10 21:07:09

Cross-Project Recalls

ProjectHitsLast recalled
opencode-lore 2 2026-07-17

Content

The isOidcEnvironment() helper in src/targets/npm.ts detects OIDC capability by checking CI-specific env vars that npm itself uses for OIDC token exchange: - GitHub Actions: ACTIONS_ID_TOKEN_REQUEST_URL AND ACTIONS_ID_TOKEN_REQUEST_TOKEN (both present when id-token: write permission is set) - GitLab CI/CD: NPM_ID_TOKEN (present when id_tokens with aud: "npm:registry.npmjs.org" is configured) This auto-detection means zero config changes for the common case. The explicit oidc: true config is only needed to force OIDC when NPM_TOKEN is also set (e.g., migration period).

Move to: