T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:9
- Finding
- Unpinned Third-Party Package Is Installed and Executed as a Background Daemon<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:9-15, 29-34`; duplicated in `README.md:9-15, 29-34` **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: Medium ### Vulnerable Code ```yaml requires: bins: [bnbot-cli] install: - id: node kind: node package: bnbot-cli bins: [bnbot-cli] label: Install bnbot-cli (npm) ``` ```bash nohup bnbot serve > /tmp/bnbot.log 2>&1 & sleep 1 lsof -i :18900 -P 2>/dev/null | grep LISTEN ``` ### Technical Analysis The installation metadata requests `bnbot-cli` from npm without specifying an exact version or package-integrity digest. The instructions subsequently launch code supplied by that dependency as a persistent background process for the current host session. Because dependency resolution is not pinned to an audited artifact, the code installed at different times can differ from the version originally reviewed. A malicious or compromised future package release could therefore execute arbitrary commands under the account running the Skill. The daemon is also designed to communicate with a Chrome extension operating in an authenticated Twitter/X browser session. Consequently, compromise of the dependency could potentially affect both local resources available to the process and social-media operations exposed through that extension. The repository contains only documentation and no implementation of the npm package or extension, so their internal controls and actual network behavior could not be verified in this audit. ### Attack Path 1. An attacker compromises the npm publisher account, package distribution process, or another component responsible for publishing `bnbot-cli`. 2. The attacker publishes a malicious release under the expected package name. 3. A user installs the Skill after that release becomes the version selected by npm because no exact version or integrity digest is specified. 4. The setup instructions cause the user or agent to run `b ...[truncated 1200 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `bnbot-cli` to a reviewed, exact version rather than resolving the latest available package: ```yaml package: bnbot-cli@1.5.0 ``` 2. Verify the package with a trusted lockfile and npm integrity digest. Preserve and review the expected `integrity` value before installation. 3. Document the expected npm publisher, source repository, release commit, and package hash so users can verify provenance. 4. Use automated dependency monitoring and require security review before updating the pinned version. 5. Do not automatically start the daemon immediately after installation. Request explicit user approval and display the executable path and version that will run. 6. Run the daemon with a restricted operating-system account or sandbox, minimal filesystem access, and constrained outbound network access. 7. Bind the WebSocket service only to the loopback interface and require authenticated, origin-validated connections between the daemon and extension. 8. Limit extension permissions and Twitter/X operations to those explicitly requested by the user. Require confirmation for posting, deleting, following, and transmitting local files. 9. Publish auditable source code for the CLI and extension or provide reproducible builds so the installed artifacts can be compared with reviewed source. 10. Add documented shutdown instructions and avoid presenting an indefinitely running background process as necessary when a short-lived process would suffice. ]]>
