`npm audit signatures` intermittently fails with EMISSINGSIGNATUREKEY for packages signed with key SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U

オープン
#10,300 コメント 2 件 リアクション 2 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
12/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
活発
技術スタック
javascript, nodejs
領域
cli, security

調査の方向性

Start by reproducing the EMISSINGSIGNATUREKEY error from npm audit signatures --prefer-online on the lockfile that fails, and check whether the key ID SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U is missing from the keys endpoint https://registry.npmjs.org/-/npm/v1/keys on the failing responses. The issue does not name the source file that handles key lookup, so find it by searching for the error code. Done means identifying the cause of the intermittent miss and a fix that makes the result consistent across runs.

索引モデルが issue の本文から書いたものです。

説明

Summary

npm audit signatures intermittently fails with EMISSINGSIGNATUREKEY on GitHub-hosted runners for packages whose attestations are signed with key ID SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U. Re-running the same job with an identical lockfile passes.

I am filing this as a blank issue because the Bug form requires confirming the latest npm, and this was observed with npm 10.9.9 (the version bundled with Node.js 22.23.4). I have not yet been able to try the latest npm, because the failure cannot be reproduced on demand.

Existing issues checked
  • #8066 (closed, January 2025): constant failure after a key rotation, not intermittent.
  • #10018: a different problem (reporting of skipped packages).
Current behaviour
npm error code EMISSINGSIGNATUREKEY
npm error [email protected] has attestations but no corresponding public key(s) can be found

or the same error for [email protected].

Within one failing job, three attempts about 20 seconds apart all fail. A re-run a few minutes later, with the same lockfile, passes.

Expected behaviour

For an unchanged lockfile, the result should be the same every time: either verification passes, or it fails consistently.

Steps to reproduce
  1. npm ci --no-audit --no-fund
  2. npm audit signatures --prefer-online

The failure is intermittent.

Observations
  • Both packages' attestations are signed with key ID SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U (logged on 26–27 October 2026).
  • I fetched https://registry.npmjs.org/-/npm/v1/keys 15 times from a different network. Every response included that key ID. The response headers showed it was last modified on Thu, 12 Nov 2026 07:23:58 GMT, and served from a CDN cache (cf-cache-status: HIT).
  • Hypothesis, not confirmed: some CDN edges reached by GitHub's runners may still have served an older copy of the key list without this key. I cannot confirm this from outside, and there may be another cause.
Occurrences (13 November 2026, UTC)
Time (approx.) Result
18:00–18:15 failed twice on the same commit; a later re-run passed
18:25 failed once; the next run passed
21:02 all three attempts failed ([email protected]); re-run passed
21:49–21:50 all three attempts failed ([email protected]); re-run passed
22:36–22:37 all three attempts failed ([email protected]); re-run passed

Other runs on the same day with the same lockfile passed.

Environment
  • npm: 10.9.9
  • Node.js: v22.23.4
  • OS: GitHub-hosted ubuntu-latest runner (Ubuntu 26.04.1 LTS)
  • Registry: https://registry.npmjs.org/ (default)
Workaround in use

We retry the whole command up to three times, and the job fails unless one attempt succeeds. Signature verification is never skipped or weakened.

I am happy to provide more output (with private details removed) if it helps.

主要言語
JavaScript
スター
10.3k
フォーク
5k
平均マージ
4日 11時間
マージ済み PR(30日)
26

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

npm/cli のほかの issue

npm/cli の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。