dockerfile: update govulncheck to v1.1.4
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
ARG GO_VERSION=1.24
|
ARG GO_VERSION=1.24
|
||||||
ARG ALPINE_VERSION=3.21
|
ARG ALPINE_VERSION=3.21
|
||||||
|
|
||||||
ARG GOVULNCHECK_VERSION=v1.1.3
|
ARG GOVULNCHECK_VERSION=v1.1.4
|
||||||
ARG FORMAT="text"
|
ARG FORMAT="text"
|
||||||
|
|
||||||
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base
|
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base
|
||||||
@@ -20,12 +20,6 @@ RUN --mount=type=bind,target=. <<EOT
|
|||||||
set -ex
|
set -ex
|
||||||
mkdir /out
|
mkdir /out
|
||||||
govulncheck -format ${FORMAT} ./... | tee /out/govulncheck.out
|
govulncheck -format ${FORMAT} ./... | tee /out/govulncheck.out
|
||||||
if [ "${FORMAT}" = "sarif" ]; then
|
|
||||||
# Make sure "results" field is defined in SARIF output otherwise GitHub Code Scanning
|
|
||||||
# will fail when uploading report with "Invalid SARIF. Missing 'results' array in run."
|
|
||||||
# Relates to https://github.com/golang/vuln/blob/ffdef74cc44d7eb71931d8d414c478b966812488/internal/sarif/sarif.go#L69
|
|
||||||
jq '(.runs[] | select(.results == null) | .results) |= []' /out/govulncheck.out | tee >(sponge /out/govulncheck.out)
|
|
||||||
fi
|
|
||||||
EOT
|
EOT
|
||||||
|
|
||||||
FROM scratch AS output
|
FROM scratch AS output
|
||||||
|
|||||||
Reference in New Issue
Block a user