1
0
mirror of https://github.com/lxc/incus.git synced 2026-02-05 09:46:19 +01:00

lint: Make govulncheck non-fatal

There is no mechanism to override govulncheck for the situation where it
reports a security issue with no available fixes and where the code in
question isn't in use in the project.

Instead it fails and prevents any further change to be merged until an
eventual release of a fix.

So just make it informational and rely on dependency-review (Github
Action) instead for the blocking checks as that one can have exceptions
correctly added.

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This commit is contained in:
Stéphane Graber
2025-11-19 17:01:42 -05:00
parent 48b53e7e92
commit e8dc7e3c7c

View File

@@ -1,9 +1,9 @@
#!/bin/sh -eu
echo "Checking for vulnerabilities in Go dependencies using govulncheck..."
echo "Checking for vulnerabilities in Go dependencies using govulncheck... (non-fatal)"
GOVERSION=$(go version | cut -d' ' -f3 | sed "s/go//g")
cp go.mod go.mod.bak
sed "s/^go 1.*/go ${GOVERSION}/" -i go.mod
govulncheck ./...
govulncheck ./... || true
mv go.mod.bak go.mod