docker / docker/github-builder

Signing the main tag/manifest?

Aperta
#104 3 commenti 6 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

kind/enhancement status/triage
Lingua principale
Nessun dato sulla lingua
Stelle
83
Fork
23
Merge medio
2g 22h
PR unite (30g)
8

Descrizione

Description

Today if we do this:

    uses: docker/github-builder/.github/workflows/build.yml@v1
    with:
      output: image
      push: true
      platforms: linux/amd64,linux/arm64
      sbom: true
      meta-images: |
        ghcr.io/my-org/my-image
      meta-tags: |
        latest

We are able to cosign verify the two manifests per platform linux/amd64 and linux/arm64 individually and explicitly.

But we are not able to do this:

cosign verify \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  --certificate-identity-regexp ^https://github.com/docker/github-builder/.github/workflows/build.yml.*$ \
  ghcr.io/my-org/my-image:FIXME-WITH-LATEST-DIGEST

We'll get this error because there is no signature on the main tag/manifest:

Error: no signatures found
error during command execution: no signatures found

It's common practice to have the main tag/digest in Dockerfile for base images and in Kubernetes manifests for final container images to refer to the main tag/digest, letting then the platform pulling the actual digest based on the arch/platform. In the meantime, admission controller like Kyverno will check the signature on the main tag/digest.

Could we add the cosign signature on the main tag/digest too?

Guida per i contributori

Apri la guida per i contributori

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.

Direzione di ricerca

Inizia in .github/workflows/build.yml e verifica come vengono prodotte le firme cosign per i manifest linux/amd64 e linux/arm64. Confronta questo flusso con il comando richiesto per la verifica di main tag/digest; il lavoro è completato quando anche il manifest main può essere verificato correttamente, mantenendo le firme esistenti per piattaforma.

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

Valutazione

Stack tecnologico
docker, github-actions
Ambito
ci-cd, devops, security
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.