T08 · Insecure Dependencies
- Location
SKILL.md:63- Finding
Unpinned Global npm Package Installation Creates a Supply-Chain Execution Risk
- Content
View full analysis
/dev/null && echo "found" || echo "missing" ``` If missing, show the user this command and ask for confirmation before running it: > "The `akp` CLI is not installed. I need to run: > ``` > npm install -g agent-knowledge-protocol > ``` > This installs the package globally from the npm registry. Shall I proceed? (yes/no)" **Only install after explicit yes.** Then run: ```bash npm install -g agent-knowledge-protocol akp --version ``` ``` ### Technical Analysis The skill instructs the agent to install `agent-knowledge-protocol` globally from the npm registry without specifying an exact version, integrity hash, verified artifact, or trusted package provenance. Consequently, the code ultimately executed is determined by the package version served by the registry at installation time rather than by the audited skill contents. An npm installation can execute package lifecycle scripts. If the package, one of its transitive dependencies, a maintainer account, or the registry delivery path is compromised, malicious code could execute during installation. User confirmation makes the external installation visible but does not verify the safety or immutability of the retrieved package. The global installation also increases scope compared with a project-local installation: it modifies the executing user's global npm environment and places a command named `akp` on the user's executable path. ### Attack Path 1. An attacker compromises the npm package, a transitive dependency, or an authorized publisher account. 2. The attacker publishes a malicious version under the legitimate `agent-knowledge-protocol` package name. 3. The user approves the installation command presented by the skill. 4. `npm install -g agent-knowledge-pro ...[truncated 878 chars]- Remediation
View remediation
