T08 · Insecure Dependencies
- Location
SKILL.md:24- Finding
Unpinned Installation from a Mutable Git Repository
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 24
Vulnerability Type: Unpinned VCS dependency installation
Risk Level: MediumVulnerable Code
bash pip install git+https://github.com/minirr890112-byte/code-inspector.gitTechnical Analysis
The installation command retrieves the package from the repository's current default branch without pinning an immutable commit or verifying an artifact hash. Consequently, the code installed by a user may differ from the version covered by this audit.
Python package installation can execute build-backend logic and install executable package code. If the upstream repository, maintainer account, or default branch is compromised, an attacker could introduce malicious build or runtime code that is retrieved when a user follows these instructions.
The audited project currently declares ordinary dependencies (
clickandrich) and contains no confirmed malicious implementation. The risk arises from the mutable installation source rather than from a malicious payload observed in the reviewed files.Attack Path
- An attacker compromises the upstream repository, its maintainer credentials, or a workflow able to modify the default branch.
- The attacker adds malicious package code or build-time behavior.
- A user follows the documented unpinned
pip install git+https://...command. pipretrieves the attacker-controlled default-branch revision.- Malicious build or package code executes during installation or when the installed CLI is invoked.
Impact Assessment
Successful exploitation could execute arbitrary code with the privileges of the user running
pipor invoking the installed package. This may permit access to that user's files, environment variables, credentials, network access, and other resources available to the process. It does not inherently grant elevated operating-system privileges unless installation is performed by a privileged account.The network-li ...[truncated 348 chars]
- Remediation
View remediation
Remediation Suggestions
- Publish reviewed releases through a trusted package registry and require an exact version.
- Use lock files and hash verification where supported, for example
pip install --require-hashes -r requirements.txt. - If installation directly from Git is necessary, pin the dependency to a reviewed full commit SHA:
bash pip install "code-inspector @ git+https://github.com/minirr890112-byte/code-inspector.git@<full-reviewed-commit-sha>"- Protect upstream releases and repository changes with multi-factor authentication, branch protection, mandatory review, and signed tags or commits.
- Build and publish reproducible artifacts through a protected release workflow, and verify their provenance before installation.
- Avoid running package installation as
rootor another privileged account; use an isolated virtual environment with only the permissions required by the scanner.
