mcp-server-semgrep
Version:
MCP Server for Semgrep Integration - static code analysis with AI
20 lines (19 loc) • 583 B
YAML
rules:
- id: use-sys-exit
languages:
- python
message:
Detected use of `exit`.
Use `sys.exit` over the python shell `exit` built-in. `exit` is a helper for the interactive shell and may not
be available on all Python implementations.
patterns:
- pattern: exit($X)
- pattern-not: sys.exit($X)
severity: WARNING
fix: sys.exit($X)
metadata:
category: correctness
technology:
- python
references:
- https://stackoverflow.com/questions/6501121/difference-between-exit-and-sys-exit-in-python