Sign release binaries with GitHub build provenance attestations

Aperta Adatta ai principianti
#3,038 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
62/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github-actions

Direzione di ricerca

La modifica riguarda il workflow cli-release.yml: controlla prima il blocco permissions esistente del job, poi individua dove goreleaser produce dist/checksums.txt e dove softprops/action-gh-release pubblica gli asset. Aggiungi il permesso attestations e uno step actions/attest-build-provenance tra questi due punti, come abbozzato nell'issue. Il lavoro è completo quando il workflow continua a eseguirsi e un asset compilato supera gh attestation verify rispetto al repository.

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

Descrizione

feature triage
What problem are you trying to solve?

Release assets are verifiable only against checksums.txt, published through the same channel. That detects a corrupted download; it cannot distinguish artifacts built by cli-release.yml from artifacts uploaded by anyone holding release permissions and able to update checksums.txt at the same time.

This matters a bit more since 0.19.0: devbox version update now replaces /usr/local/bin/devbox with the release binary itself, asking for sudo to do so. The downloaded binary is written to a root-owned path by the updater, where previously only the small launcher script lived there and the binary stayed under ~/.cache.

What solution would you like?

Attest the release artifacts in cli-release.yml. The job already has id-token: write; add

permissions:
attestations: write
and one step after goreleaser, before softprops/action-gh-release:

  • uses: actions/attest-build-provenance@v2
    with:
    subject-checksums: dist/checksums.txt

Keyless (Sigstore), no key to manage, no change to the published assets. Any download can then be verified with
gh attestation verify devbox_0.19.0_linux_amd64.tar.gz --repo jetify-com/devbox
and the launcher or version update could run the same check before installing.

Happy to ask my Muse Wonder to send the PR if you'd take it. We run devbox as the trust root of an agent fleet and adopt releases on day 0 (fail forward fast + report upstream fast); build provenance is the one check we can't do on our side. Thanks in advance, Pallieter @ CopyHosting & eBrain.

Alternatives you've considered

No response

Lingua principale
Go
Stelle
12.4k
Fork
358
Merge medio
17h 12m
PR unite (30g)
31

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di jetify-com/devbox

Tutte le issue di jetify-com/devbox

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.