T08 · Insecure Dependencies
- Location
SKILL.md:203- Finding
Unvalidated system-level dependency installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 203-209
Vulnerability Type: Untrusted package installation and software supply-chain exposure
Risk Level: HighVulnerable Code:
python def _install_dependency(self, details): # Install dependency pkg = details.get('package') if pkg: subprocess.run(['pip3', 'install', '--break-system-packages', pkg]) return {'success': True, 'message': f'Installed {pkg}'} return {'success': False}Technical Analysis
The package identifier is obtained from the
detailsobject supplied to the automatic repair executor and passed directly topip3 install. Although the list-based subprocess invocation prevents shell metacharacter injection, it does not make the requested package trustworthy.There is no package allowlist, version pinning, hash verification, trusted-index enforcement, isolated virtual environment, or human approval. The
--break-system-packagesoption also bypasses Python's externally managed environment protection and permits modification of the system Python installation.Python package installation can execute package-controlled build hooks or other installation logic. Consequently, an attacker who can influence a repair instruction could select a malicious, dependency-confusion, or typosquatted package and obtain code execution under the account running the repair framework. The code also fails to set
check=Trueor inspect the return code, so it reports success even if installation fails.Attack Path
- An attacker influences an error diagnosis, generated repair plan, or JSON repair instruction.
- The attacker selects the
install_dependencyrepair type and supplies a malicious or attacker-controlled package name indetails.package. apply_fixdispatches the request to_install_dependency.- The executor invokes
pip3 install --break-system-packagesfor the untrusted package.
...[truncated 725 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove unrestricted automatic package installation from the repair workflow.
- Require explicit operator approval before installing or changing dependencies.
- Maintain an allowlist of reviewed package names, exact versions, and permitted repair scenarios.
- Install dependencies in a dedicated virtual environment rather than using
--break-system-packages. - Pin every permitted dependency and validate package hashes with a locked requirements file.
- Restrict installation to an explicitly configured and trusted package index.
- Reject package names containing direct URLs, local paths, VCS references, extras, or unapproved version specifiers.
- Run the installer under a sandboxed, least-privileged account with restricted network and filesystem access.
- Use
subprocess.run(..., check=True)and report success only after verifying the installed package and version. - Record the approved request, package source, resolved version, integrity hash, output, and result in an audit log.
