T08 · Insecure Dependencies
- Location
SKILL.md:317- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 317
Vulnerability Type: Unpinned third-party dependency and insufficient supply-chain controls
Risk Level: MediumVulnerable Code
bash # Requires: pip install requests export DIDIT_API_KEY="your_api_key"The project instructs users to install
requestswithout 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 requestscommand 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:20and 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
- An attacker compromises the upstream package distribution channel, influences the configured Python package index, or otherwise causes dependency resolution to return a malicious release.
- A user follows the documented
pip install requestsinstruction without a version or hash ...[truncated 1181 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the unconstrained installation instruction with a dependency manifest that pins a specifically reviewed version:
text requests==<reviewed-version> - Generate and enforce cryptographic hashes for the package and its transitive dependencies, for example:
bash python -m pip install --require-hashes -r requirements.txt - Commit a lockfile or fully resolved requirements file so installations use the same reviewed dependency graph.
- 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 - Review and update pinned dependencies through a controlled process that includes vulnerability scanning, provenance verification, and testing before deployment.
- Run the script in a minimally privileged virtual environment or container, and expose only the required
DIDIT_API_KEYand necessary network access. - Rotate the API key immediately if dependency compromise is suspected, and review Didit account usage for unauthorized requests or credit consumption.
- Replace the unconstrained installation instruction with a dependency manifest that pins a specifically reviewed version:
