Skip to content

Commit

Permalink
- Move to only public ecr for trivy as there ratelimits are higher
Browse files Browse the repository at this point in the history
- Change trivy-action to pull from ecr registry
Signed-off-by: Shailesh Pant <[email protected]>
  • Loading branch information
ishaileshpant committed Nov 13, 2024
1 parent 0e16aff commit 20be334
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
docker build --pull -t docker.io/securefederatedai/openfl:${{ github.sha }} -f openfl-docker/Dockerfile.base .
- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
uses: aquasecurity/[email protected]
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2
with:
image-ref: 'docker.io/securefederatedai/openfl:${{ github.sha }}'
format: 'sarif'
Expand All @@ -46,7 +48,7 @@ jobs:
--ignore-unfixed \
--vuln-type os,library \
--severity CRITICAL,HIGH,MEDIUM,LOW \
--db-repository 'ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db' \
--db-repository 'public.ecr.aws/aquasecurity/trivy-db:2,ghcr.io/aquasecurity/trivy-db' \
.
- name: Upload Code Vulnerability Scan Results
Expand All @@ -57,6 +59,8 @@ jobs:

- name: Run Trivy vulnerability scanner for Docker image (JSON Output)
uses: aquasecurity/[email protected]
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2
with:
image-ref: 'docker.io/securefederatedai/openfl:${{ github.sha }}'
format: 'json'
Expand All @@ -80,7 +84,7 @@ jobs:
--ignore-unfixed \
--vuln-type os,library \
--severity CRITICAL,HIGH,MEDIUM,LOW \
--db-repository 'ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db' \
--db-repository 'public.ecr.aws/aquasecurity/trivy-db:2,ghcr.io/aquasecurity/trivy-db' \
.
- name: Upload Code Vulnerability Scan Results
Expand All @@ -91,6 +95,8 @@ jobs:

- name: Run Trivy vulnerability scanner for Docker image (SPDX-JSON Output)
uses: aquasecurity/[email protected]
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2
with:
image-ref: 'docker.io/securefederatedai/openfl:${{ github.sha }}'
format: 'spdx-json'
Expand Down

0 comments on commit 20be334

Please sign in to comment.