T08 · Insecure Dependencies
Error
- Location
- SKILL.md:48
- Finding
- Unpinned Global Installation of an Unreviewed Third-Party CLI<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 48-55 **Vulnerability Type**: Unpinned third-party dependency with global installation **Risk Level**: High ### Vulnerable Code ```bash # Install via npm npm install -g agentmemory-cli # Setup (auto-syncs everything!) agentmemory init ``` ### Technical Analysis The Skill instructs users to globally install the latest available version of `agentmemory-cli` without a version constraint, integrity hash, lockfile, package signature, or source-review requirement. A global npm installation may execute package lifecycle scripts and installs executable code under the permissions of the invoking user. The implementation of this CLI is not included in the audited project, so its actual filesystem access, encryption behavior, credential handling, initialization process, and synchronization scope cannot be verified. The subsequent `agentmemory init` operation is expressly described as automatically synchronizing data, further increasing the potential impact of an untrusted or compromised package. This dependency is directly related to the declared functionality, but the unrestricted installation and execution method grants more trust than is minimally necessary. ### Attack Path 1. An attacker compromises the npm publisher account, package repository, release pipeline, or a transitive dependency. 2. The attacker publishes a malicious version under the existing `agentmemory-cli` package name. 3. A user follows the Skill and runs `npm install -g agentmemory-cli`. 4. npm retrieves the current malicious release because no version or integrity value is pinned. 5. Malicious lifecycle or CLI code executes with the user's permissions. 6. The package can access files and environment variables available to the user, including the AgentMemory credential and data selected for synchronization. 7. The attacker can exfiltrate data, alter local files, or manipulate synchronized memories. ### Impact Assessment ...[truncated 488 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin the CLI to a specifically reviewed version rather than installing the latest release. - Publish and verify a cryptographic integrity digest or signed release manifest. - Include the relevant CLI source, dependency lockfile, and security documentation in the auditable artifact. - Prefer a project-local, sandboxed installation instead of a global npm installation. - Disable npm lifecycle scripts during installation unless they are documented and independently reviewed. - Document every local path, environment variable, and network destination accessed by initialization. - Require explicit user selection and confirmation of each synchronization category. - Run the CLI with the least-privileged account and restrict filesystem and network access where sandboxing is available. ]]>
