Skip to content

Commit 81dbe36

Browse files
committed
Python: Promote SQLAlchemy modeling
Due to the split between `src/` and `lib/`, I was not really able to do the next step without having moved the SQLAlchemy modeling over to be in `lib/` as well.
1 parent ba99e21 commit 81dbe36

File tree

11 files changed

+5
-2
lines changed

11 files changed

+5
-2
lines changed

docs/codeql/support/reusables/frameworks.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ Python built-in support
177177
psycopg2, Database
178178
sqlite3, Database
179179
peewee, Database ORM
180+
SQLAlchemy, Database ORM
180181
cryptography, Cryptography library
181182
pycryptodome, Cryptography library
182183
pycryptodomex, Cryptography library
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
lgtm,codescanning
2+
* Added modeling of SQL execution in the `SQLAlchemy` PyPI package, resulting in additional sinks for the SQL Injection query (`py/sql-injection`). This modeling was originally [submitted as a contribution by @mrthankyou](https://github.com/github/codeql/pull/5680).

python/ql/lib/semmle/python/Frameworks.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ private import semmle.python.frameworks.MarkupSafe
2020
private import semmle.python.frameworks.Multidict
2121
private import semmle.python.frameworks.Mysql
2222
private import semmle.python.frameworks.MySQLdb
23+
private import semmle.python.frameworks.Peewee
2324
private import semmle.python.frameworks.Psycopg2
2425
private import semmle.python.frameworks.PyMySQL
2526
private import semmle.python.frameworks.Rsa
2627
private import semmle.python.frameworks.Simplejson
28+
private import semmle.python.frameworks.SqlAlchemy
2729
private import semmle.python.frameworks.Stdlib
2830
private import semmle.python.frameworks.Tornado
29-
private import semmle.python.frameworks.Peewee
3031
private import semmle.python.frameworks.Twisted
3132
private import semmle.python.frameworks.Ujson
3233
private import semmle.python.frameworks.Yaml

python/ql/src/experimental/semmle/python/frameworks/SqlAlchemy.qll renamed to python/ql/lib/semmle/python/frameworks/SqlAlchemy.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ private import semmle.python.dataflow.new.DataFlow
1010
private import semmle.python.dataflow.new.TaintTracking
1111
private import semmle.python.ApiGraphs
1212
private import semmle.python.Concepts
13-
private import experimental.semmle.python.Concepts
1413
// This import is done like this to avoid importing the deprecated top-level things that
1514
// would pollute the namespace
1615
private import semmle.python.frameworks.PEP249::PEP249 as PEP249

0 commit comments

Comments
 (0)