Skip to content

Commit f7f82ff

Browse files
committed
Merge branch 'main' into CVE760-reexport
2 parents 7d8bb33 + bc1d3de commit f7f82ff

File tree

657 files changed

+29763
-7297
lines changed

Some content is hidden

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

657 files changed

+29763
-7297
lines changed

.github/codeql/codeql-config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ paths-ignore:
77
- '/cpp/'
88
- '/java/'
99
- '/python/'
10+
- '/javascript/ql/test'
11+
- '/javascript/extractor/tests'

.vscode/extensions.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
44
// List of extensions which should be recommended for users of this workspace.
55
"recommendations": [
6-
"github.vscode-codeql"
6+
"GitHub.vscode-codeql"
77
],
88
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
99
"unwantedRecommendations": []
10-
}
10+
}

change-notes/1.25/analysis-java.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,26 @@ The following changes in version 1.25 affect Java analysis in all applications.
44

55
## General improvements
66

7-
## New queries
8-
9-
| **Query** | **Tags** | **Purpose** |
10-
|-----------------------------|-----------|--------------------------------------------------------------------|
11-
7+
The Java autobuilder has been improved to detect more Gradle Java versions.
128

139
## Changes to existing queries
1410

1511
| **Query** | **Expected impact** | **Change** |
1612
|------------------------------|------------------------|-----------------------------------|
17-
13+
| Hard-coded credential in API call (`java/hardcoded-credential-api-call`) | More results | The query now recognizes the `BasicAWSCredentials` class of the Amazon client SDK library with hardcoded access key/secret key. |
14+
| Deserialization of user-controlled data (`java/unsafe-deserialization`) | Fewer false positive results | The query no longer reports results using `org.apache.commons.io.serialization.ValidatingObjectInputStream`. |
15+
| Use of a broken or risky cryptographic algorithm (`java/weak-cryptographic-algorithm`) | More results | The query now recognizes the `MessageDigest.getInstance` method. |
16+
| Use of a potentially broken or risky cryptographic algorithm (`java/potentially-weak-cryptographic-algorithm`) | More results | The query now recognizes the `MessageDigest.getInstance` method. |
17+
| Reading from a world writable file (`java/world-writable-file-read`) | More results | The query now recognizes more JDK file operations. |
1818

1919
## Changes to libraries
2020

21+
* The data-flow library has been improved with more taint flow modeling for the
22+
Collections framework and other classes of the JDK. This affects all security
23+
queries using data flow and can yield additional results.
24+
* The data-flow library has been improved with more taint flow modeling for the
25+
Spring framework. This affects all security queries using data flow and can
26+
yield additional results on project that rely on the Spring framework.
2127
* The data-flow library has been improved, which affects most security queries by potentially
2228
adding more results. Flow through methods now takes nested field reads/writes into account.
2329
For example, the library is able to track flow from `"taint"` to `sink()` via the method
@@ -39,3 +45,5 @@ The following changes in version 1.25 affect Java analysis in all applications.
3945
}
4046
}
4147
```
48+
* The library has been extended with more support for Java 14 features
49+
(`switch` expressions and pattern-matching for `instanceof`).
Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,9 @@
11
# Improvements to Python analysis
22

3-
The following changes in version 1.25 affect Python analysis in all applications.
4-
5-
## General improvements
6-
7-
8-
## New queries
9-
10-
| **Query** | **Tags** | **Purpose** |
11-
|-----------------------------|-----------|--------------------------------------------------------------------|
12-
13-
14-
## Changes to existing queries
15-
16-
| **Query** | **Expected impact** | **Change** |
17-
|----------------------------|------------------------|------------------------------------------------------------------|
18-
19-
20-
## Changes to libraries
21-
223
* Importing `semmle.python.web.HttpRequest` will no longer import `UntrustedStringKind` transitively. `UntrustedStringKind` is the most commonly used non-abstract subclass of `ExternalStringKind`. If not imported (by one mean or another), taint-tracking queries that concern `ExternalStringKind` will not produce any results. Please ensure such queries contain an explicit import (`import semmle.python.security.strings.Untrusted`).
4+
* Added model of taint sources for HTTP servers using `http.server`.
5+
* Added taint modeling of routed parameters in Flask.
6+
* Improved modeling of built-in methods on strings for taint tracking.
7+
* Improved classification of test files.
8+
* New class `BoundMethodValue` represents a bound method during runtime.
9+
* The query `py/command-line-injection` now recognizes command execution with the `fabric` and `invoke` Python libraries.

change-notes/1.26/analysis-cpp.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ The following changes in version 1.26 affect C/C++ analysis in all applications.
2323
* The QL class `Block`, denoting the `{ ... }` statement, is renamed to `BlockStmt`.
2424
* The models library now models many taint flows through `std::array`, `std::vector`, `std::deque`, `std::list` and `std::forward_list`.
2525
* The models library now models many more taint flows through `std::string`.
26-
* The models library now models some taint flows through `std::ostream`.
26+
* The models library now models many taint flows through `std::istream` and `std::ostream`.
2727
* The models library now models some taint flows through `std::shared_ptr`, `std::unique_ptr`, `std::make_shared` and `std::make_unique`.
28+
* The models library now models some taint flows through `std::pair`, `std::map` and `std::unordered_map`.
2829
* The `SimpleRangeAnalysis` library now supports multiplications of the form
2930
`e1 * e2` and `x *= e2` when `e1` and `e2` are unsigned or constant.

change-notes/1.26/analysis-csharp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The following changes in version 1.26 affect C# analysis in all applications.
1212

1313
| **Query** | **Expected impact** | **Change** |
1414
|------------------------------|------------------------|-----------------------------------|
15-
15+
| Weak encryption: Insufficient key size (`cs/insufficient-key-size`) | More results | The required key size has been increased from 1024 to 2048. |
1616

1717
## Removal of old queries
1818

change-notes/1.26/analysis-javascript.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,25 @@
33
## General improvements
44

55
* Support for the following frameworks and libraries has been improved:
6+
- [bluebird](https://www.npmjs.com/package/bluebird)
7+
- [express](https://www.npmjs.com/package/express)
68
- [fast-json-stable-stringify](https://www.npmjs.com/package/fast-json-stable-stringify)
79
- [fast-safe-stringify](https://www.npmjs.com/package/fast-safe-stringify)
10+
- [http](https://nodejs.org/api/http.html)
811
- [javascript-stringify](https://www.npmjs.com/package/javascript-stringify)
912
- [js-stringify](https://www.npmjs.com/package/js-stringify)
1013
- [json-stable-stringify](https://www.npmjs.com/package/json-stable-stringify)
1114
- [json-stringify-safe](https://www.npmjs.com/package/json-stringify-safe)
1215
- [json3](https://www.npmjs.com/package/json3)
16+
- [lodash](https://www.npmjs.com/package/lodash)
17+
- [needle](https://www.npmjs.com/package/needle)
1318
- [object-inspect](https://www.npmjs.com/package/object-inspect)
1419
- [pretty-format](https://www.npmjs.com/package/pretty-format)
1520
- [stringify-object](https://www.npmjs.com/package/stringify-object)
21+
- [underscore](https://www.npmjs.com/package/underscore)
1622

1723
* Analyzing files with the ".cjs" extension is now supported.
24+
* ES2021 features are now supported.
1825

1926
## New queries
2027

@@ -32,6 +39,8 @@
3239
| Unused loop iteration variable (`js/unused-loop-variable`) | Fewer results | This query no longer flags variables in a destructuring array assignment that are not the last variable in the destructed array. |
3340
| Unsafe shell command constructed from library input (`js/shell-command-constructed-from-input`) | More results | This query now recognizes more commands where colon, dash, and underscore are used. |
3441
| Unsafe jQuery plugin (`js/unsafe-jquery-plugin`) | More results | This query now detects more unsafe uses of nested option properties. |
42+
| Client-side URL redirect (`js/client-side-unvalidated-url-redirection`) | More results | This query now recognizes some unsafe uses of `importScripts()` inside WebWorkers. |
43+
| Missing CSRF middleware (`js/missing-token-validation`) | More results | This query now recognizes writes to cookie and session variables as potentially vulnerable to CSRF attacks. |
3544

3645

3746
## Changes to libraries

config/identical-files.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@
5050
"csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImplConsistency.qll",
5151
"python/ql/src/experimental/dataflow/internal/DataFlowImplConsistency.qll"
5252
],
53+
"SsaReadPosition Java/C#": [
54+
"java/ql/src/semmle/code/java/dataflow/internal/rangeanalysis/SsaReadPositionCommon.qll",
55+
"csharp/ql/src/semmle/code/csharp/dataflow/internal/rangeanalysis/SsaReadPositionCommon.qll"
56+
],
57+
"Sign Java/C#": [
58+
"java/ql/src/semmle/code/java/dataflow/internal/rangeanalysis/Sign.qll",
59+
"csharp/ql/src/semmle/code/csharp/dataflow/internal/rangeanalysis/Sign.qll"
60+
],
61+
"SignAnalysis Java/C#": [
62+
"java/ql/src/semmle/code/java/dataflow/internal/rangeanalysis/SignAnalysisCommon.qll",
63+
"csharp/ql/src/semmle/code/csharp/dataflow/internal/rangeanalysis/SignAnalysisCommon.qll"
64+
],
5365
"C++ SubBasicBlocks": [
5466
"cpp/ql/src/semmle/code/cpp/controlflow/SubBasicBlocks.qll",
5567
"cpp/ql/src/semmle/code/cpp/dataflow/internal/SubBasicBlocks.qll"
@@ -87,7 +99,7 @@
8799
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/Operand.qll",
88100
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/Operand.qll",
89101
"csharp/ql/src/experimental/ir/implementation/raw/Operand.qll",
90-
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/Operand.qll"
102+
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/Operand.qll"
91103
],
92104
"IR IRType": [
93105
"cpp/ql/src/semmle/code/cpp/ir/implementation/IRType.qll",
@@ -109,11 +121,11 @@
109121
"cpp/ql/src/semmle/code/cpp/ir/implementation/internal/OperandTag.qll",
110122
"csharp/ql/src/experimental/ir/implementation/internal/OperandTag.qll"
111123
],
112-
"IR TInstruction":[
124+
"IR TInstruction": [
113125
"cpp/ql/src/semmle/code/cpp/ir/implementation/internal/TInstruction.qll",
114126
"csharp/ql/src/experimental/ir/implementation/internal/TInstruction.qll"
115127
],
116-
"IR TIRVariable":[
128+
"IR TIRVariable": [
117129
"cpp/ql/src/semmle/code/cpp/ir/implementation/internal/TIRVariable.qll",
118130
"csharp/ql/src/experimental/ir/implementation/internal/TIRVariable.qll"
119131
],
@@ -381,4 +393,4 @@
381393
"javascript/ql/src/Comments/CommentedOutCodeReferences.qhelp",
382394
"python/ql/src/Lexical/CommentedOutCodeReferences.qhelp"
383395
]
384-
}
396+
}

cpp/ql/src/Metrics/Dependencies/ExternalDependencies.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @deprecated
23
* @name External dependencies
34
* @description Count the number of dependencies a C/C++ source file has on external libraries.
45
* @kind treemap

cpp/ql/src/Metrics/Dependencies/ExternalDependenciesSourceLinks.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @deprecated
23
* @name External dependency source links
34
* @kind source-link
45
* @metricType externalDependency

0 commit comments

Comments
 (0)