Skip to content

aicr evidence: two-phase push-without-sign + sign-existing support #1434

Description

@njhensley

Part of #1431.

Summary

Let AICR produce a "mostly-formed" pointer and bundle without a signature, and add a separate path that signs an already-pushed bundle and patches its pointer in place. This decouples the network-light work (compute digest, assemble bundle, push to registry, write pointer skeleton) from the Fulcio-bound work (sign + log to Rekor + fill in signer identity/index). Today signing is mandatory whenever --push is set — there is no no-sign path — which couples the whole flow to a network that can reach Fulcio.

Motivation / Context

  • The pointer types already model an unsigned state: signer.rekorLogIndex is a pointer that is nil when unsigned (pkg/evidence/attestation/types.go). The schema supports it; the CLI doesn't produce it.
  • This is what the fork-based signing workflow consumes: contributor publishes unsigned + commits pointer locally; CI fills in the signature.

Proposed approach

(a) Push-without-sign: add --no-sign (or --unsigned) to validate --emit-attestation and/or evidence publish that:

  • assembles the bundle and pushes it to the registry (content-addressed, unsigned), and
  • writes a pointer with bundle.oci / bundle.digest populated and signer empty / rekorLogIndex nil.

(b) Sign-existing: add an evidence sign <pointer> path (or extend evidence publish) that takes the already-pushed bundle referenced by the pointer, signs it with ambient OIDC, logs to Rekor, and patches the pointer's signer block in place — without re-emitting the bundle. This is exactly what the fork workflow calls.

(c) Verifier: evidence verify should treat an unsigned pointer as a distinct "pending signature" status rather than "invalid," so an in-flight PR isn't flagged as broken (gate stays warning-only).

Acceptance criteria

  • aicr ... --no-sign produces a committable pointer with bundle digest set and signer empty, and pushes the unsigned bundle.
  • A sign-existing step fills in signer.identity, signer.issuer, signer.rekorLogIndex from the committed pointer without re-emitting the bundle.
  • evidence verify reports unsigned pointers as a non-failing "pending" state.
  • Unit coverage for the unsigned pointer round-trip in pkg/evidence/attestation.

References

  • pkg/evidence/attestation/types.go (Pointer, PointerSigner.RekorLogIndex *...)
  • pkg/evidence/attestation/pointer.go, publish.go
  • pkg/cli/evidence_publish.go, pkg/cli/validate.go
  • Unblocks the fork-based signing workflow issue.

Metadata

Metadata

Assignees

Fields

No fields configured for Enhancement.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions