Skip to content

Commit 16eedf9

Browse files
committed
Merge branch 'master' into python-objectapi-to-valueapi-wrongnumberargumentsincall
2 parents 01aac82 + e5d3286 commit 16eedf9

File tree

87 files changed

+1372
-615
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1372
-615
lines changed

change-notes/1.24/analysis-cpp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ The following changes in version 1.24 affect C/C++ analysis in all applications.
4646
`StackVariableReachability`. The functionality is the same.
4747
* The models library models `strlen` in more detail, and includes common variations such as `wcslen`.
4848
* The models library models `gets` and similar functions.
49+
* The models library now partially models `std::string`.
4950
* The taint tracking library (`semmle.code.cpp.dataflow.TaintTracking`) has had
5051
the following improvements:
5152
* The library now models data flow through `strdup` and similar functions.

change-notes/1.24/analysis-csharp.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ The following changes in version 1.24 affect C# analysis in all applications.
2222
| Dereferenced variable may be null (`cs/dereferenced-value-may-be-null`) | More results | Results are reported from parameters with a default value of `null`. |
2323
| Useless assignment to local variable (`cs/useless-assignment-to-local`) | Fewer false positive results | Results have been removed when the value assigned is an (implicitly or explicitly) cast default-like value. For example, `var s = (string)null` and `string s = default`. |
2424
| XPath injection (`cs/xml/xpath-injection`) | More results | The query now recognizes calls to methods on `System.Xml.XPath.XPathNavigator` objects. |
25+
| Information exposure through transmitted data (`cs/sensitive-data-transmission`) | More results | The query now recognizes writes to cookies and writes to ASP.NET (`Inner`)`Text` properties as additional sinks. |
26+
| Information exposure through an exception (`cs/information-exposure-through-exception`) | More results | The query now recognizes writes to cookies, writes to ASP.NET (`Inner`)`Text` properties, and email contents as additional sinks. |
2527

2628
## Removal of old queries
2729

@@ -42,5 +44,6 @@ The following changes in version 1.24 affect C# analysis in all applications.
4244
* [Code contracts](https://docs.microsoft.com/en-us/dotnet/framework/debug-trace-profile/code-contracts) are now recognized, and are treated like any other assertion methods.
4345
* Expression nullability flow state is given by the predicates `Expr.hasNotNullFlowState()` and `Expr.hasMaybeNullFlowState()`.
4446
* `stackalloc` array creations are now represented by the QL class `Stackalloc`. Previously they were represented by the class `ArrayCreation`.
47+
* A new class `RemoteFlowSink` has been added to model sinks where data might be exposed to external users. Examples include web page output, e-mails, and cookies.
4548

4649
## Changes to autobuilder

change-notes/1.24/analysis-javascript.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
| Useless regular-expression character escape (`js/useless-regexp-character-escape`) | Fewer false positive results | This query now distinguishes escapes in strings and regular expression literals. |
8787
| Identical operands (`js/redundant-operation`) | Fewer results | This query now recognizes cases where the operands change a value using ++/-- expressions. |
8888
| Superfluous trailing arguments (`js/superfluous-trailing-arguments`) | Fewer results | This query now recognizes cases where a function uses the `Function.arguments` value to process a variable number of parameters. |
89+
| Incomplete URL scheme check (`js/incomplete-url-scheme-check`) | More results | This query now recognizes more variations of URL scheme checks. |
8990

9091
## Changes to libraries
9192

config/identical-files.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,13 @@
242242
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/gvn/ValueNumbering.qll",
243243
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/gvn/ValueNumbering.qll"
244244
],
245+
"C++ IR PrintValueNumbering": [
246+
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/gvn/PrintValueNumbering.qll",
247+
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/gvn/PrintValueNumbering.qll",
248+
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/PrintValueNumbering.qll",
249+
"csharp/ql/src/semmle/code/csharp/ir/implementation/raw/gvn/PrintValueNumbering.qll",
250+
"csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/gvn/PrintValueNumbering.qll"
251+
],
245252
"C++ IR ConstantAnalysis": [
246253
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/constant/ConstantAnalysis.qll",
247254
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/constant/ConstantAnalysis.qll",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- description: Standard Code Scanning queries for C and C++
2+
- qlpack: codeql-cpp
3+
- apply: code-scanning-selectors.yml
4+
from: codeql-suite-helpers
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
private import internal.ValueNumberingImports
2+
private import ValueNumbering
3+
4+
/**
5+
* Provides additional information about value numbering in IR dumps.
6+
*/
7+
class ValueNumberPropertyProvider extends IRPropertyProvider {
8+
override string getInstructionProperty(Instruction instr, string key) {
9+
exists(ValueNumber vn |
10+
vn = valueNumber(instr) and
11+
key = "valnum" and
12+
if strictcount(vn.getAnInstruction()) > 1
13+
then result = vn.getDebugString()
14+
else result = "unique"
15+
)
16+
}
17+
}

cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/ValueNumbering.qll

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
private import internal.ValueNumberingInternal
22
private import internal.ValueNumberingImports
33

4-
/**
5-
* Provides additional information about value numbering in IR dumps.
6-
*/
7-
class ValueNumberPropertyProvider extends IRPropertyProvider {
8-
override string getInstructionProperty(Instruction instr, string key) {
9-
exists(ValueNumber vn |
10-
vn = valueNumber(instr) and
11-
key = "valnum" and
12-
if strictcount(vn.getAnInstruction()) > 1
13-
then result = vn.getDebugString()
14-
else result = "unique"
15-
)
16-
}
17-
}
18-
194
/**
205
* The value number assigned to a particular set of instructions that produce equivalent results.
216
*/
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
private import internal.ValueNumberingImports
2+
private import ValueNumbering
3+
4+
/**
5+
* Provides additional information about value numbering in IR dumps.
6+
*/
7+
class ValueNumberPropertyProvider extends IRPropertyProvider {
8+
override string getInstructionProperty(Instruction instr, string key) {
9+
exists(ValueNumber vn |
10+
vn = valueNumber(instr) and
11+
key = "valnum" and
12+
if strictcount(vn.getAnInstruction()) > 1
13+
then result = vn.getDebugString()
14+
else result = "unique"
15+
)
16+
}
17+
}

cpp/ql/src/semmle/code/cpp/ir/implementation/raw/gvn/ValueNumbering.qll

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
private import internal.ValueNumberingInternal
22
private import internal.ValueNumberingImports
33

4-
/**
5-
* Provides additional information about value numbering in IR dumps.
6-
*/
7-
class ValueNumberPropertyProvider extends IRPropertyProvider {
8-
override string getInstructionProperty(Instruction instr, string key) {
9-
exists(ValueNumber vn |
10-
vn = valueNumber(instr) and
11-
key = "valnum" and
12-
if strictcount(vn.getAnInstruction()) > 1
13-
then result = vn.getDebugString()
14-
else result = "unique"
15-
)
16-
}
17-
}
18-
194
/**
205
* The value number assigned to a particular set of instructions that produce equivalent results.
216
*/
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
private import internal.ValueNumberingImports
2+
private import ValueNumbering
3+
4+
/**
5+
* Provides additional information about value numbering in IR dumps.
6+
*/
7+
class ValueNumberPropertyProvider extends IRPropertyProvider {
8+
override string getInstructionProperty(Instruction instr, string key) {
9+
exists(ValueNumber vn |
10+
vn = valueNumber(instr) and
11+
key = "valnum" and
12+
if strictcount(vn.getAnInstruction()) > 1
13+
then result = vn.getDebugString()
14+
else result = "unique"
15+
)
16+
}
17+
}

0 commit comments

Comments
 (0)