T08 · Insecure Dependencies
- Location
tools.json:22- Finding
Unpinned npm Package Is Executed Through npx
- Content
View full analysis
Vulnerability Details
File Location:
tools.json:19-27
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: HighVulnerable Code
json "subscription": { "price": "1 SOL", "duration": "30 days", "cli": "npx whistle-rpc subscribe", "endpoints": { "quote": "POST https://api.whistle.ninja/api/agent/subscribe", "activate": "POST https://api.whistle.ninja/api/agent/activate", "status": "GET https://api.whistle.ninja/api/agent/status/:apiKey" } }The same unversioned CLI is advertised in
CHANGELOG.md:11:markdown - CLI: npx whistle-rpcTechnical Analysis
The command
npx whistle-rpc subscribedoes not specify an exact package version or integrity value. If the package is absent locally,npxcan retrieve it from the configured npm registry and execute its exposed CLI. The artifact under review does not include the CLI source, a lockfile, an integrity hash, or another mechanism that binds execution to an audited package release.Consequently, the code executed by this instruction can change after the skill has been reviewed. A compromised npm maintainer account, compromised package release, registry/configuration manipulation, or malicious future package version could cause arbitrary package code to run. Depending on the npm configuration and package contents, execution may include package lifecycle behavior as well as the requested CLI entry point.
Attack Path
- An attacker compromises the
whistle-rpcnpm package, its publisher account, or the registry resolution path. - The attacker publishes or serves a malicious version that is selected by the unversioned package reference.
- A user or agent follows the documented subscription procedure and runs
npx whistle-rpc subscribe. npxdownloads the currently resolved package because no audited version is pinned.- The malicious package executes with the permis ...[truncated 769 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Replace the unversioned invocation with an exact, reviewed version, such as
npx --yes whistle-rpc@1.0.0 subscribe, after independently auditing that release. - Prefer installing the dependency through a committed lockfile and invoking the locked local binary rather than downloading code at execution time.
- Verify npm package integrity through lockfile integrity metadata, trusted provenance, and publisher/signature controls.
- Run the CLI in a sandbox or container with minimal filesystem access, no unrelated secrets, and a dedicated low-value wallet.
- Disable package lifecycle scripts where compatible, for example by using an npm configuration with
ignore-scripts=true. - Document the expected package publisher, checksum, supported version, and verification procedure.
- Require explicit operator approval before any installation or execution of code retrieved from a package registry.
- Replace the unversioned invocation with an exact, reviewed version, such as
