T08 · Insecure Dependencies
Error
- Location
- SKILL.md:22
- Finding
- Unverified Third-Party Repository Installation and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:22-29` **Vulnerability Type**: Unverified external dependencies and executable code **Risk Level**: High ### Vulnerable Code ```markdown ## Installation Prerequisites This Skill guides users to install and run a third-party repository from GitHub. **Supply-chain risk**: clone + pip install executes external code, which may present a risk if the repository is compromised. Before installation: (1) inspect the repository and requirements.txt dependencies; (2) **pin a release tag** (for example, `git clone --branch v0.1.0`); (3) run it in an isolated environment or container without root privileges; (4) store credentials only in .env and do not commit them to version control. ## Install fastfish-format 1. Clone the repository: `git clone --branch <release-tag> https://github.com/superxs777/fastfish-format.git` 2. Enter the directory: `cd fastfish-format` 3. Install dependencies: `pip install -r requirements.txt` or `pip install -e .` 4. Optional: `pip install fastfish-format[api]` to start the HTTP API service on port 8900 ``` ### Technical Analysis The Skill depends entirely on code obtained from an external GitHub repository, but the installation procedure does not enforce an immutable commit hash, dependency hashes, a lockfile, a verified signature, or a trusted artifact checksum. Pinning a release tag is recommended, but tags are mutable references and therefore do not provide the same integrity guarantee as a verified commit digest. Both `pip install -r requirements.txt` and `pip install -e .` may download transitive dependencies and execute Python package build hooks or installation logic. After installation, the Skill instructs the Agent to repeatedly execute `ffformat_cli.py` through `system.run`. Consequently, the effective executable payload is outside the audited artifact and can differ from what was reviewed. The document explicitly acknowledges the supply-chain risk and recommends ...[truncated 1793 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the external repository to a reviewed, immutable Git commit SHA rather than a mutable branch or release tag. 2. Publish and verify a cryptographic checksum or signed release artifact before installation. 3. Use a fully resolved dependency lockfile with hashes and install dependencies using hash enforcement, such as `pip install --require-hashes`. 4. Review and restrict all direct and transitive dependencies before approving a release. 5. Vendor the audited CLI and required dependencies into the Skill package when licensing and maintenance requirements permit it. 6. Perform installation and execution inside an isolated, unprivileged container or virtual environment with: - No root privileges. - Read-only access to unrelated workspace files. - Restricted outbound network access. - No inherited API keys or unrelated environment variables. 7. Separate installation from runtime credential use so package installation hooks cannot access secrets. 8. Require explicit user confirmation of the exact version and verified commit before cloning or installing. 9. Re-audit the referenced `ffformat_cli.py`, package configuration, and dependency manifests because they are not included in the supplied project artifact. ]]>
