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

[discussion] Support tags other than github.ref #1947

Open
ianlewis opened this issue Apr 10, 2023 · 2 comments
Open

[discussion] Support tags other than github.ref #1947

ianlewis opened this issue Apr 10, 2023 · 2 comments
Labels
area:docker-based Docker based builder (supplying a builder image and command) area:generic Issue with the generic generator area:go Issue related to the Go ecosystem area:nodejs Issue related to the Node.js builder type:discussion A point of discussion

Comments

@ianlewis
Copy link
Member

Some workflows release via a workflow_dispatch event (example: jib).

Several slsa-github-generator workflows support an upload-tag-name field to allow uploading provenance to a tag other than github.ref since there is no associated tag for workflow_dispatch events.

Currently the provenance does not include any info on the tag used to generate the artifact in this case so slsa-verifier cannot verify the tag using --source-tag.

Should we support something like this? How?

I think it's not possible for the generic generator since we have no control over the source and build steps themselves, however it might be possible with builder workflows.

@ianlewis ianlewis added area:go Issue related to the Go ecosystem area:generic Issue with the generic generator type:discussion A point of discussion area:docker-based Docker based builder (supplying a builder image and command) labels Apr 10, 2023
@ianlewis
Copy link
Member Author

Example test:

$ slsa-verifier verify-artifact --source-tag v99 --provenance-path multiple.intoto.jsonl --source-uri github.com/ianlewis/actions-test artifact1 
Verified signature against tlog entry index 17555002 at URL: https://rekor.sigstore.dev/api/v1/log/entries/24296fb24b8ad77a538ab5c694d7c9b8653e6f866ffef63a4b8c4b4ab038a045c50d334ea8f59a18
Verifying artifact artifact1: FAILED: expected tag 'refs/tags/v99', got '': tag used to generate the binary does not match provenance

FAILED: SLSA verification failed: expected tag 'refs/tags/v99', got '': tag used to generate the binary does not match provenance

@ianlewis ianlewis added the area:nodejs Issue related to the Node.js builder label Apr 10, 2023
@another-rex
Copy link

+1 we are also running into this problem in osv-scanner. We create the tag during the workflow_dispatch event, and it'll be great to have the tag information in the provenance generated at the end.

another-rex added a commit to google/osv-scanner that referenced this issue Oct 26, 2023
- Fix github action documentation to have correct examples
- Update jekyll feed dependency, which renovate bot fails to do for some
reason
- Set the upload-tag-name to actually upload the verification along with
the release using the new pipeline. (This is because the new pipeline no
longer runs "on" a commit, so cannot automatically pick up the tag. This
actually causes bigger problems in that we can't verify the tag (see
slsa-framework/slsa-github-generator#1947))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:docker-based Docker based builder (supplying a builder image and command) area:generic Issue with the generic generator area:go Issue related to the Go ecosystem area:nodejs Issue related to the Node.js builder type:discussion A point of discussion
Projects
None yet
Development

No branches or pull requests

3 participants