pythonsecurity-s2091-xpath-injection-mining
Read-only mining codemod for pythonsecurity:S2091: XPath expressions should not be vulnerable to injection attacks.
Emits python_security_finding metric rows with blocking severity. Source files are never modified.
Rule
- ID:
pythonsecurity:S2091 - Severity: blocking
- Remediation: Use parameterized XPath APIs instead of string concatenation
Usage
bashpnpm dlx codemod@latest workflow run -w codemods/python-security-mining/pythonsecurity-s2091-xpath-injection-mining/workflow.yaml --target /path/to/python/project
Development
bashpnpm --filter ./codemods/python-security-mining/pythonsecurity-s2091-xpath-injection-mining test