Harden dependency and image security checks

Signed-off-by: Jordan Mecom <jm@squareup.com>
This commit is contained in:
Jordan Mecom
2026-08-20 13:17:37 -07:00
parent cd0d33f085
commit 7ebc8382cc
19 changed files with 664 additions and 393 deletions

17
scripts/scan-container-image.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ $# -ne 1 || -z "$1" ]]; then
echo "usage: $0 <image-reference>" >&2
exit 2
fi
# Distribution advisories without a vendor package cannot be remediated in the
# image. Fail as soon as a high- or critical-severity fix is available so a
# stale base image or package layer cannot continue to ship unnoticed.
bin/trivy image \
--scanners vuln \
--severity HIGH,CRITICAL \
--ignore-unfixed \
--exit-code 1 \
"$1"