-
Notifications
You must be signed in to change notification settings - Fork 137
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
Add functionality to output the UUID for log lookup purposes #3744
Closed
Closed
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
930ed59
Add functionality to output the UUID for log lookup purposes
daoauth 5d19df0
fix output name and update README.md
daoauth 3473314
update description
daoauth d440ec9
reformat workflow outputs table
daoauth 83b4cea
fix uuid length
daoauth 4853ba0
fix markdown format
daoauth bf7ef05
Merge branch 'main' into main
daoauth d9a57c9
update CHANGELOG.md
daoauth 6601053
update CHANGELOG.md
daoauth c81f799
Update CHANGELOG.md
daoauth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,6 +97,9 @@ on: | |
provenance-name: | ||
description: "The artifact name of the signed provenance. (A file with the intoto.jsonl extension)." | ||
value: ${{ jobs.generator.outputs.provenance-name }} | ||
provenance-rekor-uuid: | ||
description: "The Rekor UUID is a unique identifier that can be used to search for and view specific log entry details on the Rekor Search UI." | ||
value: ${{ jobs.generator.outputs.uuid }} | ||
# Note: we use this output because there is no buildt-in `outcome` and `result` is always `success` | ||
# if `continue-on-error` is set to `true`. | ||
outcome: | ||
|
@@ -145,6 +148,7 @@ jobs: | |
outcome: ${{ steps.final.outputs.outcome }} | ||
provenance-sha256: ${{ steps.sign-prov.outputs.provenance-sha256 }} | ||
provenance-name: ${{ steps.sign-prov.outputs.provenance-name }} | ||
uuid: ${{ steps.sign-prov.outputs.uuid }} | ||
subject-artifact-name: ${{ steps.metadata.outputs.artifact_name }} | ||
runs-on: ubuntu-latest | ||
needs: [detect-env] | ||
|
@@ -234,7 +238,10 @@ jobs: | |
# number of subjects based on in-toto attestation bundle file naming conventions. | ||
# See: https://github.com/in-toto/attestation/blob/main/spec/bundle.md#file-naming-convention | ||
# NOTE: The attest commmand outputs the provenance-name and provenance-sha256 | ||
"$GITHUB_WORKSPACE/$BUILDER_BINARY" attest --subjects-filename "${SUBJECTS_FILENAME}" -g "$untrusted_prov_name" | ||
output=$("$GITHUB_WORKSPACE/$BUILDER_BINARY" attest --subjects-filename "${SUBJECTS_FILENAME}" -g "$untrusted_prov_name") | ||
echo "$output" | ||
uuid=$(echo "$output" | grep -oP 'UUID \K[0-9a-f]{80}') | ||
echo "uuid=$uuid" >> $GITHUB_OUTPUT | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lint errors: please run |
||
|
||
- name: Upload the signed provenance | ||
id: upload-prov | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nonblocker: it seems the rekor UUID is meant to be 64 hex digits, not 80.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The length of the UUID generated in "create and sign provenance" is 80.
https://search.sigstore.dev/?uuid=24296fb24b8ad77a037b175b6a98db3d318ae8d94428f5be89eb07c8a6b70b58b54bdd32c7b15fb6
https://docs.sigstore.dev/logging/sharding/#identifier-definitions-entryid-uuid-logid-log-index
So, I think the UUID used as a search parameter in sigstore is actually an entry ID.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The additional prefix digits are for distinguishing which log "shard" hosts the content.