Skip to content

Commit 7260b5b

Browse files
bluesentinelsecMichael Long
andauthored
Display 'no vulns found' for Dockerfiles (#92)
Co-authored-by: Michael Long <mlongii@amazon.com>
1 parent cdcff85 commit 7260b5b

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

entrypoint/entrypoint/dockerfile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,10 @@ def write_dockerfile_report_md(inspector_scan_path, dst_file):
331331
row = vuln_to_markdown_row(vuln)
332332
markdown_report += row
333333

334+
if len(dockerfile_vulns) == 0:
335+
row = ":green_circle: Amazon Inspector scanned for security issues in Dockerfiles and no issues were found."
336+
markdown_report += row
337+
334338
logging.info(f"writing Dockerfile vulnerability markdown report to: {dst_file}")
335339
with open(dst_file, "w") as f:
336340
f.write(markdown_report)

entrypoint/test.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
python3 main.py \
4+
--artifact-type="container" \
5+
--artifact-path="alpine:latest" \
6+
--display-vuln-findings="enabled" \
7+
--out-sbom="./sbom.json" \
8+
--out-scan="inspector_scan_.json" \
9+
--out-scan-csv="inspector_scan_.csv" \
10+
--out-scan-markdown="inspector_scan_.md" \
11+
--out-dockerfile-scan-csv="inspector_dockerfile_scan_.csv" \
12+
--out-dockerfile-scan-md="inspector_dockerfile_scan_.md" \
13+
--sbomgen-version="1.4.0"
14+

0 commit comments

Comments
 (0)