Publish from CI with npm provenance (--provenance / OIDC trusted publisher)

Offen
#2,028 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
github-actions, node.js, typescript
Bereich
ci-cd, devops, release

Rechercherichtung

Beginne mit dem Lesen von publish-mcp-registry.yml und verfolge die vorhandenen release:prepare- und release:mark-dev-Skripte. Bestätige, dass der Release-Workflow über OIDC id-token-Berechtigungen verfügt und npm publish --provenance verwendet; abgeschlossen ist der Vorgang, wenn ein nicht-null npm view agent-device dist.attestations-Wert vorliegt, der sich zum Release-Commit auflöst, nachdem ein Maintainer die npm trusted-publisher-Einstellungen konfiguriert hat.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

needs-info

From the MCP registry security assessment (its item 4). release:publish runs npm publish from a maintainer laptop, so the published tarball has only npm's registry signature — dist.attestations is null, and there is no verifiable link from the tarball back to the commit that produced it.

Goal

Publish from CI with npm publish --provenance under an OIDC trusted publisher, so consumers get a signed provenance statement pinning the tarball to its source commit and workflow run.

Work

  • Configure the npm package's trusted-publisher / OIDC settings on npmjs.com (maintainer action — cannot be scripted from the repo; blocks the rest).
  • Add a release workflow (or extend the existing tag-triggered one) that runs release:prepare then npm publish --provenance with id-token: write permission, instead of a local npm publish.
  • Keep release:mark-dev running post-publish (added in #2023) so main still moves off the released version.
  • The MCP-registry publish workflow already uses OIDC (publish-mcp-registry.yml) — mirror its trusted-publisher pattern.

Notes

  • Independent of #2023; the release-script changes there don't conflict.
  • Verify afterward: npm view agent-device dist.attestations is non-null and the provenance resolves to the release commit.
Vorherrschende Sprache
TypeScript
Sterne
5.2k
Forks
359
Ø Merge
13 Std. 23 Min.
Gemergte PRs (30 T.)
655

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus callstack/agent-device

Alle Issues in callstack/agent-device

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.