Commit 11ac699
jtabsbm
Add SQL injection models for the duckdb Python package
duckdb (~10M downloads/month) implements PEP 249 but had no CodeQL models,
so string-built SQL passed to duckdb.execute()/sql()/executemany() was not
flagged by the SqlInjection query suite. This adds:
- DuckdbPEP249: models duckdb as a PEP 249 module (connect/cursor/
execute/executemany sinks via the existing PEP249 machinery)
- ModuleLevelExecuteCall: models the module-level duckdb.sql(),
duckdb.execute() and duckdb.executemany() convenience wrappers as
SqlExecution calls (getSql from arg 0 or the 'query' keyword)
- Frameworks.qll registration and supported-frameworks docs entry
Pattern follows the merged hdbcli models (PR #19444).
Signed-off-by: jtabsbm <317336566@users.noreply.github.com>1 parent 3aecce9 commit 11ac699
4 files changed
Lines changed: 54 additions & 0 deletions
File tree
- docs/codeql/reusables
- python/ql
- lib/semmle/python
- frameworks
- src/change-notes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
259 | 260 | | |
260 | 261 | | |
261 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments