T09 · Insecure Skill Coding Practices
- Location
scripts/fxbaogao_client.py:242- Finding
Optional TLS Certificate Verification Bypass
- Content
View full analysis
ssl.SSLContext: if SSL_NO_VERIFY: return ssl._create_unverified_context() if certifi is not None: return ssl.create_default_context(cafile=certifi.where()) return ssl.create_default_context() ``` The insecure mode is recommended as a certificate-error workaround in `SKILL.md:86`: ```markdown - 如果运行时出现本机 Python 证书链错误,可提示用户临时加上 `FXBAOGAO_SSL_NO_VERIFY=1` 重试,但不要默认关闭 SSL 校验 ``` ### Technical Analysis When `FXBAOGAO_SSL_NO_VERIFY` is set to a recognized true value, `_build_ssl_context()` returns `ssl._create_unverified_context()`. This disables both certificate-chain validation and hostname verification for requests made through the shared client. The affected requests include report-search API calls to the configured API endpoint and report-detail requests to the configured detail endpoint. Although verification remains enabled by default, the Skill explicitly documents disabling it as a troubleshooting procedure. A user encountering a local certificate-chain error may therefore enable this mode and continue using it beyond the immediate test. Without certificate validation, HTTPS still encrypts traffic but no longer authenticates the remote server. An attacker capable of intercepting or redirecting network traffic can present an arbitrary certificate and impersonate the report service. ### Attack Path 1. The user encounters a Python certificate-chain error when ...[truncated 1414 chars]- Remediation
View remediation
