UNPKG

mcp-server-semgrep

Version:

MCP Server for Semgrep Integration - static code analysis with AI

37 lines (36 loc) 1.01 kB
rules: - id: insecure-urlopen message: >- Detected 'urllib.urlopen()' using 'http://'. This request will not be encrypted. Use 'https://' instead. metadata: owasp: - A03:2017 - Sensitive Data Exposure - A02:2021 - Cryptographic Failures cwe: - 'CWE-319: Cleartext Transmission of Sensitive Information' references: - https://docs.python.org/3/library/urllib.request.html#urllib.request.urlopen category: security technology: - urllib subcategory: - audit likelihood: LOW impact: LOW confidence: LOW severity: WARNING languages: [python] fix-regex: regex: '[Hh][Tt][Tt][Pp]://' replacement: https:// pattern-either: - pattern: urllib.request.urlopen("=~/[Hh][Tt][Tt][Pp]://.*/", ...) - pattern: | $URL = "=~/[Hh][Tt][Tt][Pp]://.*/" ... urllib.request.urlopen($URL, ...) - pattern: | def $FUNC(..., $URL = "=~/[Hh][Tt][Tt][Pp]://.*/", ...): ... urllib.request.urlopen($URL, ...)