T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:1002
- Finding
- Automatic Installation of Unpinned Third-Party Dependencies<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:1002-1080` and `SKILL.md:1602-1611` **Vulnerability Type**: Automatic dependency installation without consent, version pinning, or integrity verification **Risk Level**: Medium ### Vulnerable Code ```python import subprocess import sys def ensure_qrencode(): """Ensure qrencode is installed, auto-install if not""" result = subprocess.run(['which', 'qrencode'], capture_output=True) if result.returncode == 0: return True print("📦 qrencode not found. Installing...") subprocess.run(['brew', 'install', 'qrencode']) # Verify installation result = subprocess.run(['which', 'qrencode'], capture_output=True) return result.returncode == 0 ``` ```python import subprocess def ensure_zbar(): """Ensure zbar is installed""" result = subprocess.run(['which', 'zbarimg'], capture_output=True) if result.returncode == 0: return True print("📦 zbar not found. Installing...") subprocess.run(['brew', 'install', 'zbar']) return True ``` ```python import subprocess def ensure_figlet(): """Ensure figlet is installed, auto-install if not""" result = subprocess.run(['which', 'figlet'], capture_output=True) if result.returncode == 0: return True print("📦 figlet not found. Installing...") subprocess.run(['brew', 'install', 'figlet']) return True ``` ### Technical Analysis The QR code, QR reader, and ASCII-art examples automatically invoke Homebrew when their expected executables are missing. These operations modify the host environment without first obtaining explicit user consent. The formulas are referenced only by package name. The Skill does not pin versions, verify expected hashes or signatures, validate the selected Homebrew repository, or reliably check whether installation completed successfully. Although Homebrew provides its own supply-chain controls, silently initiating installation unnecessarily increa ...[truncated 1283 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove all automatic `brew install` calls from utility execution paths. 2. Detect missing dependencies and return a clear error containing an optional installation command. 3. Require explicit user confirmation before initiating any package-manager operation. 4. Where practical, document tested or pinned dependency versions. 5. Use trusted repositories and preserve package-manager signature and integrity checks. 6. Check and handle the installation command's return code rather than assuming success. 7. Prefer built-in implementations when available, such as the included ASCII-art fallback. 8. Run third-party utilities with only the filesystem and network access required for the requested task. ]]>
