Skip to content

Commit 421bd7a

Browse files
authored
Bugfix/trivy reporting (#467)
* Adding trivy XML reporting * Adding trivyignore and exit codes
1 parent 7b52ba6 commit 421bd7a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.circleci/config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,13 @@ jobs:
8383
- run:
8484
name: Scan images
8585
command: |
86+
mkdir -p trivy-results
8687
for image in ./workspace_cache/*.tar; do
8788
[ -e "$image" ] || continue
88-
./trivy image --exit-code 0 --ignore-unfixed --severity "HIGH,CRITICAL" --no-progress -i "$image"
89+
./trivy image --exit-code 1 --format template --template "@contrib/junit.tpl" -o trivy-results/`basename $image`.xml --ignore-unfixed --severity "HIGH,CRITICAL" --no-progress -i "$image"
8990
done
91+
- store_test_results:
92+
path: trivy-results
9093

9194
scan_images_anchore:
9295
executor: anchore/anchore_engine

.trivyignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Both of these are coming from this file, but it's not actually installed in the container
2+
# /usr/lib/python3.7/site-packages/ansible_collections/netbox/netbox/poetry.lock
3+
CVE-2020-36242
4+
CVE-2020-14343

0 commit comments

Comments
 (0)