Skip to content

ci: skip govulncheck findings covered by a VEX statement - #4711

Draft
reinkrul wants to merge 1 commit into
masterfrom
ci/govulncheck-vex
Draft

reinkrul wants to merge 1 commit into
masterfrom
ci/govulncheck-vex

Conversation

@reinkrul

Copy link
Copy Markdown
Member

Problem

The govulncheck workflows fail on master, V6.2 and V5.4 since 2026-11-05, on two advisories for github.com/labstack/echo/v4:

Advisory Problem
GO-2026-6875 / CVE-2026-118651 echo's reverse proxy middleware forwards an X-Real-IP header set by the caller
GO-2026-6872 / CVE-2026-118653 echo's rate limiter can be bypassed with a spoofed X-Forwarded-For header
  • Only echo v5 fixes them; there is no fixed v4 release.
  • The Go vulnerability database doesn't list the affected functions for v4, so govulncheck reports every use of echo.
  • The node is not affected:
    • It doesn't use echo's proxy middleware.
    • It always sets Echo#IPExtractor (http/engine.go), the workaround named in both advisories.
    • Its rate limiter (http/ratelimiter.go) has one shared limit and ignores the caller's IP.
  • A check that is always red hides the next real finding.

govulncheck has no option to skip a finding (v1.9.0 can write OpenVEX, not read it).

Change

  • .vex/nuts-node.openvex.json: an OpenVEX document with a not_affected statement for each of the two advisories, with the reason.
  • .github/scripts/govulncheck-vex.sh: reads govulncheck's JSON output and the VEX document. It fails on every vulnerability that is called by the code, unless a not_affected statement covers it.
    • A statement is only used for 180 days after its timestamp (or last_updated). After that the check fails on it again, until someone reviews the statement and updates the date. OpenVEX has no expiry field, so this rule is in the script.
  • Both govulncheck workflows (govulncheck.yaml, govulncheck-cron-schedule.yaml): the action writes JSON to a file, and the script decides whether the job fails.
  • Docs (docs/pages/deployment/docker.rst): new section "Scanning images for vulnerabilities". Operators can pass the same document to their image scanner.

Adding a statement to the VEX document is a public claim that the node is not affected. Each one needs an analysis like the one above.

Testing

Script, on govulncheck's JSON output for master (Go 1.27.3):

Case Expected Result
Real output: the two echo advisories and GO-2026-6859 (stdlib) echo skipped, fails on GO-2026-6859 ✅ exit 1
Same, without the stdlib finding passes ✅ exit 0
MAX_AGE_DAYS=0 (statements too old) fails on the echo advisories ✅ exit 1

VEX document with Trivy, on nutsfoundation/nuts-node:6.2.19 (echo v4.16.1): without --vex both echo CVEs are reported; with --vex they are listed as suppressed (not_affected) and the other findings are unchanged.

make docs-docker: build succeeds, no new warnings.

Not tested: the changed workflows themselves. govulncheck.yaml only runs on push to master and release branches, and the scheduled workflow checks out those branches, which don't have the script yet.

After merging

  • The scheduled check stays red on master until Go is upgraded: GO-2026-6859 (net/http, fixed in Go 1.27.4 and 1.26.11) is a real finding. go.mod on master says 1.27.3.
  • The scheduled check takes the script and the VEX document from the branch it checks. V6.2 and V5.4 stay red until this is backported. Backports follow after review; on V5.4 the product in the VEX document is nuts-node/v5.

Assisted by AI

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant