T08 · Insecure Dependencies
- Location
SKILL.md:7- Finding
Unpinned Third-Party Python Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 7
Vulnerability Type: T08: Insecure Dependencies
Risk Level: MediumVulnerable Code Snippet:
yaml dependencies: "pip install jieba python-docx fpdf2"Technical Analysis
The skill declares three Python dependencies without exact version constraints or cryptographic integrity hashes. If this installation instruction is honored,
pipwill resolve whatever package versions are available from its configured package index at installation time.Consequently, the installed code is not reproducible and may change after the skill has been reviewed. A compromised package release, compromised package-maintainer account, or unsafe package-index configuration could cause attacker-controlled package code to be installed. Python packages may execute build or installation logic during installation, and their imported modules execute with the privileges of the process running the skill.
The reviewed package names are not visibly misspelled or sourced from disguised URLs. The risk arises specifically from unconstrained dependency resolution and absent integrity verification; the audit found no evidence that the listed packages are currently malicious.
Attack Path
- An attacker compromises one of the declared packages, its maintainer account, or a package index trusted by the target environment.
- The attacker publishes a malicious release under the expected package name.
- A user or agent follows the declaration and runs:
bash pip install jieba python-docx fpdf2 - Because no versions or hashes are specified,
pipmay resolve and download the attacker-controlled release. - Malicious installation logic or imported package code executes with the privileges and environmental access of the Python process.
- Depending on those privileges, the payload could access local files, generated reports, environment variables, or browser ...[truncated 789 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the unconstrained installation command with exact, reviewed version pins, for example:
text jieba==<reviewed-version> python-docx==<reviewed-version> fpdf2==<reviewed-version> - Store dependencies in a lock or requirements file containing SHA-256 hashes and install them with hash enforcement:
bash python3 -m pip install --require-hashes -r requirements.txt - Generate and review the lock file from a trusted package index, and explicitly configure the approved index rather than relying on mutable global
pipsettings. - Install dependencies inside a dedicated virtual environment or similarly isolated runtime using a non-privileged account.
- Prevent dependency installation from receiving unnecessary secrets, authenticated browser state, or write access to unrelated files.
- Scan and review dependency updates before changing pinned versions, including transitive dependencies and package provenance.
- Avoid executing dependency installation automatically when the skill is loaded; require an explicit, reviewable setup step.
- Replace the unconstrained installation command with exact, reviewed version pins, for example:
