diff --git a/vsa/README.md b/vsa/README.md new file mode 100644 index 0000000..ceeea1d --- /dev/null +++ b/vsa/README.md @@ -0,0 +1,14 @@ +# create multiple images each with a vsa attached +```bash +create-multiple-VSAs.sh +``` + +# get attestation from an oci registry +```bash +oci_get_entry.sh +``` + +# get an entry from rekor by digest +```bash +rekor_get_entry.sh +``` \ No newline at end of file diff --git a/vsa/create-multiple-VSAs.sh b/vsa/create-multiple-VSAs.sh new file mode 100644 index 0000000..059cba9 --- /dev/null +++ b/vsa/create-multiple-VSAs.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +set -euo pipefail + +REPO="quay.io/jstuart/hacbs-docker-build" +KEY="cosign.key" +mkdir -p blobs predicates + +for i in {1..2}; do + blob="blobs/file-$i.txt" + echo "This is blob $i" > "$blob" + + digest=$(oras push "$REPO:blob-$i" "$blob:application/vnd.test.file" 2>&1 | grep "Digest:" | awk '{print $2}') + echo "Got digest: $digest" + + pred="predicates/predicate-$i.json" + cat > "$pred" < "$blob" + + digest=$(oras push "$REPO:blob-$i" "$blob:application/vnd.test.file" 2>&1 | grep "Digest:" | awk '{print $2}') + echo "Got digest: $digest" + + pred="predicates/predicate-$i.json" + cat > "$pred" <