T08 · Insecure Dependencies
- Location
SKILL.md:31- Finding
Unpinned Third-Party CLI Installation Creates a Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 31-37
Vulnerability Type: Unpinned npm dependency installation
Risk Level: MediumVulnerable Code
markdown This environment has already been validated. Installed CLI: ```bash npm install -g @youmind-ai/cli --prefix "$HOME/.local"text ### Technical Analysis The Skill documents installation of `@youmind-ai/cli` without specifying an exact version, lockfile, package integrity hash, or provenance-verification procedure. Consequently, the version resolved from the npm registry can change after the Skill has been reviewed. npm package installation can execute package lifecycle scripts. If the package, publisher account, registry delivery path, or a future package release is compromised, following this instruction could execute attacker-controlled code under the account running the Agent. Describing the package as official does not provide a technical integrity guarantee. The installation target is the user's local prefix rather than a system-wide directory, which limits the immediate privilege level. However, the installed program subsequently receives the `YOUMIND_API_KEY` and processes user content, so a compromised version would occupy a sensitive trust position. ### Attack Path 1. An attacker compromises the npm package publisher, package release process, or another part of the package-distribution chain. 2. The attacker publishes a malicious version of `@youmind-ai/cli`. 3. A user or Agent follows the documented unpinned installation command. 4. npm resolves the malicious version and may execute its lifecycle scripts during installation. 5. The malicious package executes with the privileges of the current user. 6. During installation or subsequent CLI use, it accesses local user data, intercepts `YOUMIND_API_KEY`, captures content supplied to YouMind operations, or alters API requests and responses. ### Impact Assessment Suc ...[truncated 747 chars]- Remediation
View remediation
Remediation Suggestions
-
Pin the CLI to an exact reviewed version rather than resolving the latest release:
bash npm install -g @youmind-ai/cli@<reviewed-exact-version> --prefix "$HOME/.local" -
Record and verify the expected package integrity digest and package provenance before installation.
-
Verify the npm package owner, registry URL, signing or provenance metadata, and correspondence with the official upstream source repository.
-
Review package contents and lifecycle scripts before approving version updates.
-
Use
--ignore-scriptswhere compatible, or explicitly document why lifecycle scripts are required. -
Test upgrades in an isolated environment before changing the approved version.
-
Run the CLI with only the filesystem and network access required for YouMind operations.
-
Continue preferring environment-based authentication over command-line API-key arguments, and ensure credentials are scoped, rotated, and revocable.
-
