T08 · Insecure Dependencies
- Location
SKILL.md:39- Finding
Unpinned Third-Party Package Installation at Runtime
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 39-44
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable Code:
bash # Install if not already present pip install --user --break-system-packages mdpdf 2>/dev/null # Convert markdown → PDF ~/.local/bin/mdpdf -o /tmp/output.pdf /path/to/input.mdTechnical Analysis
The skill instructs the agent to install the
mdpdfpackage from a package index at runtime without specifying an exact version, cryptographic hash, lockfile, or verified source. Consequently, the package content retrieved during execution may differ from what was reviewed.Python package installation may execute attacker-controlled build or installation hooks. The package is then explicitly executed from
~/.local/bin/mdpdf, giving installed code access to the agent user's files and environment. The--break-system-packagesoption bypasses Python environment protections, and redirecting standard error to/dev/nullsuppresses diagnostics that could reveal installation failures, repository anomalies, or dependency conflicts.The declared
allowed-toolslist permitsBash(mdpdf *)but does not declarepip, creating a mismatch between the skill's stated capability boundary and its installation instructions.Attack Path
- An attacker compromises the upstream
mdpdfrelease, one of its transitive dependencies, or the package distribution channel. - A user requests delivery of a Markdown file, causing the agent to follow the documented conversion workflow.
- If
mdpdfis unavailable, the agent runs the unpinnedpip installcommand. - The package index returns the compromised or unexpectedly changed package version.
- Malicious code executes through package build or installation hooks, or when
~/.local/bin/mdpdfis subsequently invoked. - The malicious code runs with the privileges of the agent's operating-system account and c ...[truncated 559 chars]
- An attacker compromises the upstream
- Remediation
View remediation
Remediation Suggestions
- Preinstall and security-review
mdpdfin a controlled build environment instead of installing it during skill execution. - Pin an audited exact version and all transitive dependencies using a lockfile.
- Require cryptographic hashes, such as with
pip install --require-hashes, and use only an explicitly trusted package index. - Remove
--break-system-packages; install the dependency in an isolated virtual environment or immutable container. - Remove
2>/dev/nullso installation warnings and integrity failures remain visible and auditable. - Prohibit runtime package installation through the skill's capability policy. If installation is genuinely required, declare and narrowly constrain the package-management capability.
- Execute the converter in a sandbox with minimal filesystem access, no unnecessary credentials, and restricted network connectivity.
- Preinstall and security-review
