T08 · Insecure Dependencies
- Location
scripts/generate_report.py:24- Finding
Unpinned Third-Party Dependency Installation Guidance
- Content
View full analysis
Vulnerability Details
File Location:
scripts/generate_report.py:24-26
Vulnerability Type: Unpinned third-party dependency
Risk Level: Mediumpython except ImportError: print("Error: reportlab not installed. Run: pip install reportlab") sys.exit(1)Technical Analysis
When ReportLab is unavailable, the script instructs the user to install it directly from the default Python package index without specifying a reviewed version, verifying package hashes, requiring a trusted index, or using a lock file.
The command therefore resolves mutable third-party content at installation time. Although the project does not automatically execute the installation command, following its explicit recovery instructions can run package installation or build logic supplied by the resolved package version.
Attack Path
- A user invokes the report generator in an environment where ReportLab is not installed.
- The script terminates and instructs the user to run
pip install reportlab. - Pip resolves the current package from its configured indexes without a version or hash constraint.
- If an upstream release, configured index, dependency, or distribution artifact has been compromised, its installation or runtime code executes.
- The malicious code operates with the privileges of the user running pip or the report generator.
Impact Assessment
Successful supply-chain exploitation could execute arbitrary code with the invoking user's privileges. This could expose customer KYC files, generated reports, environment credentials, and other files accessible to that account. The project itself contains no evidence that ReportLab is currently malicious, so exploitation depends on compromise or unsafe configuration of the external package supply chain.
- Remediation
View remediation
Remediation Suggestions
- Declare ReportLab in a reviewed dependency manifest rather than providing an unconstrained installation command.
- Pin an exact reviewed version.
- Require package hashes through a hash-locked requirements file.
- Install dependencies from a trusted, explicitly configured package index.
- Use an isolated virtual environment or container with least privilege.
- Add automated vulnerability and integrity scanning for direct and transitive dependencies.
- Replace the message with a reproducible command such as installation from a project-maintained lock file.
