T08 · Insecure Dependencies
Warning
- Location
- README.md:136
- Finding
- Unpinned npm Package Is Downloaded and Executed During Recommended Installation## Vulnerability Details **File Location**: `README.md:136-138` **Vulnerability Type**: Supply-chain exposure through mutable package execution **Risk Level**: Medium ### Vulnerable Code ```text # Optional China mirror: npm config set registry https://registry.npmmirror.com npx -y @yottameta/yotta-security-testing --agent <agent-name> # install to the agent's default user-level skills dir npx -y @yottameta/yotta-security-testing --dir <your-skills-dir> # point to the skills dir itself (e.g. ~/.codex/skills) ``` Equivalent unpinned commands also appear in `README.zh-CN.md:128-130`. ### Technical Analysis The recommended installation procedure invokes `npx -y` without specifying an exact package version or verifying package integrity. The effective executable is therefore the package version resolved by the configured npm registry at installation time, rather than the version reviewed in this audit. The `-y` option suppresses the normal confirmation prompt. The package exposes `bin/install.js` as its executable, so the downloaded package immediately receives the current user's filesystem privileges. Its intended behavior includes writing into user-level Agent skill directories. The optional `npm config set registry` command changes the user's persistent npm registry configuration. This broadens the trust decision beyond this installation because subsequent npm commands may also resolve packages through that mirror. No malicious dependency or remote payload was found in the audited artifact. The issue is that the documented process does not cryptographically bind installation to this reviewed version. ### Attack Path 1. An attacker compromises the npm publisher account, configured registry, mirror, or package release process. 2. The attacker publishes or serves a modified version under `@yottameta/yotta-security-testing`. 3. A user follows the recommended unpinned `npx -y` command. 4. npm resolves ...[truncated 803 chars]
- Remediation
- ## Remediation Suggestions 1. Pin installation commands to an audited exact version, for example: ```text npx @yottameta/yotta-security-testing@0.3.0 --agent <agent-name> ``` 2. Avoid `-y` so users retain an explicit execution confirmation. 3. Publish package integrity information and document verification of the npm tarball before execution. 4. Prefer downloading and inspecting a pinned package archive before running its installer. 5. Use a command-scoped registry option instead of persistently changing the user's npm registry configuration. 6. Protect publisher accounts with phishing-resistant multi-factor authentication and restricted release tokens. 7. Add reproducible release and provenance controls so users can compare the registry artifact with the reviewed repository revision.
