T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:37
- Finding
- Unpinned Prerelease Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 37 **Vulnerability Type**: Unpinned and automatically upgraded prerelease dependency **Risk Level**: Medium ### Vulnerable Code ```bash # Must install the prerelease, otherwise lbg sdbx is missing pip install --pre --upgrade lbg ``` The same unsafe installation recommendation is repeated in the troubleshooting guidance at line 338: ```text pip install --pre --upgrade lbg ``` ### Technical Analysis The Skill directs users or Agents to install the latest available prerelease of `lbg` without pinning an audited version or validating a package hash. The `--upgrade` option can also replace an existing installation with whichever accepted prerelease is current when the command runs. Consequently, the dependency executed at runtime may differ from the version considered during this audit. A compromised package publisher account, package-index compromise, or malicious future prerelease could introduce arbitrary installation-time or runtime behavior. Python packages can execute code during package installation and subsequently whenever their command-line entry points are invoked. This is classified as `T08: Insecure Dependencies` because the risk originates from an unpinned third-party prerelease obtained dynamically from a package index. ### Attack Path 1. An attacker compromises the relevant package publisher account or package-distribution channel, or otherwise causes a malicious prerelease to become the version selected by pip. 2. A user or Agent follows the Skill and runs `pip install --pre --upgrade lbg`. 3. Pip resolves and downloads the new, unaudited prerelease. 4. Attacker-controlled package installation logic executes, or malicious code is installed in the `lbg` command-line entry point. 5. The user or Agent invokes `lbg`, allowing the malicious dependency to access resources available to that local process. ### Impact Assessment Malicious package code would execute with the p ...[truncated 726 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `lbg` to an exact prerelease version that has been reviewed, rather than accepting every available prerelease: ```bash python -m pip install 'lbg==4.0.0bNN' ``` 2. Publish a lock file or requirements file containing a verified SHA-256 hash, and install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Replace the placeholder version with a specific reviewed release and document the expected package hash. 4. Avoid `--upgrade` in the standard installation workflow. Treat upgrades as a separate, explicit operation requiring review. 5. Use a trusted package index configured over verified TLS and, where practical, maintain an internal mirror containing only approved artifacts. 6. Verify the installed version before use: ```bash python -m pip show lbg ``` 7. Re-audit and update the pinned version deliberately when a newer release is required. ]]>
