T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:4
- Finding
- Unpinned Third-Party Dependencies Enable Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:4` **Vulnerability Type**: Unpinned package installation from an external package registry **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: {"clawdbot":{"emoji":"🏠","requires":{"bins":["miiocli"]},"install":[{"id":"pipx-miio","kind":"exec","command":"pipx install python-miio && /Users/$(whoami)/.local/pipx/venvs/python-miio/bin/python -m pip install 'click<8.1.0'","label":"Install python-miio via pipx (with click fix)"}]}} ``` ### Technical Analysis The installation command retrieves `python-miio` and its transitive dependencies from the configured Python package registry without pinning an exact version, validating cryptographic hashes, or using a reviewed lockfile. It then modifies the installed environment with the broad constraint `click<8.1.0`. Because dependency resolution is mutable, the code installed during one review may differ from the code installed later. Python packages and their build systems may execute code during installation. Consequently, compromise of the package, one of its transitive dependencies, the package registry, or the local registry configuration could result in arbitrary code execution. The path `/Users/$(whoami)/...` is also platform-specific and relies on shell expansion, but no attacker-controlled value is shown entering that expression in the audited artifact. ### Attack Path 1. An attacker compromises a resolved package release, a transitive dependency, the configured registry, or the dependency distribution channel. 2. The user installs the Skill and its installation command invokes `pipx` and `pip`. 3. The package manager resolves the mutable, unpinned dependency versions. 4. Malicious package installation or build logic executes with the privileges of the user performing the installation. 5. The malicious dependency can access data and resources available to that user and alter the created Python environment. This path is conditional on a ...[truncated 586 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `python-miio`, `click`, and all transitive dependencies to reviewed, exact versions. 2. Use a lockfile or requirements file containing cryptographic hashes, and enforce hash verification during installation. 3. Install only from an explicitly configured and trusted package index. 4. Review dependency source code and release provenance before updating pinned versions. 5. Replace the post-install dependency mutation with a reproducible, tested dependency specification. 6. Avoid hard-coded, user-specific interpreter paths; use the environment created by `pipx` through supported commands. 7. Run installation with ordinary user privileges in an isolated environment and never require administrator access unless strictly necessary. ]]>
