T08 · Insecure Dependencies
- Location
SKILL.md:43- Finding
Unpinned Third-Party Dependencies and Executable Tool Retrieval
- Content
View full analysis
Vulnerability Details
File Locations:
SKILL.md:43-45references/generators.md:7-9references/generators.md:53-59
Vulnerability Type: Unpinned third-party dependency and executable tool retrieval
Risk Level: MediumVulnerable Code
SKILL.md:43-45:bash go get github.com/spf13/cobra@latestreferences/generators.md:7-9:bash go get github.com/spf13/cobra/docreferences/generators.md:53-59:bash go get -tool github.com/spf13/cobra-cli@latest # Initialize a new cobra project go tool cobra-cli init myappTechnical Analysis
The skill recommends retrieving dependencies and an executable scaffolding tool without pinning them to reviewed versions. The
@latestselector is mutable, meaning the content installed when a user follows the instructions can differ from the content available when the skill was audited. The unversionedcobra/docretrieval can also resolve or update dependencies according to the module state at execution time.The risk is greater for
cobra-clibecause the downloaded component is subsequently executed throughgo tool cobra-cli init myapp. This gives newly retrieved third-party code an opportunity to create or modify files within the invoking user's accessible project and filesystem scope.The package paths reference the expected upstream organization, and the audited files contain no evidence that the current upstream packages are malicious. The vulnerability is therefore an unsafe and non-reproducible dependency acquisition practice rather than evidence of an active malicious payload.
Attack Path
- A user or agent follows the skill and runs a command containing
@latest, or retrieves the unversionedcobra/docpackage. - Go resolves the dependency version available at that time rather than a version reviewed during this audit.
- An upstream account compromise, malicious future release, compromised modu ...[truncated 1215 chars]
- Remediation
View remediation
Remediation Suggestions
-
Replace mutable dependency selectors with reviewed, explicit semantic versions:
bash go get github.com/spf13/cobra@vX.Y.Z go get github.com/spf13/cobra/doc@vX.Y.Z go get -tool github.com/spf13/cobra-cli@vX.Y.Z -
Replace
vX.Y.Zwith a specific version that has been reviewed and tested by the project maintainers. -
Commit and review
go.modandgo.sumso dependency changes are visible and integrity hashes are retained. -
Perform dependency upgrades through controlled pull requests rather than resolving
@latestduring routine skill execution. -
Review release notes, source changes, provenance, and known vulnerability information before updating pinned versions.
-
Execute scaffolding tools in a restricted development environment with no unnecessary credentials or elevated permissions.
-
Review generated files and module changes before committing or building them in trusted release environments.
-
Where practical, use an approved internal module proxy or artifact mirror that only exposes vetted versions.
-
