Skip to content

Commit 558ddcd

Browse files
authored
Update docker-image.yml
1 parent c608a2a commit 558ddcd

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/docker-image.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ permissions:
3636
packages: write # push to ghcr.io via GITHUB_TOKEN
3737
security-events: write # upload SARIF to “Code scanning”
3838
actions: read # needed by upload-sarif in private repos
39+
id-token: write # required for OIDC token generation
3940

4041
jobs:
4142
build-scan-sign:
@@ -180,17 +181,17 @@ jobs:
180181

181182
- name: 🔏 Sign & attest images (latest + timestamp)
182183
env:
183-
COSIGN_EXPERIMENTAL: "1" # required for key-less flow
184-
OIDC_ISSUER: https://token.actions.githubusercontent.com
184+
COSIGN_EXPERIMENTAL: "1"
185185
run: |
186186
for REF in $IMAGE_NAME:latest $IMAGE_NAME:${{ env.TAG }}; do
187187
echo "🔑 Signing $REF"
188-
cosign sign --yes --oidc-issuer "$OIDC_ISSUER" "$REF" # key-less sign
188+
cosign sign --yes "$REF"
189+
189190
echo "📝 Attesting SBOM for $REF"
190191
cosign attest --yes \
191-
--predicate sbom.spdx.json \
192-
--oidc-issuer "$OIDC_ISSUER" \
193-
"$REF" # SBOM attestation
192+
--predicate sbom.spdx.json \
193+
--type spdxjson \
194+
"$REF"
194195
done
195196
196197
# -------------------------------------------------------------

0 commit comments

Comments
 (0)