T08 · Insecure Dependencies
Error
- Location
- SKILL.md:15
- Finding
- Unpinned Third-Party CLI Installation Creates a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 15-19; dependency context at line 6 **Vulnerability Type**: Unpinned third-party dependency installation from a mutable package repository **Risk Level**: High ### Vulnerable Code ```markdown compatibility: Requires Python 3.10+ and pip. The CLI command is `posthog` (installed via `pip install phog-cli`). ``` ```bash pip install phog-cli ``` ### Technical Analysis The Skill instructs users or agents to install `phog-cli` from the default Python package index without specifying an audited version, verifying cryptographic hashes, or locking transitive dependencies. The package is community-maintained and is subsequently trusted to process PostHog API credentials and sensitive analytics data. Because the package reference is mutable, future invocations may install a different release from the one reviewed when this Skill was published. The repository URL in the metadata does not cause `pip` to verify that the downloaded package was built from that repository or from a particular source revision. This is a supply-chain weakness rather than evidence that the current package is malicious. Exploitation requires compromise of the package publisher, package-index distribution path, or one of the package's unresolved dependencies. ### Attack Path 1. An attacker compromises the package publisher account, package release process, or an unpinned transitive dependency. 2. The attacker publishes a malicious release that still resolves under the name `phog-cli`. 3. A user or agent follows the Skill and runs `pip install phog-cli`. 4. The package manager resolves and installs the attacker-controlled release. 5. Malicious installation or runtime code executes with the privileges of the account running `pip` or the CLI. 6. When the CLI is used, the malicious code may access `POSTHOG_API_KEY`, configuration files, analytics responses, and other data available to the process. ### Impact Assessment Suc ...[truncated 657 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin the package to a specifically reviewed version, for example: ```bash python -m pip install "phog-cli==<reviewed-version>" ``` - Publish a lock file or requirements file that pins all transitive dependencies. - Provide cryptographic hashes and require hash verification: ```bash python -m pip install --require-hashes -r requirements.txt ``` - Verify that the package artifact is produced from the stated source repository using signed tags, attestations, or trusted build provenance. - Re-audit the dependency whenever the pinned version changes. - Recommend installation into an isolated virtual environment rather than the system Python environment. - Avoid elevated installation privileges and grant the PostHog API key only the minimum permissions required for the intended operation. ]]>
