Files
payment-api/.semgrep-gate.yml
demo f893b5e196 Initial commit: payment API with vulnerable legacy billing module
Python/Flask, intentionally outdated dependencies (flask 2.0.1, requests 2.25.1,
urllib3 1.26.4) for SCA demo. CWE-89, CWE-327, CWE-798, CWE-22 in legacy_billing.py.
2026-09-02 11:33:14 +00:00

20 lines
597 B
YAML

rules:
- id: no-eval
patterns:
- pattern: eval(...)
message: "eval() is banned — code injection risk (CWE-95)"
severity: ERROR
languages: [python, javascript]
- id: no-os-system
patterns:
- pattern: os.system(...)
message: "os.system() is banned — command injection risk (CWE-78)"
severity: ERROR
languages: [python]
- id: no-subprocess-shell
patterns:
- pattern: subprocess.run(..., shell=True, ...)
message: "subprocess with shell=True is banned — command injection risk (CWE-78)"
severity: ERROR
languages: [python]