Skip to content

Commit 24149a8

Browse files
committed
Update Trivy vulnerability scan format to GitHub and remove image signing step
1 parent df086bb commit 24149a8

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

.github/workflows/docker-image.yml

+4-15
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ jobs:
7777
with:
7878
image-ref: ${{ fromJSON(steps.build.outputs.metadata)['image.name'] }}
7979
output: trivy-report.json
80-
format: json
80+
# format: json
81+
format: 'github'
82+
github-pat: ${{ github.token }}
8183
exit-code: 0
8284

8385
- name: Upload Vulnerability Scan Results
@@ -97,17 +99,4 @@ jobs:
9799
labels: ${{ steps.meta.outputs.labels }}
98100
cache-from: type=gha
99101
cache-to: type=gha,mode=max
100-
# Sign the resulting Docker image digest except on PRs.
101-
# This will only write to the public Rekor transparency log when the Docker
102-
# repository is public to avoid leaking data. If you would like to publish
103-
# transparency data even for private images, pass --force to cosign below.
104-
# https://github.com/sigstore/cosign
105-
- name: Sign the published Docker image
106-
if: ${{ github.event_name != 'pull_request' }}
107-
env:
108-
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
109-
TAGS: ${{ steps.meta.outputs.tags }}
110-
DIGEST: ${{ steps.build-and-push.outputs.digest }}
111-
# This step uses the identity token to provision an ephemeral certificate
112-
# against the sigstore community Fulcio instance.
113-
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
102+

0 commit comments

Comments
 (0)