Repository navigation
Description
Severity: Medium (supply chain). CWE: CWE-829, CWE-1357. Status: design weakness, plausible attack path; not exploited.
What
In .github/workflows/main.yml the release/publish job (about lines 212-300) has permissions: id-token: write
(npm trusted publishing) and, in the same job:
npm install -g npm@^11.5.1floats to whatever 11.x is current.npm install(notnpm ci) does not fail on lockfile drift, and the rootpostinstall
(scripts/install-clients.mjs) runsnpm installwith lifecycle scripts enabled inclients/web,clients/cli,clients/tui.- Every action in the job (
actions/checkout@v7,actions/setup-node@v7) is a mutable tag.
Any dependency install script executing in this job runs in the same process environment where the OIDC token request
variables exist, so a compromised transitive dependency could request an OIDC token and publish under the trusted-publisher identity.
Why it matters
The scheduled workflows in this repo already do the right thing (npm ci --ignore-scripts in sdk-watch.yml:98 and
dependabot-alerts.yml:94), so the release job is the outlier and the only one that can publish.
Verified / not verified
- Verified by reading the workflow and
scripts/install-clients.mjs(spawnsnpm installper client, no--ignore-scripts). npm audit --package-lock-onlyandosv-scannershow 0 known vulnerabilities today, so this is a hardening issue, not a live compromise.- Not verified: whether the trusted-publisher config on npmjs.com restricts by workflow file and environment.
Suggested change (for maintainers' workflow)
- Split into a
buildjob (noid-token) that produces the tarball as an artifact, and apublishjob that only
downloads it and runsnpm publish --provenance, with no dependency install. - If a single job is kept:
npm ci, and run the repo's owninstall-clients.mjsexplicitly with clients installed vianpm ci --ignore-scripts. - Pin
npmto an exact version and all actions to commit SHAs (see the companion issue on SHA-pinning). - Consider a protected GitHub Environment with required reviewers for publish.
Reviewed at 1e31c78 (v2.8.0). No fix code is offered, per CONTRIBUTING.md.
Prompt used (per CONTRIBUTING.md)
"Audit this repository's CI workflows and one crypto module against the OpenSSF/CRA-friendly checklist. Run Semgrep,
osv-scanner, gitleaks and trufflehog; read every cited line before accepting a finding; reproduce any crypto claim on the
lowest supported Node version; drop findings that are test fixtures or already mitigated."
Activity
cliffhall commentedon Sep 24, 2026
Triage: Priority Medium (total 6)
id-token: write); hardening, not a live compromisesecuritylabelBoard: #28, Status
Incoming(awaiting maintainer review — no milestone yet).ci: split the npm release job so install scripts never hold the OIDC …
cliffhall commentedon Sep 26, 2026
Shipped in #2506.
fix(ci): publish the tarball by a ./ path so npm reads it as a file