T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:317
- Finding
- Unpinned Third-Party Dependency Installation## Vulnerability Details **File Location**: `SKILL.md`, line 317 **Vulnerability Type**: Unpinned third-party dependency and insufficient supply-chain controls **Risk Level**: Medium ### Vulnerable Code ```bash # Requires: pip install requests export DIDIT_API_KEY="your_api_key" ``` The project instructs users to install `requests` without specifying a reviewed version, cryptographic hash, lockfile, or trusted package index. The project directory contains no dependency manifest that otherwise constrains or verifies this package. ### Technical Analysis An unconstrained `pip install requests` command resolves whichever compatible release is available from the configured package index at installation time. Consequently, the installed code may differ from the code reviewed when this Skill was published. This creates a supply-chain risk if the upstream package or package-distribution account is compromised, if a malicious package index is configured, or if package resolution is intercepted or redirected. The script imports the dependency at `scripts/verify_email.py:20` and subsequently provides it with sensitive request headers and payloads. A malicious dependency could therefore execute code during import or request processing. The legitimate script sends the Didit API key, email addresses, OTP values, and optional vendor tracking data only to the fixed HTTPS Didit endpoint. That disclosure is necessary for the declared verification functionality and does not itself exceed minimum privilege. The dependency installation process, however, lacks controls ensuring that the code handling those values is the reviewed dependency version. ### Attack Path 1. An attacker compromises the upstream package distribution channel, influences the configured Python package index, or otherwise causes dependency resolution to return a malicious release. 2. A user follows the documented `pip install requests` instruction without a version or hash ...[truncated 1181 chars]
- Remediation
- ## Remediation Suggestions 1. Replace the unconstrained installation instruction with a dependency manifest that pins a specifically reviewed version: ```text requests==<reviewed-version> ``` 2. Generate and enforce cryptographic hashes for the package and its transitive dependencies, for example: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Commit a lockfile or fully resolved requirements file so installations use the same reviewed dependency graph. 4. Explicitly use the official Python Package Index or an organization-controlled mirror: ```bash python -m pip install --index-url https://pypi.org/simple --require-hashes -r requirements.txt ``` 5. Review and update pinned dependencies through a controlled process that includes vulnerability scanning, provenance verification, and testing before deployment. 6. Run the script in a minimally privileged virtual environment or container, and expose only the required `DIDIT_API_KEY` and necessary network access. 7. Rotate the API key immediately if dependency compromise is suspected, and review Didit account usage for unauthorized requests or credit consumption.
