Skip to content

Commit

Permalink
vuln thresholds dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Long committed Feb 21, 2024
1 parent 3f377eb commit 797b66f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ dtg=$(date +"%Y-%m-%d_%H-%M-%S")
job=$(echo $GITHUB_RUN_ID)
out_file="$sbom_dir/sbom-$job-$dtg.json"

echo "[+] invoking inspector-sbomgen to generate sbom for $artifact_type $artifact_path"
$sbomgen $artifact_type $artifact_path_arg $artifact_path $prog -o $out_file

# move the logs and give needed permissions for the uploader
Expand All @@ -49,13 +50,17 @@ chmod -R o+r logs
chmod -R o+r $sbom_dir

# scan SBOM with Inspector
echo "scanning $out_file with Amazon Inspector"
scan_dir=inspector-scan
scan_file=$scan_dir/inspector-scan-$job-$dtg.json
mkdir $scan_dir
cp $out_file ./sbom_to_scan.json

echo "[i] invoking aws cli to scan SBOM with Amazon Inspector"
aws inspector-scan scan-sbom --sbom file://sbom_to_scan.json --output-format CYCLONE_DX_1_5 > $scan_file 2>&1
chmod -R o+r $scan_dir

# present findings
echo "[i] presenting summarized findings"
python3 /present_findings.py $scan_file $out_file $thresholds_enabled $critical_threshold $high_threshold $medium_threshold $low_threshold


0 comments on commit 797b66f

Please sign in to comment.