Skip to content

Fix possible fix(deps): 5 vulnerable dependencies in go.mod - #698

Open
begininvoke wants to merge 1 commit into
Qovery:mainfrom
begininvoke:redgem/security-fix-24204dc9
Open

Fix possible fix(deps): 5 vulnerable dependencies in go.mod#698
begininvoke wants to merge 1 commit into
Qovery:mainfrom
begininvoke:redgem/security-fix-24204dc9

Conversation

@begininvoke

@begininvoke begininvoke commented Aug 25, 2026

Copy link
Copy Markdown

This changes go.mod to address something a scan flagged. It is around line 1.

The project depends on golang.org/x/net v0.54.0, which is vulnerable to CVE-2026-25681. This flaw allows parsing of arbitrary HTML that is later rendered, potentially creating an unexpected HTML tree and enabling cross‑site scripting (XSS) attacks. An attacker could inject malicious scripts, steal user data, or perform actions on behalf of victims. The vulnerability is rated HIGH, indicating a serious security risk for any application that renders user‑provided HTML.

Updates golang.org/x/net and golang.org/x/text to patched versions, resolving multiple high‑severity CVEs while preserving module compatibility.

For reference: rule CVE-2026-25681. Rated high.

I do not know the codebase, so please check the change fits how the rest of it works. Happy to adjust it or close this if the reasoning is off.


Found with automated scanning (RedGem) and reviewed before opening. If it is not useful, closing it is completely fine.


Summary by cubic

Updates golang.org/x/net and golang.org/x/text to patched versions to remove high‑severity security issues in HTML parsing and text handling; no functional changes expected beyond potentially stricter parsing.

Dependencies

  • golang.org/x/net v0.54.0 → v0.56.0; addresses CVE-2026-25681 in x/net/html.
  • golang.org/x/text v0.37.0 → v0.39.0; pulls in upstream security fixes.

Migration

  • No code changes required; run go mod tidy to refresh go.sum.
  • Re-run tests for HTML parsing/rendering paths in case stricter validation surfaces.

Written for commit fce9aaf. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai 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.

2 issues found across 1 file

Confidence score: 2/5

  • go.mod updates dependencies to v0.56.0 and v0.39.0 without corresponding go.sum checksums, so clean builds using -mod=readonly and go mod verify can fail due to missing module integrity data — regenerate and commit go.sum for both versions.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="go.mod">

<violation number="1" location="go.mod:102">
P1: The bump edits go.mod but not go.sum, which still has checksums only for the old v0.54.0/v0.37.0 versions and none for the new v0.56.0/v0.39.0. Under the default `-mod=readonly` mode, `go build` and `go mod verify` will fail with missing-go.sum-entry errors. Run `go mod tidy` or `go mod download golang.org/x/net@v0.56.0 golang.org/x/text@v0.39.0` followed by `go mod tidy`, then commit the regenerated go.sum.</violation>

<violation number="2" location="go.mod:102">
P2: These version bumps are not accompanied by the required `go.sum` entries, so clean builds that disallow module-file updates fail with missing checksums. Regenerate and commit `go.sum` for both new versions and their selected transitive modules.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread go.mod
go.yaml.in/yaml/v3 v3.0.4 // indirect
go4.org v0.0.0-20260112195520-a5071408f32f // indirect
golang.org/x/net v0.54.0 // indirect
golang.org/x/net v0.56.0 // indirect

@cubic-dev-ai cubic-dev-ai Bot Aug 25, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1: The bump edits go.mod but not go.sum, which still has checksums only for the old v0.54.0/v0.37.0 versions and none for the new v0.56.0/v0.39.0. Under the default -mod=readonly mode, go build and go mod verify will fail with missing-go.sum-entry errors. Run go mod tidy or go mod download golang.org/x/net@v0.56.0 golang.org/x/text@v0.39.0 followed by go mod tidy, then commit the regenerated go.sum.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At go.mod, line 102:

<comment>The bump edits go.mod but not go.sum, which still has checksums only for the old v0.54.0/v0.37.0 versions and none for the new v0.56.0/v0.39.0. Under the default `-mod=readonly` mode, `go build` and `go mod verify` will fail with missing-go.sum-entry errors. Run `go mod tidy` or `go mod download golang.org/x/net@v0.56.0 golang.org/x/text@v0.39.0` followed by `go mod tidy`, then commit the regenerated go.sum.</comment>

<file context>
@@ -99,9 +99,9 @@ require (
 	go.yaml.in/yaml/v3 v3.0.4 // indirect
 	go4.org v0.0.0-20260112195520-a5071408f32f // indirect
-	golang.org/x/net v0.54.0 // indirect
+	golang.org/x/net v0.56.0 // indirect
 	golang.org/x/oauth2 v0.36.0 // indirect
-	golang.org/x/text v0.37.0 // indirect
</file context>
Fix with cubic

Comment thread go.mod
go.yaml.in/yaml/v3 v3.0.4 // indirect
go4.org v0.0.0-20260112195520-a5071408f32f // indirect
golang.org/x/net v0.54.0 // indirect
golang.org/x/net v0.56.0 // indirect

@cubic-dev-ai cubic-dev-ai Bot Aug 25, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: These version bumps are not accompanied by the required go.sum entries, so clean builds that disallow module-file updates fail with missing checksums. Regenerate and commit go.sum for both new versions and their selected transitive modules.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At go.mod, line 102:

<comment>These version bumps are not accompanied by the required `go.sum` entries, so clean builds that disallow module-file updates fail with missing checksums. Regenerate and commit `go.sum` for both new versions and their selected transitive modules.</comment>

<file context>
@@ -99,9 +99,9 @@ require (
 	go.yaml.in/yaml/v3 v3.0.4 // indirect
 	go4.org v0.0.0-20260112195520-a5071408f32f // indirect
-	golang.org/x/net v0.54.0 // indirect
+	golang.org/x/net v0.56.0 // indirect
 	golang.org/x/oauth2 v0.36.0 // indirect
-	golang.org/x/text v0.37.0 // indirect
</file context>
Fix with cubic

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