T08 · Insecure Dependencies
- Location
SKILL.md:84- Finding
Unpinned Runtime Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 84
Vulnerability Type: Supply-chain exposure through automatic installation of an unpinned package
Risk Level: MediumVulnerable Code:
bash python3 -c "import docx" 2>/dev/null || pip3 install python-docx -qTechnical Analysis
If the
docxmodule is unavailable, the Skill automatically installspython-docxfrom the package index configured forpip3. No exact version, package hash, trusted index URL, or lock file is specified.Consequently, the code installed during a Skill invocation can differ from the code reviewed during the audit. A compromised package-index account, malicious package mirror, unsafe local pip configuration, or compromised future release could introduce attacker-controlled installation or runtime code.
This behavior also conflicts with the statement at
SKILL.md:311that the Skill requires no network access. The installation may initiate an external network connection without clearly requesting user approval.Attack Path
- The Skill runs in an environment where the
docximport is unavailable. - The import check fails and automatically invokes
pip3 install python-docx -q. - Pip resolves the package through its configured index or mirror without enforcing a reviewed version or integrity hash.
- A compromised package release, index, mirror, or pip configuration supplies malicious package content.
- Malicious installation code executes during installation, or malicious module code executes when the document-processing script imports
docx.
Impact Assessment
Malicious dependency code could execute with the same operating-system identity and privileges as the Agent. It could read or modify files accessible to that identity, including the Word document being processed, access available credentials or environment variables, initiate network connections, and execute additional local commands.
The Sk ...[truncated 221 chars]
- The Skill runs in an environment where the
- Remediation
View remediation
Remediation Suggestions
- Remove automatic package installation from the Skill's execution path.
- Declare dependencies in a reviewed lock file and pin
python-docxto an exact approved version. - Verify downloaded artifacts with cryptographic hashes, such as pip's
--require-hashesmode. - Use an explicitly configured trusted package repository rather than inheriting an arbitrary user or system pip configuration.
- Install dependencies in a dedicated virtual environment with minimal permissions.
- Require explicit user approval before any operation that needs network access or changes the Python environment.
- Correct the security documentation to disclose dependency-related network access when installation remains necessary.
