T08 · Insecure Dependencies
- Location
SKILL.md:35- Finding
Unpinned Third-Party Packages Are Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 35-53; additional occurrence at lines 171-175
Vulnerability Type: Unreviewed and unpinned supply-chain dependency execution
Risk Level: MediumVulnerable Code
bash npx @primersystems/x402 create chutes-proxy my-ai-proxy cd my-ai-proxy npm install cp .env.example .env # Edit .env with your Chutes API key and wallet address npm run devbash pip install primer-x402 x402 create chutes-proxy my-ai-proxy cd my-ai-proxy pip install -r requirements.txt cp .env.example .env # Edit .env with your Chutes API key and wallet address uvicorn main:app --reloadAn additional command downloads and executes the same unpinned npm package:
bash npx @primersystems/x402 pay http://localhost:8787/v1/chat/completions \ --max-amount 0.01 \ --method POST \ --body '{"messages":[{"role":"user","content":"Hello"}]}'Technical Analysis
The Skill instructs users or agents to install and execute npm and Python packages without pinning exact versions or validating package integrity. In particular,
npx @primersystems/x402may retrieve the current registry release and execute its code immediately. Similarly,pip install primer-x402,npm install, andpip install -r requirements.txtmay execute package installation or build logic and introduce unreviewed transitive dependencies.The downloaded package, generated application, dependency manifests, and lockfiles are not included in the audited project. Consequently, the effective code executed by these instructions can change after this Skill has been reviewed. The audit found no evidence that the named packages are currently malicious; the vulnerability is the unsafe trust and execution model.
This is especially sensitive because users are subsequently instructed to place a Chutes API key and a payment wallet address into the generated application. Compromised packag ...[truncated 1599 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every directly invoked npm and Python package to a reviewed exact version rather than relying on the latest registry release.
- Commit dependency lockfiles for the generated templates and require deterministic, lockfile-enforced installation modes such as
npm ci. - Publish and verify package integrity hashes or signed release provenance before execution.
- Avoid using
npxin a mode that automatically downloads the current package release. Require a separately installed, version-pinned, verified CLI. - Pin and audit all dependencies in the generated
package-lock.jsonor Python requirements file, including transitive dependencies where practical. - Include the generated template source in the reviewed Skill or link to an immutable commit and verify its checksum before use.
- Review generated code before adding
CHUTES_API_KEY, wallet configuration, or other secrets. - Run scaffolding and dependency installation in an isolated, non-privileged environment with minimal filesystem and network access.
- Add automated dependency scanning, release-signature verification, and publisher-account protections to the package release process.
