Repository navigation
Conversation
Upgrade to Go 1.26.9 and refresh module dependencies to address the stdlib advisories failing MegaLinter. Select and verify the go.mod toolchain in a fail-closed MegaLinter pre-command, propagating GOTOOLCHAIN to linters without disabling vulnerability scanning. Document the effective CI toolchain and compatibility policy. Issue: linuxfoundation/lfx-self-serve-ops#509 Co-authored-by: Copilot <copilot@github.com> Signed-off-by: Jordan Evans <jevans@linuxfoundation.org>
There was a problem hiding this comment.
🔵 Needs a closer look
Full MegaLinter container validation remains pending for the Go minor-version upgrade and toolchain propagation.
0 open findings
What changed in this PR
Updates the LFX CLI toolchain and dependencies to address reported standard-library vulnerabilities.
Changes:
- Raises the required Go version to 1.26.9 and refreshes dependencies.
- Adds fail-closed MegaLinter toolchain selection and propagation.
- Documents toolchain setup and linter compatibility requirements.
| File | Description |
|---|---|
| README.md | Documents the Go requirement and MegaLinter download behavior. |
| go.sum | Updates dependency checksums. |
| go.mod | Upgrades Go and dependency versions. |
| AGENTS.md | Clarifies runtime and linter compatibility policy. |
| .mega-linter.yml | Selects and propagates the required Go toolchain before linting. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
andrest50
left a comment
There was a problem hiding this comment.
This PR upgrades Go from 1.25.14 to 1.26.9 and refreshes dependencies to remediate nine stdlib advisories flagged by OSV Scanner, and adds a fail-closed MegaLinter pre-command that selects and downloads the pinned toolchain from go.mod before linters run. The approach is well thought-out: the awk-based toolchain extraction is correct, the set -eu + continue_if_failed: false combination is genuinely fail-closed, and the output_variables propagation is the right way to make GOTOOLCHAIN available to linter subprocesses. Documentation and agent guidance are updated accurately.
What's done well
- The pre-command cleanly decouples the effective Go runtime from whatever version the MegaLinter image happens to bundle, which was the root cause of needing to pin the minor version behind the image before. The approach works for both CI and local Docker runs.
go versionafter settingGOTOOLCHAINserves as an immediate verification step and will trigger toolchain download exactly once on a cold container.- The
awkextractor ($1 == "go" { print $2; exit }) correctly handles leading comment lines and stops after the first match. It won't be confused by a futuretoolchaindirective because that directive's first field would betoolchain, notgo. - AGENTS.md correctly removes the old "stay one minor behind the image" constraint, which was a workaround for the exact problem the pre-command now solves. The replacement guidance is accurate.
go.sumentries are consistent with every module version ingo.mod.
Outside the diff
- Full MegaLinter container validation is pending (acknowledged in the PR description — local Docker access denied). The most important thing to verify on the first CI run is that
GOTOOLCHAINpropagates correctly toGO_REVIVEand that the pinned Revive version builds cleanly against Go 1.26.9.
Reconciliation with existing reviews
- ➡️
github-license-compliance[bot]"BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang" ongo.modline 1 — this is the Google patent grant language that accompaniesgolang.org/x/oauth2(and othergolang.org/x/packages) and was present before this PR. The bumps from v0.36.0 → v0.37.0 of oauth2 do not change the license. If the policy has not accepted this expression, it should be tracked separately; it is not introduced by this PR. - ➡️ Copilot "full MegaLinter container validation pending" — acknowledged in the PR description; acceptable given local Docker access is denied.
Issue count
- 🔴 Blocking: 0
- 🟡 Major: 0
- 🔵 Minor: 1
- ⚪ Nit: 0
- ❔ Question: 0
Decision
Approving — no blocking or major findings. One minor note on the undocumented non-stdlib minor version bumps is included below as a PR comment.
|
Minor — non-stdlib minor version bumps not explained in the PR description ( Three direct dependencies take minor version increments beyond what the nine stdlib CVEs require: Why it matters: If these were swept up incidentally by Fix: Add one sentence to the PR description: e.g. "Dependency refresh also picked up minor updates to |
Summary
go.modin a fail-closed MegaLinter pre-command and propagate it to linter subprocesses for CI and local runs. Vulnerability scanning remains enabled and blocking.Local OSV Scanner, checks (including pinned Revive), race tests, and Linux/Windows builds pass. Full MegaLinter container validation awaits CI because local Docker access is denied.
Fixes linuxfoundation/lfx-self-serve-ops#509
Separate from the browser-launch validation fix in #15.