T08 · Insecure Dependencies
- Location
SKILL.md:63- Finding
Unpinned Dependency Installed into the System Python Environment
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:63
Vulnerability Type: Insecure third-party dependency installation
Risk Level: MediumVulnerable Code
bash pip3 install rich --break-system-packages --quietTechnical Analysis
The installation command downloads
richwithout pinning an exact reviewed version or verifying an integrity hash. Consequently, the installed artifact can vary over time and depends on the configured package index and resolver state. If the package, one of its dependencies, or the configured index is compromised, malicious package code could execute during installation or when the scanner importsrich.The
--break-system-packagesoption bypasses Python's externally managed environment safeguard. This permits pip to alter the system-managed Python environment, increasing the potential for dependency conflicts and expanding the impact beyond an isolated Skill environment.No dependency confusion or package compromise is demonstrated in the audited artifact; the finding concerns the unsafe dependency acquisition and installation mechanism.
Attack Path
- An attacker compromises the configured pip index, the published
richdistribution, or a dependency selected by the resolver. - A user follows the Skill's installation instruction.
pip3retrieves an unpinned and unverified artifact from the configured index.- Installation-time package behavior may execute under the privileges of the user running pip.
- Because
--break-system-packagesis enabled, the package can modify the system Python environment rather than an isolated virtual environment. - The scanner later imports
rich, providing another opportunity for compromised dependency code to execute.
Impact Assessment
Successful exploitation could execute code with the privileges of the user running the installation or Skill. Within those privileges, malicious dependency code could access l ...[truncated 358 chars]
- An attacker compromises the configured pip index, the published
- Remediation
View remediation
Remediation Suggestions
- Create and use a dedicated virtual environment instead of modifying system Python.
- Remove
--break-system-packages. - Pin
richand any transitive dependencies to reviewed versions. - Use a lock file or requirements file containing cryptographic hashes, and install with
pip install --require-hashes. - Configure an explicitly trusted package index and prevent fallback to uncontrolled indexes.
- Run installation and scanning as an unprivileged user.
- Avoid
--quietin security-sensitive installation instructions so package source, resolver, and integrity errors remain visible.
Example hardened workflow:
bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txtThe corresponding
requirements.txtshould contain an exact reviewed version and hashes for every resolved package.
