T08 · Insecure Dependencies
- Location
SKILL.md:74- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 74-78
Vulnerability Type: Unpinned runtime dependency installation
Risk Level: MediumVulnerable Code:
markdown If `python-docx` is missing, install it: ```bash python -m pip install --user python-docxtext ### Technical Analysis The installation command retrieves the current `python-docx` package and its transitive dependencies from pip's configured package index without enforcing an audited version, a dependency lock file, or cryptographic hashes. The installed code can therefore differ between executions even when the Skill itself has not changed. Although `python-docx` is a legitimate package and the audit found no evidence that it is currently malicious, this installation method creates a supply-chain risk. Compromise of the package publisher, package index, dependency resolution process, or a transitive dependency could cause attacker-controlled code to be installed. A malicious package could execute code during installation or when imported by `scripts/review_1040.py`. ### Attack Path 1. An attacker compromises a relevant package release, publisher account, configured package index, or transitive dependency. 2. A user follows the Skill's documented installation command because `python-docx` is unavailable. 3. Pip resolves and downloads mutable, unpinned package content from the configured index. 4. The compromised package is installed in the user's Python environment. 5. Malicious code executes during package installation or when `scripts/review_1040.py` imports `docx`. 6. The code runs with the privileges of the user executing pip or the review script. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the current user's privileges. The accessible scope may include files readable or writable by that user, generated tax-review artifacts, supplied tax-return data, environment variables, ...[truncated 462 chars]- Remediation
View remediation
Remediation Suggestions
- Declare
python-docxin a reviewed dependency file and pin it to an explicitly approved version. - Lock all transitive dependencies rather than constraining only the top-level package.
- Record cryptographic hashes and install with pip's hash verification:
bash python -m pip install --require-hashes -r requirements.txt - Generate and review the lock file through a controlled dependency-management process.
- Retrieve packages only from an approved package index or internal artifact repository.
- Run dependency vulnerability and provenance checks before updating pinned versions.
- Avoid encouraging ad hoc runtime installation in the Skill instructions. Instead, document a reproducible environment setup step performed before sensitive tax data is processed.
- Execute the review in an isolated virtual environment or container with minimal filesystem and credential access.
- Declare
