Skip to content

Commit

Permalink
chore(scripts): create a script to check trivy
Browse files Browse the repository at this point in the history
  • Loading branch information
saku-koodari committed Jan 8, 2025
1 parent a9e2b6c commit 80b44d2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions scripts/run_trivy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

set -euo pipefail

source "$( dirname "${BASH_SOURCE[0]}" )/common-functions.sh"

repo="https://github.com/Opetushallitus/koto-rekisteri"
reportDir="temp"
repoName="koto-rekisteri"
trivyImage=aquasec/trivy:latest

docker pull ${trivyImage}

docker run --rm \
--volume trivy-cache:/trivy-cache \
--volume ${reportDir}:/reports \
${trivyImage} \
repo ${repo} \
--cache-dir /trivy-cache \
--scanners vuln \
--format json \
--output /reports/${repoName}_trivy.json

0 comments on commit 80b44d2

Please sign in to comment.