T08 · Insecure Dependencies
- Location
SKILL.md:20- Finding
Mutable and Unpinned Third-Party Dependencies Can Execute Unreviewed Code
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 20–31
Vulnerability Type: Supply-chain risk from mutable and unpinned dependencies
Risk Level: MediumVulnerable Code
bash npx clawhub@latest install deepseekoracle/lygo-sandcastle export LYGO_STACK_ROOT=/absolute/path/to/lygo-protocol-stack python tools/install_lygo_sandcastle.pytext Optional: `pip install sandcastle-ai` + `LYGO_SANDCASTLE_USE_UPSTREAM=yes` (user trust required).Technical Analysis
The documented setup executes
clawhub@latest, which is a mutable package reference. The code retrieved when a user runs this command may therefore differ from the version that existed when the skill was reviewed. The package is downloaded and executed without a pinned version, integrity hash, lockfile, or other reproducibility control.The optional
sandcastle-aidependency is also installed without an exact version or integrity verification. Python package installation can execute package build hooks, and the installed package may later execute when imported or enabled. Although the documentation states that user trust is required, this warning does not technically prevent substitution of a compromised or unexpectedly changed release.Attack Path
- An attacker compromises the relevant package publisher, registry account, distribution channel, or upstream release process.
- The attacker publishes a malicious package under the mutable
latestrelease or a version satisfying the unpinned installation command. - A user follows the documented setup instructions.
npxdownloads and executes the changed package, orpipinstalls a malicious distribution and runs applicable build hooks.- The malicious code executes with the privileges and environment of the user running the installation.
Impact Assessment
Successful exploitation permits arbitrary code execution under the installing user's account. The resu ...[truncated 477 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace
@latestwith an explicitly reviewed package version. - Pin
sandcastle-aito an exact version rather than allowing the package manager to select a mutable release. - Use lockfiles and registry-supported integrity hashes to make installations reproducible.
- Verify package signatures, checksums, publisher identity, and release provenance before execution.
- Prefer downloading and inspecting packages before running installers rather than using
npxfor immediate retrieval and execution. - Run installation in a restricted environment without production credentials, sensitive environment variables, or unnecessary filesystem access.
- Document the trusted registry and the exact reviewed versions in
SKILL.md.
- Replace
