T08 · Insecure Dependencies
- Location
SKILL.md:401- Finding
Unpinned Third-Party Python Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 401
Vulnerability Type: Unpinned third-party dependency
Risk Level: MediumVulnerable Code Snippet
markdown | PyYAML | Python library | Optional | `pip install pyyaml` (required for configuration-file functionality) |The original documentation describes PyYAML as optional and directs users to install it with the equivalent command
pip install pyyaml, without specifying a version or integrity hash.Technical Analysis
The installation instruction resolves the latest package version available from the configured Python package index at execution time. It does not constrain installation to a reviewed version and does not verify package artifacts against trusted hashes.
Python package installation may execute package-controlled build or installation logic. Consequently, the effective code installed by this instruction can change after the Skill has been reviewed. Exploitation would require compromise of the legitimate package, the configured package repository, the dependency resolution path, or another relevant supply-chain component. The audit found no evidence that the currently named PyYAML package or version is malicious.
Attack Path
- An attacker compromises a relevant package publication or dependency-distribution channel.
- A malicious or compromised release becomes the version selected by the unpinned command.
- A user or AI agent follows the documented setup instructions and runs
pip install pyyaml. - The package installer downloads and processes the attacker-controlled artifact.
- Malicious installation logic or imported package code executes with the privileges of the account running the installation.
Impact Assessment
Successful exploitation could execute arbitrary code with the privileges of the user or agent environment performing the installation. Depending on that environment's permissions, the attacker could access project files, alter lo ...[truncated 317 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin PyYAML to a reviewed, explicitly approved version rather than resolving the latest available release.
- Store dependencies in a lock file or requirements file and require cryptographic hashes, for example:
text PyYAML==<reviewed-version> --hash=sha256:<verified-artifact-hash>- Install with hash enforcement:
bash python3 -m pip install --require-hashes -r requirements.txt- Obtain the expected hash from a trusted release artifact and review dependency updates before changing the pinned version.
- Use an isolated virtual environment with minimal filesystem and network privileges.
- Prefer binary wheels from trusted indexes where appropriate, disable unnecessary build isolation or source builds according to organizational policy, and configure an approved internal package mirror for controlled environments.
- Add automated dependency vulnerability and integrity checks to the release process.
