UNPKG

mcp-server-semgrep

Version:

MCP Server for Semgrep Integration - static code analysis with AI

21 lines (20 loc) 710 B
rules: - id: python.requests.best-practice.use-response-json-shortcut patterns: - pattern-inside: import json; ... - pattern-inside: import requests; ... - pattern-inside: $RESP = requests.$METHOD(...); ... - pattern: json.loads($RESP.text) fix: $RESP.json() message: >- The requests library has a convenient shortcut for reading JSON responses, which lets you stop worrying about deserializing the response yourself. severity: WARNING metadata: references: - https://requests.readthedocs.io/en/stable/user/quickstart/#json-response-content category: best-practice technology: - requests languages: - python