T08 · Insecure Dependencies
- Location
SKILL.md:52- Finding
Unpinned npm Package Is Downloaded and Immediately Executed
- Content
View full analysis
"The **ai-seo MCP** (`@automatelab/ai-seo-mcp`) is not connected. Step 5 can run a programmatic citation-worthiness and schema score on your draft in addition to the manual audit. To install it: > ``` > npx -y @automatelab/ai-seo-mcp > ``` > then register it in your MCP config. See the [ai-seo-mcp README](https://github.com/AutomateLab-tech/ai-seo-mcp) for one-line configs for Claude Code, Cursor, and Cline. Type **skip** to continue with the manual-only audit." ``` ### Technical Analysis The instruction invokes `npx` with the `-y` option and no exact package version. This causes npm to resolve the package from the configured registry, download the currently selected release, and execute its entry point without an interactive installation confirmation. The effective executable can therefore change after this Skill has been reviewed. A compromised maintainer account, malicious future release, registry compromise, or dependency-chain compromise could cause arbitrary code to run under the invoking user's identity. The MCP is explicitly optional and is not required for the core drafting or manual auditing workflow. Automatically executing its latest registry version therefore exceeds the minimum privilege and dependency requirements of the Skill's core functionality. ### Attack Path 1. An attacker compromises the `@automatelab/ai-seo-mcp` package, one of its transitive dependencies, or the associated registry publishing account. 2. The attacker publishes a malicious release that is selected by npm's unpinned version resolution. 3. A user follows the Skill's installation prompt and runs: ```bash npx -y @automatelab/ai-seo-mcp ``` 4. `npx` downloads and executes the compromised package without displaying an interactive confirmation. 5. The malicious package ...[truncated 761 chars]- Remediation
View remediation
``` 2. Record and verify the expected package integrity hash and registry provenance. 3. Use a lockfile for any persistent installation and commit the lockfile for review. 4. Review the package and its transitive dependencies before recommending execution. 5. Remove `-y` from user-facing instructions where feasible so package resolution and installation require explicit confirmation. 6. Run the optional MCP in a sandbox with restricted filesystem, environment-variable, and network access. 7. Keep the manual-only audit as the default path and install the MCP only after explicit, informed user consent. ]]>
