Rasmus Wriedt Larsen
26319bfc04
Python: Fix Flask jsonify XSS regression
...
The reason the result was found before, is that `jsonify(data)` was
modeled as TWO separate subclasses of `Http::Server::HttpResponse`, one
because of the implicit construction in return
(FlaskRouteHandlerReturn), and one from the `jsonify` call
(FlaskJsonifyCall). Due to the QL evaluation, we got a combination from
the two, meaning mime-type from FlaskRouteHandlerReturn and body from
FlaskJsonifyCall...
2023-08-29 11:11:32 +02:00
Rasmus Wriedt Larsen
b36fd9fdab
Python: Add jsonify XSS regression example
2023-08-29 10:38:49 +02:00
Rasmus Wriedt Larsen
ce6335866b
Python: Move ModificationOfParameterWithDefault to new dataflow API
2023-08-28 16:19:47 +02:00
Rasmus Wriedt Larsen
c665c21d83
Python: More style-guide renaming
...
Split it into multiple commits to make it easier to review.
2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
5ba8e102eb
Python: Adopt tests to new DataflowQueryTest
...
Since we want to know the _sinks_ and not just the flow, we need to
expose the config as well :|
2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
6961ca5234
Python: Rename to EmailXss
2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
ed0e441567
Python: Accept missing DataflowQueryTest implementation for now
2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
bfcc194b85
Python: Move experimental paramiko to new dataflow API
2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
1a4e8d9464
Python: Move experimental PossibleTimingAttackAgainstSensitiveInfo to new dataflow API
2023-08-28 15:31:07 +02:00
Rasmus Wriedt Larsen
67cc3a3935
Python: Move experimental ReflectedXSS to new dataflow API
2023-08-28 15:31:07 +02:00
Rasmus Wriedt Larsen
a0d26741d0
Python: Move experimental TarSlipImprov to new dataflow API
2023-08-28 15:31:07 +02:00
Rasmus Wriedt Larsen
3cdd875e9f
Python: Move experimental UnsafeUnpack to new dataflow API
2023-08-28 15:31:07 +02:00
Rasmus Wriedt Larsen
657b1997cc
Python: Move FullServerSideRequestForgery and PartialServerSideRequestForgery to new dataflow API
2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
dd074173d2
Python: Move WeakSensitiveDataHashing to new dataflow API
...
I adopted helper predicates to do the "heavy" lifting of .asPathNode1(), maybe I like this approach better... let me know what you think 😊
2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
cca78f31ff
Python: Move PamAuthorization to new dataflow API
2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
dcd96083e8
Python: Move StackTraceExposure to new dataflow API
2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
e97032909a
Python: Move PathInjection to new dataflow API
2023-08-28 15:27:49 +02:00
yoff
6e05246daa
Merge pull request #13935 from yoff/python/mad-on-externals
...
Python: MaD on externals
2023-08-28 14:04:54 +02:00
yoff
826b8e6aa5
Merge pull request #14067 from RasmusWL/modern-dataflowquerytests
...
Python: Adopt tests to new `DataflowQueryTest`
2023-08-28 13:54:34 +02:00
Rasmus Wriedt Larsen
889cb7a95b
Python: Adopt tests to new DataflowQueryTest
...
Co-authored-by: Rasmus Lerchedahl Petersen <yoff@github.com >
2023-08-28 11:44:01 +02:00
Rasmus Wriedt Larsen
9c44235782
Python: Modernize DataflowQueryTest.qll
...
Co-authored-by: Rasmus Lerchedahl Petersen <yoff@github.com >
2023-08-28 11:40:41 +02:00
Rasmus Wriedt Larsen
7cba6cd1d8
Python: Update .expected files
...
Due to change in path-graph, and including LHS of assignments
2023-08-28 11:33:44 +02:00
Rasmus Wriedt Larsen
0f242475f2
Merge branch 'main' into experimental-cleanup
2023-08-28 11:01:22 +02:00
Rasmus Lerchedahl Petersen
ad49eada48
Python: Do not alter codeql-workspaces.yml
...
And remove the qlpack referred to therein.
Instead we rename and duplicate the extesion file
that this qlpack pointed to.
These two extension files are kept in sync by `identical-files.json`.
2023-08-25 11:46:41 +02:00
Rasmus Lerchedahl Petersen
68cd422788
Python: Fix test expectations
2023-08-25 11:27:53 +02:00
Rasmus Lerchedahl Petersen
d3c24ba110
PythonÆ fix test expectations
2023-08-24 21:21:49 +02:00
Rasmus Lerchedahl Petersen
88fc96e8d7
Python: Add test with prefix
2023-08-24 21:21:49 +02:00
Rasmus Lerchedahl Petersen
7ad1a21c2d
Python: make mode characters not be characters
...
They are simply considered part of the group start.
2023-08-24 21:21:49 +02:00
yoff
a834703195
Merge pull request #13779 from geoffw0/pythonparsemode
...
Python: Understand multiple parse mode flags specified in a regular expression string
2023-08-24 21:20:45 +02:00
Geoffrey White
f07f97a94e
Python: Accept test changes. I think these reflect the 'parse mode chars should not be considered chars' issue.
2023-08-24 10:52:52 +01:00
Rasmus Wriedt Larsen
f33359bd5c
Python: Fix tests
2023-08-23 15:37:55 +02:00
yoff
00c0ebe9e4
Merge pull request #13738 from RasmusWL/path-steps
...
Python: Include all assignments in data flow paths
2023-08-22 11:58:11 +02:00
Rasmus Wriedt Larsen
c8c69aac9b
Merge pull request #13561 from amammad/amammad-python-WebAppsConstatntSecretKeys
...
Python: Flask & Django Constant Secret Key initialization
2023-08-21 11:39:19 +02:00
Rasmus Wriedt Larsen
b579ab0694
Python: Accept .expected change
2023-08-18 11:12:55 +02:00
Rasmus Wriedt Larsen
38577e6a5c
Python: Remove duplicated SSTI tests
...
Besides the Cheetah tests, which were missing from the query tests.
2023-08-18 10:20:16 +02:00
Rasmus Wriedt Larsen
33f8998c2e
Python: Minor fix in test
2023-08-18 10:19:44 +02:00
Rasmus Wriedt Larsen
843f2681bb
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2023-08-18 10:09:45 +02:00
Rasmus Wriedt Larsen
cf54d3f4ca
Python: Move paramiko tests to own folder
2023-08-17 15:45:28 +02:00
Rasmus Wriedt Larsen
4c693b4fc3
Python: Port py/xslt-injection to new data-flow
2023-08-17 15:45:07 +02:00
Rasmus Wriedt Larsen
ef139f2ee9
Python: Delete XsltSinks.ql test
2023-08-17 15:45:07 +02:00
Rasmus Wriedt Larsen
779fe6498c
Python: Rename to XsltInjection.ql
2023-08-17 15:45:07 +02:00
Rasmus Wriedt Larsen
0336c76871
Python: Rename template injection tests
2023-08-17 15:45:04 +02:00
Rasmus Wriedt Larsen
91edde72c4
Python: Port py/template-injection to new data-flow
...
I kept all the modeling in _one_ file, since that makes it easy to work
with such an external contribution... and I would certainly propose this
file setup for the future 👍
2023-08-17 15:44:26 +02:00
yoff
7f2f6f14e7
Merge pull request #13729 from yoff/python/model-aws-lambdas
...
Python/JavaScript: Shared module for serverless functions
2023-08-16 15:14:08 +02:00
Rasmus Wriedt Larsen
0443057608
Merge branch 'main' into amammad-python-WebAppsConstatntSecretKeys
2023-08-16 15:06:08 +02:00
Rasmus Wriedt Larsen
c55b0982f7
Merge pull request #13819 from yoff/python/relax-module-resolution
...
Python: Relax module resolution
2023-08-16 12:04:49 +02:00
Rasmus Lerchedahl Petersen
e6943ce98e
Python: use standard test format
2023-08-15 15:26:18 +02:00
Erik Krogh Kristensen
6a3b9e10eb
Merge pull request #13914 from erik-krogh/escape-unicode
...
ReDoS: escape unicode chars in the output for the ReDoS queries
2023-08-15 11:21:21 +02:00
Rasmus Wriedt Larsen
d12743d7c3
Merge pull request #13941 from yoff/python/test-nice-location
...
Python: fix nice locations for import aliases
2023-08-14 21:37:23 +02:00
Rasmus Wriedt Larsen
1c3cc1fa29
Python: Remove flow through stdlib
...
This means tests can pass on any machine now 👍
2023-08-14 11:55:22 +02:00