Skip to content

Commit 07bf0ce

Browse files
committed
ci(gha): add TRIVY_SKIP_VERSION_CHECK to trivy container image scan job
1 parent e7cf31a commit 07bf0ce

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/pipeline.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -226,16 +226,6 @@ jobs:
226226
labels: ${{ steps.meta.outputs.labels }}
227227
cache-to: type=registry,ref=${{ env.BASE_IMAGE }}:cache
228228
cache-from: type=registry,ref=${{ env.BASE_IMAGE }}:cache,mode=max
229-
- name: Scan Image
230-
uses: aquasecurity/[email protected]
231-
with:
232-
versin: 0.66.0
233-
image-ref: ${{ steps.meta.outputs.tags }}
234-
format: 'table'
235-
exit-code: '1'
236-
ignore-unfixed: true
237-
vuln-type: 'os,library'
238-
scanners: 'vuln,secret,misconfig'
239229
- name: Validate Container Image
240230
run: |
241231
docker run -d -p 8080:8080 ${{ steps.meta.outputs.tags }}
@@ -246,6 +236,18 @@ jobs:
246236
exit 1
247237
fi
248238
echo "Health check passed. Status: $HEALTH_STATUS"
239+
- name: Scan Image
240+
uses: aquasecurity/[email protected]
241+
with:
242+
versin: 0.66.0
243+
image-ref: ${{ steps.meta.outputs.tags }}
244+
format: 'table'
245+
exit-code: '1'
246+
ignore-unfixed: true
247+
vuln-type: 'os,library'
248+
scanners: 'vuln,secret,misconfig'
249+
env:
250+
TRIVY_SKIP_VERSION_CHECK: true
249251
- name: Re-Build & Push Image
250252
uses: docker/build-push-action@v6
251253
with:

0 commit comments

Comments
 (0)