Rasmus Wriedt Larsen
43688715f5
Python: Add test of stdlib HTTP server facilities
...
Just a port of the old tests, except for the fact that I learned
`cgi.FieldStorage()` _should_ be tainted when not specifying any arguments. (and
moved taint-test to own function)
Also clarified how imports of all the .*HTTPRequestHandler works in Python2
2020-12-08 14:01:55 +01:00
Rasmus Wriedt Larsen
e5e8ec6ecc
Python: Add a few test-cases for barrier guards and references
...
I'm not sure references is the best name, but it's the best I could come up with
jsut now
2020-12-07 15:27:20 +01:00
Rasmus Wriedt Larsen
c7ab78f8c2
Python: Add modeling of django class based view handlers
...
BUT, since MyCustomViewBaseClass.post (django-v2-v3/testapp/views.py) and
Foo.post (django-v2-v3/routing_test.py) aren't handled, this raises important
question about how to do MRO without points-to :S
2020-12-04 14:03:59 +01:00
Rasmus Wriedt Larsen
4ead118a31
Python: Add class based route handler in django tests
...
Disabled CSRF middleware for now, since it blocked my debugging curl POST requests :(
2020-12-04 13:27:01 +01:00
CodeQL CI
e266cedc84
Merge pull request #4700 from RasmusWL/python-add-code-injection-FP
...
Approved by tausbn
2020-12-02 16:29:21 +00:00
Rasmus Lerchedahl Petersen
289b9e62f9
Python: Add read step for unpacking assignment
2020-11-30 15:30:14 +01:00
Rasmus Lerchedahl Petersen
f345e55951
Python: Adjust test expectations
2020-11-30 14:21:30 +01:00
Rasmus Lerchedahl Petersen
673ff901fb
Python: Test for unpacking assignment
2020-11-30 14:18:22 +01:00
Rasmus Wriedt Larsen
a0c7365ae6
Python: Proper models of json.loads and json.dumps
2020-11-27 15:57:56 +01:00
yoff
346a007bf6
Merge pull request #4720 from RasmusWL/python-better-open-models
...
Python: better models of `open` function
2020-11-27 14:47:10 +01:00
Rasmus Wriedt Larsen
cc9a7fe4fe
Python: Move BarrierGuards to own file
2020-11-27 12:09:57 +01:00
Rasmus Wriedt Larsen
cafe55f5c7
Merge pull request #4701 from yoff/python-fix-return-node-enclosing-callable
...
Python: Use default `getEnclosingCallable` for `RetrunNode`
2020-11-25 10:36:41 +01:00
Rasmus Lerchedahl Petersen
88643da01f
Python: Use default getEnclosingCallable
...
for `RetrunNode`
2020-11-25 08:19:07 +01:00
Rasmus Lerchedahl Petersen
36d9097d03
Python: Add test for inner return
2020-11-25 07:09:27 +01:00
Rasmus Lerchedahl Petersen
34896ae0d7
Python: Fix failing test
2020-11-25 07:09:27 +01:00
Rasmus Wriedt Larsen
d88e5bdb3a
Python: Model io.open as FileSystemAccess
2020-11-24 18:27:33 +01:00
Rasmus Wriedt Larsen
e39bb56078
Python: Model builtin open function better
2020-11-24 18:27:31 +01:00
Rasmus Wriedt Larsen
5af1fdd06f
Python: Expand tests of open
2020-11-24 18:27:30 +01:00
yoff
215986bce5
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-11-24 14:12:23 +01:00
Rasmus Lerchedahl Petersen
05d156ba0f
Python: add comments
2020-11-24 14:11:14 +01:00
Rasmus Lerchedahl Petersen
80dcb8da4a
Python: annotate missing flow
2020-11-24 11:55:28 +01:00
Rasmus Lerchedahl Petersen
737f4dff09
Python: update test annotations
2020-11-24 10:57:57 +01:00
Rasmus Lerchedahl Petersen
da805f8242
Merge remote-tracking branch 'upstream/main' into python-dataflow-modernize-tests
2020-11-24 10:56:22 +01:00
Rasmus Lerchedahl Petersen
a19304a4a0
Python: Factor out prettyPrinter and update tests
2020-11-24 02:17:38 +01:00
Rasmus Lerchedahl Petersen
39c5e0d487
Python: update test expectations
2020-11-23 16:46:35 +01:00
Rasmus Lerchedahl Petersen
38bb06a207
Merge remote-tracking branch 'upstream/main' into python-dataflow-variable-capture
2020-11-23 16:40:20 +01:00
Rasmus Wriedt Larsen
f35ffa5632
Python: Add support for x in ["safe", "also_safe"] (and not in)
2020-11-23 10:42:24 +01:00
Rasmus Wriedt Larsen
431aab45f7
Python: Add support for x != "safe" BarrierGuard
2020-11-23 10:36:55 +01:00
Rasmus Wriedt Larsen
18041fd059
Python: Expand string-const-compare tests
...
Also moved file to reflect that. Added tests of
+ `!=`
+ `in`
+ `not in`
2020-11-23 10:36:49 +01:00
Rasmus Wriedt Larsen
08bcba98e6
Python: Add BarrierGuard test with exception inside unsafe branch
2020-11-20 11:55:07 +01:00
Rasmus Wriedt Larsen
34f78d4211
Python: Add BarrierGuard test with return inside unsafe branch
2020-11-20 11:52:36 +01:00
Rasmus Wriedt Larsen
12b36b2245
Python: Highlight that safe or also_safe doesn't clear taint :(
2020-11-20 10:43:46 +01:00
Rasmus Wriedt Larsen
1a52f17da3
Python: Add StringConstCompare BarrierGuard
2020-11-20 10:40:04 +01:00
Rasmus Wriedt Larsen
a82936c904
Python: Enable test for sanitizer-guard and logic expressions
...
`not` is not working properly, but otherwise pretty good
2020-11-20 10:06:25 +01:00
Rasmus Wriedt Larsen
b3d3d6e142
Python: Move logical test of sanitizers
...
Don't know why it would ever have been under default sanitizers :D
2020-11-19 16:46:07 +01:00
Rasmus Lerchedahl Petersen
7cbbf3bbf7
Python: slightly nicer test
2020-11-19 16:20:57 +01:00
Rasmus Lerchedahl Petersen
39f134c1c1
Python: reorganized and added to tests
2020-11-19 12:06:58 +01:00
Rasmus Wriedt Larsen
ab856d6c01
Python: Show getCallableForArgument can have multiple results
2020-11-18 10:44:32 +01:00
Rasmus Lerchedahl Petersen
71830abda0
Python: remaining c# tests, except lambdas
...
both via nonlocal and via dict
2020-11-17 08:28:11 +01:00
Rasmus Lerchedahl Petersen
27b4c67b9f
Python: Start of tests for captured variables
2020-11-16 17:25:39 +01:00
Rasmus Lerchedahl Petersen
dc91406ff0
Python: make .expected empty
...
still need to annotate missing results
2020-11-13 09:22:57 +01:00
Rasmus Lerchedahl Petersen
e468d49b19
Python: routing tests 3-7 and some annotations
2020-11-12 23:07:01 +01:00
Rasmus Lerchedahl Petersen
4fe2576b9a
Python: start modernizing routing tests
2020-11-12 22:43:34 +01:00
Rasmus Lerchedahl Petersen
823ed447df
Python: Add new-style tests
...
should perhaps move `LocalFlowStepTest` and `MaximalFlowStep` into where
they are referenced (they did not seem too reusable after all).
Should also add argument tests in the same way.
2020-11-12 21:57:29 +01:00
Rasmus Wriedt Larsen
611398586d
Merge pull request #4649 from yoff/python-dataflow-cfgparameters
...
Python: Make `ParameterNode` a `CfgNode`
2020-11-11 10:22:12 +01:00
Rasmus Lerchedahl Petersen
0710963fc3
Python: update test expectations
...
EssaNode -> ControlFlowNode
2020-11-10 23:58:55 +01:00
Anders Schack-Mulligen
89ef6ea4eb
C++/C#/Java/JavaScript/Python: Autoformat set literals.
2020-11-10 13:32:27 +01:00
Rasmus Lerchedahl Petersen
109d55eb25
Python: Make ParameterNode a CfgNode
...
Add a step from that `CfgNode` to the corresponding `EssaNode`.
The intended effect is seen in `ImpliesDataflow.expected`.
The efeect seen in other `.expected`-files is that parameter nodes
change type, that the extra steps are seen, and that flow from
`EssaVar`s is mirrored in flow from `CfgNode`s.
There is one surprise, which is the `.0` node in
`coverage/localFlow.expected`.
2020-11-10 11:35:50 +01:00
Rasmus Lerchedahl Petersen
6cecd3ba83
Python: Move and rename query
2020-11-05 11:49:39 +01:00
Rasmus Lerchedahl Petersen
38b2bb2828
Python: Add testfile with regressions
2020-11-04 15:55:59 +01:00