Skip to content

Commit

Permalink
added trivy scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
akannan1087 authored Jan 8, 2025
1 parent bdff204 commit 6bbf5bb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,12 @@ jobs:
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
# Download and install Trivy
- name: Install Trivy
run: |
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh
# Scan the Docker image
- name: Scan Docker Image
run: |
trivy image --exit-code 1 --severity CRITICAL,HIGH $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG

0 comments on commit 6bbf5bb

Please sign in to comment.