Skip to content

Commit d1757bd

Browse files
committed
chore: prevent attacker-controllable input
1 parent 8311069 commit d1757bd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/release-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,13 @@ jobs:
7373
run: |
7474
set -Eeuo pipefail
7575
FORMATTED_DIGEST=${DIGEST//:/_}
76-
gh attestation verify --repo ${{ github.repository }} "oci://${REGISTRY}/${{ github.repository }}-${CONTAINER_FLAVOR}@${DIGEST}" --format json --jq '.[] | .attestation.bundle.dsseEnvelope | select(.payloadType == "application/vnd.in-toto+json").payload' | base64 -d | jq . > "${{ github.repository_owner }}-${{ github.event.repository.name }}-${CONTAINER_FLAVOR}_${FORMATTED_DIGEST}.intoto.jsonl"
76+
gh attestation verify --repo ${{ github.repository }} "oci://${REGISTRY}/${{ github.repository }}-${CONTAINER_FLAVOR}@${DIGEST}" --format json --jq '.[] | .attestation.bundle.dsseEnvelope | select(.payloadType == "application/vnd.in-toto+json").payload' | base64 -d | jq . > "${REPOSITORY_OWNER}-${REPOSITORY_NAME}-${CONTAINER_FLAVOR}_${FORMATTED_DIGEST}.intoto.jsonl"
7777
gh release upload "${REF_NAME}" ./*.intoto.jsonl
7878
env:
7979
DIGEST: ${{ steps.inspect-manifest.outputs.digest }}
8080
GH_TOKEN: ${{ github.token }}
81+
REPOSITORY_OWNER: ${{ github.repository_owner }}
82+
REPOSITORY_NAME: ${{ github.event.repository.name }}
8183
- name: Update package details in release
8284
run: |
8385
set -Eeuo pipefail

0 commit comments

Comments
 (0)