T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:52
- Finding
- Unpinned Dependency Installation Into the System Python Environment<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:52-74` **Vulnerability Type**: Unsafe and unpinned third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```bash PYTHON_CMD="" for cmd in python3 python python3.13 python3.12 python3.11 python3.10 python3.9 python3.8; do if command -v "$cmd" &>/dev/null && "$cmd" -c "import sys; exit(0 if sys.version_info >= (3,8) else 1)" 2>/dev/null; then PYTHON_CMD="$cmd" break fi done if [ -z "$PYTHON_CMD" ]; then echo "ERROR: Python 3.8+ not found." echo "Install on macOS: brew install python3 or visit https://www.python.org/downloads/" exit 1 fi echo "Found Python: $PYTHON_CMD ($($PYTHON_CMD --version))" $PYTHON_CMD -m pip install -q --break-system-packages python-pptx echo "Dependencies ready." ``` The same general installation pattern also appears in `workflow_local.md:10`: ```bash pip install python-pptx ``` ### Technical Analysis The Skill instructs the Agent to install `python-pptx` without an exact version or package hash. Resolution therefore depends on the package index and dependency graph available when the Skill executes. A future compromised release, malicious mirror, altered pip configuration, or compromised transitive dependency could introduce executable code that was not present during this audit. The `--break-system-packages` option bypasses Python distribution protections and allows pip to modify an externally managed interpreter. This unnecessarily expands the impact beyond an isolated Skill environment and can overwrite or conflict with packages used by other applications. Installation is described as an environment check that should always run, meaning dependency mutation may occur even when the selected operation does not require a new installation. ### Attack Path 1. A user activates the Skill. 2. The Agent follows the mandatory environment-check instructions. 3. Pip resolves the unpinned package and transitive dependencies using t ...[truncated 993 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Create a dedicated virtual environment for the Skill instead of modifying the system interpreter. 2. Remove `--break-system-packages`. 3. Pin `python-pptx` and all transitive dependencies to reviewed versions. 4. Use a lock file with cryptographic hashes, such as a hash-locked requirements file: ```bash python3 -m venv .venv .venv/bin/python -m pip install \ --require-hashes \ -r requirements.lock ``` 5. Use an organization-approved package index and enforce TLS certificate validation. 6. Check whether the required dependency is already available before attempting installation. 7. Avoid automatic package installation for workflows that do not require `python-pptx`, such as remote web search or remote generation. ]]>
