Skip to content

Commit

Permalink
Use fallback trivy db repos in testDocker (#1034)
Browse files Browse the repository at this point in the history
* Use fallback trivy db repos in testDocker

* CircleCI
  • Loading branch information
usmansaleem authored Oct 31, 2024
1 parent 68db6b7 commit 1e0a1e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ jobs:
name: Scan with trivy
shell: /bin/sh
command: |
export TRIVY_DB_REPOSITORY="ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db"
export TRIVY_JAVA_DB_REPOSITORY="ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db"
$HOME/bin/trivy image consensys/web3signer:develop-arm64 --image-src remote --exit-code 1 --quiet --no-progress --severity HIGH,CRITICAL --ignorefile "gradle/trivyignore.txt" --timeout 10m
$HOME/bin/trivy image consensys/web3signer:develop-amd64 --image-src remote --exit-code 1 --quiet --no-progress --severity HIGH,CRITICAL --ignorefile "gradle/trivyignore.txt" --timeout 10m
Expand Down
5 changes: 4 additions & 1 deletion docker/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ eth2 \
docker image rm ${DOCKER_TEST_IMAGE}

# also check for security vulns with trivy
docker run aquasec/trivy image $DOCKER_IMAGE
docker run \
-e "TRIVY_DB_REPOSITORY=ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db" \
-e "TRIVY_JAVA_DB_REPOSITORY=ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db" \
aquasec/trivy image $DOCKER_IMAGE

echo "test.sh Exit code: $i"
exit $i

0 comments on commit 1e0a1e2

Please sign in to comment.