Skip to content

Commit febbe12

Browse files
committed
Merge branch 'main' into python-more-complete-dataflow-tests
2 parents 9a821bf + 2ba84be commit febbe12

File tree

458 files changed

+11002
-1621
lines changed

Some content is hidden

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

458 files changed

+11002
-1621
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You can use the [interactive query console](https://lgtm.com/help/lgtm/using-que
99

1010
## Contributing
1111

12-
We welcome contributions to our standard library and standard checks. Do you have an idea for a new check, or how to improve an existing query? Then please go ahead and open a pull request! Before you do, though, please take the time to read our [contributing guidelines](CONTRIBUTING.md). You can also consult our [style guides](https://github.com/github/codeql/tree/master/docs) to learn how to format your code for consistency and clarity, how to write query metadata, and how to write query help documentation for your query.
12+
We welcome contributions to our standard library and standard checks. Do you have an idea for a new check, or how to improve an existing query? Then please go ahead and open a pull request! Before you do, though, please take the time to read our [contributing guidelines](CONTRIBUTING.md). You can also consult our [style guides](https://github.com/github/codeql/tree/main/docs) to learn how to format your code for consistency and clarity, how to write query metadata, and how to write query help documentation for your query.
1313

1414
## License
1515

change-notes/1.25/analysis-javascript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
- [yargs](https://www.npmjs.com/package/yargs)
3131
- [webpack-dev-server](https://www.npmjs.com/package/webpack-dev-server)
3232

33-
* TypeScript 3.9 is now supported.
33+
* TypeScript 4.0 is now supported.
3434

3535
* TypeScript code embedded in HTML and Vue files is now extracted and analyzed.
3636

change-notes/1.25/analysis-python.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ The following changes in version 1.25 affect Python analysis in all applications
2020
## Changes to libraries
2121

2222
* 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`).
23-
* Added support for tainted f-strings.

change-notes/1.26/analysis-csharp.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ The following changes in version 1.26 affect C# analysis in all applications.
1919
## Changes to code extraction
2020

2121
* Partial method bodies are extracted. Previously, partial method bodies were skipped completely.
22+
* Inferring the lengths of implicitely sized arrays is fixed. Previously, multidimensional arrays were always extracted with the same length for
23+
each dimension. With the fix, the array sizes `2` and `1` are extracted for `new int[,]{{1},{2}}`. Previously `2` and `2` were extracted.
2224

2325
## Changes to libraries
2426

change-notes/1.26/analysis-javascript.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
| **Query** | **Expected impact** | **Change** |
2828
|--------------------------------|------------------------------|---------------------------------------------------------------------------|
2929
| Incomplete URL substring sanitization (`js/incomplete-url-substring-sanitization`) | More results | This query now recognizes additional URLs when the substring check is an inclusion check. |
30+
| Ambiguous HTML id attribute (`js/duplicate-html-id`) | Results no longer shown | Precision tag reduced to "low". The query is no longer run by default. |
31+
| 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. |
3032

3133

3234
## Changes to libraries
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Improvements to Python analysis
2+
3+
The following changes in version 1.26 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+
22+
* Added taint tracking support for string formatting through f-strings.

config/identical-files.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,60 @@
325325
"csharp/ql/src/experimental/ir/implementation/raw/gvn/internal/ValueNumberingImports.qll",
326326
"csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingImports.qll"
327327
],
328+
"Inline Test Expectations": [
329+
"cpp/ql/test/TestUtilities/InlineExpectationsTest.qll",
330+
"python/ql/test/TestUtilities/InlineExpectationsTest.qll"
331+
],
328332
"XML": [
329333
"cpp/ql/src/semmle/code/cpp/XML.qll",
330334
"csharp/ql/src/semmle/code/csharp/XML.qll",
331335
"java/ql/src/semmle/code/xml/XML.qll",
332336
"javascript/ql/src/semmle/javascript/XML.qll",
333337
"python/ql/src/semmle/python/xml/XML.qll"
338+
],
339+
"DuplicationProblems.qhelp": [
340+
"cpp/ql/src/Metrics/Files/DuplicationProblems.qhelp",
341+
"csharp/ql/src/Metrics/Files/DuplicationProblems.qhelp",
342+
"javascript/ql/src/Metrics/DuplicationProblems.qhelp",
343+
"python/ql/src/Metrics/DuplicationProblems.qhelp"
344+
],
345+
"CommentedOutCodeQuery.qhelp": [
346+
"cpp/ql/src/Documentation/CommentedOutCodeQuery.qhelp",
347+
"python/ql/src/Lexical/CommentedOutCodeQuery.qhelp",
348+
"csharp/ql/src/Bad Practices/Comments/CommentedOutCodeQuery.qhelp",
349+
"java/ql/src/Violations of Best Practice/Comments/CommentedOutCodeQuery.qhelp",
350+
"javascript/ql/src/Comments/CommentedOutCodeQuery.qhelp"
351+
],
352+
"FLinesOfCodeReferences.qhelp": [
353+
"java/ql/src/Metrics/Files/FLinesOfCodeReferences.qhelp",
354+
"javascript/ql/src/Metrics/FLinesOfCodeReferences.qhelp"
355+
],
356+
"FCommentRatioCommon.qhelp": [
357+
"java/ql/src/Metrics/Files/FCommentRatioCommon.qhelp",
358+
"javascript/ql/src/Metrics/FCommentRatioCommon.qhelp"
359+
],
360+
"FLinesOfCodeOverview.qhelp": [
361+
"java/ql/src/Metrics/Files/FLinesOfCodeOverview.qhelp",
362+
"javascript/ql/src/Metrics/FLinesOfCodeOverview.qhelp"
363+
],
364+
"CommentedOutCodeMetricOverview.qhelp": [
365+
"cpp/ql/src/Metrics/Files/CommentedOutCodeMetricOverview.qhelp",
366+
"csharp/ql/src/Metrics/Files/CommentedOutCodeMetricOverview.qhelp",
367+
"java/ql/src/Metrics/Files/CommentedOutCodeMetricOverview.qhelp",
368+
"javascript/ql/src/Comments/CommentedOutCodeMetricOverview.qhelp",
369+
"python/ql/src/Lexical/CommentedOutCodeMetricOverview.qhelp"
370+
],
371+
"FLinesOfDuplicatedCodeCommon.qhelp": [
372+
"cpp/ql/src/Metrics/Files/FLinesOfDuplicatedCodeCommon.qhelp",
373+
"java/ql/src/Metrics/Files/FLinesOfDuplicatedCodeCommon.qhelp",
374+
"javascript/ql/src/Metrics/FLinesOfDuplicatedCodeCommon.qhelp",
375+
"python/ql/src/Metrics/FLinesOfDuplicatedCodeCommon.qhelp"
376+
],
377+
"CommentedOutCodeReferences.qhelp": [
378+
"cpp/ql/src/Metrics/Files/CommentedOutCodeReferences.qhelp",
379+
"csharp/ql/src/Metrics/Files/CommentedOutCodeReferences.qhelp",
380+
"java/ql/src/Metrics/Files/CommentedOutCodeReferences.qhelp",
381+
"javascript/ql/src/Comments/CommentedOutCodeReferences.qhelp",
382+
"python/ql/src/Lexical/CommentedOutCodeReferences.qhelp"
334383
]
335384
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE qhelp PUBLIC
2+
"-//Semmle//qhelp//EN"
3+
"qhelp.dtd">
4+
<qhelp>
5+
<fragment>
6+
<warning>
7+
This check is an approximation, so some results may not be actual defects in the program.
8+
It is not possible in general to compute the exact value of the variable without running the program with all possible input data.
9+
</warning>
10+
</fragment>
11+
</qhelp>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE qhelp PUBLIC
2+
"-//Semmle//qhelp//EN"
3+
"qhelp.dtd">
4+
<qhelp>
5+
<fragment>
6+
<warning>
7+
This check is an approximation, so some results may not be actual defects in the program.
8+
It is not possible in general to compute which function is actually called in a virtual call,
9+
or a call through a pointer, without running the program with all possible input data.
10+
</warning>
11+
</fragment>
12+
</qhelp>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE qhelp PUBLIC
2+
"-//Semmle//qhelp//EN"
3+
"qhelp.dtd">
4+
<qhelp>
5+
<fragment>
6+
<warning>
7+
This check is an approximation, so some results may not be actual defects in the program.
8+
It is not possible in general to compute the actual branch taken in conditional statements such
9+
as "if" without running the program with all possible input data. This means that it is not possible
10+
to determine if a particular statement is going to be executed.
11+
</warning>
12+
</fragment>
13+
</qhelp>

0 commit comments

Comments
 (0)