Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PF-1408 slsaprovenance was not good enough must use slsaprovenance1 as type #169

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

kiversen
Copy link
Contributor

@kiversen kiversen commented Oct 2, 2024

When signing the image we also add the slsa provenance data like this:

cosign attest --yes --predicate ./provenance.json --type slsaprovenance "${{ steps.set-image-name.outputs.image-name }}@${DIGEST}"
But when we are verifying, with kyverno, we expects the slsa provenance data to be compliant with slsa provenance v1.

We must explicitly use the slsaprovenance1 when defining the type:

 --type='custom':     
specify a predicate type     

(slsaprovenance|slsaprovenance02|slsaprovenance1|link|spdx|spdxjson|cyclonedx|vuln|openvex|custom) or an URI

The correct cosign command should be:

cosign attest --yes --predicate ./provenance.json --type slsaprovenance1 "${{ steps.set-image-name.outputs.image-name }}@${DIGEST}"

@kiversen kiversen requested a review from a team October 2, 2024 16:03
@kiversen kiversen merged commit 99dcc14 into main Oct 2, 2024
1 check passed
@kiversen kiversen deleted the PF-1408-use-slsaprovenance1-as-predictatype branch October 2, 2024 16:40
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.

2 participants