T08 · Insecure Dependencies
- Location
SKILL.md:118- Finding
Unpinned package execution through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:118-133
Vulnerability Type: Unpinned third-party package execution
Risk Level: MediumVulnerable Code
bash npx vitest run && npx playwright testbash npx vitest --watchbash npx vitest run src/lib/__tests__/utils.test.tsbash npx vitest run --coverageAdditional unpinned
npxinvocations occur atSKILL.md:152-158andSKILL.md:211.Technical Analysis
The Skill instructs the agent to execute named packages through
npxwithout requiring that they already exist in the audited project's locked dependency tree. Depending on the installed npm/npx version and configuration, an absent package may be resolved from the configured package registry and executed.This introduces a supply-chain execution path not required for local testing. The Skill does not validate package versions, lockfile integrity, package provenance, or registry configuration before execution. Although no malicious dependency is bundled by this project, the instructions permit mutable third-party code to execute with the agent's privileges.
Attack Path
- The target project does not have one of the requested packages installed locally, or dependency resolution is influenced by a malicious registry configuration.
- The agent follows the Skill and invokes the package through
npx. npxresolves and downloads the package from the active registry.- Package lifecycle logic or the package CLI executes with the same privileges as the agent process.
- A compromised or substituted package can read accessible project files, modify the workspace, access environment variables available to the process, or initiate network connections.
Impact Assessment
Successful exploitation would provide code execution under the agent's operating-system account. The practical scope includes files and environment data accessible to th ...[truncated 247 chars]
- Remediation
View remediation
Remediation Suggestions
- Require all testing and linting tools to be declared in the target project's dependency manifest and pinned by a committed lockfile.
- Prevent implicit downloads by using
npx --no-install, or the equivalent package-manager option that executes only locally installed binaries. - Verify lockfile integrity and the expected package registry before running third-party tools.
- Avoid automatically installing missing dependencies. Report missing tools and request explicit user authorization instead.
- Where supported, use deterministic package-manager commands such as
npm exec --offline -- vitest run. - Run test tooling in a sandbox with restricted filesystem access, limited environment variables, and outbound network access disabled unless explicitly required.
