T08 · Insecure Dependencies
- Location
- README.md:49
- Finding
- Unpinned Third-Party Package Execution in Installation Instructions## Vulnerability Details **File Location**: `README.md:49-57` **Vulnerability Type**: Supply-chain risk from executing a mutable third-party package release **Risk Level**: Medium ### Vulnerable Code ```bash # notion-api-automation npx clawhub@latest install notion-api-automation pnpm dlx clawhub@latest install notion-api-automation ``` The same unsafe installation pattern is repeated at `README.md:149-156`: ```bash npx clawhub@latest install notion-api-automation ``` ```bash pnpm dlx clawhub@latest install notion-api-automation ``` ### Technical Analysis The documented commands download and execute the mutable `latest` release of the third-party `clawhub` package. No reviewed version or package integrity value is pinned. Consequently, the code executed by users can change after this Skill has been reviewed. This dependency is security-sensitive because it installs `notion-api-automation`, which is subsequently invoked by `scripts/notionctl_bridge.js` and operates in a process environment that may contain a Notion API credential. A malicious package release, compromised publisher account, registry compromise, or compromised transitive dependency could therefore execute arbitrary JavaScript during installation or package invocation. This finding is limited to the documented package installation mechanism. The project itself declares no runtime npm dependencies, and no evidence was found that the included scripts covertly retrieve or execute a remote payload. ### Attack Path 1. An attacker compromises the `clawhub` package, its publisher account, or a transitive dependency, or publishes a malicious future version under the same package channel. 2. A user follows the documented `npx clawhub@latest` or `pnpm dlx clawhub@latest` command. 3. The package manager resolves `latest` to the attacker-controlled release and downloads it. 4. Package lifecycle or runtime code executes with the invoking user’s OS privileges. 5. The malicious code can access files an ...[truncated 928 chars]
- Remediation
- ## Remediation Suggestions 1. Replace `@latest` with an explicitly reviewed and immutable version: ```bash npx clawhub@<reviewed-version> install notion-api-automation pnpm dlx clawhub@<reviewed-version> install notion-api-automation ``` 2. Pin `notion-api-automation` to a reviewed version rather than relying on a mutable default release. 3. Record and verify package integrity metadata through a committed lockfile or equivalent checksum-based verification. 4. Document the expected package publisher, source repository, and reviewed release identifier so users can verify package provenance. 5. Review package lifecycle scripts and transitive dependencies before updating the pinned version. 6. Perform installation in a constrained environment without production credentials. Inject `NOTION_API_KEY` only when the reviewed runtime component is actually needed. 7. Apply the same changes to both duplicated installation sections at `README.md:49-57` and `README.md:149-156`.
