Skip to content

Commit c9a6cbb

Browse files
committed
add cves to exclude from govulncheck
Signed-off-by: Dave Dykstra <[email protected]>
1 parent dd27a54 commit c9a6cbb

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.github/workflows/ci.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,20 @@ jobs:
3333
- name: Install govulncheck
3434
run: go install golang.org/x/vuln/cmd/govulncheck@latest
3535

36+
- name: Install jq
37+
run: sudo apt-get update && sudo apt-get install -y jq
38+
3639
- name: Check for vulnerabilities
37-
run: $HOME/go/bin/govulncheck ./...
40+
run: |
41+
$HOME/go/bin/govulncheck -format json ./...|jq -r .finding.osv|grep -v null|sort -u >/tmp/vuln-cves
42+
CVES="$(cat .govulncheck-ignorecves .govulncheck-ignorecves /tmp/vuln-cves|sort|uniq -u)"
43+
if [ -n "$CVES" ]; then
44+
echo >&2
45+
echo "***" govulncheck CVES that are not ignored: $CVES "***" >&2
46+
echo >&2
47+
set -x
48+
$HOME/go/bin/govulncheck -show verbose ./...
49+
fi
3850
3951
- name: Build Source
4052
run: go build ./...

.govulncheck-ignorecves

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
GO-2025-3373
2+
#comment one at first as a test
3+
#GO-2025-3420

0 commit comments

Comments
 (0)