UNPKG

mcp-server-semgrep

Version:

MCP Server for Semgrep Integration - static code analysis with AI

22 lines (21 loc) 608 B
rules: - id: raise-not-base-exception message: In Python3, a runtime `TypeError` will be thrown if you attempt to raise an object or class which does not inherit from `BaseException` languages: [python] severity: ERROR pattern-either: - pattern: raise "..." - pattern: | $X: BaseException raise $X(...) - patterns: - pattern: raise $EXCEPTION - metavariable-regex: metavariable: $EXCEPTION regex: '[0-9]*\.?[0-9]+' metadata: category: correctness technology: - python