docker / docker/github-builder

Signing the main tag/manifest?

Abierto
#104 3 comentarios 6 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

kind/enhancement status/triage
Lenguaje dominante
Sin datos de lenguaje
Estrellas
83
Forks
23
Merge medio
2 d 22 h
PR fusionados (30 d)
8

Descripción

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?

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Empieza en .github/workflows/build.yml e inspecciona cómo se producen las firmas de cosign para los manifiestos linux/amd64 y linux/arm64. Compara ese flujo con el comando solicitado para verificar main tag/digest; se considera terminado cuando el manifiesto main también se puede verificar correctamente, conservando las firmas existentes por plataforma.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
docker, github-actions
Área
ci-cd, devops, security
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.