T08 · Insecure Dependencies
- Location
references/tooling.md:17- Finding
Unpinned Remote Retrieval of Executable Go Tooling
- Content
View full analysis
Vulnerability Details
File Location:
references/tooling.md:17,references/tooling.md:32,references/versions.md:454-455, andreferences/versions.md:473
Vulnerability Type: Unpinned executable dependency and toolchain retrieval
Risk Level: MediumVulnerable Code
From
references/tooling.md:bash # Update toolchain go get toolchain@latestbash # Pin in the module (Go 1.24+) go get -tool golang.org/x/vuln/cmd/govulncheck@latestFrom
references/versions.md:bash go get -tool golang.org/x/tools/cmd/stringer@latest go get -tool github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latestThe same file also recommends:
text Use `go install tool` to install all module-pinned tools when needed and `go get -u tool` to update them deliberately.Technical Analysis
The Skill recommends retrieving compiler and developer-tool executables using mutable selectors such as
@latestand the broad update commandgo get -u tool. These selectors do not identify an immutable, previously reviewed release. Consequently, the effective executable payload may change after the Skill itself has been audited.The referenced package namespaces appear legitimate, and the audit found no evidence that the listed upstream projects are malicious. Nevertheless, relying on mutable upstream content creates a supply-chain trust boundary. A compromised upstream account, malicious release, compromised module proxy, or unexpectedly breaking update could cause attacker-controlled or unsafe code to enter the target project's tool dependency graph.
These installation and update operations are not required merely to inspect a project or recommend modernization. Automatically applying them would therefore exceed the minimum privileges needed for read-only analysis. They also modify
go.mod,go.sum, or the selected Go toolchain and may later result in downloaded code being executed bygo tool, lint, test, or build commands....[truncated 1775 chars]
- Remediation
View remediation
Remediation Suggestions
-
Replace every
@latestselector with an explicitly reviewed version, for example:bash go get toolchain@go1.26.1 go get -tool golang.org/x/vuln/cmd/govulncheck@v1.1.4 go get -tool golang.org/x/tools/cmd/stringer@v0.38.0 go get -tool github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.6.2The versions above are illustrative; maintainers should select releases that they have actually reviewed and tested.
-
Preserve resolved module checksums in
go.sumand review all changes togo.modandgo.sumbefore executing newly added tools. -
Do not automatically run installation or update commands during a read-only modernization scan. Present proposed changes and require explicit user approval before modifying the toolchain or dependency graph.
-
Replace broad updates such as
go get -u toolwith individual, version-specific updates. Review release notes, provenance, checksums, and transitive dependency changes for each update. -
Run newly retrieved tools in a restricted environment with:
- Minimal filesystem access.
- No unnecessary credentials or secrets.
- Restricted outbound network access.
- No elevated operating-system privileges.
- An isolated worktree or disposable container.
-
Separate update discovery from installation. A check may report that a newer version exists, but installation should occur only after review and approval.
-
Prefer trusted Go module proxies and configure checksum database verification where organizational policy permits. Avoid untrusted custom proxies or disabled checksum validation.
-
Document rollback procedures and run the complete test suite after approved toolchain or tooling changes.
-
