T08 · Insecure Dependencies
- Location
IRIS 代码格式化 Skill 使用说明.md:22- Finding
Unpinned npm CLI Package Execution Through npx
- Content
View full analysis
--no-input ``` ``` ### Technical Analysis The installation guide directs users to invoke `clawhub` through `npx` without specifying an exact package version or integrity hash. If the package is not already available locally, `npx` can retrieve and execute the version resolved from the configured npm registry. The project does not include a package lockfile, integrity metadata, vendored installer, or other mechanism that establishes which implementation of the CLI will execute. The `--no-input` option also causes installation to proceed without interactive confirmation. This creates a supply-chain risk because the code executed by the documented command can change independently of the audited Skill. A compromised registry account, package takeover, malicious future release, or unsafe registry configuration could cause attacker-controlled package code to run. ### Attack Path 1. An attacker compromises the npm package or publisher account associated with the resolved `clawhub` package, publishes a malicious future release, or influences the user's npm registry configuration. 2. A user follows the installation instructions and runs the documented `npx clawhub install ... --no-input` command. 3. `npx` resolves and downloads the attacker-controlled package version because no exact version or integrity value is required. 4. Package lifecycle code or the CLI entry point executes with the privileges of the user running the command. 5. The malicious package can access resources available to that user and may alter the requested installation output or perform unrelated local actions. ### Impact Assessment Successful exploitation woul ...[truncated 768 chars]- Remediation
View remediation
install iris-code-formatter --workdir ``` 2. Document the expected npm package publisher, registry, package version, and integrity hash. 3. Prefer a trusted, previously installed CLI whose version is verified before use. 4. Where supported, use a lockfile or an equivalent dependency-locking mechanism that records integrity metadata. 5. Avoid noninteractive installation by default. Remove `--no-input` unless automated deployment explicitly requires it and validates all inputs beforehand. 6. Recommend running the installer with a least-privileged account in an isolated environment. 7. Add a verification step that checks the downloaded Skill contents against a published checksum or signed release before activation. ]]>
