Skip to content

Commit 519a26a

Browse files
committed
modified the build.yaml
1 parent 8964e4c commit 519a26a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,12 @@ jobs:
6969
env:
7070
REGISTRY_URL: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com
7171
IMAGE_NAME: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/${{ env.ECR_REPO }}:${{ env.CODE_BRANCH }}.${{ github.run_number }}
72-
run: |
73-
echo "Testing Image with Trivy: $IMAGE_NAME"
74-
docker run --rm --name trivy -u root -v /var/run/docker.sock:/var/run/docker.sock aquasecurity/trivy:latest \
75-
image --exit-code 1 --severity HIGH,CRITICAL $IMAGE_NAME
72+
uses: aquasecurity/trivy-action@master
73+
with:
74+
image-ref: '${{ env.IMAGE_NAME }}'
75+
format: 'table'
76+
exit-code: 1
77+
severity: 'CRITICAL,HIGH'
7678

7779
- name: Configure AWS Role to assume using OIDC authentication
7880
uses: aws-actions/configure-aws-credentials@v4

0 commit comments

Comments
 (0)