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
yoff
8bf60301da
python: we have hidden isParameterOf
...
but now allow a clear alternative
2022-06-23 08:57:50 +00:00
yoff
fe0c5d8ee5
python: make ArgumentNode publicly usable
...
- add `getCall`
2022-06-23 08:48:55 +00:00
yoff
cedf9ef538
python: make DataFlowCall "publicly usable"
...
- add `getCallable`, `getArg` and `getNode`
- these are `none` for summary calls
- revert "external" uses (they had been changed to `DataFlowSourceCall`)
2022-06-23 08:32:23 +00:00
Rasmus Wriedt Larsen
4be375521f
Python: Handle _ in sensitive-data-sources
2022-06-22 11:05:14 +02:00
Rasmus Wriedt Larsen
4a844312f4
Python: _ in var name not handled by sensitive-data-sources
2022-06-22 11:05:14 +02:00
Rasmus Wriedt Larsen
5dc2bb717a
Python: ignore common words (certain/concert) as sensitive source
2022-06-22 11:05:05 +02:00
Rasmus Wriedt Larsen
abdcfd55c3
Python: uncertainty is treated as a certificate :O
2022-06-22 10:16:28 +02:00
yoff
dd69100dcd
python: ParameterNode -> SourceParameterNode
2022-06-21 12:55:22 +00:00
Asger F
181a53bd03
Python: Rename getAnImmediateUse -> asSource
2022-06-21 12:44:06 +02:00
Anders Schack-Mulligen
f473a0a961
Python: Deprecate and replace BarrierGuard class.
2022-06-20 15:46:38 +02:00
Rasmus Wriedt Larsen
b2c8e0fe8d
Python: Add comment to test
2022-06-15 15:59:54 +02:00
Rasmus Wriedt Larsen
24c9aff2fc
Python: Fix a type-tracking test
2022-06-15 15:58:17 +02:00
Tom Hvitved
4f95abc4f6
Python: Update expected test output
2022-05-25 14:39:37 +02:00
yoff
8b9915e372
Python: Let the user help us identifying callbacks
2022-05-23 11:07:47 +00:00
yoff
2822ed9594
Merge remote-tracking branch 'upstream/main' into python-dataflow/flow-summaries-from-scratch
2022-05-16 08:10:15 +00:00