Rasmus Lerchedahl Petersen
a9cfc60ea1
python: move supporting libraries
...
and update reference in query
2022-02-08 11:27:45 +01:00
Rasmus Wriedt Larsen
c9e36aaf72
Python: Fix deprecated deprecated
2022-02-04 12:02:09 +01:00
Rasmus Wriedt Larsen
5a032d6f84
Python: deprecate old taint-tracking related predicates
2022-02-04 12:02:08 +01:00
Rasmus Wriedt Larsen
dba6b60c80
Python: Deprecate old library modeling
2022-02-04 12:02:08 +01:00
Arthur Baars
33b97f3e0c
Update synchronized files
2022-02-02 13:30:45 +01:00
Rasmus Lerchedahl Petersen
4ad99d9299
python: add missing QlDoc
2022-02-02 09:14:21 +01:00
Rasmus Lerchedahl Petersen
1e2428cb6b
python: create LDAP module in Concepts
2022-02-01 14:39:58 +01:00
Rasmus Lerchedahl Petersen
c2cd58edc4
python: rewrite to separate configurations
...
source nodes get duplicated, so perhaps flow states
are actually better for performance?
2022-02-01 14:36:11 +01:00
Rasmus Wriedt Larsen
f7a0b17ed6
Merge pull request #7687 from yoff/python/PathInjection-FlowState
...
python: Rewrite path injection query to use flow state
2022-02-01 11:33:37 +01:00
Rasmus Lerchedahl Petersen
7511b33512
python: "command" -> "log"
2022-02-01 10:23:16 +01:00
Rasmus Lerchedahl Petersen
8b5114d10e
python: Add standard customization setup
...
- modernize the sanitizer, but do not make it less specific
2022-01-31 11:27:55 +01:00
Rasmus Lerchedahl Petersen
20d54543fd
python: move log injection out of experimental
...
- move from custom concept `LogOutput` to standard concept `Logging`
- remove `Log.qll` from experimental frameworks
- fold models into standard models (naively for now)
- stdlib:
- make Logger module public
- broaden definition of instance
- add `extra` keyword as possible source
- flak: add app.logger as logger instance
- django: `add django.utils.log.request_logger` as logger instance
(should we add the rest?)
- remove LogOutput from experimental concepts
2022-01-31 11:27:55 +01:00
Rasmus Lerchedahl Petersen
0c3bce1415
python: deprecation
...
I am slightly concerned that the test now generates many more
intermediate results. I suppose that maes the analysis heavy.
Should the new library get a new name instead, so the old code
does not get evaluated?
2022-01-31 08:32:24 +01:00
Rasmus Lerchedahl Petersen
a026120c52
Python: Move configuration over and refine it
...
The original configuration did not match sinks with sanitizers.
Here it is resolved using flow state,
it could also be done by using two configurations.
2022-01-28 09:00:40 +01:00
Rasmus Lerchedahl Petersen
49d4b1480d
python: Do not remove ChainedConfigs12.qll
...
since it was clearly already used.
Add deprecation message instead.
2022-01-21 12:27:29 +01:00
yoff
5b9ae9cede
Merge pull request #7659 from RasmusWL/move-regex-injection-files
...
Python: Move regex injection configuration files
2022-01-21 11:42:06 +01:00
Rasmus Lerchedahl Petersen
a5bc5373d0
python: Rewrite path injection to use flow state
...
This removes the FP cause by chaining
This PR also removes `ChainedConfigs12.qll`,
as we hope to solve future problems via flow states.
2022-01-21 09:26:48 +01:00
Rasmus Wriedt Larsen
aa10ad6a8a
Python: Fix RegexInjection query, add old deprecated versions
2022-01-19 17:22:44 +01:00
Rasmus Wriedt Larsen
e82ea7ad17
Python: move regex injection configuration files
...
I did not notice that these went to the wrong location in
https://github.com/github/codeql/pull/6693 . They should be in the
dataflow folder with the rest of the data-flow configurations files, the
injection folder is for old points-to based modeling.
2022-01-19 17:21:46 +01:00
Rasmus Wriedt Larsen
e82e648ca1
Python: Remove usernames as sensitive source for cleartext queries
...
Closes #6363 , #6927 , #6726 , #7497 , #7116
2022-01-19 15:25:21 +01:00
Erik Krogh Kristensen
f7a63d5ea0
remove duplicated line
2022-01-07 18:38:02 +01:00
Erik Krogh Kristensen
1a8b6d7414
recognize ranges without upper bounds
2022-01-07 18:38:01 +01:00
Erik Krogh Kristensen
acaf294bee
support a limited number of regexp ranges
2022-01-07 18:36:30 +01:00
Erik Krogh Kristensen
8019b52838
run the non-us patch with "modelled/modeled"
2021-12-20 17:47:15 +01:00
Rasmus Wriedt Larsen
626009ea60
Python: Fix typo
2021-12-17 14:29:38 +01:00
Rasmus Wriedt Larsen
e309d8227c
Python: Remove debug predicate
...
Accidentally committed :|
2021-12-17 09:44:35 +01:00
Rasmus Wriedt Larsen
1d00730753
Python: Allow http[s]:// prefix for SSRF
2021-12-17 00:27:18 +01:00
Rasmus Wriedt Larsen
4b5599fe17
Python: Improve full/partial SSRF split
...
Now full-ssrf will only alert if **all** URL parts are fully
user-controlled.
2021-12-16 22:48:51 +01:00
Rasmus Wriedt Larsen
cb934e17b1
Python: Adjust SSRF location to request call
...
Since that might not be the same place where the vulnerable URL part is.
2021-12-16 22:48:51 +01:00
Rasmus Wriedt Larsen
1cc5e54357
Python: Add SSRF queries
...
I've added 2 queries:
- one that detects full SSRF, where an attacker can control the full URL,
which is always bad
- and one for partial SSRF, where an attacker can control parts of an
URL (such as the path, query parameters, or fragment), which is not a
big problem in many cases (but might still be exploitable)
full SSRF should run by default, and partial SSRF should not (but makes
it easy to see the other results).
Some elements of the full SSRF queries needs a bit more polishing, like
being able to detect `"https://" + user_input` is in fact controlling
the full URL.
2021-12-16 01:48:34 +01:00
Erik Krogh Kristensen
6ff8d4de5c
add all remaining explicit this
2021-11-26 13:50:10 +01:00
Erik Krogh Kristensen
ee858d840e
get ReDoSUtil in sync for ruby
2021-11-18 16:49:34 +01:00
Erik Krogh Kristensen
02f500b9c2
Merge branch 'main' into htmlReg
2021-11-04 12:58:42 +01:00
Rasmus Wriedt Larsen
85f00fda19
Merge pull request #6776 from yoff/python/model-asyncpg
...
Python: Model `asyncpg`
2021-10-29 13:54:44 +02:00
Erik Krogh Kristensen
6fffdf6101
Merge pull request #6855 from erik-krogh/secCookie
...
JS: Move cookie queries out of experimental.
2021-10-29 10:23:48 +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
Erik Krogh Kristensen
44afa34e37
Merge branch 'main' of github.com:github/codeql into htmlReg
2021-10-26 14:46:27 +02:00
Erik Krogh Kristensen
834d5ec6ad
add session{key,id} as sensitive info
2021-10-26 13:46:59 +02:00
Erik Krogh Kristensen
a3c55c2aec
use set literal instead of big disjunction of literals
2021-10-26 12:55:25 +02:00
Rasmus Lerchedahl Petersen
5a02b3880e
Python: use SqlConstruction in SqlAlchemy and
...
`SqlInjection`
2021-10-25 13:30:14 +02:00
Geoffrey White
8f30b8b586
Autoformat.
2021-10-14 16:00:23 +01:00
Geoffrey White
f08d2ee759
Merge branch 'main' into setliterals
2021-10-14 14:39:39 +01:00
Geoffrey White
9d63efe495
Python: Set literals.
2021-10-14 14:22:44 +01:00
Anders Schack-Mulligen
8b6baa250c
Merge pull request #6878 from aschackmull/remove-singleton-setliteral
...
C++/C#/Java/JavaScript/Python: Remove singleton set literals.
2021-10-14 14:53:05 +02:00
Anders Schack-Mulligen
57cb300759
C++/C#/Java/JavaScript/Python: Remove singleton set literals.
2021-10-14 11:34:22 +02:00
Rasmus Lerchedahl Petersen
61008fd3d0
Merge branch 'main' of github.com:github/codeql into python/promote-regex-injection
2021-10-12 11:28:12 +02:00
yoff
f6122c8a6c
Merge pull request #6734 from erik-krogh/regBehind
...
JS/PY: do not filter away regular expressions with lookbehinds
2021-10-10 13:54:26 +02:00
Erik Krogh Kristensen
8d6cac76cc
apply suggestions from asgerf
2021-10-04 12:45:02 +02:00
Rasmus Lerchedahl Petersen
175a06fe73
Python: Fix compile error due to predicate rename
2021-10-01 10:33:42 +02:00
Rasmus Wriedt Larsen
987b573709
Fix hasLocationInfo URL reference
...
Follow up to https://github.com/github/codeql/pull/5830
2021-09-29 13:47:58 +02:00