File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,10 @@ jobs:
145
145
run : |
146
146
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b /usr/local/bin v0.49.0
147
147
148
+ - name : Install yq
149
+ run : |
150
+ wget https://github.com/mikefarah/yq/releases/download/v4.42.1/yq_linux_amd64.tar.gz -O - | tar xz && sudo mv yq_linux_amd64 /usr/bin/yq
151
+
148
152
- name : Install Kayobe
149
153
run : |
150
154
mkdir -p venvs &&
Original file line number Diff line number Diff line change
1
+ ---
2
+ # ##############################################################################
3
+ # Trivy allowed vulnerabilities list
4
+
5
+ # Example allowed vulnerabilities file setup
6
+ #
7
+ # keystone_allowed_vulnerabilities:
8
+ # CVE-2022-2447
9
+ #
10
+ # horizon_allowed_vulnerabilities:
11
+ # CVE-2022-45582
12
+
13
+ # ##############################################################################
14
+ # Dummy variable to allow Ansible to accept this file.
15
+ workaround_ansible_issue_8743 : yes
Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ touch image-scan-output/clean-images.txt image-scan-output/dirty-images.txt
33
33
# If there are vulnerabilities detected, add it to dirty-images.txt and
34
34
# generate a csv summary
35
35
for image in $images ; do
36
+ rm .trivyignore && touch .trivyignore
37
+ for vulnerability in $( yq ${image} _allowed_vulnerabilities $KAYOBE_CONFIG_PATH /trivy.yml) ; do
38
+ echo $vulnerability >> .trivyignore;
39
+ done
36
40
filename=$( basename $image | sed ' s/:/\./g' )
37
41
if $( trivy image \
38
42
--quiet \
You can’t perform that action at this time.
0 commit comments