Skip to content

sign: a failing pre-check verify is silent and re-signs the digest #1237

Description

@teemow

Problem

retagger sign verifies a digest before signing it and signed whenever the verify failed. cosign v3 verify detects the bundle format with a referrers listing and, when that listing fails for any reason — the registry throttling the per-identity ListReferrers lookups of a busy pass — falls back silently to the legacy signature-tag path and reports no signatures found, the same text and exit code as for a digest that was never signed. A sign-all pass with four workers trips the throttle about every 80 s, and the four in-flight pre-checks then re-signed their digests: a duplicate signature and Rekor entry each, ~40–55 per large file per pass, harmless and invisible in the log.

Solution

#1239. The pre-check logs the verify's error at debug level with cosign's message; trusts no signatures found only once the registry's referrers list confirms no signature bundle for the digest (a listed bundle means the lookup was throttled, and the verify is retried with backoff); signs over another identity's signature; and fails the tag for any other verify error instead of signing blindly. The registry's throttling of the listing is retried like any transient error, as is the TUF cache race between concurrent cosign processes.

Acceptance criteria

  • A sign-all pass right after a completed one reports 0 signed for tags whose digest did not change (only mutable names such as latest may re-sign) — pipeline 6424, all eleven gsoci jobs 0 signed, 0 failed (evidence).
  • A failing pre-check verify appears in the job log with cosign's message (evidence).

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions