Skip to content
Snippets Groups Projects
Commit 8431b34f authored by Joost Hemmen's avatar Joost Hemmen :basketball:
Browse files

Update file security-scan.gitlab-ci.yml

parent 3e387ab4
No related branches found
No related tags found
1 merge request!243Resolve "Document CVEs of images used in docker compose setup"
Pipeline #486435 failed
......@@ -8,18 +8,17 @@ scan-docker-images:
# Install Trivy in the pipeline environment
- apk add --no-cache curl
- curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin v0.58.2
script:
- "docker compose pull -q"
- "docker compose build -q"
- for image in $(docker images --format "{{.Repository}}:{{.Tag}}"); do
echo "Scanning $image ...";
trivy image $image --severity critical --exit-code 0 >> ./trivy.${image}.out;
trivy image $image --severity critical --exit-code 0 >> ./trivy.out;
done
artifacts:
when: on_success
paths:
- trivy-*.json
- ./trivy.out
rules:
- if: $CI_COMMIT_BRANCH == "main"
expire_in: 30 days
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment