Tom Hvitved
8f701cf1cb
Python: Update expected test output
2022-12-05 14:33:06 +01:00
Rasmus Wriedt Larsen
1b30cf8eca
Merge branch 'main' into call-graph-tests
2022-11-22 13:39:27 +01:00
Rasmus Wriedt Larsen
84faf49bf0
Python: Add tests for compound arguments field flow
2022-11-22 11:29:00 +01:00
Rasmus Wriedt Larsen
d876acde4c
Python: Fix SINK/SINK_F usage for crosstalk tests
...
As discussed in PR review
https://github.com/github/codeql/pull/11208#discussion_r1022473421
2022-11-22 11:29:00 +01:00
Rasmus Wriedt Larsen
7ca32ee2b5
Python: Fieldflow: merge assignment tests
2022-11-15 11:11:59 +01:00
Rasmus Wriedt Larsen
88f703af1f
DataFlow: Accept changes to .expected
2022-11-10 22:13:34 +01:00
Rasmus Wriedt Larsen
6577281bed
Python: Add crosstalk fieldflow test
2022-10-28 09:31:16 +02:00
Rasmus Wriedt Larsen
c1b2561598
Python: Extend fieldflow tests with bound method call
2022-10-28 09:31:16 +02:00
Tom Hvitved
f4b82cb2e8
Python: Update expected test output
2022-09-22 15:01:40 +02:00
erik-krogh
1d1aa7c8b4
update some expected output
2022-08-25 20:52:30 +02:00
Rasmus Wriedt Larsen
ead0b658d2
Python: Fix fieldflow tests by increasing max-import-depth
2022-02-28 10:58:44 +01:00
Rasmus Wriedt Larsen
f988e1f0d8
Python: Improve field-flow by removing import *
...
Since that apparently impacts call graph resolution with points-to :O
Also interesting that global flow was only not working for those cases
because of the tricky ifs... still need to 100% figure out how those ifs
are messing up the analysis :|
2022-02-25 16:01:08 +01:00
Rasmus Wriedt Larsen
999af15bd5
Python: Show unresolved calls for field-flow tests
2022-02-25 15:58:07 +01:00
Rasmus Wriedt Larsen
2d0034c40d
Python: Replicate global field-flow failures
2022-02-25 14:14:00 +01:00
Rasmus Wriedt Larsen
faaa63a73c
Python: Ensure no cross-talk in global tests
...
By giving all variables unique names
I also added a comment with the function name from the normal tests, so
its' easily visible what these tests are testing
2022-02-25 13:41:51 +01:00
Rasmus Wriedt Larsen
0642610ee9
Python: Global flow works when in own file???
...
This is very suspicious
2022-02-25 13:36:00 +01:00
Rasmus Wriedt Larsen
d83a9ef8d3
Python: Fix global field-flow for validTest.py
2022-02-25 13:35:43 +01:00
Rasmus Wriedt Larsen
abe4d8da62
Python: Accept global field-flow inconsistencies
...
Yikes
2022-02-24 15:07:18 +01:00
Rasmus Wriedt Larsen
94d23f3817
Python: Also do all field-flow tests in global scope
...
Notice that these tests don't pass, to show how they differ in the next
commit!
2022-02-24 15:06:40 +01:00
Rasmus Wriedt Larsen
2da4b39844
Python: Add global field-flow tests
...
I thought it was interesting that it did not propagate flow to the uses
inside the functions :O
2022-02-24 13:15:48 +01:00
Rasmus Wriedt Larsen
7aa559f4aa
Python: Restore dataflow consistency queries
2022-02-18 13:47:29 +01:00
Rasmus Wriedt Larsen
b2ce0fcb72
Python: Add post-update nodes to args of unresolved calls
...
Besides solving the problem with `setattr`, it also solved some old
problems with json library modeling (yay).
2022-02-04 11:51:53 +01:00
Rasmus Wriedt Larsen
49b5d60229
Python: Use AttrRead/AttrWrite for attr read/store steps
...
Note that this doesn't actually add the desired flow from setattr, due
to missing post-update note. This will be fixed in later commit.
2022-02-03 14:58:30 +01:00
Rasmus Wriedt Larsen
51bc6dcf7e
Python: Add attributeClearStep
2022-02-02 11:19:35 +01:00
Rasmus Wriedt Larsen
d2b72a7547
Python: Expand fieldflow tests
2022-02-02 11:19:31 +01:00
Rasmus Wriedt Larsen
f6215f2300
Python: Refactor field-flow test
2022-02-01 17:59:03 +01:00
Rasmus Wriedt Larsen
5ee755db09
Python: Require MISSING: flow annotations for normal data-flow tests
...
I had to rewrite the SINK1-SINK7 definitions, since this new requirement
complained that we had to add this `MISSING: flow` annotation :D
Doing this implementation also revealed that there was a bug, since I
did not compare files when checking for these `MISSING:` annotations. So
fixed that up in the implementation for inline taint tests as well.
(extra whitespace in argumentPassing.py to avoid changing line numbers
for other tests)
2022-02-01 17:46:53 +01:00
Rasmus Wriedt Larsen
2bc4a60496
Python: Unify normal dataflow test setup
...
I went with NormalDataflowTest to signify that if you don't know what
you're looking for, this is probably the one. I did not want to just
call it DataflowTest, since that becomes a big vague when there are also
`FlowTest.qll` and `MaximalFlowTest.qll` -- I'm open to renaming this
though 👍
2022-02-01 17:31:31 +01:00
Rasmus Wriedt Larsen
41319607a9
Python: Use InlineExpectationsTest for field-flow tests
...
I deleted the old tests, so it's very clear what tests to look for
2022-02-01 17:31:31 +01:00
Rasmus Wriedt Larsen
a4bb0cc5d8
Python: Run tests for fieldflow/test.py
2022-02-01 15:32:07 +01:00
Rasmus Wriedt Larsen
1390f034f3
Python: Delete duplicated tests
...
All the same tests are present in `fieldflow/test.py`
2022-02-01 15:31:30 +01:00
Taus
75c4d6a8a0
Merge pull request #6650 from yoff/python-dataflow/init-time
...
Python: Import time dataflow
2021-10-12 11:31:03 +02:00
Rasmus Wriedt Larsen
8444388ec7
Python: Update .expected
2021-10-11 09:48:56 +02:00
Rasmus Lerchedahl Petersen
64b1aeaecd
Python: Shorten toString for module vars
2021-10-10 15:59:31 +02:00
Rasmus Lerchedahl Petersen
0aa632d149
Python: Move writing of module vars
...
into runtime jump steps.
2021-10-10 15:49:33 +02:00
Rasmus Lerchedahl Petersen
4807f50c00
Merge branch 'main' of github.com:github/codeql into python-dataflow/init-time
2021-10-08 14:55:01 +02:00
Rasmus Lerchedahl Petersen
e27b3162e5
Python: rewrite simpleLocalFlowStep
...
to take into account the split between
import time and runtime.
2021-09-09 12:43:08 +02:00
Anders Schack-Mulligen
f30dad7705
Dataflow: Update test expected outputs.
2021-09-07 13:02:20 +02:00
Rasmus Lerchedahl Petersen
f6fa1276a6
Python: Add consistency checks
...
to all data-flow test floders
2021-01-29 21:28:43 +01:00
Rasmus Lerchedahl Petersen
42fa3bdb81
Python: Only consider the closest SOURCE
...
(in use-use flow) a source
2021-01-19 09:13:17 +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
Taus Brock-Nannestad
5dadb0f476
Python: Fix imports in tests
2020-11-02 23:02:29 +01:00
Rasmus Lerchedahl Petersen
0766eef49b
Merge branch 'main' of github.com:github/codeql into SharedDataflow_ArgumentPassing
2020-10-15 09:49:21 +02:00
Taus Brock-Nannestad
fdb489fc93
Python: Remove flow between ESSA variables
...
This required a minor change in the type tracker implementation, but
apart from that no other changes appear to be needed. Seems to clean
up the test output quite a bit.
2020-10-13 16:35:41 +02:00
Rasmus Lerchedahl Petersen
ce18bff274
Python: Support method calls
2020-10-03 23:34:39 +02:00
Rasmus Lerchedahl Petersen
bd32faf934
Python: annotate new test
2020-10-02 10:06:54 +02:00
Rasmus Lerchedahl Petersen
2a4d21a989
Python: Test method call
2020-10-02 10:02:29 +02:00
Rasmus Lerchedahl Petersen
0841e92a6b
Python: Test for method call
2020-10-01 16:26:12 +02:00
Rasmus Lerchedahl Petersen
5326125b70
Python: Handle positional construtor arguments
2020-10-01 15:28:26 +02:00
Rasmus Lerchedahl Petersen
2187389da1
Python: Show constructor keyword arg problem
...
Also make tests runnable
2020-10-01 12:48:38 +02:00