Made grype work with file
This commit is contained in:
@@ -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
|
RUN apk add --no-cache grype bash
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,11 @@ if [ -n "$INPUT_PLATFORM" ]; then
|
|||||||
GRYPE_OPTIONS+=("--platform" "$INPUT_PLATFORM")
|
GRYPE_OPTIONS+=("--platform" "$INPUT_PLATFORM")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
GRYPE_OPTIONS+=("registry:${IMAGE_NAME}")
|
if [[ "$INPUT_IMAGE_NAME" == *:* ]]; then
|
||||||
|
GRYPE_OPTIONS+=("registry:${IMAGE_NAME}")
|
||||||
|
else
|
||||||
|
GRYPE_OPTIONS+=("file:${INPUT_IMAGE_NAME}")
|
||||||
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2145
|
# shellcheck disable=SC2145
|
||||||
echo "Running grype container scanning with options: ${GRYPE_OPTIONS[@]} --show-suppressed"
|
echo "Running grype container scanning with options: ${GRYPE_OPTIONS[@]} --show-suppressed"
|
||||||
|
|||||||
Reference in New Issue
Block a user