T08 · Insecure Dependencies
Warning
- Location
- requirements.txt:1
- Finding
- Unpinned Third-Party Python Dependencies<![CDATA[ ## Vulnerability Details **File Location**: `requirements.txt:1-3` **Vulnerability Type**: Unrestricted dependency resolution and supply-chain exposure **Risk Level**: Medium ### Vulnerable Code ```text requests beautifulsoup4 selenium ``` The corresponding installation instructions in `SKILL.md:11-14` also install these packages without version constraints or integrity verification: ```bash pip install requests beautifulsoup4 selenium ``` ### Technical Analysis All third-party dependencies are specified without exact versions, hashes, or a lock file. Consequently, each installation resolves whatever package versions are available from the configured Python package index at that time. This prevents reproducible builds and means the code that is installed can differ from the code reviewed during the audit. If a dependency account, release pipeline, package index, or configured mirror is compromised, a malicious release could be selected automatically. Even without a compromise, an incompatible future release could introduce exploitable behavior or break the Skill. The package names appear legitimate and there is no evidence that any currently referenced dependency is malicious. The vulnerability is the absence of dependency version and integrity controls. ### Attack Path 1. An attacker compromises the publishing account or release process of one of the listed dependencies, or compromises a package mirror used by the operator. 2. The attacker publishes a malicious version that satisfies the unrestricted dependency declaration. 3. A user follows the documented installation command or installs `requirements.txt`. 4. `pip` resolves and downloads the malicious release because no reviewed version or cryptographic hash is required. 5. Attacker-controlled code may execute during package installation or when the package is imported by the Skill. 6. The code runs with the privileges of the user or service account performing installation or executing t ...[truncated 502 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency to an explicitly reviewed version, for example: ```text requests==<reviewed-version> beautifulsoup4==<reviewed-version> selenium==<reviewed-version> ``` 2. Generate and commit a lock file that includes resolved transitive dependencies. 3. Add cryptographic hashes and install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Install dependencies from a trusted, explicitly configured package index. 5. Run dependency vulnerability and provenance checks in CI before accepting updates. 6. Update `SKILL.md` so its installation command uses the reviewed requirements or lock file rather than installing unrestricted package versions directly. 7. Perform installation and execution in an isolated virtual environment or container under a non-privileged account. ]]>
