T08 · Insecure Dependencies
- Location
references/using-scripts.md:7- Finding
Unverified Third-Party Packages Are Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
references/using-scripts.md, lines 7–11
Vulnerability Type: Third-party dependency supply-chain exposure
Risk Level: MediumVulnerable Code
markdown | `uvx` | `uvx ruff@0.8.0 check .` | Python isolated env | | `npx` | `npx eslint@9 --fix .` | Bundled with Node.js | | `bunx` | `bunx eslint@9 --fix .` | Bun equivalent of npx | | `deno run` | `deno run npm:eslint@9 -- --fix .` | Requires permission flags | | `go run` | `go run golang.org/x/tools/cmd/goimports@v0.28.0 .` | Bundled with Go |Technical Analysis
These documented one-shot commands may resolve, download, and immediately execute code from external package registries or module sources. Although versions are specified,
eslint@9is a mutable major-version range rather than an exact immutable release. None of the examples require dependency lockfiles, cryptographic checksums, signature verification, provenance validation, or prior package review.Package execution can include the selected tool's runtime code and, depending on the package manager and package, installation lifecycle logic. Consequently, compromise of a publisher account, registry, dependency, release artifact, or package-resolution path could cause attacker-controlled code to execute with the permissions of the Agent process.
Attack Path
- A user asks the Agent to perform linting, formatting, or related script operations.
- The Agent loads
references/using-scripts.mdand follows one of the documented one-shot command examples. - The selected package manager contacts an external registry or module source.
- It resolves and downloads the named package and its transitive dependencies without integrity requirements defined by this Skill.
- A compromised or malicious resolved component executes locally.
- The payload accesses or modifies resources available to the Agent process. In particular,
eslint@9 --fix .is expressly authorized to modify files beneath ...[truncated 480 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every dependency to an exact, reviewed release rather than a major-version range such as
eslint@9. - Use lockfiles with verified integrity hashes and enforce immutable or frozen dependency resolution.
- Validate package signatures, checksums, and available provenance attestations before execution.
- Prefer reviewed, preinstalled, or vendored tools over commands that download and execute packages on demand.
- Require explicit user approval before any command performs network retrieval or executes newly downloaded code.
- Run third-party tooling in a restricted sandbox with minimum filesystem, environment-variable, credential, and network access.
- Disable unnecessary package lifecycle scripts where the relevant package manager supports that control.
- Run file-modifying operations such as
--fix .only after reviewing a dry-run or proposed diff, and restrict their working directory to the intended project.
- Pin every dependency to an exact, reviewed release rather than a major-version range such as
