T09 · Insecure Skill Coding Practices
- Location
SKILL.md:80- Finding
Persistent pip configuration disables normal TLS host verification
- Content
View full analysis
pip.conf << 'EOF' [global] index-url = https://mirrors.aliyun.com/pypi/simple/ trusted-host = mirrors.aliyun.com EOF ``` The troubleshooting guidance also recommends this behavior: ```text | SSL certificate error | Add a `trusted-host` configuration (already included in the commands above) | ``` ### Technical Analysis The `trusted-host` option instructs pip to trust the specified package host even when secure HTTPS authentication cannot be established normally. The configured mirror already supports HTTPS, so applying this exception persistently is unnecessary. Certificate failures can indicate interception, incorrect proxy configuration, an invalid certificate chain, DNS manipulation, or mirror impersonation. Suppressing these failures rather than correcting their cause weakens package-origin authentication and can conceal a man-in-the-middle condition. Because Python packages may execute build backends or installation logic, accepting a substituted package can lead to local code execution during dependency installation. ### Attack Path 1. The Agent writes the supplied pip configuration, including the persistent `trusted-host` exception. 2. An attacker gains a network interception position or manipulates DNS or proxy routing for the mirror hostname. 3. The attacker presents an endpoint whose TLS identity would otherwise fail normal validation. 4. A subsequent `pip install` retrieves a modified or substituted package from the attacker-controlled endpoint. 5. Package build or installation logic executes with the privileges of the user running p ...[truncated 551 chars]- Remediation
View remediation
