T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:51
- Finding
- Third-Party Packages Are Installed Without Cryptographic Integrity Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:51-54` and `scripts/create_sandbox.py:42-44` **Vulnerability Type**: Supply-chain exposure through dependencies installed from a custom package index without artifact hashes **Risk Level**: Medium ### Vulnerable Code From `SKILL.md:51-54`: ```bash pip3.9 install e2b==1.11.2+baidu --index=https://pip.baidu-int.com/simple/ pip3.9 install e2b-code-interpreter==1.5.2 --index=https://pip.baidu-int.com/simple/ pip3.9 install load_dotenv==0.1.0 --index=https://pip.baidu-int.com/simple/ ``` The same installation instructions are emitted by `scripts/create_sandbox.py:42-44`: ```python print("pip3.9 install e2b==1.11.2+baidu --index=https://pip.baidu-int.com/simple/") print("pip3.9 install e2b-code-interpreter==1.5.2 --index=https://pip.baidu-int.com/simple/") print("pip3.9 install load_dotenv==0.1.0 --index=https://pip.baidu-int.com/simple/") ``` ### Technical Analysis The dependency versions are pinned, but the package artifacts and their transitive dependencies are not protected with cryptographic hashes. Installation therefore relies entirely on the integrity of the configured custom package index, its DNS and TLS environment, and the continued integrity of every published artifact. Python packages can execute code during installation and whenever imported. These scripts subsequently import `dotenv` and `e2b_code_interpreter`, making compromise or substitution of either distribution a direct code-execution path. The distribution named `load_dotenv` also warrants explicit provenance verification because the imported module name is `dotenv`, which may otherwise be associated with differently named distributions. This finding does not establish that the referenced packages are currently malicious. It identifies the absence of controls that would prevent a compromised or incorrectly published artifact from being accepted. ### Attack Path 1. An attacker compromises the custom package index, a publis ...[truncated 961 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Provide a reviewed lock file containing exact versions for direct and transitive dependencies. 2. Record SHA-256 hashes for every permitted artifact and install with `pip --require-hashes`. 3. Verify the provenance and intended distribution name of the package that supplies the `dotenv` module. 4. Use a controlled package mirror with authenticated publishing, immutable artifacts, audit logging, and malware scanning. 5. Install dependencies in an isolated virtual environment under a nonprivileged account. 6. Add automated dependency provenance and vulnerability checks to the release process. ]]>
