T09 · Insecure Skill Coding Practices
- Location
scripts/analyze.py:30- Finding
TLS Certificate and Hostname Verification Disabled
- Content
View full analysis
str: """Make GET request with timeout and SSL bypass. Returns response body.""" hdrs = {"User-Agent": "PaperImpactAnalyzer/1.0"} if headers: hdrs.update(headers) req = urllib.request.Request(url, headers=hdrs) resp = urllib.request.urlopen(req, timeout=timeout, context=SSL_CTX) return resp.read().decode("utf-8") ``` ### Technical Analysis The code explicitly disables both certificate-chain validation and hostname verification. Consequently, HTTPS connections to GitHub, OpenAlex, and Semantic Scholar do not authenticate the remote endpoint. An attacker capable of intercepting network traffic can present an arbitrary TLS certificate, impersonate the intended API, and return attacker-controlled JSON. The forged response can manipulate repository statistics, citation counts, author information, and URLs included in generated Markdown reports. This issue compromises transport authenticity and response integrity. It does not directly grant local code execution or filesystem access because retrieved data is parsed as XML or JSON rather than executed. ### Attack Path 1. A user invokes the analyzer with an arXiv identifier. 2. The analyzer initiates an HTTPS connection to GitHub, OpenAlex, or Semantic Scholar using the insecure SSL context. 3. An attacker controlling a network gateway, proxy, DNS path, or similar interception point redirects or intercepts the request. 4. The attacker presents an un ...[truncated 695 chars]- Remediation
View remediation
