T08 · Insecure Dependencies
- Location
SKILL.md:14- Finding
Unscoped Local Python Package Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 14–19
Vulnerability Type: Insecure dependency installation from an unverified working directory
Risk Level: HighVulnerable Code Snippet:
markdown ## Requisitos - Python 3.9 o superior - Instalar dependencias del proyecto - Descargar GTFS local antes de consultas que usan datos estaticos ```bash pip install ".[all]" red-transporte gtfs updatetext ### Technical Analysis The command `pip install ".[all]"` installs the Python project found in the process's current working directory. The audited package contains no `pyproject.toml`, `setup.py`, lockfile, hash manifest, pinned package version, verified repository reference, or instruction requiring the Agent to enter a trusted source directory before running this command. Python package installation can invoke package build backends and installation hooks. Therefore, if an Agent follows this instruction while its working directory contains an attacker-controlled Python project, `pip` may evaluate or execute that project's build logic. The command also does not reliably identify or install the declared `red-transporte` dependency. ### Attack Path 1. An attacker places a malicious Python project, including malicious package build configuration or hooks, in a directory from which the Agent may invoke the Skill. 2. The Agent follows `SKILL.md` and executes `pip install ".[all]"` without first validating the current directory or package identity. 3. `pip` discovers the attacker-controlled local project and invokes its configured build backend or installation behavior. 4. The malicious build logic executes with the operating-system privileges of the Agent process. 5. The attacker can then perform any action permitted to that account, such as reading accessible files, modifying user-owned data, or initiating network connections. ### Impact Assessment Successful exploitation can resul ...[truncated 557 chars]- Remediation
View remediation
Remediation Suggestions
- Replace the relative installation command with the exact official package name and a reviewed, pinned version from an explicitly trusted package index.
- Use a lockfile and require artifact hashes, such as pip's
--require-hashes, to provide integrity and reproducibility. - If installation from source is necessary, provide the exact verified repository URL and commit identifier, validate the checkout, and explicitly change into that trusted checkout before installation.
- Never run
pip install .orpip install ".[all]"from an unspecified working directory. - Perform installation inside a dedicated virtual environment using a non-privileged account.
- Review package metadata and build-backend configuration before permitting installation, especially when the source directory may be writable by another party.
- Separate dependency installation from routine Skill invocation so transit queries do not repeatedly trigger package build or installation behavior.
