Testing trivy checksum #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests trivy SHA | |
env: | |
HADOLINT_VERSION: "2.12.0" | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/*" | |
jobs: | |
pull-test: | |
runs-on: ubuntu-latest | |
services: | |
registry: | |
image: registry:2 | |
ports: | |
- 5000:5000 | |
env: | |
TRIVY_VERSION: "0.58.2" | |
TRIVY_DATABASES: '"ghcr.io/aquasecurity/trivy-db:2","public.ecr.aws/aquasecurity/trivy-db"' | |
TRIVY_JAVA_DATABASES: '"ghcr.io/aquasecurity/trivy-java-db:1","public.ecr.aws/aquasecurity/trivy-java-db"' | |
TRIVY_MAX_RETRIES: 5 | |
TRIVY_RETRY_DELAY: 20 | |
steps: | |
# Scan image for vulnerabilities | |
- name: Trivy Sha | |
run: | | |
curl -sLO https://github.com/aquasecurity/trivy/releases/download/v${{ env.TRIVY_VERSION }}/trivy_${{ env.TRIVY_VERSION }}_Linux-64bit.tar.gz \ | |
&& curl -LO https://github.com/aquasecurity/trivy/releases/download/v${{ env.TRIVY_VERSION }}/trivy_${{ env.TRIVY_VERSION }}_checksums.txt \ | |
&& grep "trivy_${{ env.TRIVY_VERSION }}_Linux-64bit.tar.gz" trivy_${{ env.TRIVY_VERSION }}_checksums.txt | sha256sum -c - \ | |
&& tar -xf trivy_${{ env.TRIVY_VERSION }}_Linux-64bit.tar.gz \ | |
&& chmod +x trivy \ | |
&& sudo mv ./trivy /usr/local/bin/trivy | |
trivy --version |