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
Taus
e76ab8c78c
Merge branch 'main' into python-clean-up-import-resolution
2022-11-17 22:47:50 +00:00
Rasmus Wriedt Larsen
98bf3adc72
Python: Add enclosing-callable test
2022-11-15 11:11:59 +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
Rasmus Wriedt Larsen
0f34752f8f
Python: Delete classesCallGraph.ql
...
I don't see the value from this, so just going to outright delete it.
(it actually stayed alive for quite some time in the original git history,
but never seemed to be that useful.)
2022-10-28 09:31:01 +02:00
Rasmus Wriedt Larsen
7d8c0c663f
Python: Remove dataflow/coverage/dataflow.ql
...
The selected edges is covered by `NormalDataflowTest.ql` now... and
reading the test-output changes in `edges` is just going to make commits
larger while not providing any real value.
2022-10-28 09:29:32 +02:00
Rasmus Wriedt Larsen
609a4cfd42
Python: validate tests in datamodel.py
...
And adopt argument passing tests as well.
turns out that `C.staticmethod.__func__` doesn't actually work :O
2022-10-28 09:29:32 +02:00
Rasmus Wriedt Larsen
39081e9c1c
Python: Fix staticmethod datamodel test
2022-10-28 09:29:32 +02:00
Taus
58754982ce
Python: Update type tracking tests
...
No longer missing! 🎉
2022-10-17 14:34:10 +00:00
Tom Hvitved
f4b82cb2e8
Python: Update expected test output
2022-09-22 15:01:40 +02:00
yoff
ea743173d5
Merge pull request #8781 from yoff/python-dataflow/flow-summaries-from-scratch
...
Python dataflow: flow summaries restart
2022-09-20 14:08:31 +02:00
Rasmus Lerchedahl Petersen
37fb27fa1c
Python: change type of LibraryCallable::getACall
...
The other callables return control flow nodes,
so it is slightly inconsistent for this to return a
data flow node, but it does make models based
on API graphs nicer.
2022-09-19 14:02:52 +02:00
Rasmus Lerchedahl Petersen
245baa51a3
Python: rename summary map -> list_map,
...
since map resolves to a class call
also fix test expectation
2022-09-14 11:21:16 +02:00
Rasmus Lerchedahl Petersen
f83158ff8b
Python: do not stake out too much territory
2022-09-14 10:28:11 +02:00
Rasmus Lerchedahl Petersen
58cfac27d2
Python: adjust expectations to new spelling
2022-09-13 10:10:17 +02:00
Rasmus Lerchedahl Petersen
c1ab66181b
Python: format
2022-09-13 08:08:04 +02:00
Rasmus Lerchedahl Petersen
03c243175b
Python: fix QL alerts
2022-09-12 23:53:42 +02:00
Rasmus Lerchedahl Petersen
bf16e220a0
Python: adjust expectations
2022-09-12 22:43:03 +02:00
Rasmus Lerchedahl Petersen
efc5cfb852
Merge branch 'main' of github.com:github/codeql into python-dataflow/flow-summaries-from-scratch
2022-09-12 19:56:16 +02:00
Rasmus Lerchedahl Petersen
0f95992b2f
Python: remove NonLibraryDataFlowCallable
...
this required managing parameters and their pre-update nodes a bit
2022-09-12 15:17:29 +02:00
Rasmus Wriedt Larsen
4296ac1ac0
Python: Allow CallNode.getArgByName for keyword args after **kwargs
2022-09-12 15:03:13 +02:00
Rasmus Lerchedahl Petersen
895f5480c2
Python: Added recursion guard
...
to ensure that the call graph seen by type tracking
does not include summary calls resolved by type tracking.
(I tried inserting a similar test into the Ruby codebase,
and it still compiled)
To get this to compile, I had to move the resolution of summary calls
out of the data flow nodes and into the `viableCallable` predicate.
This means that we now have a potential summary call for each
cfg call node. (I tried using the base class, `DataFlowCall`, for this
but calls to `map` got identified as class calls and would no longer
be associated with a summary.)
It is possible that the "NonLIbrary"-layers the were inserted into the
hierarchy can be removed again.
2022-09-09 22:47:47 +02:00
Rasmus Lerchedahl Petersen
f6d807aec0
Python: Add summary test append_to_list
2022-09-06 18:42:32 +02:00
Taus
3bb7e28712
Merge pull request #10176 from RasmusWL/import-problem
...
Python: Add testcase for import problem
2022-09-06 18:12:37 +02:00
Rasmus Lerchedahl Petersen
4cd41c24c7
Python: remove comments and start design document
2022-09-06 17:23:40 +02:00
Rasmus Lerchedahl Petersen
67c3a9b2f4
Python: resolve library calls in the CFG
...
rather than in the AST
2022-09-06 17:00:28 +02:00
Rasmus Wriedt Larsen
e979dffc08
Python: Fix variable access from extractor-change
...
These changes are from internal PR.
2022-09-06 10:11:37 +02:00
Rasmus Wriedt Larsen
ebd97f4496
Python: Add type-tracking regession example
2022-09-06 10:11:36 +02:00
erik-krogh
1d1aa7c8b4
update some expected output
2022-08-25 20:52:30 +02:00
erik-krogh
cc7a9ef97a
rename more acronyms
2022-08-25 20:52:27 +02:00
Rasmus Wriedt Larsen
0728ecebbb
Python: Highlight that import problem is not just a relative problem
2022-08-25 15:54:21 +02:00
Rasmus Wriedt Larsen
1ca19533e0
Python: Add import problem test from the wild
2022-08-25 15:50:55 +02:00
yoff
6b4716485b
Python: rename file
2022-08-25 12:23:09 +00:00
yoff
800165d63c
python: udate deprecated call
2022-08-25 09:49:46 +00:00
yoff
75ac24a847
Merge branch 'main' into python-dataflow/flow-summaries-from-scratch
2022-08-10 10:57:59 +02:00
Rasmus Wriedt Larsen
f89b32183f
Merge branch 'main' into typetracker-decorators
2022-08-08 11:52:09 +02:00
yoff
f52d792b36
Merge branch 'main' of https://github.com/github/codeql into python-dataflow/flow-summaries-from-scratch
2022-07-01 12:01:07 +00:00
yoff
61523bd330
python: better names
...
- "Normal" instead of "NonSpecial"
- "NonLibrary" instead of "2"
I could not find a good replacement for "NonLibrary", nor for "Source",
but I added QLDocs in a few places to help the reading.
2022-07-01 11:55:20 +00:00
yoff
6087bc6888
Merge branch 'main' into python/more-logic-tests
2022-06-28 22:16:38 +02:00
Asger F
a522562f93
Merge pull request #9369 from asgerf/python/api-graph-api
...
Python: API graph renaming and documentation
2022-06-28 14:48:12 +02:00
Rasmus Lerchedahl Petersen
a1fe8a5b2b
python: handle not in BarrierGuard
...
in the program
```python
if not is_safe(path):
return
```
the last node in the `ConditionBlock` is `not is_safe(path)`,
so it would never match "a call to is_safe".
Thus, guards inside `not` would not be part of `GuardNode`
(nor `BarrierGuard`). Now they can.
2022-06-27 20:10:47 +00:00
Rasmus Lerchedahl Petersen
882000afb3
python: not is confusing our logic
...
- added `is_unsafe`
- added "negated version" of two tests.
These versions do not use `not` and the analysis gets the taint right.
2022-06-27 20:10:47 +00:00
Rasmus Wriedt Larsen
3248f7b423
Merge pull request #9649 from RasmusWL/certificate-modeling
...
Python/JS/Ruby: Ignore common words (like certain) as sensitive data source
2022-06-23 12:04:58 +02:00
yoff
140dc1a61e
merge in main
2022-06-23 09:05:32 +00:00