Skip to content

Conversation

arubegonsan
Copy link

Summary

This commit introduces a new --payload-media-type flag to the cosign sign command.

When signing with a custom payload using the --payload flag, users can now also specify the MIME type of that payload via --payload-media-type.

This media type is then stored in the mediaType field of the signature layer descriptor in the resulting OCI manifest. This allows consumers of the signature to correctly interpret the payload's content type.

If --payload is not used, this flag is ignored.

Release Note

Documentation

Needs documentation change.

@arubegonsan arubegonsan requested a review from a team as a code owner July 23, 2025 16:27
This commit introduces a new `--payload-media-type` flag to the
`cosign sign` command.

When signing with a custom payload using the `--payload` flag, users can
now also specify the MIME type of that payload via `--payload-media-type`.

This media type is then stored in the `mediaType` field of the signature
layer descriptor in the resulting OCI manifest. This allows consumers of
the signature to correctly interpret the payload's content type.

If `--payload` is not used, this flag is ignored.

Signed-off-by: Alberto Gonzalez <[email protected]>
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.

cosign sign --payload hardcodes layer MIME to application/vnd.dev.cosign.simplesigning.v1+json
1 participant