Fix govulncheck CI check on main branch

This commit fixed the Go Vulnerability Checker CI job, which isn't
scanning for all go.mod files within the project.

Reference:
- https://github.com/etcd-io/etcd/discussions/18168

Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
This commit is contained in:
Chun-Hung Tseng 2024-06-13 22:03:54 +02:00
parent 260dd77ed4
commit bc1aed1936
No known key found for this signature in database
GPG Key ID: EF93C20F55FB48BB

View File

@ -16,4 +16,6 @@ jobs:
- run: |
set -euo pipefail
go install golang.org/x/vuln/cmd/govulncheck@latest && govulncheck ./...
go install golang.org/x/vuln/cmd/govulncheck@latest
find -name go.mod -exec /bin/bash -c 'echo scanning $(dirname {}); govulncheck -C $(dirname {}) -show verbose ./...' \;