Rasmus Lerchedahl Petersen
0f2f68bcbb
Python: rename file
2021-10-28 19:14:02 +02:00
Rasmus Wriedt Larsen
a33a8fd518
Python: Support flask.blueprints.Blueprint
...
Thanks to @haby0 who originally proposed this as part of
https://github.com/github/codeql/pull/6977
2021-10-28 14:02:03 +02:00
Rasmus Wriedt Larsen
8c3349f40f
Python: Properly model flask.send_from_directory
...
To not include `filename` as path-injection sink.
2021-10-28 13:41:39 +02:00
Rasmus Wriedt Larsen
436152a46d
Python: Refactor flask file sending tests
2021-10-28 12:37:07 +02:00
Rasmus Wriedt Larsen
6d09334cba
Merge pull request #6330 from porcupineyhairs/pyPathTraversal
...
Python : Add Flask sinks for path injection query
2021-10-28 11:39:40 +02:00
Rasmus Wriedt Larsen
3fa66519f5
Merge branch 'main' into fastapi
2021-10-28 11:37:40 +02:00
Rasmus Wriedt Larsen
358663ffbb
Python: Fix tests
2021-10-28 11:14:41 +02:00
yoff
9478faf040
Merge pull request #6967 from RasmusWL/ruamel.yaml
...
Python: Model `ruamel.yaml` PyPI package
2021-10-28 10:19:08 +02:00
Porcuiney Hairs
4fd3f212f8
Python : Add Flask sinks for path injection query
2021-10-28 02:12:11 +05:30
Rasmus Lerchedahl Petersen
06586a13a3
Python: merge tests files
2021-10-27 11:55:04 +02:00
Rasmus Wriedt Larsen
cd6d73d553
Python: Handle kwarg in PyYAML
...
Really surprised that we didn't already :|
2021-10-26 17:48:10 +02:00
Rasmus Wriedt Larsen
6c0083e584
Python: Add PoC for PyYAML code execution
2021-10-26 17:48:10 +02:00
Rasmus Wriedt Larsen
1ce09afa08
Python: Add modeling of ruamel.yaml PyPI package
2021-10-26 17:48:10 +02:00
Rasmus Wriedt Larsen
29e3abc977
Python: FastAPI: Add HTTP header taint example
2021-10-26 15:34:16 +02:00
Erik Krogh Kristensen
a3c55c2aec
use set literal instead of big disjunction of literals
2021-10-26 12:55:25 +02:00
Rasmus Wriedt Larsen
7619d0fc33
Python: FastAPI: Model WebSocket usage
2021-10-25 15:23:33 +02:00
Rasmus Wriedt Larsen
b69977b37a
Python: FastAPI: Ignore scheme as tainted
...
reasoning highlighted in the comment
2021-10-25 15:23:33 +02:00
Rasmus Wriedt Larsen
bd8eec8475
Python: FastAPI: Add websocket test
2021-10-25 15:23:33 +02:00
Rasmus Wriedt Larsen
7e7a6464ec
Python: FastAPI: Model extra-taint for pydantic models
...
It feels a bit strange to add it to `frameworks.rst` since we only
support a little bit of it, but if I don't do it now, we will most
likely forget to do it later on (since it has already been added to
`frameworks.qll`).
2021-10-25 15:22:50 +02:00
Rasmus Lerchedahl Petersen
5a02b3880e
Python: use SqlConstruction in SqlAlchemy and
...
`SqlInjection`
2021-10-25 13:30:14 +02:00
Rasmus Lerchedahl Petersen
e5b68d68cb
Python: Use SqlConstruction in Asyncpg.qll
2021-10-25 13:15:09 +02:00
Rasmus Wriedt Larsen
f5464b79e4
Merge branch 'main' into fastapi
2021-10-25 09:49:42 +02:00
Mathias Vorreiter Pedersen
47a85bbb1d
Merge pull request #6869 from MathiasVP/fix-prefix/suffix-equality
...
Java/JS/Python: Replace '.prefix'/'.suffix' with '.matches'
2021-10-14 13:47:03 +01:00
CodeQL CI
2b0415e238
Merge pull request #6741 from yoff/python/model-os-path-file-accesses
...
Approved by RasmusWL
2021-10-13 11:11:41 -07:00
Mathias Vorreiter Pedersen
a80860cdc6
Python: Replace '.prefix'/'.suffix' with '.matches'.
2021-10-13 13:23:12 +01:00
Rasmus Wriedt Larsen
5e6f042f6e
Python: Model pickle.Unpickler
2021-10-08 11:55:54 +02:00
Rasmus Wriedt Larsen
75b06d8a25
Python: Model dill.load
2021-10-08 11:55:54 +02:00
Rasmus Wriedt Larsen
4820be3b10
Python: Model keyword arguments to dill.loads
2021-10-08 11:55:54 +02:00
Rasmus Wriedt Larsen
f9333fc551
Python: Expand dill tests
2021-10-08 11:55:54 +02:00
Rasmus Wriedt Larsen
42980a1ab4
Python: Model shelve.open
2021-10-08 11:55:54 +02:00
Rasmus Wriedt Larsen
a81d359669
Python: Model marshal.load
2021-10-07 21:27:51 +02:00
Rasmus Wriedt Larsen
1b61296ea5
Python: Model pickle.load
2021-10-07 21:25:48 +02:00
Rasmus Wriedt Larsen
27c368a444
Python: Model keyword arguments to pickle.loads
2021-10-07 21:24:12 +02:00
Rasmus Wriedt Larsen
3592b09d56
Python: Expand stdlib decoding tests
...
The part about claiming there is decoding of the input to `shelve.open`
is sort of an odd one, since it's not the filename, but the contents of
the file that is decoded.
However, trying to only handle this problem through path injection is
not enough -- if a user is able to upload and access files through
`shelve.open` in a path injection safe manner, that still leads to code
execution.
So right now the best way we have of modeling this is to treat the
filename argument as being deserialized...
2021-10-07 21:11:51 +02:00
Rasmus Wriedt Larsen
2d5c6e2723
Python: FastAPI: Add taint test
2021-09-30 19:14:15 +02:00
Rasmus Wriedt Larsen
c839f35485
Python: FastAPI: Proper modeling of implicit returns
2021-09-30 19:14:15 +02:00
Rasmus Wriedt Larsen
50147708bf
Python: FastAPI: Model response classes
...
Figuring out how to do the `media_type` tracking was quite difficult.
2021-09-30 19:14:15 +02:00
Rasmus Wriedt Larsen
eef946a0c8
Python: FastAPI: Add test for custom response annotation
...
It really is rather contrived, but it also _does_ work.
2021-09-30 19:14:15 +02:00
Rasmus Wriedt Larsen
c9895b54fe
Python: FastAPI: Add tests for direct response construction
2021-09-30 19:14:14 +02:00
Rasmus Wriedt Larsen
c50c805f5f
Python: FastAPI: Model Cookie Writes
2021-09-30 19:14:14 +02:00
Rasmus Wriedt Larsen
d34c5fd72f
Python: FastAPI: Add tests with response parameter
2021-09-30 19:14:14 +02:00
Rasmus Wriedt Larsen
285de2b4c8
Python: FastAPI: Add support for APIRouter
2021-09-30 19:14:14 +02:00
Rasmus Wriedt Larsen
b1f8b5352b
Python: FastAPI: Add support for api_route
...
Note that `route` did not actually work (that also comes from the
underlying web framework library Starlette)
2021-09-30 19:14:14 +02:00
Rasmus Wriedt Larsen
3661ff3bd8
Python: Add basic FastAPI support
2021-09-30 19:14:14 +02:00
Rasmus Lerchedahl Petersen
cc1c32cf0e
Python: model file accesses
2021-09-29 16:53:25 +02:00
Rasmus Lerchedahl Petersen
3c1206f873
Python: Model more awaiting construcs
...
in API graphs.
Some unsatisfactory lack of understanding here.
2021-09-27 16:41:01 +02:00
Rasmus Lerchedahl Petersen
f6311bf051
Python: model other awaiting constructs
2021-09-27 14:32:55 +02:00
Rasmus Lerchedahl Petersen
15b07bfcc0
Python: Model sql executions
2021-09-27 14:15:58 +02:00
Rasmus Wriedt Larsen
ded3088529
Python/JS: Recognize SHA-3 hash functions
...
Official names are SHA3-224, SHA3-256, SHA3-384, SHA3-512 as per
https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf
2021-09-27 12:08:40 +02:00
Rasmus Lerchedahl Petersen
520a2da8ab
Python: Add tests for asyncpg
2021-09-24 14:41:50 +02:00