T08 · Insecure Dependencies
- Location
scripts/generate_iso_docs.py:21- Finding
Third-Party Dependency Installed Without Integrity Verification
- Content
View full analysis
Vulnerability Details
File Location:
scripts/generate_iso_docs.py:21-25
Related Location:SKILL.md:19-22
Vulnerability Type: Unverified third-party dependency installation
Risk Level: MediumVulnerable Code Snippet
python except ImportError: print("Error: the python-docx library must be installed") print("Run: pip install python-docx==1.1.2") exit(1)The corresponding dependency declaration in
SKILL.md:19-22is:text python-docx==1.1.2Technical Analysis
The project instructs users to install
python-docxdirectly from the package source configured forpip. Although the dependency is pinned to version1.1.2, no cryptographic hash, lockfile, trusted-index requirement, package signature verification, or transitive dependency integrity control is supplied.Version pinning provides reproducibility but does not establish authenticity. If the configured package index, network path, package release, or dependency-resolution configuration is compromised, an attacker-controlled distribution could be installed. Python packages may execute build or installation logic and are subsequently imported by this script.
No evidence indicates that
python-docxitself is malicious. The vulnerability is the absence of supply-chain integrity controls around installation.Attack Path
- An attacker compromises a configured Python package index, package publication account, local package mirror, or dependency-resolution path.
- The attacker serves a malicious distribution matching the requested package and version, or compromises a transitive dependency selected by
pip. - A user follows the displayed
pip install python-docx==1.1.2instruction. - Malicious package installation or build logic executes with the privileges of the user running
pip. - The malicious package may execute again when
generate_iso_docs.pyimports thedocxmodule.
Im
...[truncated 477 chars]
- Remediation
View remediation
Remediation Suggestions
- Add a hash-locked dependency file generated from a reviewed artifact, for example:
text python-docx==1.1.2 --hash=sha256:<verified-distribution-hash> - Require installation with:
bash python -m pip install --require-hashes -r requirements.txt - Lock and verify all transitive dependencies rather than only the top-level package.
- Document the approved package index and use an explicitly configured HTTPS index.
- Perform dependency vulnerability and provenance checks in CI.
- Install dependencies in an isolated virtual environment under a non-privileged account.
- Correct the statement in
SKILL.md:894that claims there is no external dependency risk.
- Add a hash-locked dependency file generated from a reviewed artifact, for example:
