Skip to content

ci: go vulnerability gate (spec 013 G1) - #673

Merged
ValgulNecron merged 11 commits into
masterfrom
claude/013-govulncheck
Oct 12, 2026
Merged

ValgulNecron merged 11 commits into
masterfrom
claude/013-govulncheck

Conversation

@ValgulNecron

@ValgulNecron ValgulNecron commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Depends on #671 (its setup commit is included here until that merges).

Before: no Go vulnerability scanning ran anywhere in CI.

After: a new vuln (go) job installs govulncheck v1.9.0 and scans every go.work module (operator and api with envtest, test/e2e with e2e, and api again with postgres), failing on any reachable finding. .github/workflows/vuln-weekly.yaml runs the same scan on master every Monday at 04:00 UTC and on demand.

How: hack/check-govulncheck_test.sh proves the gate offline against a synthetic advisory DB in hack/testdata/govulncheck/db. A module calling vulnfixture.Bad must exit 3, and one calling only vulnfixture.Good must exit 0. The fixture module is vendored at v1.0.0 into a temp dir rather than reached through a directory replace, because govulncheck never reports a module with an empty version (affected() in x/vuln internal/vulncheck/vulncheck.go); tasks.md T016 notes this. T015–T020; T021 (fix what the first run reports, flip G-01) follows from this PR's CI.

🤖 Generated with Claude Code


Generated by Claude Code

New "vuln (go)" job installs govulncheck v1.9.0 and runs
hack/govulncheck-all.sh over every go.work module (envtest, e2e and
postgres tag sets included); a weekly workflow scans master the same way.
hack/check-govulncheck_test.sh proves the gate against an offline
synthetic advisory: a module calling the affected symbol exits 3, one
calling only the safe symbol exits 0. The fixture module is vendored at
v1.0.0 in a temp dir rather than reached through a directory replace,
because govulncheck skips modules whose version is empty. T015-T020.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: GameplanePanel/Gameplane/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d5d380c2-5f1a-4014-a74a-05362e04d827
📥 Commits

Reviewing files that changed from the base of the PR and between 5dabc32 and 0b03a58.

⛔ Files ignored due to path filters (2)
  • go.work.sum is excluded by !**/*.sum
  • operator/go.sum is excluded by !**/*.sum
📒 Files selected for processing (18)
  • .github/actions/go-cache/action.yml
  • .github/workflows/ci.yaml
  • .github/workflows/vuln-weekly.yaml
  • hack/check-govulncheck_test.sh
  • hack/govulncheck-all.sh
  • hack/testdata/govulncheck/db/ID/GO-0000-0001.json
  • hack/testdata/govulncheck/db/index/db.json
  • hack/testdata/govulncheck/db/index/modules.json
  • hack/testdata/govulncheck/db/index/vulns.json
  • hack/testdata/govulncheck/fail/go.mod
  • hack/testdata/govulncheck/fail/main.go
  • hack/testdata/govulncheck/pass/go.mod
  • hack/testdata/govulncheck/pass/main.go
  • hack/testdata/govulncheck/vulnfixture/go.mod
  • hack/testdata/govulncheck/vulnfixture/vulnfixture.go
  • operator/go.mod
  • specs/013-expand-test-coverage/coverage-gaps.md
  • specs/013-expand-test-coverage/tasks.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ValgulNecron ValgulNecron added type: ci CI, workflows, or build tooling type: security Security hardening or vulnerability fix area: shared netguard, gameaction, gameproto, svcutil and other shared packages labels Oct 12, 2026 — with Claude
@ValgulNecron ValgulNecron self-assigned this Oct 12, 2026

Copy link
Copy Markdown
Collaborator Author

vuln (go) is red as expected on its first run: the gate works, and these are the pre-existing findings T021 has to fix. The proof step passed (fixture exit 3 on the vulnerable call, 0 on the safe one).

Reachable findings, 13 of 17 scans:

  • Go standard library, go1.26.8 (net/http, crypto/tls, net/textproto, html/template, mime/multipart): fixed in go1.26.9. CI's go-cache action requests 1.26 and got 1.26.8.
  • golang.org/x/net v0.59.0 in capture-sidecar: fixed in v0.60.0.
  • operator only, no fixed version: GO-2026-5932 (golang.org/x/crypto/openpgp, reached through cosign) and GO-2026-4529 (github.com/sigstore/cosign/v2 v2.6.5). Both are reached from internal/verify/verify.go. Clearing them means moving the operator off cosign v2. Excluding them is not an option under the spec (FR-008).

Not pushing a fix yet: the dependency and toolchain changes need the owner's sign-off first (CLAUDE.md override 1). This PR stays draft until then.


Generated by Claude Code

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

CI Report - 0b03a58

run 38323102092 - attempt 1

0 failed - 30 passed - 0 skipped - 76m48s elapsed

Coverage

Module Measured Gate Margin
web L95.53 S94.07 B88.79 F91.78 L92 S92 B82 F76 +2.07

Changed

Area Files +/-
hack/ 12 +262/-0
operator/ 2 +95/-97
.github/ 3 +66/-1
specs/ 2 +12/-9
(root) 1 +1/-1

Slowest jobs

Job Duration
e2e telemetry / amd64 (kind) 23m14s
e2e telemetry / arm64 (kind) 21m50s
build e2e images 14m25s
e2e capture overhead (kind) 12m21s
e2e multicluster / arm64 (kind x2) 10m40s

e2e buckets run

api-agent, api-auth, api-mods, api-rbac, api-roles, bot-fast, multicluster, operator, ratelimit, telemetry, upgrade

govulncheck flagged stdlib go1.26.8 (fixed in 1.26.9): setup-go kept the
runner's preinstalled 1.26.8. check-latest makes '1.26' resolve to the
newest patch. capture-sidecar's x/net is already v0.60.0 via master.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>

Copy link
Copy Markdown
Collaborator Author

vuln (go) on e98f77a: check-latest worked. The runner now picks up go1.26.9, and every stdlib finding is gone. The fixture proof still catches GO-0000-0001 as it should. Two findings remain, both in operator:

The maintainer chose to keep the cosign migration in its own PR, with this one merging after it. So I'm not copying #684 in here. When #684 merges, I'll merge master into this branch and re-check.


Generated by Claude Code

Signed-off-by: Claude <noreply@anthropic.com>

# Conflicts:
#	.github/workflows/ci.yaml
Brings in the cosign v3 migration (#684) so govulncheck can re-check the
operator module.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
govulncheck still reported GO-2026-5932 (golang.org/x/crypto/openpgp, no
fixed version) after the cosign v3 migration: rekor v1.5.3's pkg/pki/pgp
imported the deprecated package. rekor v1.5.4 uses ProtonMail/go-crypto
instead, so the vulnerable package leaves the operator's build graph.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
#672 and #674 each raised the closed count from 2 to 3 on their own
branches, so after both merged the summary said 3 closed while the
table holds 4, which make check-coverage-gaps rejects.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
@ValgulNecron
ValgulNecron marked this pull request as ready for review October 12, 2026 23:38
@ValgulNecron
ValgulNecron merged commit 28e39db into master Oct 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: shared netguard, gameaction, gameproto, svcutil and other shared packages type: ci CI, workflows, or build tooling type: security Security hardening or vulnerability fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants