callstack / callstack/agent-device

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

Aperta
#2,028 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
needs-info
Lingua principale
TypeScript
Stelle
4.6k
Fork
299
Merge medio
10h 42m
PR unite (30g)
493

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia leggendo publish-mcp-registry.yml e tracciando gli script esistenti release:prepare e release:mark-dev. Verifica che il workflow di release disponga dei permessi OIDC id-token e utilizzi npm publish --provenance; il completamento è dato da un valore non nullo di npm view agent-device dist.attestations che risolve al commit di release, dopo che un maintainer ha configurato le impostazioni npm trusted-publisher.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
github-actions, node.js, typescript
Ambito
ci-cd, devops, release
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.