You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo"Warning: Empty image name provided from $$src_file. Skipping."$(if$(saveOutput), | tee -a dep-image-scan.txt,);\
246
+
return;\
247
+
fi;\
248
+
if grep -Fxq "$$img""$$scanned_images_tracker_file";then \
249
+
echo"= $$img (from $$src_file) - Already Processed"$(if$(saveOutput), | tee -a dep-image-scan.txt,);\
250
+
return;\
251
+
fi;\
252
+
echo"= Scanning $$img (from $$src_file)"$(if$(saveOutput), | tee -a dep-image-scan.txt,);\
253
+
if! docker pull "$$img";then \
254
+
echo"Error: Failed to pull Docker image $$img. Skipping scan."$(if$(saveOutput), | tee -a dep-image-scan.txt,);\
255
+
echo"$$img">>"$$scanned_images_tracker_file";\
256
+
return;\
257
+
fi;\
258
+
echo"$$img">>"$$scanned_images_tracker_file";\
259
+
printf"%s,""$${img}">> helm_image.list ;\
260
+
grype_json_output=$$(docker run --rm -v /var/run/docker.sock:/var/run/docker.sock anchore/grype:latest --output json "$$img" 2>/dev/null);\
261
+
if [ -z"$$grype_json_output" ];then \
262
+
echo"Warning: Grype produced no output for $$img. Command might have failed or image not found/supported by grype."$(if$(saveOutput), | tee -a dep-image-scan.txt,);\
263
+
echo$(if$(saveOutput), | tee -a dep-image-scan.txt,);\
(echo "Package\tVersion\tCVE\tSeverity";echo"$$scan_out_body") | column -t -s $$'\t'$(if$(saveOutput), | tee -a dep-image-scan.txt,);\
280
+
else\
281
+
echo"No vulnerability details to display for $$img (though summary reported counts)."$(if$(saveOutput), | tee -a dep-image-scan.txt,);\
282
+
fi;\
283
+
fi;\
284
+
echo$(if$(saveOutput), | tee -a dep-image-scan.txt,);\
285
+
};\
286
+
util_image=$$(grep -A2 'utilContainer:' charts/values.yaml | grep 'image:' | sed 's/.*image:[[:space:]]*//g' | sed 's/"//g' | xargs);\
287
+
scan_image "$$util_image""charts/values.yaml";\
288
+
haproxy_image=$$(grep -A 3 '^haproxy:' charts/values.yaml | grep -A 1 '^\s*image:' | grep '^\s*repository:' | sed 's/.*repository:[[:space:]]*//g' | sed 's/"//g' | sed 's/#.*//g' | xargs);\
289
+
haproxy_tag=$$(grep -A 4 '^haproxy:' charts/values.yaml | grep -A 2 '^\s*image:' | grep '^\s*tag:' | sed 's/.*tag:[[:space:]]*//g' | sed 's/"//g' | sed 's/{{.*}}/latest/' | sed 's/#.*//g' | xargs);\
0 commit comments