T08 · Insecure Dependencies
- Location
SKILL.md:397- Finding
Unpinned Third-Party Python Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 397-400
Vulnerability Type: Supply-chain risk from mutable, unverified dependencies
Risk Level: MediumVulnerable Code Snippet
markdown | ruff(可选) | Linter | 规范检查 | `pip install ruff` | | pytest(可选) | 测试框架 | 测试覆盖 | `pip install pytest` | | mypy(可选) | 类型检查 | 类型门禁 | `pip install mypy` | | bandit(可选) | 安全扫描 | 安全门禁 | `pip install bandit` |Technical Analysis
The Skill recommends installing four third-party Python packages without fixed versions, cryptographic hashes, a lockfile, or an explicitly approved package index. Consequently, the package content resolved by
pipmay differ from the content available when the Skill was audited.Although the listed package names are established projects and the dependencies are described as optional, installing mutable packages creates a supply-chain trust boundary. A compromised package release, compromised transitive dependency, malicious package-index configuration, or dependency substitution could introduce attacker-controlled code. Such code may execute during installation or when the quality-gate commands later invoke the installed tools.
Attack Path
- A user or Agent follows the dependency instructions in
SKILL.md. - The environment executes one or more unpinned
pip installcommands. pipresolves the latest available package versions and their transitive dependencies from the configured index.- An attacker compromises a package release, a transitive dependency, or the package source used by that environment.
- The malicious component is downloaded and installed without hash verification.
- Attacker-controlled code executes during installation or when the installed quality tools are subsequently invoked.
Impact Assessment
Successful exploitation could execute arbitrary code with the privileges of the user, CI runner, or AI Agent performing the installation. Depen ...[truncated 550 chars]
- A user or Agent follows the dependency instructions in
- Remediation
View remediation
Remediation Suggestions
- Pin every direct dependency to a reviewed, exact version rather than resolving the latest release.
- Pin transitive dependencies through a committed lockfile generated by a controlled process.
- Record and enforce cryptographic hashes, such as with pip's
--require-hashesoption. - Configure an approved package index or internal artifact mirror rather than relying on an unspecified environment-level index.
- Install dependencies in an isolated virtual environment or least-privileged CI container.
- Scan and periodically review pinned dependencies before deliberately updating them.
- Separate dependency installation from quality-gate execution and prevent unreviewed dependency updates in release jobs.
- Replace the current examples with hardened commands or direct users to a version-controlled, hash-verified requirements file.
