T08 · Insecure Dependencies
Warning
- Location
SKILL.md:20- Finding
Mutable Git Dependency Can Execute Unreviewed Remote Code During Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 20-24
Vulnerability Type: Supply-chain exposure through direct installation from a remote Git repository
Risk Level: MediumCode Snippet:
markdown ## Install ```bash python3 -m pip install "git+https://github.com/somo-ui/cognitive-gate.git@v0.1.6"text ### Technical Analysis The documented installation command instructs `pip` to retrieve and install code directly from an external Git repository. Although the dependency references the `v0.1.6` tag, a Git tag is not necessarily immutable and can be deleted or moved by a repository administrator or an attacker who compromises the upstream repository. Python package installation may execute upstream-controlled build backend code or legacy installation hooks. Because the dependency's source is not included in this project, its behavior and integrity cannot be verified from the audited artifact. No evidence establishes that the current upstream package is malicious; the vulnerability is the unsafe, mutable trust relationship created by the installation method. ### Attack Path 1. An attacker compromises the upstream repository, a maintainer account, or another credential capable of modifying tags. 2. The attacker moves or recreates the `v0.1.6` tag so that it references a malicious commit. 3. The attacker places malicious behavior in package build configuration, installation hooks, or imported runtime code. 4. A user follows the installation command in `SKILL.md`. 5. `pip` downloads the attacker-controlled revision and may execute its build or installation logic. 6. The payload runs with the permissions of the account invoking `pip`. ### Impact Assessment Successful exploitation could provide arbitrary code execution under the installing user's account. This may permit access to that user's files, environment variables, credentials, network resources, and any other resources available to ...[truncated 318 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to a reviewed, immutable Git commit SHA rather than a mutable tag.
- Prefer a vetted package distributed through a trusted registry with provenance attestations and reproducible release procedures.
- Where archive or wheel installation is used, require cryptographic hashes and enforce them with
pip --require-hashes. - Verify release signatures or repository provenance before installation.
- Review and lock all transitive dependencies rather than relying only on the top-level version.
- Build and install dependencies in an isolated, least-privileged environment without access to production credentials or sensitive host resources.
- Vendor the reviewed source into the project when practical so that the effective installed code is included in future audits.
- Document the exact reviewed commit and establish an update process requiring security review before changing it.
