T08 · Insecure Dependencies
- Location
SKILL.md:10- Finding
Unpinned Remote npm Package Is Installed and Executed
- Content
View full analysis
` - Storage: `~/.polygon-agent/` (AES-256-GCM encrypted) ``` The quick-start guide additionally recommends a global installation: ```markdown ## Prerequisites - Node.js 22+ - Run via npx: `npx @polygonlabs/agent-cli ` - Or install globally for the shorter `polygon-agent` command: `npm install -g @polygonlabs/agent-cli` ``` ### Technical Analysis The documentation instructs the Agent to retrieve and execute `@polygonlabs/agent-cli` without pinning an exact package version or integrity digest. Depending on local npm behavior and cache state, `npx` can download the current registry release and execute it immediately. Consequently, the effective executable can change after the Skill has been reviewed. A compromised npm account, package registry, maintainer environment, or future malicious release could introduce arbitrary code without any modification to this Skill. Global installation further expands the exposure because the package remains available to later shell sessions. This risk is particularly significant because the package is expected to operate in a context containing wallet credentials, project access keys, encrypted wallet sessions, and authority to broadcast financial transactions. ### Attack Path 1. An attacker compromises the package publisher, publication pipeline, or registry entry for `@polygonlabs/agent-cli`. 2. The attacker publishes a modified release containing malicious install-time or runtime behavior. 3. The Agent follows the Skill and invokes `npx @polygonlabs/agent-cli` or installs the package globally without specifying an audited version. 4. npm retrieves and executes the attacker-cont ...[truncated 905 chars]- Remediation
View remediation
