fix: improve trivy stage
This commit is contained in:
+10
-8
@@ -36,16 +36,18 @@ dev_deploy:
|
||||
- master
|
||||
|
||||
dev_trivy:
|
||||
image: eu.gcr.io/vnc-development/docker-vnc-runner:latest
|
||||
image: aquasec/trivy:latest
|
||||
stage: scan
|
||||
script:
|
||||
- apt -y update
|
||||
- apt -y install wget apt-transport-https gnupg lsb-release
|
||||
- wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | apt-key add -
|
||||
- echo "deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main" >> /etc/apt/sources.list.d/trivy.list
|
||||
- apt -y update
|
||||
- apt -y install trivy
|
||||
- trivy image --input scan/mucrest.tgz
|
||||
- trivy image --exit-code 1 --format template --template "@/contrib/junit.tpl" -o mucrest.xml --input scan/mucrest.tgz
|
||||
artifacts:
|
||||
public: false
|
||||
expire_in: 12h
|
||||
paths:
|
||||
- ./*.xml
|
||||
reports:
|
||||
junit:
|
||||
- ./*.xml
|
||||
only:
|
||||
- master
|
||||
|
||||
|
||||
Reference in New Issue
Block a user