T08 · Insecure Dependencies
- Location
SKILL.md:259- Finding
Unpinned Third-Party Package Installation at Runtime
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 259–261
Vulnerability Type: Unsafe runtime dependency installation
Risk Level: MediumVulnerable Code:
bash # Check whether zhdate is installed python -c "import zhdate" 2>/dev/null || pip install zhdateTechnical Analysis
The Skill instructs the Agent to install the latest available version of the third-party
zhdatepackage whenever the import check fails. The package version is not pinned, no cryptographic hash is verified, no lock file is used, and installation is not restricted to an isolated environment.Python package installation can execute package-controlled build or installation logic with the same privileges and filesystem access as the Agent. Because the package retrieved from the package index can change after this Skill has been reviewed, the effective code executed by the Skill is mutable and is not covered by the static audit.
This is a supply-chain weakness rather than evidence that the current
zhdatepackage is malicious.Attack Path
- A user requests a lunar-calendar or Daoist festival calculation.
- The Skill invokes the documented import check.
- If
zhdateis unavailable, the fallback executespip install zhdate. pipretrieves the current package and its dependency artifacts from the configured package index.- A compromised package release, package index, dependency, or build artifact executes installation-controlled code with the Agent's privileges.
- That code could access or modify resources available to the Agent before the requested calendar calculation continues.
Impact Assessment
Exploitation could result in arbitrary code execution under the operating-system identity running the Agent. The accessible scope could include the Agent's readable and writable files, its Python environment, network access, and any credentials exposed to that process.
The instruction does not re ...[truncated 301 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove automatic
pip installexecution from the runtime workflow. - Declare an exact, reviewed
zhdateversion in a dependency manifest and lock file. - Require cryptographic hash verification, such as:
bash pip install --require-hashes -r requirements.txt - Install dependencies during a trusted setup phase rather than in response to a user request.
- Use a dedicated virtual environment with minimal filesystem and network permissions.
- Review and pin transitive dependencies as well as the direct dependency.
- If the dependency is unavailable, fail safely and explain that calendar conversion is unavailable instead of modifying the environment automatically.
- Where practical, replace the dependency with a small, reviewed local helper or use a host-provided calendar API that does not permit package installation.
- Remove automatic
