Skip to content

fix(security): remediate CVE vulnerabilities - #376

Merged
ulucinar merged 5 commits into
release-0.10from
fix/cve-remediation-release-0.10-20261015-191511
Oct 16, 2026
Merged

ulucinar merged 5 commits into
release-0.10from
fix/cve-remediation-release-0.10-20261015-191511

Conversation

@ulucinar

Copy link
Copy Markdown
Collaborator

Summary

This PR fixes CVE vulnerabilities identified by security scanning.

Vulnerabilities Fixed

CVE/GHSA Severity Package Fixed Version
GO-2026-6612 Critical stdlib, golang.org/x/net go1.26.9, v0.60.0
GO-2026-6604 Critical stdlib go1.26.9
GO-2026-6603 High stdlib, golang.org/x/net go1.26.9, v0.60.0
GO-2026-6611 High stdlib, golang.org/x/net go1.26.9, v0.60.0
GO-2026-6608 High stdlib go1.26.9
GO-2026-6607 High stdlib go1.26.9
GO-2026-6609 High stdlib go1.26.9
GO-2026-6613 High stdlib go1.26.9
GO-2026-6605 High stdlib go1.26.9
GO-2026-6610 High stdlib, golang.org/x/net go1.26.9, v0.60.0
GO-2026-6617 Unknown stdlib, golang.org/x/net go1.26.9, v0.60.0
GO-2026-6599 Unknown stdlib go1.26.9
GO-2026-6600 Unknown stdlib go1.26.9

Changes Made

  • Updated Go version from 1.25.13 to 1.26.9 in go.mod
  • Updated golang.org/x/net from v0.58.0 to v0.60.0 in go.mod
  • Ran go mod tidy to update all transitive dependencies
  • Updated GO_VERSION to 1.26.9 in .github/workflows/ci.yml

References

Verification

  • Rescanned with `cve-scan` skill after fixes
  • All listed vulnerabilities resolved

- Update Go version to 1.26.9 (fixes GO-2026-6612, GO-2026-6604, GO-2026-6603, GO-2026-6611, GO-2026-6608, GO-2026-6607, GO-2026-6609, GO-2026-6613, GO-2026-6605, GO-2026-6610, GO-2026-6617, GO-2026-6599, GO-2026-6600)
- Update golang.org/x/net to v0.60.0 (fixes GO-2026-6612, GO-2026-6603, GO-2026-6611, GO-2026-6610, GO-2026-6617)
- Update CI workflows to use Go 1.26.9

Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
@ulucinar

Copy link
Copy Markdown
Collaborator Author

Build Failure Analysis

Check: lint
Status: Failed
Analyzed: 2026-10-15T19:21:00Z

Summary

The lint check failed because golangci-lint v2.4.0 was built with Go 1.25, which is incompatible with the project's Go 1.26.9 requirement.

Root Cause

The CVE remediation upgraded Go from 1.25.13 to 1.26.9 in go.mod. However, golangci-lint v2.4.0 in the CI workflow was built with Go 1.25 and cannot operate with Go 1.26.x targets.

When golangci-lint tries to load the project configuration, it detects that the target Go version (1.26.9) is higher than its build version (1.25) and refuses to proceed.

Error Details

Error: can't load config: the Go language version (go1.25) used to build golangci-lint is lower than the targeted Go version (1.26.9)
##[error]golangci-lint exit with code 3

Recommendation

Upgrade golangci-lint in .github/workflows/ci.yml to v2.5.0 or later, which supports Go 1.26.x. A remediation plan will be generated to fix this issue.


This analysis was generated by the build-failure-analyze skill.

The previous golangci-lint version (v2.4.0) was built with Go 1.25 and cannot
operate with Go 1.26.9 targets. Upgrading to v2.5.0 resolves this compatibility
issue.

Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
@ulucinar

Copy link
Copy Markdown
Collaborator Author

Build Failure Analysis

Check: lint
Status: Failed
Analyzed: 2026-10-15T19:32:00Z

Summary

The lint check failed because golangci-lint v2.5.0 is still built with Go 1.25, which is incompatible with the project's Go 1.26.9 requirement.

Root Cause

The previous fix upgraded golangci-lint from v2.4.0 to v2.5.0, but v2.5.0 is also built with Go 1.25. golangci-lint cannot operate when its build version is lower than the target Go version.

According to golangci-lint documentation, v2.14.0 is the first version built with Go 1.26, providing full support for Go 1.26.x projects.

Error Details

Error: can't load config: the Go language version (go1.25) used to build golangci-lint is lower than the targeted Go version (1.26.9)
##[error]golangci-lint exit with code 3

Recommendation

Upgrade golangci-lint in .github/workflows/ci.yml to v2.14.0 or later, which is built with Go 1.26. A remediation plan will be generated to fix this issue.


This analysis was generated by the build-failure-analyze skill.

golangci-lint v2.5.0 was still built with Go 1.25. v2.14.0 is the first version
built with Go 1.26, providing full support for Go 1.26.x projects.

Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
@ulucinar

Copy link
Copy Markdown
Collaborator Author

Build Failure Analysis

Check: lint
Status: Failed
Analyzed: 2026-10-15T19:43:00Z

Summary

Good news: golangci-lint v2.14.0 is now successfully running with Go 1.26.9! However, it's catching 1066 exhaustruct_v5 linter violations that need to be addressed via configuration.

Root Cause

golangci-lint v2.14.0 introduced versioned linter names (e.g., exhaustruct_v5, gomodguard_v2, wsl_v5). The project's .golangci.yml explicitly disables the exhaustruct linter on line 64 with this rationale:

"Warns about struct instantiations that don't specify every field. Could be useful in theory to catch fields that are accidentally omitted. Seems like it would have many more false positives than useful catches, though."

However, the disable rule for exhaustruct doesn't cover the new exhaustruct_v5 variant introduced in golangci-lint v2.x, so all 1066 violations are being reported.

Error Details

##[error]connection_test.go:41:10: main.args is missing fields cd, data (exhaustruct_v5)
##[error]connection_test.go:43:6: v1beta1.ConnectionDetail is missing fields Name, FromConnectionSecretKey, FromFieldPath, Value (exhaustruct_v5)
[... 1066 total exhaustruct_v5 violations throughout test files ...]

Recommendation

Update .golangci.yml to explicitly disable exhaustruct_v5 alongside the existing exhaustruct disable. A remediation plan will be generated to fix this issue.


This analysis was generated by the build-failure-analyze skill.

@ulucinar

Copy link
Copy Markdown
Collaborator Author

Build Failure Analysis: lint

Check: lint
Workflow Run: 38795624340
Timestamp: 2026-10-15T19:42:00Z

Summary

The golangci-lint check failed with 1065 linting errors from linters that should be disabled according to the repository's linting policy.

Root Cause

The CI workflow uses golangci-lint v2.14.0, which renamed many linters with version suffixes (e.g., exhaustruct → exhaustruct_v5). The .golangci.yml configuration disables exhaustruct but not exhaustruct_v5, causing 903 false positive errors.

Additionally, the modernize linter (new in v2.x) is enabled by default and suggests replacing ptr.To(x) with new(x), generating 144 style warnings.

Error Details

##[error]connection_test.go:41:10: main.args is missing fields cd, data (exhaustruct_v5)
##[error]validate_test.go:665:17: newexpr: call of To(x) can be simplified to new(x) (modernize)

Error breakdown:

  • 903 exhaustruct_v5 errors (struct field initialization)
  • 144 modernize errors (ptr.To vs new suggestions)
  • 18 goconst errors (repeated string constants - within acceptable threshold)

Recommendation

Fix required: Update .golangci.yml to disable the v2.x linter names (exhaustruct_v5, modernize) to match the existing disable policy. This is not a code quality issue - these linters are intentionally disabled in the repository's configuration, but the config uses old linter names that don't match golangci-lint v2.x.

A retry will not help - the configuration file must be updated.


ulucinar and others added 2 commits October 15, 2026 20:12
- Add exhaustruct_v5 to disable list (v2.x versioned name for exhaustruct)
- Add modernize to disable list (new linter in v2.x)

Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
- Re-enable the modernize linter and disable only its newexpr analyzer,
  which suggests replacing ptr.To(x) with Go 1.26's new(x) across the
  codebase.
- Fix the one remaining modernize finding (stringsbuilder) by building
  the joined string with strings.Builder instead of += in a loop. Output
  is unchanged.
- Exclude goconst from test files, consistent with the other linters
  already excluded there; its v2.14.0 findings were all repeated test
  fixture strings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>

@sergenyalcin sergenyalcin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @ulucinar LGTM!

@ulucinar
ulucinar merged commit ce6bb70 into release-0.10 Oct 16, 2026
6 checks passed
@ulucinar
ulucinar deleted the fix/cve-remediation-release-0.10-20261015-191511 branch October 16, 2026 14:04
@ulucinar
ulucinar restored the fix/cve-remediation-release-0.10-20261015-191511 branch October 16, 2026 14:04
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.

2 participants