Commit Graph

29908 Commits

Author SHA1 Message Date
Calum Grant
ed73d9bab4 Merge pull request #6860 from github/ruby-docs
Ruby documentation
2021-10-20 10:47:05 +01:00
Tom Hvitved
f1f7930529 Make all self nodes LocalSourceNodes 2021-10-20 11:43:50 +02:00
Tom Hvitved
94f0f8daf2 Make SelfVariableAccess a sub type of LocalVariableAccess 2021-10-20 11:43:44 +02:00
Harry Maclean
e0b2d88377 Remove redundant import 2021-10-20 10:41:17 +01:00
Harry Maclean
c437fd50a4 Update test fixtures
Some of these look a bit suspicious, so need to double check them before
merging.
2021-10-20 10:39:36 +01:00
Harry Maclean
c71f538a5a Extend the scope of self variables
`self` variables are scoped to methods, modules, classes and the
top-level of the program. Prior to this change, they were treated as
being scoped just to methods.

This change means we (once again) correctly synthesise `self` receivers
for method calls in class bodies, module bodies and at the top-level.
2021-10-20 09:43:23 +01:00
Harry Maclean
647485acde Don't omit self from uninitialized writes
We can safely create uninitialized writes for `self` variables, because
they appear at index -1 in the entry block of a method, and are
immediately overwritten by a write to `self` at index 0. As a result,
they are not live and will be pruned from the CFG.
2021-10-20 09:43:22 +01:00
Tom Hvitved
446eb13471 Minor adjustments to SSA library for self variables 2021-10-20 09:43:21 +01:00
Harry Maclean
0d39a15786 Model implicit reads of self variables
We already synthesise `self` nodes for method calls with no receiver.
This change creates read accesses for each of these synthesised nodes.
2021-10-20 09:43:20 +01:00
Harry Maclean
e7a3050fb2 Improve the modelling of self variables.
We model `self` variables by inserting a write at the start of every
method body. We then treat them as local variables that are alive for
the extent of the method body.
2021-10-20 09:43:19 +01:00
Tamás Vajk
9331b3538d Merge pull request #6914 from tamasvajk/feature/improve-csv-pr-commenter
Introduce foldable region in CSV coverage PR comments
2021-10-20 08:45:55 +02:00
Ian Lynagh
9fbff1b4c1 Java: Add an upgrade script 2021-10-20 00:34:47 +01:00
Jonathan Leitschuh
d4b18fe6a3 [Java] JDK Collection lambda models
Adds support for data flow tracking through simple JDK collection
functional APIs.
 - `Iterable::forEach`
 - `Iterator::forEachRemaining`
 - `Map::forEach`

Replaces #5871

Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com>
2021-10-19 15:57:58 -04:00
Ian Lynagh
90299033d1 Java: Replace @type with more specific types 2021-10-19 20:23:53 +01:00
Geoffrey White
f7bd74ea59 C++: Prototype nodeBefore predicate. 2021-10-19 20:08:55 +01:00
Geoffrey White
57fe4b9a31 C++: Also fix variableMustBeNullTerminated. 2021-10-19 18:06:11 +01:00
Jonathan Leitschuh
584c27a2f8 Move CollectionPassingTest to correct directory 2021-10-19 11:44:12 -04:00
Jonathan Leitschuh
8231907116 Ratpack code cleanup from code review 2021-10-19 11:42:35 -04:00
Calum Grant
112d408fb9 Address review comments. 2021-10-19 16:30:54 +01:00
Chris Smowton
233a3346a8 Merge pull request #6240 from haby0/java/UnsafeUrlForward
[Java] CWE-552: Unsafe url forward
2021-10-19 16:18:23 +01:00
Geoffrey White
b4b8392748 C++: New, behaviour preserving solution. 2021-10-19 16:16:05 +01:00
Jonas Jensen
7015be7cad Merge pull request #6916 from geoffw0/fixnotbound
C++: Fix unbound variables in PrivateCleartextWrite.qll.
2021-10-19 16:46:42 +02:00
Geoffrey White
38257a58f0 C++: Fix unbound variables in PrivateCleartextWrite.qll. 2021-10-19 15:01:32 +01:00
Tom Hvitved
3f396ac10e Merge pull request #371 from github/hvitved/dataflow/arg-sugar
Data flow: Fix bug for sugared call arguments
2021-10-19 15:48:21 +02:00
Chris Smowton
057d0fb7e0 Rewrite query to use shared StringPrefixes library 2021-10-19 14:45:38 +01:00
Tamás Vajk
12d7f0c9e2 Merge pull request #6913 from tamasvajk/feature/improve-stubbing
C#: Remove cartesian product in stubbing (GeneratedType::getStub)
2021-10-19 15:13:26 +02:00
Geoffrey White
e487832823 C++: Clean up QL. 2021-10-19 14:10:30 +01:00
Chris Smowton
8a4fa0a7e2 Copyedit 2021-10-19 12:50:17 +01:00
haby0
9d9a7abd06 Fix 2021-10-19 12:50:03 +01:00
haby0
283376eb19 Modify the model 2021-10-19 12:49:08 +01:00
haby0
679652e63a Modify Sanitizer 2021-10-19 12:49:08 +01:00
haby0
952b34a163 Eliminate FP 2021-10-19 12:49:08 +01:00
haby0
d0eec1e381 Add CWE-552-UnsafeUrlForward 2021-10-19 12:49:07 +01:00
Tamas Vajk
70ffbae091 Introduce foldable region in CSV coverage PR comments 2021-10-19 13:34:25 +02:00
Anders Schack-Mulligen
662852bd1d Merge pull request #6859 from smowton/smowton/admin/factor-string-prefix
Java: Factor out string prefix logic
2021-10-19 13:32:52 +02:00
Arthur Baars
db1be380ea Merge pull request #372 from github/aibaars/codeqlmanifest
Add reference to nested .codeqlmanifest.json
2021-10-19 13:25:30 +02:00
Arthur Baars
c604825fdd Add reference to nested .codeqlmanifest.json 2021-10-19 13:14:45 +02:00
Henry Mercer
548a344d34 JS: Implement suggestions from review
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2021-10-19 12:00:40 +01:00
Tamas Vajk
c7c35401e0 C#: Remove cartesian product in stubbing (GeneratedType::getStub) 2021-10-19 12:56:23 +02:00
Chris Smowton
d46b897492 Add explicit this 2021-10-19 11:32:24 +01:00
Chris Smowton
beaa1cffd2 Make import private 2021-10-19 11:28:56 +01:00
Chris Smowton
3bf9abb4ce Avoid ambiguous term 'successor'. 2021-10-19 11:28:56 +01:00
Chris Smowton
0d66cebfba Autoformat 2021-10-19 11:28:56 +01:00
Chris Smowton
3c25301593 Extend documentation 2021-10-19 11:28:55 +01:00
Chris Smowton
d0d17e3b84 Make import private 2021-10-19 11:28:55 +01:00
Chris Smowton
b71920209e Factor out string prefix logic 2021-10-19 11:28:54 +01:00
Anders Schack-Mulligen
b975e12f41 Merge pull request #6912 from aschackmull/java/minor-perf-fix
Java: Fix bad join-order.
2021-10-19 12:13:26 +02:00
Rasmus Wriedt Larsen
386c7e3a12 Python: Add missing pragma[noinline] 2021-10-19 11:55:51 +02:00
Rasmus Wriedt Larsen
b0af805460 Merge pull request #6899 from thepurpleowl/patch-1
Python SignatureOverriddenMethod: Rmv duplicate condition
2021-10-19 11:24:01 +02:00
Anders Schack-Mulligen
90a50e7ca9 Java: Fix bad join-order. 2021-10-19 10:55:52 +02:00