Made grype work with file

This commit is contained in:
2024-12-25 22:51:54 +01:00
parent 5afea6f44f
commit 911eef9f39
2 changed files with 6 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
FROM public.ecr.aws/docker/library/alpine:3.20
FROM public.ecr.aws/docker/library/alpine:3.21
RUN apk add --no-cache grype bash

View File

@@ -35,7 +35,11 @@ if [ -n "$INPUT_PLATFORM" ]; then
GRYPE_OPTIONS+=("--platform" "$INPUT_PLATFORM")
fi
if [[ "$INPUT_IMAGE_NAME" == *:* ]]; then
GRYPE_OPTIONS+=("registry:${IMAGE_NAME}")
else
GRYPE_OPTIONS+=("file:${INPUT_IMAGE_NAME}")
fi
# shellcheck disable=SC2145
echo "Running grype container scanning with options: ${GRYPE_OPTIONS[@]} --show-suppressed"