pythonsecurity-s5131-reflected-xss-mining
Mine pythonsecurity:S5131: Endpoints should not be vulnerable to reflected cross-site scripting (XSS) attacks; read-only metrics with blocking severity
# pythonsecurity-s5131-reflected-xss-mining
Read-only mining codemod for **pythonsecurity:S5131**: Endpoints should not be vulnerable to reflected cross-site scripting (XSS) attacks.
Emits `python_security_finding` metric rows with **blocking** severity. Source files are never modified.
## Rule
- **ID**: `pythonsecurity:S5131`
- **Severity**: blocking
- **Remediation**: Escape or sanitize user input before including it in HTTP responses
## Usage
```bash
pnpm dlx codemod@latest workflow run -w codemods/python-security-mining/pythonsecurity-s5131-reflected-xss-mining/workflow.yaml --target /path/to/python/project
```
## Development
```bash
pnpm --filter ./codemods/python-security-mining/pythonsecurity-s5131-reflected-xss-mining test
```