This commit is contained in:
parent
8473b553f8
commit
4c0d5f6ef9
@ -2,7 +2,7 @@ name: Vulnerability Scan
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 14 * * *'
|
- cron: "0 14 * * *"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
scan:
|
scan:
|
||||||
@ -16,9 +16,10 @@ jobs:
|
|||||||
id: scan
|
id: scan
|
||||||
uses: aquasecurity/trivy-action@master
|
uses: aquasecurity/trivy-action@master
|
||||||
with:
|
with:
|
||||||
image-ref: 'docker.asperti.com/paspo/glpi:latest'
|
image-ref: "docker.asperti.com/paspo/glpi:latest"
|
||||||
format: 'json'
|
format: "json"
|
||||||
output: 'trivy-results.json'
|
output: "trivy-results.json"
|
||||||
|
|
||||||
|
# if some vulnerability is found, we fail
|
||||||
- name: check output
|
- name: check output
|
||||||
run: if [ $(jq '.Results[0].Vulnerabilities|length' trivy-results.json) -ne "0" ] ; then exit 1 ; fi
|
run: if [ $(jq '.Results[0].Vulnerabilities|length' trivy-results.json) -ne "0" ] ; then exit 1 ; fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user