T08 · Insecure Dependencies
- Location
SKILL.md:77- Finding
Unverified Third-Party npm Package Installation and Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 77–80
Vulnerability Type: Supply-chain exposure through an externally sourced npm dependency
Risk Level: MediumVulnerable Code
bash npm install --save-exact agent-payment-policy@0.15.0 npx agent-payment-policy output-schema-check \ ./output-schema.json \ data.source,data.value,data.observedAtTechnical Analysis
The skill directs the user or agent to retrieve
agent-payment-policy@0.15.0from the configured npm registry and then execute its CLI throughnpx. An exact version prevents ordinary version drift, but it does not authenticate the retrieved package contents or make the dependency implementation reviewable from this project.The project does not include the package source, a lockfile with integrity metadata, or another content digest for independently verifying the downloaded artifact. Package installation can also execute npm lifecycle scripts unless they are explicitly disabled. Consequently, trust is delegated to the registry, account controlling the package, configured registry infrastructure, and transitive dependency chain.
This is a supply-chain weakness rather than evidence that the named package is currently malicious.
Attack Path
- An attacker compromises the package publisher, npm account, configured registry, registry infrastructure, or a transitive dependency.
- Malicious content is made available under the referenced package version or supplied through the package’s dependency chain.
- A user or agent follows the documented
npm installinstruction. - Malicious lifecycle code may run during installation with the invoking user’s privileges.
- The subsequent
npx agent-payment-policycommand executes package-controlled code. - That code can access resources available to the process, such as local files, environment variables, working-directory content, and network connectivity.
Impact Assessment
Successful exploitation provide ...[truncated 689 chars]
- Remediation
View remediation
Remediation Suggestions
- Vendor and audit the required implementation so the executed code is included in the reviewed project.
- Commit a lockfile containing registry resolution and integrity metadata, and use a reproducible installation command such as
npm ci. - Disable lifecycle scripts during installation where they are unnecessary:
bash npm ci --ignore-scripts- Execute a reviewed local binary from the locked installation rather than relying on dynamic
npxresolution. - Verify package provenance, signatures, and integrity through the organization’s trusted package-management controls.
- Route dependencies through an approved registry mirror with malware scanning and package allowlisting.
- Run the CLI in a least-privileged sandbox without wallet secrets, signing keys, unrelated credentials, or unnecessary filesystem and network access.
- Audit direct and transitive dependencies before approving package upgrades.
