T08 · Insecure Dependencies
Error
- Location
- README.md:16
- Finding
- Unauditable External Repository and Unsafe Dependency Installation Workflow<![CDATA[ ## Vulnerability Details **File Location**: `README.md:16-20` **Vulnerability Type**: Supply-chain exposure through an unspecified external repository and npm installation **Risk Level**: High ### Vulnerable Code ```bash git clone <repo-url-provided-after-purchase> cd polymarket-bot npm install cp .env.example .env ``` ### Technical Analysis The audited package does not include the advertised trading bot, its `package.json`, a dependency lockfile, or its TypeScript source. Instead, users are directed to clone an unspecified repository supplied after purchase and execute `npm install`. The repository URL, owner, revision, release digest, and dependency versions are not pinned in the reviewed material. Consequently, the code ultimately installed and executed can differ from the content reviewed during this audit. In addition, `npm install` can execute package lifecycle scripts such as `preinstall`, `install`, and `postinstall`, giving dependencies an opportunity to run arbitrary commands with the invoking user's privileges. This is a supply-chain risk rather than proof that the external repository is malicious. The absence of the repository and dependency metadata prevents verification of the executable component advertised by the Skill. ### Attack Path 1. A user installs the documentation-only Skill and receives a mutable external repository URL after purchase. 2. The repository, one of its dependencies, or a dependency release is compromised or replaced. 3. The user runs `npm install` as instructed. 4. A malicious npm lifecycle script executes under the user's local account. 5. The script can read files accessible to that account, alter the bot, access subsequently configured environment secrets, or establish unauthorized network communication. 6. When the user runs the trading bot, modified code may submit unauthorized transactions or disclose credentials. ### Impact Assessment Successful exploitation would obtain the privileges of the user ...[truncated 545 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Include the complete executable source, `package.json`, and lockfile in the auditable package. 2. Publish the official repository URL and pin installation instructions to a reviewed commit hash or signed release tag. 3. Pin exact dependency versions and enforce lockfile integrity with `npm ci`. 4. Review all direct and transitive dependency lifecycle scripts before permitting their execution. 5. Perform an initial installation with lifecycle scripts disabled, such as `npm ci --ignore-scripts`, and explicitly enable only scripts demonstrated to be necessary. 6. Generate and verify release checksums or signatures. 7. Add automated dependency, provenance, and secret scanning to the release process. 8. Do not ask users to configure wallet or exchange credentials until the installed source and dependencies have been verified. ]]>
