Skip to content

chore(deps): bump golang.org/x/mod to v0.40.0 (fix Trivy HIGH CVEs) - #468

Merged
anisaoshafi merged 1 commit into
mainfrom
fix/trivy-x-mod-cve-bump
Aug 21, 2026
Merged

chore(deps): bump golang.org/x/mod to v0.40.0 (fix Trivy HIGH CVEs)#468
anisaoshafi merged 1 commit into
mainfrom
fix/trivy-x-mod-cve-bump

Conversation

@anisaoshafi

@anisaoshafi anisaoshafi commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

What

Bumps the indirect dependency golang.org/x/mod from v0.37.0 to v0.40.0, which resolves two fixable HIGH CVEs that are currently failing the Trivy fixable CRITICAL/HIGH gate on every open PR (the vuln lives in main's go.mod):

  • CVE-2026-56864 — a malicious GOSUMDB could serve arbitrary module content
  • CVE-2026-56865 — a malicious GOPROXY could forge sumdb entries

golang.org/x/mod is pulled in transitively (internal/iac/terraform/clihashicorp/hcl/v2golang.org/x/tools/cmd/stringergolang.org/x/mod/modfile). go mod tidy also advanced the related x/net, x/text, and x/tools indirect deps.

This unblocks the CI (failed PR checks).

Verification

Reproduced and verified locally with Trivy 0.70.0 (matching CI) using the exact gate flags:

trivy fs --scanners vuln --severity CRITICAL,HIGH --ignore-unfixed --exit-code 1 .
  • Before: go.mod → 2 HIGH, exit code 1 (gate fails)
  • After: both go.mod targets → 0 vulnerabilities, exit code 0 (gate passes)
  • go build ./... passes

Resolves DEVX-1063
🤖 Generated with Claude Code

golang.org/x/mod v0.37.0 (pulled in transitively via
hashicorp/hcl -> golang.org/x/tools/cmd/stringer) has two fixable HIGH
vulnerabilities that wedge the Trivy fixable-CRITICAL/HIGH gate on every
open PR:

- CVE-2026-56864: malicious GOSUMDB could serve arbitrary module content
- CVE-2026-56865: malicious GOPROXY could forge sumdb entries

Both are fixed in v0.40.0. `go mod tidy` also advanced the related
x/net, x/text, and x/tools indirect deps.

Verified locally with trivy 0.70.0 (matching CI): fs scan with
--severity CRITICAL,HIGH --ignore-unfixed now reports 0 vulnerabilities
and exits 0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@anisaoshafi
anisaoshafi requested review from a team and peter-smith-phd as code owners August 21, 2026 12:47
@anisaoshafi anisaoshafi added semver: patch docs: skip Pull request does not require documentation changes labels Aug 21, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉 — a clean indirect-dependency bump (golang.org/x/mod 0.37.0→0.40.0 closing the two fixable HIGH CVEs, with x/net/x/text/x/tools advanced by go mod tidy); I verified go build ./..., go mod verify, and a fresh go mod tidy all pass with no further changes, and test/integration carries no x/mod, @anisaoshafi.

Automated review on behalf of @gtsiolis.


Generated by Claude Code

@anisaoshafi
anisaoshafi enabled auto-merge (squash) August 21, 2026 13:30
@anisaoshafi
anisaoshafi disabled auto-merge August 21, 2026 13:30
@anisaoshafi
anisaoshafi merged commit ca95eeb into main Aug 21, 2026
21 of 23 checks passed
@anisaoshafi
anisaoshafi deleted the fix/trivy-x-mod-cve-bump branch August 21, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs: skip Pull request does not require documentation changes semver: patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant