Commit Graph

21651 Commits

Author SHA1 Message Date
Taus Brock-Nannestad
cd7b013a0c Python: Add missing documentation 2021-02-01 18:57:25 +01:00
CodeQL CI
749dfe4358 Merge pull request #5068 from Marcono1234/patch-1
Approved by shati-patel
2021-02-01 08:47:55 -08:00
yoff
b92af8bcec Merge pull request #5042 from RasmusWL/django-more-view-classes
Python: Add full-path modeling of Django more view classes
2021-02-01 17:33:29 +01:00
Marcono1234
fa469587c1 Remove duplicate word in language specification 2021-02-01 17:32:53 +01:00
yoff
c0511ca9f9 Merge pull request #5053 from github/python-add-essavariable-locations
Python: Add locations for ESSA variables
2021-02-01 17:31:25 +01:00
Tamás Vajk
700a2dbb93 Merge pull request #5063 from tamasvajk/feature/remove-indexerproperty-ast
C#: Report IndexerProperty as Property in the PrintAST query
2021-02-01 17:25:25 +01:00
Mathias Vorreiter Pedersen
be9908df87 C++: Fix copy/paste error. 2021-02-01 16:45:07 +01:00
yoff
384d0212b1 Update python/ql/src/semmle/python/dataflow/new/internal/DataFlowPrivate.qll
Co-authored-by: Taus <tausbn@github.com>
2021-02-01 16:41:43 +01:00
Mathias Vorreiter Pedersen
71e1218ad5 Merge pull request #5061 from MathiasVP/more-memcpy-memset-strcpy-strcat-models
C++: Add more memcpy, memset, strcat and strcpy models
2021-02-01 16:25:01 +01:00
Mathias Vorreiter Pedersen
9db19613d6 C++: Reuse logic from commons/Scanf. 2021-02-01 16:10:28 +01:00
Taus Brock-Nannestad
fc01e5607f Python: Use getLocation directly on EssaNode 2021-02-01 14:55:18 +01:00
Taus Brock-Nannestad
b8194bd1f8 Python: Add support for API graphs
Currently only supports the "use" side of things.

For the most part, this follows the corresponding implementation for
JavaScript. Major differences include:

- No `MkImportUse` nodes -- we just move directly from
  `MkModuleImport` to its uses.

- Paths are no longer labelled by s-expressions, but rather by a
string that mirrors how you would access it in QL. This makes it very
easy to see how to access an API component -- simply look at its
`toString`!

This PR also extends `LocalSourceNode` to support looking up attribute
references and invocations of such nodes. This was again based on the
JavaScript equivalent (though without specific classes for
`InvokeNode` and the like, it's a bit more awkward to use).
2021-02-01 14:38:59 +01:00
CodeQL CI
2de230ea75 Merge pull request #5062 from esbena/js/test-for-html-concat-obfuscation
Approved by erik-krogh
2021-02-01 05:29:50 -08:00
Tom Hvitved
249e431e87 C#: Adjust CFG for {Recursive,Positional,Property}PatternExpr 2021-02-01 13:52:18 +01:00
Tamas Vajk
7d62e33feb C#: Rework function pointer/delegate call DF 2021-02-01 13:40:03 +01:00
Mathias Vorreiter Pedersen
27b41c2016 C++: Address review comments. 2021-02-01 13:32:46 +01:00
CaptainFreak
3363f5e6db JS: add query for Express-HBS LFR 2021-02-01 18:01:34 +05:30
Mathias Vorreiter Pedersen
c747914ef2 C++: Add sscanf and fscanf model implementations. 2021-02-01 12:54:59 +01:00
Taus
b8b42eaea3 Merge pull request #5064 from RasmusWL/fix-missing-override
Python: Add missing override annotation
2021-02-01 12:37:38 +01:00
Mathias Vorreiter Pedersen
61125b4bf2 C++: Address review comments. 2021-02-01 12:15:57 +01:00
Taus
3179546b8c Merge pull request #5058 from yoff/python-add-consistency-checks-to-all-dataflow-test-folders
Python: Add consistency checks to all data-flow test folders
2021-02-01 11:41:31 +01:00
Rasmus Wriedt Larsen
4ef9a6cf2a Python: Add missing override annotation 2021-02-01 11:28:41 +01:00
Rasmus Wriedt Larsen
2a9e66a667 Python: Fix problem after merge conflict 2021-02-01 11:17:04 +01:00
Rasmus Wriedt Larsen
4b6a59a126 Python: Apply code-review suggestion
Co-authored-by: yoff <lerchedahl@gmail.com>
2021-02-01 11:12:32 +01:00
Esben Sparre Andreasen
9678534f25 JS: add tests for some syntactic XSS vector obfuscations 2021-02-01 10:20:23 +01:00
Tamas Vajk
1b6cb340d3 C#: Report IndexerProperty as Property in the PrintAST query 2021-02-01 10:08:51 +01:00
Erik Krogh Kristensen
aae69c6537 update expected output 2021-02-01 09:33:52 +01:00
Tamás Vajk
aa35fcafeb Merge pull request #5018 from tamasvajk/feature/csharp9-binary-pattern-cfg
C#: Extract 'and' and 'or' patterns
2021-02-01 09:17:52 +01:00
Rasmus Lerchedahl Petersen
27fd46b855 Python: Update test expectation 2021-02-01 08:55:20 +01:00
Rasmus Lerchedahl Petersen
6730396ad6 Python: Remove tests from non-test directory 2021-02-01 08:52:00 +01:00
Mathias Vorreiter Pedersen
6c3f44bba8 C++: Add more memcpy, memset, strcat and strcpy models. Also refine which strcpy functions can live in the std namespace. 2021-02-01 08:44:10 +01:00
ihsinme
2b946aee5a Update WrongInDetectingAndHandlingMemoryAllocationErrors.ql 2021-01-31 15:21:54 +03:00
ihsinme
b7df18b97e Update AccessOfMemoryLocationAfterEndOfBufferUsingStrlen.ql 2021-01-31 15:16:40 +03:00
Geoffrey White
064d89735b Merge pull request #5046 from MathiasVP/model-more-pure-functions
C++: Model more pure functions
2021-01-29 22:05:48 +00:00
Geoffrey White
03922aa1f5 C++: Exclude custom vprintf implementations. 2021-01-29 21:20:36 +00: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
05a138694d Python: Fix crashing test 2021-01-29 21:12:44 +01:00
Rasmus Lerchedahl Petersen
7f1affa122 Python: UnpackingAssignment -> IterableUnpacking 2021-01-29 17:44:53 +01:00
Rasmus Lerchedahl Petersen
182d435dc6 Python: Replace comprehension read-step by for
read-step. Add a version targetting sequence nodes.
2021-01-29 17:31:59 +01:00
Tamas Vajk
7e9913a8a7 Fix failing pattern tests 2021-01-29 17:25:44 +01:00
Rasmus Wriedt Larsen
94e7980ca4 Merge branch 'main' into port-url-redirect-query 2021-01-29 16:22:50 +01:00
Rasmus Wriedt Larsen
ef831bb16f Python: Fix tornado redirect QLdoc 2021-01-29 16:21:39 +01:00
Rasmus Wriedt Larsen
9c01aa2304 Python: Add modeling for django.shortcuts.redirect 2021-01-29 15:41:00 +01:00
Rasmus Wriedt Larsen
ff2f2b5792 Python: Add django.shortcuts.redirect test 2021-01-29 15:37:20 +01:00
Tamas Vajk
a9c51e7300 Fix missing pattern matching completions 2021-01-29 15:16:30 +01:00
CodeQL CI
c9537f2639 Merge pull request #5029 from asgerf/js/silence-angular-template-fps
Approved by erik-krogh
2021-01-29 06:06:37 -08:00
Taus Brock-Nannestad
817a142abc Python: Add getLocation to EssaVariable.
This may be a slightly "bogus" location to provide for ESSA variables,
but it can be useful for debugging. For instance, where previously you
might just see

```
SSA variable x | ...
SSA variable x | ...
SSA variable x | ...
SSA variable x | ...
SSA variable x | ...
SSA variable x | ...
```

where each instance of `SSA variable x` was just a bare string, now
each occurrence will tell you (via its location) _where_ this variable
is being (re)defined.
2021-01-29 14:45:12 +01:00
Taus
cb195a0dc4 Merge pull request #4752 from yoff/python-dataflow-unpacking-assignment
Python: Dataflow, unpacking assignment
2021-01-29 14:15:28 +01:00
Taus
be5b7bb4c4 Merge pull request #5022 from yoff/python-split-lambdas
Python: Callable for lambdas
2021-01-29 14:12:26 +01:00
Mathias Vorreiter Pedersen
92a5a2a06a C++: Solve merge conflicts by merging the two test.c test files. 2021-01-29 13:34:19 +01:00