T08 · Insecure Dependencies
- Location
scripts/README.md:8- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
scripts/README.md:8
Vulnerability Type: Supply-chain risk from an unpinned dependency
Risk Level: LowComplete Code Snippet:
bash pip3 install reportlab # Python 3.8 must pin reportlab<4.3Technical Analysis
The documented PDF setup installs
reportlabwithout pinning an exact reviewed version or verifying artifact hashes. The comment only applies a non-exact upper constraint for Python 3.8 and does not protect other environments. No lockfile, hash manifest, or trusted package-index requirement is supplied.Consequently, installation behavior can change over time as the package index resolves newer releases and transitive build dependencies. If the package, its distribution artifacts, its build dependencies, or the configured package index were compromised, installation or subsequent import could run attacker-controlled Python code.
The dependency name appears legitimate, and the audited project does not itself retrieve or execute a remote payload. This is therefore an insecure dependency-management practice rather than evidence of malicious intent.
Attack Path
- A user requests the optional PDF-report functionality.
- The user follows
scripts/README.mdand runs the documentedpip3 install reportlabcommand. pipresolves the currently available package and any required build dependencies from its configured index.- A compromised release, artifact, build dependency, or package index supplies attacker-controlled code.
- That code executes during package installation, wheel building, or later when the report generator imports ReportLab.
Exploitation depends on an upstream or package-index compromise; no direct compromise is present in the audited repository.
Impact Assessment
Malicious dependency code would execute with the privileges of the user running
pipor the PDF generator. It could potentially access that user' ...[truncated 273 chars]- Remediation
View remediation
Remediation Suggestions
- Pin ReportLab to an exact version reviewed and tested by the project, for example through a version-controlled requirements file.
- Record artifact hashes and install with
pip --require-hashes. - Pin and hash all transitive or build-time dependencies where applicable.
- Use a trusted package index explicitly and avoid unreviewed mirrors.
- Prefer binary wheels from verified sources and prevent unexpected source builds where operationally feasible.
- Run installation and PDF generation in an isolated virtual environment without administrator privileges.
- Add a documented dependency-update process that reviews release notes, provenance, and security advisories before changing the pin.
