Highlights
Code Injection: 2 prior fixes. Scrutinize any change in this area.
haystack/backends/elasticsearch_backend.py: most-fixed (2 issues). Treat as high-risk during review.
2 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns
The bug types that recur here, drawn from past fixes, not open vulnerabilities.
Code Injection: Direct eval() on untrusted search input enables arbitrary code execution; the fix replacing it with ast.literal_eval() is the only secure pattern.
Code Injection: A later refactor reintroduced eval() via _to_python, showing that the vulnerable pattern can silently return; this fix is incomplete and must be hardened.