Repository navigation
ci: gate govulncheck on an allowlist and accept GO-2026-6278 - #1640
Conversation
govulncheck has no way to suppress a finding. `make vulncheck` now runs it with `-format json` and fails only for vulnerabilities the code calls that .github/govulncheck-allowlist.txt does not justify; allowed findings print a warning and stale entries a notice. Allow GO-2026-6278 (gorilla/websocket weak PRNG for client frame mask keys): masking carries no confidentiality, only the WebSocket client masks, and the fix exists only as an untagged master pseudo-version. Also bump govulncheck to v1.10.0. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
|
⏹️ Not reviewed — PR is closed (merged) (commit 523d29c) |
- Fail unless govulncheck reports a symbol-level scan, and on findings without a trace, instead of passing them silently. - Reject allowlist entries with a malformed OSV ID or listed twice; split entries on any whitespace. - Report vulnerabilities in imported or required but uncalled code. - Treat a scanner killed by a signal as a failure. - Follow the scripts/ layout: govulncheck-gate.py with its tests in scripts/tests, run by the Vulnerability Scan workflow. - Correct the GO-2026-6278 justification: v1.5.1 and v1.5.2 are unaffected, but dependencies pin v1.5.3. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A listed vulnerability that is still imported but no longer called got 'no longer reported' next to the uncalled summary that lists it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 2 only (queue backlog)
This PR adds a govulncheck allowlist that reports GO-2026-6278 as a warning while continuing to fail on unlisted vulnerabilities that the code calls. The vulnerability scan, all 15 gate tests, and the build, test, and lint checks passed; PR Hygiene is still pending.
🟡 3 suggestion(s)
Approved: nothing here blocks the merge. The non-blocking findings are optional: fix them forward, in this PR or a follow-up, without waiting for another review round.
Review provenance
Source: reviewer 1: gpt-6.2-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.2-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.2-sol(effort low) — The PR adds a CI gate whose finding classification, allowlist validation, and failure handling warrant review, but it does not change a critical runtime surface. - Phase 1 reviewers: not run (skipped for throughput: 11 PRs queued, above the 10 limit)
- Second Phase-2 pass: on this first full review every Phase-2 reviewer also ran a second, independent time, and the verifier weighed both sets
- Fresh verifier:
gpt-6.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.2-sol— general (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `scripts/govulncheck-gate.py`:
- [SUGGESTION] scripts/govulncheck-gate.py:92-97: The v1.5.3 exception also admits other affected WebSocket releases
Impact: If a dependency change selects another affected Gorilla WebSocket release, maintainers get a passing scan even though the written exception only assesses v1.5.3.
A dependency change can inherit a risk acceptance written for a different release. The gate matches only the OSV ID, but GO-2026-6278 also covers a separate range before v1.5.1, so the ID does not establish that the scanner found v1.5.3. Match each called finding against the advisory ID, module path, and version from its first trace frame before grouping findings for display, and include the detected version in the warning.
- [SUGGESTION] scripts/govulncheck-gate.py:64-73: The gate can report a clean scan after a metadata query that checked no code
Impact: If a maintainer reuses the wrapper with govulncheck's JSON query mode, the check passes without analyzing any Tenderdash packages.
A successful database lookup can produce the same passing verdict as a clean source scan. Govulncheck v1.10.0 defaults `scan_level` to `symbol` even in query mode, which emits advisory metadata but no call findings, and `test_clean_scan_passes` explicitly accepts config-only output. The checked-in Makefile runs a real source scan. Require `scan_mode: source` and an `SBOM` with non-empty `roots`, which the pinned scanner emits even when there are no findings, and update the tests to distinguish a clean scan from missing scan output.
In `.github/govulncheck-allowlist.txt`:
- [SUGGESTION] .github/govulncheck-allowlist.txt:6: The WebSocket exception assumes ChaCha8 even when Go uses the legacy generator
Impact: Operators assessing WebSocket clients run with legacy Go randomness settings can mistakenly rely on the exception's ChaCha8 rationale.
The stated mitigation depends on runtime settings, not just the Go version. Gorilla v1.5.3 uses top-level `math/rand.Uint32`; on the pinned Go 1.27.4, `GODEBUG=randautoseed=0` selects the legacy generator, and `randseednop=0` lets an explicit `rand.Seed` call select it too. The repository does not enable either override. Describe ChaCha8 as the default under Tenderdash's runtime settings rather than an unconditional guarantee.
|
Ready for review — |
An allowlist entry now names the module version its assessment covers (<OSV ID> <module>@<version> <justification>), so a dependency change to another affected release of the same advisory fails the gate instead of inheriting the old exception. The gate also requires a source-mode scan with SBOM roots, so output that analysed no packages (e.g. query mode) cannot pass as a clean scan. The GO-2026-6278 justification states that ChaCha8 is the default generator, not an unconditional guarantee. Co-Authored-By: Claude Opus 5.5 <[email protected]>
When an allowlisted advisory is called only at another module version, the gate's notice asks to re-assess and update the entry instead of removing it. A frame without a module or version blocks with a readable name instead of a traceback. The allowlist header says replaced modules are named by their replacement and the standard library as stdlib@<Go version>. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 2 only (queue backlog)
New on this head: This update pins govulncheck exceptions to exact module versions, requires a symbol-level source scan with package roots, and adds guidance when an advisory is detected at a different version. Govulncheck, the Linux build, Go vet, and lint passed on this head; unit, app, ABCI CLI, and end-to-end tests were still pending.
🟡 1 suggestion(s) | 💬 1 nitpick(s)
Approved: nothing here blocks the merge. The non-blocking findings are optional: fix them forward, in this PR or a follow-up, without waiting for another review round.
Review provenance
Source: reviewer 1: gpt-6.2-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.2-sol(effort low) — The change adds nontrivial CI gate logic for parsing scan results, matching version-specific exceptions, and failing closed, but it does not modify a critical runtime surface. - Phase 1 reviewers: not run (skipped for throughput: 13 PRs queued, above the 10 limit)
- Fresh verifier:
gpt-6.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-sol— general (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `scripts/govulncheck-gate.py`:
- [SUGGESTION] scripts/govulncheck-gate.py:124-131: The gate asks for reassessment when the detected version is already approved
Impact: When maintainers allowlist two versions for the same advisory and a scan detects only one, the gate tells them to update the unused entry to a version they have already approved.
Following the notice can create a duplicate entry that `load_allowlist` rejects on the next run. The notice added in `58d08199f` searches all called findings by advisory ID, so it can recommend updating to the same version the preceding warning already accepts. Use `blocked` to identify versions that need reassessment, and add a test where two versions are allowlisted but only one is detected.
In `.github/govulncheck-allowlist.txt`:
- [NITPICK] .github/govulncheck-allowlist.txt:5-6: The standard-library exception format looks like it accepts the output of `go version`
Impact: A maintainer who reads `stdlib@<Go version>` and enters `[email protected]` gets an allowlist parse error.
The header leaves the required prefix unclear. The gate requires a `v` prefix, and govulncheck normalizes `go1.27.4` to `v1.27.4` in the finding frame. Show the exact form to copy from the finding.
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
The re-assess notice for an unused allowlist entry listed every called version of the advisory, including one another entry already accepts; following it would duplicate that entry. It now lists only blocked versions, so an entry unused beside an accepted version gets the plain "no longer called" notice. The allowlist header shows the exact stdlib form ([email protected]), not the go1.27.4 spelling of `go version`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
This reverts commit 12a300e, which is outside the scope of this PR (the govulncheck allowlist gate). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
/skip-bots |
TL;DR: The vulnerability scan stops failing every pull request on a low-impact
gorilla/websocketadvisory that has no released fix, by letting the project accept a reported vulnerability with a written justification.User story
As a Tenderdash maintainer, I want the vulnerability scan to fail only on vulnerabilities we have not consciously accepted, to keep it a meaningful merge gate instead of a check everyone learns to ignore.
Scenario
Base flow
Vulnerability Scanworkflow runsmake vulncheck.Actual behavior
The scan fails on every pull request (and on
dev) with GO-2026-6278 ingithub.com/gorilla/websocketv1.5.3. v1.5.1 and v1.5.2 are unaffected, but dependencies (cometbft, oasis-core, gosec) require v1.5.3, and no later tagged release contains the fix. govulncheck offers no way to accept a finding, so the check stays red regardless of the change.Expected behavior
The scan passes when every vulnerability the code calls is either fixed or listed for the detected module version, with a justification, in
.github/govulncheck-allowlist.txt. Accepted findings show up as warnings; a new, unlisted one still fails the check.Detailed discussion
What was done
scripts/govulncheck-gate.pyruns govulncheck with-format json(which always exits 0), keeps only symbol-level findings (the code calls the vulnerable symbol), and fails on any whose OSV ID and module version (from the first trace frame) are not in the allowlist. Each entry reads<OSV ID> <module>@<version> <justification>, so a dependency change to another affected release does not inherit an earlier assessment. It prints the summary, fixed version and an example trace for each blocking finding, a::warning::for each allowed one, a::notice::for allowlist entries the code no longer calls (or now calls only at another version, asking to re-assess the entry), and the IDs of vulnerabilities in imported or required but uncalled code.sourceor a scan level other thansymbol, output whose SBOM lists no scanned packages, a finding without a trace, malformed JSON, and an allowlist entry with a malformed OSV ID, nomodule@version, no justification or a duplicate all fail the job.Vulnerability Scanworkflow runs the gate's unit tests (scripts/tests/test_govulncheck_gate.py) before the scan..github/govulncheck-allowlist.txtaccepts GO-2026-6278 forgithub.com/gorilla/[email protected]. Justification: v1.5.3 regressed fromcrypto/randtomath/randfor client frame mask keys; only Tenderdash's WebSocket client (rpc/jsonrpc/client) masks frames, the node's WebSocket server does not; the mask carries no confidentiality (its key travels in the frame) and only shields WebSocket-unaware intercepting proxies from cache poisoning by attacker-chosen client payloads; since Go 1.22 top-levelmath/randdraws from the runtime's ChaCha8 generator by default (GODEBUG=randautoseed=0, orrandseednop=0with an explicitrand.Seed, selects the legacy one; Tenderdash sets neither); the fix exists only as the untagged master pseudo-versionv1.5.4-0.20240701034025-d67f41855da4, and dependencies pin v1.5.3.make vulncheckuses the gate; govulncheck is bumped from v1.9.0 to v1.10.0 (neither version has a suppression option).Out of scope: upgrading
gorilla/websocketto an untagged pseudo-version, or replacing the library.Known limitations: the gate accepts by OSV ID and module version, not per call site: a new call path to an allowed vulnerability is accepted too. Package- and module-level findings (imported or required but not called) never fail the gate, matching govulncheck's own exit behaviour.
Testing
python3 -B -m unittest discover -s scripts/tests -p test_govulncheck_gate.py: 22 tests covering the allow/block decisions, every fail-closed path above, andmain()exit propagation. Allscripts/testspass;ruff checkandruff formatare clean../rpc/... ./light/...: with the allowlist the gate exits 0 and warns about GO-2026-6278; with an empty allowlist it exits 1 and prints theWSClient.dial→websocket.Dialer.Dialtrace.Breaking changes
None.
Prior work
Attribution
🤖 Co-authored by Claudius the Magnificent AI Agent
🤖 Generated with Claude Code
PR Hygiene ·
523d29cgithub(.github/govulncheck-allowlist.txt,.github/workflows/govulncheck.yml) — approved by lklimekMakefile,scripts/govulncheck-gate.py,scripts/tests/test_govulncheck_gate.py) — lklimek or shumkovWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.