T08 · Insecure Dependencies
- Location
references/coverage-python.md:8- Finding
Unpinned Python Development Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
references/coverage-python.md, lines 8-10
Vulnerability Type: Unpinned third-party development dependencies
Risk Level: MediumVulnerable Code:
bash python -m pip install pytest pytest-cov coverage # optional type checking python -m pip install mypyTechnical Analysis
The documented installation commands do not constrain package versions or verify package hashes. Consequently, package resolution depends on the mutable state of the configured Python package index at installation time.
Package installation and subsequent execution of
pytest, coverage plugins, andmypyallow downloaded package code to run with the privileges of the invoking user. If an upstream package, release process, registry account, package index, or package-resolution configuration is compromised, a malicious release could be selected without any change to the audited skill.This is a supply-chain weakness rather than evidence that the currently named packages are malicious.
Attack Path
- An attacker compromises a relevant package publisher, distribution channel, configured package index, or dependency-resolution path.
- The attacker publishes a malicious release that satisfies the unconstrained installation request.
- A user follows the documented prerequisite commands.
pipresolves and installs the attacker-controlled release.- Malicious package code executes during installation, plugin discovery, test execution, coverage collection, or type checking.
- The payload acts with the privileges and environmental access of the user running the audit.
Impact Assessment
Successful exploitation could provide code execution under the invoking user's account. The accessible scope may include the target repository, source code, test data, environment variables, user-writable files, and credentials exposed to the audit process. It does not directly grant elevated ...[truncated 112 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every tool to a reviewed version, for example by using exact
==constraints. - Maintain a locked requirements file generated by a dependency-locking tool.
- Require package hashes with
pip --require-hasheswhere practical. - Install tools inside a dedicated virtual environment rather than the user's global Python environment.
- Use only an approved package index over authenticated TLS, and disable unintended extra indexes.
- Scan and periodically update pinned dependencies through a controlled review process.
- Run testing and analysis in an isolated container with minimal filesystem access, no production credentials, and restricted network connectivity.
- Pin every tool to a reviewed version, for example by using exact
