Skip to content

fix: include artifactType in OCI 1.1 signature referrer manifest (cherry-pick PR-4997 to release-2.6)#5002

Open
anithapriyanatarajan wants to merge 2 commits into
sigstore:release-2.6from
anithapriyanatarajan:cherry-pick-fix-signature-artifactType
Open

fix: include artifactType in OCI 1.1 signature referrer manifest (cherry-pick PR-4997 to release-2.6)#5002
anithapriyanatarajan wants to merge 2 commits into
sigstore:release-2.6from
anithapriyanatarajan:cherry-pick-fix-signature-artifactType

Conversation

@anithapriyanatarajan

Copy link
Copy Markdown
Contributor

Summary

Cherry-pick of #4997 onto release-2.6.

Closes #4995

WriteSignaturesExperimentalOCI was constructing the OCI 1.1 referrer manifest by marshalling a plain v1.Manifest struct, which does not include the top-level artifactType field required by the OCI 1.1 Image Manifest spec. As a result, signature referrer manifests uploaded via the experimental OCI path were missing artifactType, making them non-compliant and difficult to discover by tools that filter referrers by type.

Fix: Replace the json.Marshal(&m) + taggableManifest approach with the existing referrerManifest wrapper (already used by WriteReferrer and WriteAttestationsReferrer), which serializes the top-level artifactType field correctly. The value is application/vnd.dev.cosign.artifact.sig.v1+json, consistent with what ociexperimental.ArtifactType("sig") already computed in the function.

Adaptation from original: rm.targetRef(d.Repository) is called without options, as the release-2.6 version of targetRef does not accept variadic options (added later on main). The fix is otherwise identical.

Release Note

Fixed WriteSignaturesExperimentalOCI to include the top-level artifactType field (application/vnd.dev.cosign.artifact.sig.v1+json) in OCI 1.1 referrer manifests produced for signatures, aligning with the OCI 1.1 Image Manifest specification.

Documentation

No documentation update required.

Signed-off-by: Anitha Natarajan <anataraj@redhat.com>
(cherry picked from commit dd7417d)
Signed-off-by: Anitha Natarajan <anataraj@redhat.com>
@anithapriyanatarajan anithapriyanatarajan requested a review from a team as a code owner July 13, 2026 14:32
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release-2.6@fecddd3). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff               @@
##             release-2.6    #5002   +/-   ##
==============================================
  Coverage               ?   35.96%           
==============================================
  Files                  ?      218           
  Lines                  ?    12489           
  Branches               ?        0           
==============================================
  Hits                   ?     4492           
  Misses                 ?     7284           
  Partials               ?      713           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Hayden-IO

Copy link
Copy Markdown
Contributor

This is the challenge with these backports, figuring out what's needed for CI that runs against scaffolding@main. You'll need to cherry pick #4970 in as well.

…orkflow (sigstore#4970)

Signed-off-by: Aaron Lew <64337293+aaronlew02@users.noreply.github.com>
(cherry picked from commit 38f73bb)
@anithapriyanatarajan anithapriyanatarajan requested a review from a team as a code owner July 13, 2026 16:06
@anithapriyanatarajan

Copy link
Copy Markdown
Contributor Author

You'll need to cherry pick #4970 in as well.

Thank you for pointing out. Cherry-picked #4970 and the CI is passing now.

@Hayden-IO Hayden-IO left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@steiza steiza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Did you also want #4996? Maybe in a separate pull request against release-2.6? Just trying to figure out if we should land this as-is (which is fine by me).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants