T08 · Insecure Dependencies
Note
- Location
- SKILL.md:37
- Finding
- Unpinned Go Dependency Uses a Mutable Latest Version## Vulnerability Details **File Location**: `SKILL.md`, line 37 **Vulnerability Type**: Supply-chain risk caused by non-reproducible dependency resolution **Risk Level**: Low ### Vulnerable Code ```bash go get github.com/spf13/viper@latest ``` ### Technical Analysis The installation example instructs the agent or user to resolve `github.com/spf13/viper` using the mutable `@latest` selector. Although this is the official Viper module path and no malicious dependency was identified during the audit, the command does not constrain installation to a reviewed version. The effective dependency can therefore change after the Skill has been audited. Repeating the command at different times may install different source code and transitive dependency graphs. This weakens build reproducibility and makes it difficult to ensure that the installed release is the one that underwent security and compatibility review. This is a supply-chain hardening issue rather than evidence that the current Viper package is malicious. ### Attack Path 1. A user invokes the Skill while adding Viper to a Go project. 2. The agent follows the documented `go get ...@latest` command. 3. The Go toolchain queries the configured module infrastructure and resolves whichever version is considered latest at that time. 4. A newly released, compromised, or insufficiently reviewed version is downloaded. 5. The selected package and its transitive dependencies become part of the target project's dependency graph. 6. The dependency code executes when the resulting application or its tests are built and run. Successful exploitation would require compromise of the upstream release process, module-delivery infrastructure, configured Go proxy, or a future release containing a vulnerability. ### Impact Assessment The impact is limited to projects whose users or agents execute the example. A compromised dependency could obtain the privileges of the build, test, or application process. Depending on where t ...[truncated 261 chars]
- Remediation
- ## Remediation Suggestions Replace the mutable selector with a specific, reviewed release: ```bash go get github.com/spf13/viper@vX.Y.Z ``` Additional hardening should include: 1. Select and document a tested Viper version. 2. Commit `go.mod` and `go.sum` so dependency resolution can be verified. 3. Review transitive dependency changes before upgrading. 4. Use automated vulnerability scanning, such as `govulncheck`, in CI. 5. Apply dependency updates through an explicit review process rather than resolving `@latest` during routine Skill use. 6. If the documentation intentionally allows users to select a version, use a placeholder such as `@<reviewed-version>` and explain the review requirement.
