Skip to content

Commit

Permalink
Testing out Docker Scout if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
tefirman committed Oct 19, 2024
1 parent 3f63cec commit d412d14
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/docker-scout.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ jobs:
sh install-scout.sh
- name: Docker Scout
run: |
docker scout cves getwilds/bwa:latest --only-fixed --format sarif --output cves.json
NUM_VUL=$(jq '.runs[0].tool.driver.rules | length' cves.json)
docker scout cves getwilds/bwa:latest --only-fixed --format sarif --output cve_check.json
NUM_VUL=$(jq '.runs[0].tool.driver.rules | length' cve_check.json)
if [[ $NUM_VUL -ge 1 ]]; then
docker scout cves getwilds/bwa:latest --only-fixed --format markdown --output cves.html
if [[ $(wc -c cves.html) -le 65536 ]]; then
gh issue create --repo getwilds/wilds-docker-library --title "bwa Vulnerability Analysis" --body-file cves.html
docker scout cves getwilds/bwa:latest --only-fixed --format markdown --output cve_check.html
if [[ $(wc -c cve_check.html) -le 65536 ]]; then
gh issue create --repo getwilds/wilds-docker-library --title "bwa Vulnerability Analysis" --body-file cve_check.html
else
echo "Significant issues present in bwa, see quickview below and run CVE analysis locally." > qv.txt
docker scout quickview getwilds/bwa:latest >> qv.txt
Expand Down

0 comments on commit d412d14

Please sign in to comment.