-
Notifications
You must be signed in to change notification settings - Fork 49
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
bug: slsa-verifier failing to validate google cloud generated provenance #700
Comments
\cc @drewroengoogle |
In regards to impact, this is preventing us from doing any deployments of our Flutter infra applications. Is there a workaround or flag we can set to ignore the |
Thanks for the report. Please revert to the older slsa-verifier version (2.3.0). Can you attach (or copy) the result of your We added some preliminary code to verify GCB v1.0 in v2.4.0, but not fully tested and not officially released. We're missing the e2e tests. I'll work on these right away and cut a new version |
Yes, here's the provenance of one of an artifact that failed validation today:
|
Thanks. Taking a look. |
@godofredoc is correct. The text provenance and the payload's provenance don't match. Patching the text provenance with: "sourceProvenance": {
"resolvedGitSource": {
"revision": "27ecaf67be8ec7f8571b75553715bc05f3a7022c",
"url": "https://github.com/flutter/cocoon.git"
}
}, makes the verification pass. Let's create a bug on GCB side to ask why this inconsistency is happening. |
Here's a patch you can use temporarily (it assumes there's a single v0.1 provenance, which may soon change with v1.0 release at Cloud Next): gcloud artifacts docker images describe $DOCKER_IMAGE_URL --show-provenance --format json > tmp.json
val=$(cat tmp.json | jq -r '.provenance_summary.provenance[0].envelope.payload' | base64 -d | jq '.predicate.recipe.arguments.sourceProvenance')
cat tmp.json | jq ".provenance_summary.provenance[0].build.intotoStatement.slsaProvenance.recipe.arguments.sourceProvenance = ${val}" > provenance.json
slsa-verifier ... --provenance-path provenance.json ... |
Thank you @laurentsimon for the workaround. I'll implement it in the flutter workflow to unblock the validation. |
@godofredoc It's been about a year. Is this still an issue for you? |
Error:
The issue is that provenance generated with
gcloud artifacts docker images describe $DOCKER_IMAGE_URL --show-provenance --format json > $OUTPUT_DIRECTORY
has an empty sourceProvenance in the plain text part of the file:But the base64 payload contains the full sourceprovenance:
The text was updated successfully, but these errors were encountered: