Skip to content

ci: sign only the scanned image digest #188

Closed

Description

@uniqueg

Problem

The release workflow scans an image it builds for the scan job, then the publishing job builds the image again and pushes, attests and signs that second build. The published image is never scanned itself. Base images and dependencies are pinned, so the two builds should match, but nothing checks that. The same applies to the dev images built in checks.

Expected

The image that is signed and tagged is the image that was scanned:

  1. Build and push the image by digest, untagged.
  2. Scan <image>@<digest> in a job without release credentials, signing identity or id-token. Trivy resolves its binary from a mutable tag, so it must not run next to secrets.
  3. Only if the scan passes: attest and sign that digest, then tag it (imagetools create, checking that each tag resolves to the signed digest).

A failed scan leaves an untagged, unsigned digest that nobody consumes. The docs ("Verifying images and charts", contributing guide) then say that published images are the scanned ones. The same flow applies to dev images. Keep FOCA and Cloud Registry identical where possible, e.g. through the shared scan-image composite action.

Activity

  1. added
    priority: high
    status: triage
    type: ci / cd
    type: security
    workload: hours
    status: in progress
    and removed
    status: triage
    on Oct 23, 2026
  2. removed
    status: in progress
    on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: hightype: ci / cdtype: securityworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions