Skip to content

Commit 804aef9

Browse files
committed
Merge remote-tracking branch 'codeql/main' into 'main'
Conflicts: config/identical-files.json
2 parents 0e7b1f5 + b2e4276 commit 804aef9

File tree

1,184 files changed

+51275
-13549
lines changed

Some content is hidden

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

1,184 files changed

+51275
-13549
lines changed

.github/workflows/csv-coverage-pr-artifacts.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- '.github/workflows/csv-coverage-pr-comment.yml'
77
- '*/ql/src/**/*.ql'
88
- '*/ql/src/**/*.qll'
9+
- '*/ql/lib/**/*.ql'
10+
- '*/ql/lib/**/*.qll'
911
- 'misc/scripts/library-coverage/*.py'
1012
# input data files
1113
- '*/documentation/library-coverage/cwe-sink.csv'

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@
2424
/codeql/
2525

2626
csharp/extractor/Semmle.Extraction.CSharp.Driver/Properties/launchSettings.json
27+
28+
# Avoid committing cached package components
29+
.codeql

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ This open source repository contains the standard CodeQL libraries and queries t
44

55
## How do I learn CodeQL and run queries?
66

7-
There is [extensive documentation](https://help.semmle.com/QL/learn-ql/) on getting started with writing CodeQL.
8-
You can use the [interactive query console](https://lgtm.com/help/lgtm/using-query-console) on LGTM.com or the [CodeQL for Visual Studio Code](https://help.semmle.com/codeql/codeql-for-vscode.html) extension to try out your queries on any open source project that's currently being analyzed.
7+
There is [extensive documentation](https://codeql.github.com/docs/) on getting started with writing CodeQL.
8+
You can use the [interactive query console](https://lgtm.com/help/lgtm/using-query-console) on LGTM.com or the [CodeQL for Visual Studio Code](https://codeql.github.com/docs/codeql-for-visual-studio-code/) extension to try out your queries on any open source project that's currently being analyzed.
99

1010
## Contributing
1111

config/identical-files.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@
373373
],
374374
"Inline Test Expectations": [
375375
"cpp/ql/test/TestUtilities/InlineExpectationsTest.qll",
376+
"csharp/ql/test/TestUtilities/InlineExpectationsTest.qll",
376377
"java/ql/test/TestUtilities/InlineExpectationsTest.qll",
377378
"python/ql/test/TestUtilities/InlineExpectationsTest.qll",
378379
"ruby/ql/test/TestUtilities/InlineExpectationsTest.qll"
@@ -478,5 +479,13 @@
478479
"TypeTracker": [
479480
"python/ql/lib/semmle/python/dataflow/new/internal/TypeTracker.qll",
480481
"ruby/ql/lib/codeql/ruby/typetracking/TypeTracker.qll"
482+
],
483+
"CodeQL Tutorial": [
484+
"cpp/ql/lib/tutorial.qll",
485+
"csharp/ql/lib/tutorial.qll",
486+
"java/ql/lib/tutorial.qll",
487+
"javascript/ql/lib/tutorial.qll",
488+
"python/ql/lib/tutorial.qll",
489+
"ruby/ql/lib/tutorial.qll"
481490
]
482491
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
lgtm,codescanning
2+
* A new query (`cpp/cleartext-transmission`) has been added. This is similar to the `cpp/cleartext-storage-file`, `cpp/cleartext-storage-buffer` and `cpp/cleartext-storage-database` queries but looks for cases where sensitive information is most likely transmitted over a network.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
lgtm,codescanning
2+
* The "Uncontrolled data used in OS command" (`cpp/command-line-injection`) query has been enhanced to reduce false positive results and its `@precision` increased to `high`
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
lgtm,codescanning
2+
* Increase precision to high for the "Static buffer overflow" query
3+
(`cpp/static-buffer-overflow`). This means the query is run and displayed by default on Code Scanning and LGTM.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
lgtm,codescanning
2+
* Several improvements made to the `NullTermination.qll` library and the 'Potential improper null termination' (cpp/improper-null-termination). These changes reduce the number of false positive results for this query and related query 'User-controlled data may not be null terminated' (cpp/user-controlled-null-termination-tainted).
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
codescanning
2+
* Problems with extraction that in most cases won't break the analysis in a significant way are now reported as warnings rather than errors.
3+
* The failed extractor invocations query now has severity `error`.

cpp/ql/lib/semmle/code/cpp/Declaration.qll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,8 @@ class Declaration extends Locatable, @declaration {
275275
* `getTemplateArgumentKind(0)`.
276276
*/
277277
final Locatable getTemplateArgumentKind(int index) {
278-
if exists(getTemplateArgumentValue(index))
279-
then result = getTemplateArgumentType(index)
280-
else none()
278+
exists(getTemplateArgumentValue(index)) and
279+
result = getTemplateArgumentType(index)
281280
}
282281

283282
/** Gets the number of template arguments for this declaration. */

0 commit comments

Comments
 (0)