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