feat(attestations): add SigningMethod to Attestation

What does this MR do and why?

Adds Attestation.SigningMethod, which decodes the signing_method attribute that GitLab 19.6 added to List all attestations. It names the attestation method that signed the attestation: sigstore or local_ca.

The GitLab CLI needs it to verify LOCAL_CA attestations: glab attestation verify will choose the verification path (public Sigstore or the project's own CA) from this field.

The field is a plain string, like Status and PredicateKind in the same struct.

Is this a breaking change?

No. It adds one field.

How to validate

  • make reviewable passes, and make generate changes no file.
  • TestListAttestations now decodes signing_method.
  • On GitLab.com, ListAttestations for project 72356192 (the project in the existing test fixture) returns SigningMethod: "sigstore". On a local GitLab with the feature flag on, it returns both sigstore and local_ca.

References

Merge request reports

Loading
Loading