ruff/crates
Matt Oberle fc628de667
Implement bandit's 'hardcoded-sql-expressions' S608 (#2698)
This is an attempt to implement `bandit` rule `B608` (renamed here `S608`).
- https://bandit.readthedocs.io/en/latest/plugins/b608_hardcoded_sql_expressions.html

The rule inspects strings constructed via `+`, `%`, `.format`, and `f""`.

- `+` and `%` via `BinOp`
- `.format` via `Call`
- `f""` via `JoinedString`

Any SQL-ish strings that use Python string formatting are flagged.

The expressions and targeted expression types for the rule come from here:
- 7104b336d3/bandit/plugins/injection_sql.py

> Related Issue: https://github.com/charliermarsh/ruff/issues/1646
2023-02-09 19:28:17 -05:00
..
flake8_to_ruff Bump version to 0.0.244 2023-02-08 17:28:59 -05:00
ruff Implement bandit's 'hardcoded-sql-expressions' S608 (#2698) 2023-02-09 19:28:17 -05:00
ruff_cli Hide rule configuration settings on CLI (#2687) 2023-02-09 11:13:04 -05:00
ruff_dev Upgrade RustPython to pull in newline-handling optimizations (#2688) 2023-02-09 11:12:43 -05:00
ruff_macros Add documentation for mccabe, isort, and flake8-annotations (#2691) 2023-02-09 11:56:18 -05:00
ruff_python Bump version to 0.0.244 2023-02-08 17:28:59 -05:00