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

Use cosign @ HEAD for Github OIDC sign blob test #1678

Merged
merged 1 commit into from
Mar 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/github-oidc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ jobs:
- name: Build and sign a blob
run: |
set -e
make cosign
make sign-blob-experimental
8 changes: 5 additions & 3 deletions test/sign_blob_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,18 @@
set -ex

export COSIGN_EXPERIMENTAL=1
COSIGN_CLI=./cosign

echo "Creating a unique blob"
BLOB=verify-experimental-blob
date > $BLOB
cat $BLOB

echo "Sign the blob with cosign first and upload to rekor"
SIG=$(cosign sign-blob $BLOB)
SIG=$($COSIGN_CLI sign-blob $BLOB)

echo "Verifying ..."
cosign verify-blob -signature $SIG $BLOB
$COSIGN_CLI verify-blob -signature $SIG $BLOB

# Now, sign the blob with a self-signed certificate and upload to rekor
SIG_FILE=verify-experimental-signature
Expand Down Expand Up @@ -76,4 +78,4 @@ curl -X POST https://rekor.sigstore.dev/api/v1/log/entries -H 'Content-Type: app

# Verifying should still work
echo "Verifying ..."
cosign verify-blob --signature $SIG $BLOB
$COSIGN_CLI verify-blob --signature $SIG $BLOB