Compare commits

...

519 Commits

Author SHA1 Message Date
Paolo Tranquilli
6a95251206 Merge pull request #21793 from github/release-prep/2.25.4
Release preparation for version 2.25.4
2026-05-05 11:39:13 +02:00
github-actions[bot]
88e1d86c27 Release preparation for version 2.25.4 2026-05-05 09:34:30 +00:00
Tom Hvitved
4c1461ad5b Merge pull request #21786 from hvitved/inline-test-ignore-tags
Inline test expectations: Rename `tagIsOptional` to `tagIsIgnored`
2026-05-05 09:01:58 +02:00
Anders Schack-Mulligen
b67ebd11e0 Merge pull request #21762 from aschackmull/csharp/ssa2
C#: Replace SSA classes with shared code.
2026-05-04 14:21:01 +02:00
Anders Schack-Mulligen
02f5fe9a42 C#: Address some review comments. 2026-05-04 11:49:24 +02:00
Tom Hvitved
04a8ef0f81 Merge pull request #21777 from hvitved/swift/type-inference-tests
Swift: Add type inference tests
2026-05-04 11:45:32 +02:00
Anders Schack-Mulligen
f663eccf66 Merge pull request #21781 from aschackmull/java/rm-deprecated
Java: Delete old deprecated code.
2026-05-04 11:35:09 +02:00
Tom Hvitved
80ccdcc696 Inline test expectations: Rename tagIsOptional to tagIsIgnored 2026-05-04 11:21:33 +02:00
Tom Hvitved
224934645e Swift: Add type inference tests for key path expressions 2026-05-04 11:00:38 +02:00
Tom Hvitved
038f9a2c2f Swift: Split type inference tests into multiple files 2026-05-04 10:55:06 +02:00
Anders Schack-Mulligen
c7904b12c8 Java: Fix reference in deprecated code. 2026-05-04 10:52:27 +02:00
Anders Schack-Mulligen
17fded4aa5 Java: Delete old deprecated code. 2026-05-04 10:52:27 +02:00
Paolo Tranquilli
77cdafd55e Merge pull request #21785 from github/codeql-spark-run-25308467256
Update changelog documentation site for codeql-cli-2.25.3
2026-05-04 10:42:33 +02:00
Paolo Tranquilli
1c20e78593 Docs: replace build mode: none with build-mode: none 2026-05-04 10:26:50 +02:00
github-actions[bot]
5546025f12 update codeql documentation 2026-05-04 08:19:28 +00:00
Tom Hvitved
1f3a8319ed Update csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-05-04 09:41:00 +02:00
Anders Schack-Mulligen
21a0d1444f C#: Add change note. 2026-05-01 13:13:40 +02:00
Anders Schack-Mulligen
e012981e5b C#: Accept test changes for out/ref SSA location changes. 2026-05-01 10:32:18 +02:00
Anders Schack-Mulligen
351e9cc914 C#: Accept test changes. 2026-05-01 10:28:15 +02:00
Anders Schack-Mulligen
439a67a3fe C#: Fix toString for capture definitions. 2026-05-01 10:26:50 +02:00
Anders Schack-Mulligen
5fbba0e9fe C#: Delete ParameterDefaultDefinition. 2026-05-01 10:24:23 +02:00
Anders Schack-Mulligen
d3df5ce110 C#: Deprecate ParameterDefinition in favour of SsaParameterInit. 2026-05-01 10:22:53 +02:00
Mathias Vorreiter Pedersen
154d213fd2 Merge pull request #21768 from github/speed-up-unchecked-leap-year-after-modification
C++: Speed up `cpp/leap-year/unchecked-after-arithmetic-year-modification`
2026-04-30 16:06:17 +01:00
Michael Nebel
4446f42846 Merge pull request #21684 from michaelnebel/csharp/improve-reachability-checks
C#: Improve BMN feed checking & handling.
2026-04-30 15:53:52 +02:00
Owen Mansel-Chan
87c35e6401 Merge pull request #21654 from MarkLee131/fix/sensitive-log-hash-sanitizer
Java: treat hash/encrypt/digest methods as sensitive-log sanitizers
2026-04-30 13:21:03 +01:00
Anders Schack-Mulligen
ff8ab191d1 C#: Drop caching for deprecated predicates. 2026-04-30 13:58:55 +02:00
Anders Schack-Mulligen
77807c83f8 C#: Exclude entry definitions from qualifier definitions. 2026-04-30 13:56:21 +02:00
Anders Schack-Mulligen
e0421dbf53 C#: Reinstate toString for SSA data flow nodes. 2026-04-30 13:56:16 +02:00
Anders Schack-Mulligen
bedadc9f04 C#: Deprecate some SSA internals. 2026-04-30 13:54:21 +02:00
Anders Schack-Mulligen
55b83ca22a C#: Deprecate Ssa::Definition in favour of SsaDefinition. 2026-04-30 13:54:20 +02:00
Anders Schack-Mulligen
de96b5acfd C#: Deprecate Ssa::ImplicitDefinition. 2026-04-30 13:54:20 +02:00
Anders Schack-Mulligen
80d5e27b46 C#: Deprecate Ssa::ImplicitEntryDefinition. 2026-04-30 13:54:15 +02:00
Anders Schack-Mulligen
65f647a8c0 C#: Replace Ssa::UncertainDefinition with SsaUncertainWrite. 2026-04-30 13:49:23 +02:00
Anders Schack-Mulligen
9a7eb8dfb9 C#: Replace Ssa::PhiNode with SsaPhiDefinition. 2026-04-30 13:49:23 +02:00
Anders Schack-Mulligen
6ecdf3fe32 C#: Replace Ssa::ImplicitParameterDefinition with SsaParameterInit. 2026-04-30 13:49:19 +02:00
Tom Hvitved
4042bbec5b Swift: Add type inference tests 2026-04-30 13:45:57 +02:00
Anders Schack-Mulligen
31e06bc0a9 C#: Remove SSA location overrides. 2026-04-30 12:56:58 +02:00
Anders Schack-Mulligen
dc34b10cb6 C#: Replace Ssa::ExplicitDefinition with SsaExplicitWrite. 2026-04-30 12:52:51 +02:00
Anders Schack-Mulligen
a6c7f27fc1 C#: Deprecate Definition.getEnclosingCallable. 2026-04-30 12:46:28 +02:00
Anders Schack-Mulligen
ed6cdfc227 C#: Move isLiveOutRefParameterDefinition to top-level. 2026-04-30 12:46:27 +02:00
Anders Schack-Mulligen
9345c44e0f C#: Delete test for Definition.getElement. 2026-04-30 12:46:23 +02:00
Anders Schack-Mulligen
c88a22ccf8 C#: Replace most uses of Ssa::Definition with SsaDefinition. 2026-04-30 12:45:25 +02:00
Anders Schack-Mulligen
2545f06b52 C#: Deprecate member predicate Definition.getAReadAtNode. 2026-04-30 12:42:24 +02:00
Anders Schack-Mulligen
83c7a33e53 C#: Deprecate member predicates Definition.getAFirstRead and getAFirstReadAtNode. 2026-04-30 12:42:21 +02:00
Anders Schack-Mulligen
fb438bf512 C#: Remove references to getAFirstReadAtNode. 2026-04-30 11:55:55 +02:00
Anders Schack-Mulligen
e5d219a039 C#: Simplify library instantiations. 2026-04-30 11:50:59 +02:00
Anders Schack-Mulligen
72d21a9a56 C#: Instantiate shared SSA wrappers. 2026-04-30 11:48:27 +02:00
Anders Schack-Mulligen
7ef9e1b939 C#: Rename SsaImpl input. 2026-04-30 11:46:20 +02:00
Tom Hvitved
a473fdb709 Merge pull request #21759 from hvitved/csharp/cfg-params
C#: Include parameters and their defaults in the CFG
2026-04-30 11:31:06 +02:00
Owen Mansel-Chan
fed42d655f Merge pull request #21656 from MarkLee131/fix/trust-boundary-regexp-barrier
Java: add RegexpCheckBarrier to trust-boundary-violation sanitizers
2026-04-29 14:59:01 +01:00
Michael Nebel
03d70b9f94 C#: Add another nuget.config integration test. 2026-04-29 15:47:32 +02:00
Michael Nebel
e29770c2b5 C#: Fix missing slash in comments. 2026-04-29 15:27:47 +02:00
MarkLee131
28a6ff208c Merge remote-tracking branch 'origin/main' into fix/sensitive-log-hash-sanitizer
# Conflicts:
#	java/ql/test/query-tests/security/CWE-532/SensitiveLogInfo.expected
#	java/ql/test/query-tests/security/CWE-532/Test.java
2026-04-29 20:59:59 +08:00
Tom Hvitved
e14b654e8a Update shared/controlflow/codeql/controlflow/ControlFlowGraph.qll
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2026-04-29 14:57:35 +02:00
MarkLee131
51e2a5418b Java: move EncryptedSensitiveMethodCall into Sanitizers.qll
Address review feedback by moving the shared method-name-based encryption/hash/digest
check into Sanitizers.qll, and reference it from both CleartextStorageQuery.qll and
SensitiveLoggingQuery.qll instead of duplicating the definition.
2026-04-29 20:56:36 +08:00
MarkLee131
75162bb9eb Update java/ql/test/query-tests/security/CWE-532/Test.java
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2026-04-29 20:53:58 +08:00
MarkLee131
49d014cbac Merge branch 'main' into fix/trust-boundary-regexp-barrier 2026-04-29 20:48:22 +08:00
MarkLee131
d27ee86242 Java: refactor trust-boundary sanitizers into TrustBoundaryValidationSanitizer subclasses
Address review feedback by introducing dedicated subclasses of
TrustBoundaryValidationSanitizer for SimpleTypeSanitizer, RegexpCheckBarrier,
and the HttpServletSession type check, so isBarrier only references the
abstract class.
2026-04-29 20:46:11 +08:00
Jack Nørskov Jørgensen
0192ffab07 Merge pull request #21751 from github/jacknojo/move_java_generated_mads
Move generated MaDs into modelgenerator/
2026-04-29 14:33:58 +02:00
Tom Hvitved
99b5cecb18 Java: Adapt to changes in shared CFG library 2026-04-29 14:03:06 +02:00
Tom Hvitved
99023f8b59 C#: Add upgrade/downgrade scripts 2026-04-29 14:03:05 +02:00
Tom Hvitved
b6c464281b C#: Move internal logic into internal/ControlFlowGraph.qll 2026-04-29 14:01:14 +02:00
Tom Hvitved
d4a32476da C#: No need to special-case default arguments in nullness analysis 2026-04-29 14:01:13 +02:00
Tom Hvitved
6c42418faf C#: Use parameter CFG nodes in SSA 2026-04-29 14:01:11 +02:00
Tom Hvitved
cbe207ab65 C#: Include parameters and their defaults in the CFG 2026-04-29 14:01:09 +02:00
Tom Hvitved
d792e11b7f C#: Add tests for methods with default parameters 2026-04-29 14:01:08 +02:00
Tom Hvitved
77639817fe C#: Remove unintended CP 2026-04-29 14:01:06 +02:00
Josef Svenningsson
68be006a29 Merge pull request #21641 from github/josefs/promptInjectionImprovements
Improve prompt inject for Python
2026-04-29 11:23:52 +01:00
Mathias Vorreiter Pedersen
96d6ee61ff Update cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2026-04-29 10:55:02 +01:00
Michael Nebel
bfd3683b0b Merge pull request #21372 from michaelnebel/csharp14/usercompoundassignment
C# 14: User defined compound assignment operators.
2026-04-29 11:22:35 +02:00
Asger F
c95083b176 Merge pull request #21697 from yearn/js/vercel-node-framework
JS: Add support for @vercel/node serverless functions
2026-04-29 10:58:53 +02:00
Mathias Vorreiter Pedersen
dfd85c321c C++: Compute 'IgnorableOperationToOperationSourceCandidateConfig' after an initial round of the query to reduce the number of sinks. 2026-04-28 22:02:32 +01:00
Jeroen Ketema
c2beef1900 Merge pull request #21765 from jketema/switch
C++: Fix join-order problem in `getNextSwitchCase`
2026-04-28 21:57:10 +02:00
Josef Svenningsson
25a8aa97b2 Fix openai prompt injection tests 2026-04-28 18:24:26 +01:00
Josef Svenningsson
691aeb0815 Remove the chat completion create logic. 2026-04-28 18:24:24 +01:00
Josef Svenningsson
a05e191518 Add tests for anthropic prompt injection models 2026-04-28 18:24:22 +01:00
Josef Svenningsson
e069c9c2ee Fix tests 2026-04-28 18:24:19 +01:00
Josef Svenningsson
bb18bb084c Improve prompt inject for Python 2026-04-28 18:24:16 +01:00
murderteeth
6f774470b3 Merge branch 'main' into js/vercel-node-framework 2026-04-28 12:30:27 -04:00
murderteeth
18b06f1cf4 Model res.json and res.jsonp as Vercel response sinks
Vercel API handlers more often return JSON than HTML, so res.send is
not the only response body sink that matters. Mirror Express's
ResponseJsonCall by also matching res.json(...) and res.jsonp(...) on
the response (direct and chained), and exercise the new behavior in
the library-test fixture.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 16:14:53 +00:00
murderteeth
1b87140ce7 Regenerate DatabaseAccesses.expected for new vercel.ts fixture
The CWE-089/untyped/vercel.ts fixture added in this PR introduces a
conn.query(...) call that DatabaseAccesses.ql reports, so its
.expected baseline needs the corresponding entry. Output produced by
`codeql test accept`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 15:57:06 +00:00
Jeroen Ketema
29dd56f83f C++: Make formatting of switch statement examples more uniform 2026-04-28 16:36:54 +02:00
Jeroen Ketema
0bc23c3af1 C++: Match example with text 2026-04-28 16:33:17 +02:00
Jeroen Ketema
f634b328ee C++: Fix join-order problem in getNextSwitchCase
Before on `neovim`:
```
[2026-04-28 14:54:20] Evaluated non-recursive predicate Stmt::SwitchCase.getNextSwitchCase/0#dispred#2d3cb6d3@ac8178o2 in 68ms (size: 20848).
Evaluated relational algebra for predicate Stmt::SwitchCase.getNextSwitchCase/0#dispred#2d3cb6d3@ac8178o2 with tuple counts:
           21888  ~0%    {2} r1 = SCAN switch_case OUTPUT In.2, In.0
           21888  ~0%    {4}    | JOIN WITH #switch_caseMerge_21#join_rhs ON FIRST 1 OUTPUT Lhs.1, Lhs.0, _, Rhs.1
           21888  ~4%    {3}    | REWRITE WITH Tmp.2 := 1, Out.2 := (In.3 - Tmp.2) KEEPING 3
        24091916  ~0%    {3}    | JOIN WITH switch_case ON FIRST 1 OUTPUT Lhs.2, Rhs.2, Lhs.1
           20848  ~2%    {2}    | JOIN WITH #switch_caseMerge_12#join_rhs ON FIRST 2 OUTPUT Lhs.1, Lhs.2
                         return r1
```

After:
```
[2026-04-28 15:30:53] Evaluated non-recursive predicate Stmt::SwitchCase.getNextSwitchCase/0#dispred#2d3cb6d3@bf9801oj in 0ms (size: 20848).
Evaluated relational algebra for predicate Stmt::SwitchCase.getNextSwitchCase/0#dispred#2d3cb6d3@bf9801oj with tuple counts:
        21888  ~0%    {4} r1 = SCAN switch_case OUTPUT In.0, _, In.2, In.1
        21888  ~1%    {3}    | REWRITE WITH Tmp.1 := 1, Out.1 := (In.3 + Tmp.1) KEEPING 3
        20848  ~2%    {2}    | JOIN WITH switch_case ON FIRST 2 OUTPUT Lhs.2, Rhs.2
                      return r1
```
2026-04-28 15:44:53 +02:00
Jeroen Ketema
fa8c1d6226 C++: Add a getSwitchCase predicate to SwitchStmt 2026-04-28 15:44:12 +02:00
Mathias Vorreiter Pedersen
1ba9601257 Merge pull request #21764 from github/add-strsafe.h-models
C++: Add `Strsafe.h` models
2026-04-28 12:10:26 +01:00
Michael Nebel
67aa342fe5 C#: Update test expected output for integration tests. 2026-04-28 12:46:41 +02:00
Owen Mansel-Chan
b07d2fb7d7 Merge pull request #21740 from owen-mc/go/overlay-correctness
Go: improve accuracy of overlay annotations
2026-04-28 11:35:14 +01:00
Mathias Vorreiter Pedersen
c59d6cb2a7 C++: Accept query test change. 2026-04-28 11:35:08 +01:00
Mathias Vorreiter Pedersen
f28d5d2f59 C++: Add change note. 2026-04-28 10:57:04 +01:00
Mathias Vorreiter Pedersen
86d8e362a1 C++: Accept test changes. 2026-04-28 10:50:50 +01:00
Mathias Vorreiter Pedersen
2805f788ee C++: Add strsafe.h model. 2026-04-28 10:50:48 +01:00
Mathias Vorreiter Pedersen
e29efc7d2c C++: Add tests with missing flow. 2026-04-28 10:50:39 +01:00
Michael Nebel
615ae41e67 C#: Address review comments. 2026-04-28 11:47:13 +02:00
Michael Nebel
ae81f3a00f C#: Inherited feeds may not get properly computed if a nuget.config file contains a clear. This has been fixed. 2026-04-28 11:47:11 +02:00
Michael Nebel
ed857ad6e0 C#: Make the restore sources project/solution specific. 2026-04-28 11:47:09 +02:00
Michael Nebel
a6d1ccae8e C#: Update integration test expected output. 2026-04-28 11:47:07 +02:00
Michael Nebel
831b4d6ceb C#: Add NuGet package missing failures to the compilation info. 2026-04-28 11:47:05 +02:00
Michael Nebel
9bd4f65463 C#: Also apply feed exclusions to inherited feeds. 2026-04-28 11:47:03 +02:00
Michael Nebel
5ff4b43732 C#: Address review comment. 2026-04-28 11:47:01 +02:00
Michael Nebel
ca0c2746fc C#: Address Copilots review comments. 2026-04-28 11:46:59 +02:00
Michael Nebel
b7e3e6c5ca C#: Add change-note. 2026-04-28 11:46:56 +02:00
Michael Nebel
597f3fa727 C#: Update integration test expected output. 2026-04-28 11:46:54 +02:00
Michael Nebel
6f888f1544 C#: Change the All NuGet feed reachable telemetry. 2026-04-28 11:46:52 +02:00
Michael Nebel
8372a37f74 C#: Only include feeds that we can connect to. 2026-04-28 11:46:50 +02:00
Michael Nebel
c0a1dd0524 C#: Only use the default package source when using nuget.exe if it is reachable. 2026-04-28 11:46:47 +02:00
Michael Nebel
e6df1d8d8a C#: Handle special case when no feeds are reachable. 2026-04-28 11:46:45 +02:00
Michael Nebel
1ee6d631c6 C#: Rename ExtraArgs to NugetSources. 2026-04-28 11:46:43 +02:00
Michael Nebel
8369c926b1 C#: Simplify and improve the reachability check and improve the logging. 2026-04-28 11:46:40 +02:00
Michael Nebel
1dfe30deaf C#: For specific listed nuget feeds in a project, still allow their use unless there is a timeout when trying to reach them. 2026-04-28 11:46:38 +02:00
Michael Nebel
21fb44d0ba C#: Re-add the compilation information on reachable fallback NuGet feed count. 2026-04-28 11:46:36 +02:00
Michael Nebel
b95a8aa378 C#: Address review comments. 2026-04-28 11:46:34 +02:00
Michael Nebel
c53b2f589b C#: Remove redundant out parameter from CheckSpecifiedFeeds. 2026-04-28 11:46:32 +02:00
Michael Nebel
4dad62c481 C#: Make sure that the feeds that excluded for the feed check (based on an environment variable setting) are still used as sources. 2026-04-28 11:46:29 +02:00
Michael Nebel
365b419b5e C#: Add private registries to the set of explicit feeds. Always use specific sources for restoring if private registries are used of if nuget feed reachability check is performed. 2026-04-28 11:46:27 +02:00
Michael Nebel
132dc1fa26 C#: Turn checkNugetFeedResponsiveness into a field and remove some explicit this qualifiers. 2026-04-28 11:46:25 +02:00
Michael B. Gale
cce5f06086 Only use reachable feeds when private registries are configured 2026-04-28 11:46:22 +02:00
Michael B. Gale
17c45fcd75 Check reachability of inherited feeds 2026-04-28 11:46:20 +02:00
Michael B. Gale
9898e21ce7 Divide up CheckSpecifiedFeeds 2026-04-28 11:46:18 +02:00
Michael B. Gale
fdbaba896f Use explicitFeeds directly 2026-04-28 11:46:16 +02:00
Michael B. Gale
8215737db9 Inline CheckFeeds 2026-04-28 11:46:13 +02:00
Michael B. Gale
439e37a198 Use GetReachableNuGetFeeds in CheckSpecifiedFeeds 2026-04-28 11:46:11 +02:00
Michael B. Gale
d22381a943 Refactor GetReachableNuGetFeeds out of GetReachableFallbackNugetFeeds 2026-04-28 11:46:08 +02:00
Jeroen Ketema
2886127535 Merge pull request #21409 from jketema/jketema/softfloat
C++: Update expected test results after extractor changes
2026-04-28 09:47:44 +02:00
Tom Hvitved
81a00134aa Merge pull request #21753 from hvitved/go/most-recent-side-effect-multi-entry
Go: Avoid combinatorial explosion in `mostRecentSideEffect` when there are multiple entry points
2026-04-28 09:12:59 +02:00
Michael B. Gale
cafb73a7a0 Merge pull request #21761 from github/post-release-prep/codeql-cli-2.25.3
Post-release preparation for codeql-cli-2.25.3
2026-04-27 17:23:19 +01:00
Tom Hvitved
2e94b09e6f Address review comments 2026-04-27 14:18:41 +02:00
github-actions[bot]
24edae5e74 Post-release preparation for codeql-cli-2.25.3 2026-04-27 10:27:45 +00:00
Henry Mercer
f1a9637d1f Merge pull request #21571 from github/henrymercer/yaml-regression-test
JS: Add regression test for YAML extraction
2026-04-27 11:09:37 +01:00
Michael B. Gale
310c41ed3d Merge pull request #21760 from github/release-prep/2.25.3
Release preparation for version 2.25.3
2026-04-27 11:05:42 +01:00
Michael B. Gale
f817bd4924 Merge changelog entries for cpp/implicit-function-declaration 2026-04-27 11:03:42 +01:00
Michael B. Gale
03c3b3f4c4 Improve wording of actions note 2026-04-27 11:03:29 +01:00
github-actions[bot]
019ec0caf7 Release preparation for version 2.25.3 2026-04-27 10:01:23 +00:00
Michael B. Gale
6787beb8e7 Merge pull request #21758 from github/revert-21736-release-prep/2.25.3
Revert "Release preparation for version 2.25.3"
2026-04-27 09:52:36 +01:00
Michael B. Gale
9f70f718e3 Revert "Release preparation for version 2.25.3" 2026-04-27 09:36:56 +01:00
murderteeth
a6dba9eb25 Merge branch 'main' into js/vercel-node-framework 2026-04-25 14:19:43 -04:00
murderteeth
f15d53f3b9 Update javascript/ql/lib/change-notes/2026-04-12-vercel-node.md
Co-authored-by: Asger F <asgerf@github.com>
2026-04-25 14:19:01 -04:00
Owen Mansel-Chan
0daefb778b Merge pull request #21755 from github/workflow/coverage/update
Update CSV framework coverage reports
2026-04-25 07:42:44 +01:00
github-actions[bot]
be8c35ad8c Add changed framework coverage reports 2026-04-25 00:39:28 +00:00
Owen Mansel-Chan
710c1ba050 Make getACallee overlay[global]
Co-authored-by: Copilot <copilot@github.com>
2026-04-24 12:35:11 +01:00
Tom Hvitved
8e26fa1c81 Go: Avoid combinatorial explosion in mostRecentSideEffect when there are multiple entry points 2026-04-24 13:24:58 +02:00
Jack Nørskov Jørgensen
7f12fb7352 Change path where tool generate MaDs 2026-04-24 13:24:31 +02:00
Jack Nørskov Jørgensen
a6e052b2a0 Move generated MaDs for C# into modelgenerator/ 2026-04-24 13:24:31 +02:00
Jack Nørskov Jørgensen
073529a951 Move generated MaDs for Rust into modelgenerator/ 2026-04-24 13:24:31 +02:00
Jack Nørskov Jørgensen
07cb9803f0 Move generated MaDs for CPP into modelgenerator/ 2026-04-24 13:24:31 +02:00
Jack Nørskov Jørgensen
6ec250951a Move generated MaDs for Java into modelgenerator/ 2026-04-24 13:24:31 +02:00
Tom Hvitved
cbc12324bb Merge pull request #21703 from hvitved/rust/type-inference-sibling
Rust: Refine `implSiblings`
2026-04-24 12:36:51 +02:00
Owen Mansel-Chan
9fbe447428 Merge pull request #21749 from github/copilot/add-hibernate-sql-injection-tests
Add Hibernate SQL injection sink models and coverage
2026-04-24 09:36:46 +01:00
Michael Nebel
f3f3ee6e81 C#: Add cs/deferenced-value-is-always-null test example for compound operators. 2026-04-24 08:57:14 +02:00
Michael Nebel
01baa6e3ae C#: Add tests and update expected test output. 2026-04-24 08:57:11 +02:00
Michael Nebel
e2fcaeb46a C#: Handle compound assignment operators in the dispatch logic (and assignable definition). 2026-04-24 08:57:09 +02:00
Michael Nebel
bdf0c8ff5a C#: Add compound assignment operator call classes. 2026-04-24 08:57:06 +02:00
Michael Nebel
43ebcb68f0 C#: Add upgrade- and downgrade scripts. 2026-04-24 08:57:00 +02:00
Michael Nebel
44dd2f008b C#: Update the DB scheme, such that compound assignment operator calls can be considered qualifiable expressions. 2026-04-24 08:56:57 +02:00
Michael Nebel
2729bfe379 C#: Add compound assignment operator QL classes. 2026-04-24 08:50:09 +02:00
Michael Nebel
13e8976494 C#: Add change-note. 2026-04-24 08:50:06 +02:00
Michael Nebel
8ce38a5dfb C#: Re-use the GetTargetSymbol logic from invocations to find the right operator symbol (operators can also be declared in extensions). 2026-04-24 08:50:03 +02:00
Michael Nebel
77f0de89ec C#: Add support for compound assignment operators in the TryGetOperatorSymbol method. 2026-04-24 08:50:00 +02:00
Jeroen Ketema
ae89b2ee79 Merge pull request #21747 from jketema/join-order
Fix two `QualifiedName` join orders
2026-04-24 08:05:24 +02:00
Mathias Vorreiter Pedersen
82c99a594d Merge pull request #21750 from github/fix-join-in-assertions-in-ir
C++: Fix join in `TranslatedAssertion::getVariable`
2026-04-23 17:25:15 +01:00
copilot-swe-agent[bot]
083909ee3b Add Java change note for Hibernate sinks
Agent-Logs-Url: https://github.com/github/codeql/sessions/41769e74-a435-4aaf-b5f7-92060f6cd84e

Co-authored-by: owen-mc <62447351+owen-mc@users.noreply.github.com>
2026-04-23 14:10:29 +00:00
copilot-swe-agent[bot]
25d232b815 Model additional Hibernate query sinks
Agent-Logs-Url: https://github.com/github/codeql/sessions/fc2c7f71-3493-4bf7-9136-34571a1d4b47

Co-authored-by: owen-mc <62447351+owen-mc@users.noreply.github.com>
2026-04-23 13:41:03 +00:00
Tom Hvitved
c64223ae56 Merge pull request #21748 from hvitved/shared/remove-deprecated
Shared: Remove deprecated code
2026-04-23 14:44:17 +02:00
Anders Schack-Mulligen
cb21044900 Merge pull request #21744 from aschackmull/csharp/ssa
C#: Replace BaseSSA classes with shared code.
2026-04-23 14:39:54 +02:00
Tom Hvitved
eee5b067b3 Merge pull request #21743 from hvitved/cfg/body-parts
C#: Move handling of callables into shared control flow library
2026-04-23 14:10:46 +02:00
Mathias Vorreiter Pedersen
14efb4502b C++: Fix join in getVariable. 2026-04-23 12:10:09 +01:00
Owen Mansel-Chan
bf960b8c76 Merge pull request #21652 from MarkLee131/fix/path-injection-torealpath
Java: recognize Path.toRealPath() as path normalization sanitizer
2026-04-23 11:18:23 +01:00
copilot-swe-agent[bot]
081ad03b4b Add Hibernate SQL injection sink tests
Agent-Logs-Url: https://github.com/github/codeql/sessions/2e7aecca-63ea-489f-8b87-4cc557655919

Co-authored-by: owen-mc <62447351+owen-mc@users.noreply.github.com>
2026-04-23 10:04:52 +00:00
copilot-swe-agent[bot]
7b897add22 Initial plan 2026-04-23 09:50:34 +00:00
Owen Mansel-Chan
9f19791d8c Merge branch 'main' into fix/path-injection-torealpath 2026-04-23 10:40:47 +01:00
Tom Hvitved
61f1ef877f Swift: Remove deprecated references to deprecated shared code 2026-04-23 11:29:10 +02:00
Tom Hvitved
18da5f61cd Ruby: Remove deprecated references to deprecated shared code 2026-04-23 11:29:04 +02:00
Tom Hvitved
14dd72b3b1 C#: Remove deprecated references to deprecated shared code 2026-04-23 11:28:33 +02:00
Tom Hvitved
90ae086822 Shared: Remove deprecated code 2026-04-23 11:24:14 +02:00
Tom Hvitved
1a84b2b555 CFG: Use dense ranking 2026-04-23 11:22:38 +02:00
Jeroen Ketema
076b020dc4 Fix two QualifiedName join orders
Before on `StanfordLegion__legion` with `cpp/throwing-pointer`:
```
Pipeline standard for QualifiedName::Namespace.getQualifiedName/0#cbc0648a@7ff329j5 was evaluated in 2 iterations totaling 0ms (delta sizes total: 70).
        162061  ~0%    {2} r1 = JOIN `QualifiedName::Namespace.getQualifiedName/0#cbc0648a#prev_delta` WITH namespacembrs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
            70  ~2%    {4}    | JOIN WITH namespaces ON FIRST 1 OUTPUT Lhs.0, _, Lhs.1, Rhs.1
            70  ~0%    {2}    | REWRITE WITH Tmp.1 := "::", Out.1 := (In.2 ++ Tmp.1 ++ In.3) KEEPING 2
            70  ~0%    {2}    | AND NOT `QualifiedName::Namespace.getQualifiedName/0#cbc0648a#prev`(FIRST 2)
                       return r1

Pipeline standard for QualifiedName::Namespace.getAQualifierForMembers/0#132b16e1@cfd47189 was evaluated in 2 iterations totaling 3ms (delta sizes total: 85).
            12   ~0%    {2} r1 = JOIN `QualifiedName::Namespace.getAQualifierForMembers/0#132b16e1#prev_delta` WITH _#namespace_inlineMerge_#namespacembrsMerge#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1

        162417   ~0%    {2} r2 = JOIN `QualifiedName::Namespace.getAQualifierForMembers/0#132b16e1#prev_delta` WITH namespacembrs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
            73   ~1%    {4}    | JOIN WITH namespaces ON FIRST 1 OUTPUT Lhs.0, _, Lhs.1, Rhs.1
            73   ~0%    {2}    | REWRITE WITH Tmp.1 := "::", Out.1 := (In.2 ++ Tmp.1 ++ In.3) KEEPING 2

            85   ~0%    {2} r3 = r1 UNION r2
            85   ~0%    {2}    | AND NOT `QualifiedName::Namespace.getAQualifierForMembers/0#132b16e1#prev`(FIRST 2)
                        return r3
```

After:
```
Pipeline standard for QualifiedName::Namespace.getQualifiedName/0#cbc0648a@91677d3f was evaluated in 2 iterations totaling 0ms (delta sizes total: 70).
        70  ~0%    {4} r1 = JOIN `QualifiedName::Namespace.getQualifiedName/0#cbc0648a#prev_delta` WITH _#namespacembrsMerge_1#antijoin_rhs_#namespacembrsMerge_10#join_rhs_#namespacesMerge#join_rhs ON FIRST 1 OUTPUT Rhs.1, _, Lhs.1, Rhs.2
        70  ~0%    {2}    | REWRITE WITH Tmp.1 := "::", Out.1 := (In.2 ++ Tmp.1 ++ In.3) KEEPING 2
        70  ~0%    {2}    | AND NOT `QualifiedName::Namespace.getQualifiedName/0#cbc0648a#prev`(FIRST 2)
                   return r1

Pipeline standard for QualifiedName::Namespace.getAQualifierForMembers/0#132b16e1@3bbc99mb was evaluated in 2 iterations totaling 0ms (delta sizes total: 85).
        12   ~0%    {2} r1 = JOIN `QualifiedName::Namespace.getAQualifierForMembers/0#132b16e1#prev_delta` WITH _#namespace_inlineMerge_#namespacembrsMerge_1#antijoin_rhs__#namespacembrsMerge_#namespacembrsMerge___#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1

        73   ~0%    {4} r2 = JOIN `QualifiedName::Namespace.getAQualifierForMembers/0#132b16e1#prev_delta` WITH _#namespacembrsMerge_1#antijoin_rhs_#namespacesMerge__#namespacembrsMerge_#namespacembrsMerge_10#joi__#join_rhs ON FIRST 1 OUTPUT Rhs.1, _, Lhs.1, Rhs.2
        73   ~1%    {2}    | REWRITE WITH Tmp.1 := "::", Out.1 := (In.2 ++ Tmp.1 ++ In.3) KEEPING 2

        85   ~0%    {2} r3 = r1 UNION r2
        85   ~0%    {2}    | AND NOT `QualifiedName::Namespace.getAQualifierForMembers/0#132b16e1#prev`(FIRST 2)
                    return r3
```
2026-04-23 10:37:12 +02:00
Jeroen Ketema
f50bbdb9af C++: Update expected test results after extractor changes 2026-04-23 10:13:57 +02:00
Tom Hvitved
71fa2166ee Apply suggestions from code review
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2026-04-22 17:06:31 +02:00
Owen Mansel-Chan
d6abd4c72d Merge pull request #21745 from owen-mc/go/refactor-encryption-operation
Go: refactor `EncryptionOperation`
2026-04-22 15:46:49 +01:00
Owen Mansel-Chan
57eaed4dcc Refactor: remove fields from EncryptionOperation
Co-authored-by: Copilot <copilot@github.com>
2026-04-22 13:37:35 +01:00
Tom Hvitved
6ebf4ee394 Java: Adapt to changes in CFG library 2026-04-22 14:11:58 +02:00
Tom Hvitved
39cd86a48e C#: Move handling of callables into shared control flow library 2026-04-22 14:11:57 +02:00
Anders Schack-Mulligen
4b8e4b40af C#: Fix test. 2026-04-22 14:00:13 +02:00
Tom Hvitved
e60275c4de Rust: Refine implSiblings
Consider two implementations of the same trait to be siblings when the
type being implemented by one is an instantiation of the type being
implemented by the other.
2026-04-22 13:32:56 +02:00
Anders Schack-Mulligen
b0c31badc2 C#: Bugfix for multi-body baseSsa entry defs. 2026-04-22 11:53:44 +02:00
Anders Schack-Mulligen
ae7904f0c8 C#: Fix BaseSSA caching. 2026-04-22 11:53:44 +02:00
Anders Schack-Mulligen
bbd60031b1 C#: Replace references to old BaseSSA classes. 2026-04-22 11:53:40 +02:00
Anders Schack-Mulligen
145d3242a6 C#: Instantiate shared SSA wrappers for BaseSSA. 2026-04-22 11:51:44 +02:00
Michael Nebel
bca51a986c Merge pull request #21612 from michaelnebel/csharp/legacyasptaintedmember
C#: Taint members of types in ASP.NET user context.
2026-04-22 09:28:27 +02:00
Owen Mansel-Chan
62f15d0166 Merge pull request #21742 from owen-mc/docs/fixes
Docs: several minor fixes
2026-04-21 17:40:11 +01:00
Owen Mansel-Chan
b47afafe8e Fix duplicated quotation mark 2026-04-21 14:53:11 +01:00
Owen Mansel-Chan
3a13f77058 Fix typo "passd" -> "passed" 2026-04-21 14:52:48 +01:00
Owen Mansel-Chan
424b7decb1 Fix wrong parameter name 2026-04-21 14:52:22 +01:00
Owen Mansel-Chan
91f9f23138 Fix wrong function name 2026-04-21 14:52:10 +01:00
Anders Schack-Mulligen
f912731cd4 Merge pull request #21565 from aschackmull/csharp/cfg2
C#: Replace CFG with the shared implementation
2026-04-21 15:50:38 +02:00
Kaixuan Li
af794ed3c0 Merge branch 'main' into fix/trust-boundary-regexp-barrier 2026-04-21 23:01:06 +10:00
Owen Mansel-Chan
6efb21314a Merge pull request #21523 from owen-mc/docs/mad/barriers
Document models-as-data barriers and barrier guards and add change notes
2026-04-21 13:49:19 +01:00
Owen Mansel-Chan
c91b5b3c2e Merge pull request #21650 from MarkLee131/fix/sensitive-log-fp-regex
Java: reduce false positives in sensitive-log
2026-04-21 13:48:32 +01:00
Michael Nebel
8b93ce2747 C#: Add ASP.NET test case for a collection type. 2026-04-21 14:27:06 +02:00
Michael Nebel
2d6197fd7d C#: Generalize ASP.NET taint members to collection types. 2026-04-21 14:27:03 +02:00
Michael Nebel
f826262f1d C#: Re-factor CollectionType into an abstract class and introduce getElementType predicate. 2026-04-21 14:26:59 +02:00
Michael Nebel
1055084305 C#: Address review comments. 2026-04-21 13:40:07 +02:00
Michael Nebel
dc0e7d4988 C#: Add change-note. 2026-04-21 13:40:04 +02:00
Michael Nebel
8060d2ff24 C#: Streamline the implementation for ASP.NET Core tainted members. 2026-04-21 13:40:02 +02:00
Michael Nebel
921d93e427 C#: Add an ASP.NET flow source example when using the WebMethod attribute. 2026-04-21 13:39:59 +02:00
Michael Nebel
dba1b7539f C#: Taint members of types used in ASP.NET remote flow source context. 2026-04-21 13:39:56 +02:00
Michael Nebel
77da545ab4 C#: Reclassify some sources as AspNetRemoteFlowSource. 2026-04-21 13:39:54 +02:00
Michael Nebel
0062eb1209 C#: Update remote flow sources test to also report tainted members. 2026-04-21 13:39:51 +02:00
Anders Schack-Mulligen
67c0515d3c Cfg: Undo consistency check change. 2026-04-21 13:10:03 +02:00
Michael B. Gale
58e9bad0a0 Merge pull request #21737 from github/post-release-prep/codeql-cli-2.25.3
Post-release preparation for codeql-cli-2.25.3
2026-04-21 11:48:30 +02:00
Anders Schack-Mulligen
a2a4e8288e C#: Deprecate ControlFlowElement.getAControlFlowNode and remove some splitting quantification. 2026-04-21 11:14:05 +02:00
Anders Schack-Mulligen
9de02b7ae6 Cfg: Use consistent casing in additional node tags. 2026-04-21 10:56:10 +02:00
Jeroen Ketema
7f2a13bc7a Merge pull request #21728 from jketema/jketema/swift-6.3.1
Swift: Update to Swift 6.3.1
2026-04-20 19:33:08 +02:00
Jeroen Ketema
abd08440a1 Swift: Update to Swift 6.3.1 2026-04-20 16:30:29 +02:00
Jeroen Ketema
d5ded932d3 Merge pull request #21723 from jketema/swift-fixed-array
Swift: Expose the generic arguments of `BuiltinFixedArrayType`s
2026-04-20 16:17:41 +02:00
Taus
b108e173a5 Merge pull request #21695 from github/tausbn/python-add-support-for-pep-798
Python: Add support for PEP-798
2026-04-20 15:01:01 +02:00
Anders Schack-Mulligen
b6f50f5992 C#: Simplify. 2026-04-20 14:43:28 +02:00
Anders Schack-Mulligen
3ceb96a45f C#: Eliminate Completion.qll. 2026-04-20 14:43:28 +02:00
Anders Schack-Mulligen
e928c224ae C#/Cfg: Some simple review fixes. 2026-04-20 14:43:27 +02:00
github-actions[bot]
a0bab539bb Post-release preparation for codeql-cli-2.25.3 2026-04-20 12:40:34 +00:00
Owen Mansel-Chan
9f310c20f3 Merge pull request #21734 from owen-mc/java/fix-partial-path-traversal
Java: fix bug in partial path traversal
2026-04-20 11:52:55 +01:00
Michael B. Gale
a73f7cb79d Merge pull request #21736 from github/release-prep/2.25.3
Release preparation for version 2.25.3
2026-04-20 12:29:07 +02:00
Michael B. Gale
abf374433b Merge changelog entries for cpp/implicit-function-declaration 2026-04-20 12:24:05 +02:00
Michael B. Gale
34b5dcfd5f Improve wording of actions note 2026-04-20 11:40:32 +02:00
github-actions[bot]
c861d99802 Release preparation for version 2.25.3 2026-04-20 09:27:23 +00:00
MarkLee131
92d205d1a8 Use set literal for getCommonSensitiveInfoFPRegex
Replace the five-way result = ... or result = ... disjunction with a
single equality on a set literal. Addresses the CodeQL style alert
"Use a set literal in place of or" reported by the self-scan on this
PR. Pure refactor, no semantic change.
2026-04-19 23:29:07 -04:00
Owen Mansel-Chan
c6f641eac4 Add change note
Co-authored-by: Copilot <copilot@github.com>
2026-04-19 07:18:48 +01:00
Owen Mansel-Chan
6d4a3974ce Fix bug so += File.separator is recognized 2026-04-19 07:18:42 +01:00
Owen Mansel-Chan
6099c5d034 Add SPURIOUS test for += File.separator 2026-04-19 07:18:00 +01:00
Owen Mansel-Chan
63d20a54d4 Use inline expectations with second test
Co-authored-by: Copilot <copilot@github.com>
2026-04-19 07:17:05 +01:00
Owen Mansel-Chan
dca7046d8c Make inline expectation comments specify query 2026-04-18 10:35:15 +01:00
Owen Mansel-Chan
2764580cdf Merge pull request #21718 from chmodxxx/java/woodstox-xxe
Java: Add XXE sink model for Woodstox WstxInputFactory
2026-04-17 17:25:15 +01:00
Salah Baddou
fb2d53e72a Address review: inline Woodstox into XmlParsers, move changelog to lib 2026-04-17 18:46:51 +04:00
Salah Baddou
f5131f9bc6 Java: Add XXE sink model for Woodstox WstxInputFactory
`com.ctc.wstx.stax.WstxInputFactory` overrides `createXMLStreamReader`,
`createXMLEventReader` and `setProperty` from `XMLInputFactory`, so the
existing `XmlInputFactory` model in `XmlParsers.qll` does not match calls
where the static receiver type is `WstxInputFactory` (or its supertype
`org.codehaus.stax2.XMLInputFactory2`). Woodstox is vulnerable to XXE in
its default configuration, so these missed sinks were false negatives in
`java/xxe`.

This adds a scoped framework model under
`semmle/code/java/frameworks/woodstox/WoodstoxXml.qll` (registered in the
`Frameworks` module of `XmlParsers.qll`) that recognises these calls as
XXE sinks and treats the factory as safe when both
`javax.xml.stream.supportDTD` and
`javax.xml.stream.isSupportingExternalEntities` are disabled — mirroring
the existing `XMLInputFactory` safe-configuration logic.
2026-04-17 18:46:51 +04:00
Taus
ac23e16786 Python: Move Python 3.15 data-flow tests to a separate file
We won't be able to run these tests until Python 3.15 is actually out
(and our CI is using it), so it seemed easiest to just put them in their
own test directory.
2026-04-17 13:16:46 +00:00
Owen Mansel-Chan
29b07d5d07 Merge pull request #21721 from owen-mc/go/remove-global-function-jump-step-from-local-flow
Go: Remove global function step from local flow
2026-04-17 14:09:16 +01:00
Tom Hvitved
14bdb62cf8 Merge pull request #21726 from hvitved/csharp/useless-to-string-fps
C#: Fix FPs in `RedundantToStringCall.ql`
2026-04-17 14:59:22 +02:00
Jeroen Ketema
3073c1c94c Merge pull request #21725 from github/jeongsoolee09/add-aligned-alloc-model
Add models of various `aligned_alloc`s
2026-04-17 14:31:25 +02:00
Owen Mansel-Chan
bc28e1726c Refactor to get rid of duplication 2026-04-17 13:24:16 +01:00
Taus
dc36609743 Python: Add data-flow tests
Alas, all these demonstrate is that we already don't fully support the
desugared `yield from` form.
2026-04-17 12:15:04 +00:00
Tom Hvitved
7bfdfbefa9 Add change note 2026-04-17 13:57:08 +02:00
Tom Hvitved
0235df8758 C#: Improve alert message for RedundantToStringCall.ql 2026-04-17 13:55:00 +02:00
Jeroen Ketema
e3b88cbad3 Swift: Fix change note 2026-04-17 13:29:24 +02:00
Jeroen Ketema
dd2440086f Swift: Add change note 2026-04-17 13:24:17 +02:00
Jeongsoo Lee
abec00cd34 Update cpp/ql/src/change-notes/2026-04-16-add-model-for-aligned-alloc.md
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2026-04-17 07:08:38 -04:00
Owen Mansel-Chan
9f4fd7fab0 Remove a data flow consistency exclusion
This is no longer needed.
2026-04-17 11:27:36 +01:00
Paolo Tranquilli
5342cc79fb Merge pull request #21574 from github/redsun82/actions/remove-harden-runner-false-positive
Remove false positive injection sink models for `docker/build-push-action` and `step-security/harden-runner`
2026-04-17 09:43:45 +02:00
Tom Hvitved
426962e348 C#: Fix FPs in RedundantToStringCall.ql 2026-04-17 09:37:19 +02:00
Tom Hvitved
33e9c02079 C#: Add more tests for RedundantToStringCall.ql 2026-04-17 09:33:13 +02:00
jeongsoolee09
553ed103c3 Add a change note 2026-04-16 21:31:55 -04:00
jeongsoolee09
d2d594a8ff Add models of ::aligned_alloc, std::aligned_alloc, and bsl::aligned_alloc 2026-04-16 21:21:09 -04:00
Taus
6c675fcede Python: Consolidate duplicated code 2026-04-16 21:14:42 +00:00
Jeroen Ketema
efddfab564 Swift: Expose the generic arguments of BuiltinFixedArrays 2026-04-16 17:07:20 +02:00
Owen Mansel-Chan
73cc54c10d Use monospace instead of bold for quoted code 2026-04-16 12:35:38 +01:00
Owen Mansel-Chan
69c150d5f6 Use monospace instead of bold for predicate signatures 2026-04-16 12:34:47 +01:00
Owen Mansel-Chan
82d9d46fde Remove duplication and standardize wording
Co-authored-by: Copilot <copilot@github.com>
2026-04-16 12:26:44 +01:00
Owen Mansel-Chan
5a7b1b91e0 Fix mistakes in explanation of override column
To avoid copy-paste mistakes and make them more consistent we just use
the word "model".
2026-04-16 11:41:30 +01:00
Owen Mansel-Chan
2c16cb46ad Quote library name in backticks
Co-authored-by: Sarita Iyer <66540150+saritai@users.noreply.github.com>
2026-04-16 11:30:10 +01:00
Owen Mansel-Chan
f6135b70ea Remove global function step from local flow 2026-04-16 11:15:01 +01:00
Tom Hvitved
ee34e3353d Merge pull request #21698 from hvitved/rust/type-inference-index-expr
Rust: Replace special handling of index expressions in type inference
2026-04-16 09:03:06 +02:00
Jon Janego
f95ee129df Merge pull request #21713 from github/codeql-spark-run-24459914636
Update changelog documentation site for codeql-cli-2.25.2
2026-04-15 09:55:53 -05:00
github-actions[bot]
d24fb29ff4 update codeql documentation 2026-04-15 14:23:47 +00:00
Jeroen Ketema
97d8993fc5 Merge pull request #21667 from jketema/jketema/swift-6.3
Swift: Update to Swift 6.3
2026-04-15 14:07:23 +02:00
Jeroen Ketema
7d1c62daa6 Swift: Address review comment 2026-04-15 13:37:15 +02:00
Tom Hvitved
597d81038a Merge pull request #21708 from github/copilot/fix-missed-opportunity-to-use-select
Fix false positive in `MissedSelectOpportunity` when foreach body uses `await`
2026-04-15 11:32:02 +02:00
Tom Hvitved
069431941e Merge pull request #21596 from hvitved/rust/data-flow-closure-type
Rust: Track closure types in data flow
2026-04-15 10:32:05 +02:00
Tom Hvitved
609621f638 Merge pull request #21679 from hvitved/rust/type-inference-forall-checks
Rust: Replace recursion through `forall` with ranked recursion
2026-04-15 09:43:37 +02:00
Jeroen Ketema
ae2226345e Merge pull request #21709 from jketema/depr
C++: Remove deprecated code deprecated more than a year ago
2026-04-14 17:04:48 +02:00
Owen Mansel-Chan
f79ffe792e Fix docs: "branch" -> "acceptingValue" 2026-04-14 15:41:02 +01:00
Owen Mansel-Chan
87f2e21ae9 Fix docs: "acceptingvalue" -> "acceptingValue" 2026-04-14 15:37:17 +01:00
Owen Mansel-Chan
6321482a46 Remove mention of extension ID 2026-04-14 15:29:52 +01:00
Owen Mansel-Chan
8081d4602b Use hyphens in column names: "access-path", "accepting-value" 2026-04-14 15:27:42 +01:00
Owen Mansel-Chan
2ecf086333 Include parameters when quoting extensible predicate name 2026-04-14 15:27:41 +01:00
Owen Mansel-Chan
76d165e71e "modelling" -> "modeling" in docs 2026-04-14 15:27:39 +01:00
Owen Mansel-Chan
8f17b73796 Fix link formatting in change notes 2026-04-14 15:27:37 +01:00
Owen Mansel-Chan
6d4e8bfcb2 Correct extensible predicate signatures in docs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-14 15:27:35 +01:00
Owen Mansel-Chan
a2a0c087e1 Remove incorrect parameter of extensible predicate
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-14 15:27:33 +01:00
Owen Mansel-Chan
c86ba38a4e Add change notes 2026-04-14 15:27:31 +01:00
Owen Mansel-Chan
415330d5eb Update docs for barriers and barrier guards 2026-04-14 15:27:29 +01:00
Owen Mansel-Chan
05e3073165 List extensible predicates for barriers and barrier guards 2026-04-14 15:27:27 +01:00
Owen Mansel-Chan
ef9136c053 (Formatting) Remove erroneous bullet point in ruby docs 2026-04-14 15:27:25 +01:00
Owen Mansel-Chan
f02ccd36cc (Trivial) Remove trailing spaces in some docs 2026-04-14 15:27:21 +01:00
Owen Mansel-Chan
6e0bee7471 Merge pull request #21691 from github/dependabot/go_modules/go/extractor/extractor-dependencies-2d1b0e128d
Bump the extractor-dependencies group across 1 directory with 2 updates
2026-04-14 15:26:00 +01:00
Henry Mercer
cb1fd76a4c Merge pull request #21658 from github/post-release-prep/codeql-cli-2.25.2
Post-release preparation for codeql-cli-2.25.2
2026-04-14 15:24:13 +01:00
Tom Hvitved
467933bbb1 Rust: Also add specialized IndexMut implementations 2026-04-14 15:45:14 +02:00
Henry Mercer
43c9b95e6f Merge branch 'main' into post-release-prep/codeql-cli-2.25.2 2026-04-14 13:56:52 +01:00
Tom Hvitved
878cfd720c C#: Use inline test expectations 2026-04-14 14:41:28 +02:00
Geoffrey White
666c8bf87a Merge pull request #21635 from geoffw0/suspicioussizeof2
C++: Upgrade cpp/suspicious-add-sizeof to high precision
2026-04-14 13:04:24 +01:00
Jeroen Ketema
07b02942db Merge remote-tracking branch 'upstream/main' into jketema/swift-6.3 2026-04-14 13:54:16 +02:00
Jeroen Ketema
9ef088d423 C++: Add change note 2026-04-14 13:46:43 +02:00
Taus
8b1ecf05c9 Python: Update test output
This change reflects the `(value, key)` to `(key, value)` fix in an
earlier commit.
2026-04-14 13:27:31 +02:00
Taus
15790aa00c Python: Add change note 2026-04-14 13:27:31 +02:00
Taus
de900fc3b5 Python: Add QL test for comprehensions with unpacking 2026-04-14 13:27:31 +02:00
Taus
fc5b3562c3 Python: Add parser test for comprehensions with unpacking 2026-04-14 13:27:31 +02:00
Taus
90b64616f7 Python: Also fix (value, key) bug in old parser 2026-04-14 13:27:31 +02:00
Taus
91d4cf6624 Python: Update python.tsg
First, we extend the various location overriding hacks to also accept
list and dict splats in various places. Having done this, we then have
to tackle how to actually desugar these new comprehension forms (as this
is what we currently do for the old forms).

As a reminder, a list comprehension like `[x for x in y]` currently gets
desugared into a small local function, something like

```python
def listcomp(a):
    for x in a:
        yield x
listcomp(y)
```

For `[*x for x in y]`, the behaviour we want is that we unpack `x`
before yielding its elements in turn. This is essentially what we would
get if we were to use `yield from x` instead of `yield x` in the above
desugaring, so that's what we do. This also works for set
comprehensions.

For dict comprehensions, it's slightly more complicated. Here, the
generator function instead yields a stream of `(key, value)` tuples.
(And apparently the old parser got this wrong and emitted `(value, key)`
pairs instead, which we faithfully recreated in the new parser as well.
We fix that bug in both parsers while we're at it). So, a bare `yield
from` is not enough, we also need a `.items()` call to get the
double-starred expression to emit its items as a stream of tuples (that
we then `yield from`.

To make this (hopefully) less verbose in the implementation, we defer
the decision of whether to use `yield` or `yield from` by introducing a
`yield_kind` scoped variable that determines the type of the actual AST
node. And of course for dict comprehensions with unpacking we need to
synthesise the extra machinery mentioned above.

On the plus side, this means we don't have to mess with control-flow, as
the existing machinery should be able to handle the desugared syntax
just fine.
2026-04-14 13:27:31 +02:00
Taus
97086c3cc9 Python: Regenerate parser files 2026-04-14 13:27:31 +02:00
Taus
4b5ff0b89e Python: Support unpacking in comprehensions in tree-sitter-python
This is the easy part -- we just allow `dictionary_splat` or
`list_splat` to appear in the same place as the expression.
2026-04-14 13:27:31 +02:00
Taus
c748fdf8ee Merge pull request #21694 from github/tausbn/python-add-support-for-pep-810
Python: Add support for PEP 810
2026-04-14 13:27:08 +02:00
Tom Hvitved
b749ad645a Merge pull request #21706 from hvitved/rust/type-inference-perf-fixes
Rust: Improve performance of two type inference predicates
2026-04-14 13:06:26 +02:00
Jeroen Ketema
12868e5140 C++: Remove deprecated code added more than a year ago 2026-04-14 13:03:10 +02:00
Geoffrey White
fe7e8480b2 Merge branch 'main' into suspicioussizeof2 2026-04-14 10:52:00 +01:00
Anders Schack-Mulligen
e0952948ba Merge pull request #21701 from aschackmull/csharp/intvalue
C#: Introduce Expr.getIntValue.
2026-04-14 11:23:29 +02:00
Owen Mansel-Chan
7458674470 Merge pull request #21584 from owen-mc/shared/update-mad-comments
Shared: update code comments explaining models-as-data format to include barriers and barrier guards
2026-04-14 09:30:28 +01:00
copilot-swe-agent[bot]
3483050526 Fix false positive in MissedSelectOpportunity for async/await loops
Agent-Logs-Url: https://github.com/github/codeql/sessions/3e8f4320-2bf4-45f5-b9ea-dad41d522d84

Co-authored-by: hvitved <3667920+hvitved@users.noreply.github.com>
2026-04-14 08:18:02 +00:00
copilot-swe-agent[bot]
0e66555e37 Initial plan 2026-04-14 08:10:53 +00:00
Jeroen Ketema
0724c22f28 Merge pull request #21702 from jketema/conv-string
C++: Use new `getConvSpecString` instead of `getConvSpecOffset` and `substring`
2026-04-14 10:00:51 +02:00
Tom Hvitved
d69be77035 Rust: Avoid expensive regex calls
Before
```
Pipeline standard for TypeInference::AssocFunctionResolution::AssocFunctionCall.hasIncompatibleTarget/5#85c07422@d5eb7r0w was evaluated in 782 iterations totaling 13208ms (delta sizes total: 20187834).
            1464   ~2%    {7} r1 = JOIN `TypeInference::AssocFunctionResolution::SelfArgIsInstantiationOf::argIsInstantiationOf/6#aaa87ac9#prev_delta` WITH `TypeInference::AssocFunctionResolution::OverloadedCallArgsAreInstantiationsOf::argsAreNotInstantiationsOf/2#6a6070f7#prev` ON FIRST 2 OUTPUT Lhs.5, _, Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4
            1464   ~0%    {7}    | REWRITE WITH Out.1 := ""
            1464   ~0%    {6}    | JOIN WITH `FunctionType::AssocFunctionType.getTypeAt/1#dispred#d4d46f61` ON FIRST 2 OUTPUT Lhs.2, Lhs.3, Lhs.4, Lhs.5, Lhs.6, Rhs.2

          173691   ~1%    {7} r2 = JOIN `TypeInference::AssocFunctionResolution::OverloadedCallArgsAreInstantiationsOf::argsAreNotInstantiationsOf/2#6a6070f7#prev_delta` WITH `TypeInference::AssocFunctionResolution::SelfArgIsInstantiationOf::argIsInstantiationOf/6#aaa87ac9#prev` ON FIRST 2 OUTPUT Rhs.5, _, Lhs.0, Lhs.1, Rhs.2, Rhs.3, Rhs.4
          173691   ~1%    {7}    | REWRITE WITH Out.1 := ""
          173691   ~1%    {6}    | JOIN WITH `FunctionType::AssocFunctionType.getTypeAt/1#dispred#d4d46f61` ON FIRST 2 OUTPUT Lhs.2, Lhs.3, Lhs.4, Lhs.5, Lhs.6, Rhs.2

        20022454   ~0%    {7} r3 = SCAN `TypeInference::AssocFunctionResolution::SelfArgIsInstantiationOf::argIsNotInstantiationOf/6#1b8e512e#prev_delta` OUTPUT In.0, In.1, In.2, In.3, In.4, In.5, _
        20022454   ~0%    {7}    | REWRITE WITH Out.6 := "^([0-9]+)\\..*$"
        20022175   ~2%    {9}    | JOIN WITH PRIMITIVE regexpCapture#bbff ON Lhs.5,Lhs.6
        20022175   ~2%    {10}    | SCAN OUTPUT In.0, In.1, In.2, In.3, In.4, In.5, In.6, In.7, In.8, _
                          {9}    | REWRITE WITH Tmp.9 := 1, TEST InOut.7 = Tmp.9 KEEPING 9
        20022175   ~1%    {7}    | SCAN OUTPUT In.8, In.0, In.1, In.2, In.3, In.4, In.5
        20022175   ~1%    {8}    | JOIN WITH `UnboundList::Make<Locations::Location,TypeInference::M1::UnboundListInput>::encode/1#47b2ec3f_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5, Lhs.6, Lhs.0
        20022175   ~0%    {10}    | JOIN WITH `Type::Type.getATypeParameter/0#dispred#ddf0e8ff_10#join_rhs` ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5, Rhs.1, _, Lhs.6, Lhs.7, _
                          {7}    | REWRITE WITH Tmp.6 := length(In.8), Tmp.9 := 1, Tmp.6 := (Tmp.6 + Tmp.9), Out.6 := suffix(In.7,Tmp.6) KEEPING 7
        20022175   ~0%    {6}    | SCAN OUTPUT In.0, In.1, In.2, In.3, In.4, In.5

        20197330   ~0%    {6} r4 = r1 UNION r2 UNION r3
        20187834   ~0%    {6}    | AND NOT `TypeInference::AssocFunctionResolution::AssocFunctionCall.hasIncompatibleTarget/5#85c07422#prev`(FIRST 6)
                          return r4
```

After
```
Pipeline standard for TypeInference::AssocFunctionResolution::AssocFunctionCall.hasIncompatibleTarget/5#85c07422@a58ce91w was evaluated in 537 iterations totaling 382ms (delta sizes total: 20033950).
        19862347   ~0%    {7} r1 = SCAN `TypeInference::AssocFunctionResolution::SelfArgIsInstantiationOf::argIsNotInstantiationOf/6#1b8e512e#prev_delta` OUTPUT In.5, _, In.0, In.1, In.2, In.3, In.4
        19862347   ~0%    {7}    | REWRITE WITH Out.1 := ""

          174684   ~1%    {7} r2 = SCAN `TypeInference::AssocFunctionResolution::AssocFunctionCall.hasIncompatibleArgsTarget/5#dispred#7d49b9f9#prev_delta` OUTPUT In.5, _, In.0, In.1, In.2, In.3, In.4
          174684   ~1%    {7}    | REWRITE WITH Out.1 := ""

        20037031   ~0%    {7} r3 = r1 UNION r2
        20037031   ~0%    {6}    | JOIN WITH `FunctionType::AssocFunctionType.getTypeAt/1#dispred#d4d46f61` ON FIRST 2 OUTPUT Lhs.2, Lhs.3, Lhs.4, Lhs.5, Lhs.6, Rhs.2
        20033950   ~0%    {6}    | AND NOT `TypeInference::AssocFunctionResolution::AssocFunctionCall.hasIncompatibleTarget/5#85c07422#prev`(FIRST 6)
                          return r3
```
2026-04-14 09:51:45 +02:00
Tom Hvitved
0db62b2e68 Type inference: Fix bad join
Before
```
Pipeline standard for TypeInference::M2::SatisfiesConstraintWithTypeMatching<TypeInference::FunctionCallMatching::AccessConstraint::RelevantAccess,TypeMention::TypeMention,TypeInference::FunctionCallMatching::AccessConstraint::SatisfiesTypeParameterConstraintInput>::TermIsInstantiationOfCondition::typeParametersHaveEqualInstantiationToIndex/4#dde26112@d5eb7x9q was evaluated in 471 iterations totaling 24306ms (delta sizes total: 42097188).
        5676156578   ~1%    {7} r1 = JOIN `TypeInference::M2::SatisfiesConstraintWithTypeMatching<TypeInference::FunctionCallMatching::AccessConstraint::RelevantAccess,TypeMention::TypeMention,TypeInference::FunctionCallMatching::AccessConstraint::SatisfiesTypeParameterConstraintInput>::TermIsInstantiationOfCondition::typeParametersHaveEqualInstantiationToIndex/4#dde26112#prev_delta` WITH `TypeInference::M2::SatisfiesConstraintWithTypeMatching<TypeInference::FunctionCallMatching::AccessConstraint::RelevantAccess,TypeMention::TypeMention,TypeInference::FunctionCallMatching::AccessConstraint::SatisfiesTypeParameterConstraintInput>::TermIsInstantiationOfCondition::typeParametersEqual/4#a276e5d4#prev` ON FIRST 3 OUTPUT Lhs.0, Lhs.1, Lhs.2, Rhs.3, _, Lhs.3, _
                            {5}    | REWRITE WITH Tmp.4 := 1, Out.4 := (Tmp.4 + In.5), Tmp.6 := 0, TEST Out.4 != Tmp.6 KEEPING 5
        5676156578   ~1%    {5}    | SCAN OUTPUT In.1, In.4, In.3, In.0, In.2
          41691564   ~1%    {4}    | JOIN WITH `TypeInference::M2::SatisfiesConstraintWithTypeMatching<TypeInference::AssocFunctionResolution::ArgSatisfiesBlanketLikeConstraint::ArgumentTypeAndBlanketOffset,TypeMention::TypeMention,TypeInference::AssocFunctionResolution::ArgSatisfiesBlanketLikeConstraint::SatisfiesBlanketConstraint::Inp>::TermIsInstantiationOfCondition::getNthTypeParameter/2#40c66343` ON FIRST 3 OUTPUT Lhs.3, Lhs.0, Lhs.4, Lhs.1

          42097188   ~2%    {4} r2 = SCAN `TypeInference::M2::SatisfiesConstraintWithTypeMatching<TypeInference::FunctionCallMatching::AccessConstraint::RelevantAccess,TypeMention::TypeMention,TypeInference::FunctionCallMatching::AccessConstraint::SatisfiesTypeParameterConstraintInput>::TermIsInstantiationOfCondition::typeParametersEqual/4#a276e5d4#prev_delta` OUTPUT In.1, In.3, In.0, In.2

          42097188   ~1%    {5} r3 = JOIN r2 WITH `TypeInference::M2::SatisfiesConstraintWithTypeMatching<TypeInference::AssocFunctionResolution::ArgSatisfiesBlanketLikeConstraint::ArgumentTypeAndBlanketOffset,TypeMention::TypeMention,TypeInference::AssocFunctionResolution::ArgSatisfiesBlanketLikeConstraint::SatisfiesBlanketConstraint::Inp>::TermIsInstantiationOfCondition::getNthTypeParameter/2#40c66343_021#join_rhs` ON FIRST 2 OUTPUT Lhs.2, Lhs.0, Lhs.3, Rhs.2, _
                            {4}    | REWRITE WITH Tmp.4 := 0, TEST InOut.3 != Tmp.4 KEEPING 4
          41691564   ~1%    {5}    | SCAN OUTPUT In.0, In.1, In.2, _, In.3
          41691564   ~1%    {5}    | REWRITE WITH Tmp.3 := 1, Out.3 := (InOut.4 - Tmp.3)
                 0   ~0%    {4}    | JOIN WITH `TypeInference::M2::SatisfiesConstraintWithTypeMatching<TypeInference::FunctionCallMatching::AccessConstraint::RelevantAccess,TypeMention::TypeMention,TypeInference::FunctionCallMatching::AccessConstraint::SatisfiesTypeParameterConstraintInput>::TermIsInstantiationOfCondition::typeParametersHaveEqualInstantiationToIndex/4#dde26112#prev` ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.4

          42097188   ~0%    {6} r4 = JOIN r2 WITH `TypeInference::M2::SatisfiesConstraintWithTypeMatching<TypeInference::AssocFunctionResolution::ArgSatisfiesBlanketLikeConstraint::ArgumentTypeAndBlanketOffset,TypeMention::TypeMention,TypeInference::AssocFunctionResolution::ArgSatisfiesBlanketLikeConstraint::SatisfiesBlanketConstraint::Inp>::TermIsInstantiationOfCondition::getNthTypeParameter/2#40c66343_021#join_rhs` ON FIRST 2 OUTPUT Lhs.2, Lhs.0, Lhs.3, Lhs.1, Rhs.2, _
                            {5}    | REWRITE WITH Tmp.5 := 0, TEST InOut.4 = Tmp.5 KEEPING 5
            405624   ~1%    {5}    | SCAN OUTPUT In.1, _, In.3, In.0, In.2
            405624   ~1%    {5}    | REWRITE WITH Out.1 := 0
            405624   ~0%    {4}    | JOIN WITH `TypeInference::M2::SatisfiesConstraintWithTypeMatching<TypeInference::AssocFunctionResolution::ArgSatisfiesBlanketLikeConstraint::ArgumentTypeAndBlanketOffset,TypeMention::TypeMention,TypeInference::AssocFunctionResolution::ArgSatisfiesBlanketLikeConstraint::SatisfiesBlanketConstraint::Inp>::TermIsInstantiationOfCondition::getNthTypeParameter/2#40c66343` ON FIRST 3 OUTPUT Lhs.3, Lhs.0, Lhs.4, _
            405624   ~1%    {4}    | REWRITE WITH Out.3 := 0

          42097188   ~1%    {4} r5 = r1 UNION r3 UNION r4
          42097188   ~1%    {4}    | AND NOT `TypeInference::M2::SatisfiesConstraintWithTypeMatching<TypeInference::FunctionCallMatching::AccessConstraint::RelevantAccess,TypeMention::TypeMention,TypeInference::FunctionCallMatching::AccessConstraint::SatisfiesTypeParameterConstraintInput>::TermIsInstantiationOfCondition::typeParametersHaveEqualInstantiationToIndex/4#dde26112#prev`(FIRST 4)
                            return r5
```

After
```
Pipeline standard for TypeInference::M2::SatisfiesConstraintWithTypeMatching<TypeInference::FunctionCallMatching::AccessConstraint::RelevantAccess,TypeMention::TypeMention,TypeInference::FunctionCallMatching::AccessConstraint::SatisfiesTypeParameterConstraintInput>::TermIsInstantiationOfCondition::typeParametersHaveEqualInstantiationToIndex/4#dde26112@96df1x2u was evaluated in 471 iterations totaling 4058ms (delta sizes total: 42097188).
        42097188   ~0%    {4} r1 = SCAN `TypeInference::M2::SatisfiesConstraintWithTypeMatching<TypeInference::FunctionCallMatching::AccessConstraint::RelevantAccess,TypeMention::TypeMention,TypeInference::FunctionCallMatching::AccessConstraint::SatisfiesTypeParameterConstraintInput>::TermIsInstantiationOfCondition::typeParametersEqual/5#ddfcf430#prev_delta` OUTPUT In.3, In.0, In.1, In.2
          405624   ~0%    {4}    | JOIN WITH const_0 ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.3, _
          405624   ~1%    {4}    | REWRITE WITH Out.3 := 0

        42097188   ~1%    {6} r2 = SCAN `TypeInference::M2::SatisfiesConstraintWithTypeMatching<TypeInference::FunctionCallMatching::AccessConstraint::RelevantAccess,TypeMention::TypeMention,TypeInference::FunctionCallMatching::AccessConstraint::SatisfiesTypeParameterConstraintInput>::TermIsInstantiationOfCondition::typeParametersHaveEqualInstantiationToIndex/4#dde26112#prev_delta` OUTPUT In.0, In.1, In.2, _, In.3, _
        42097188   ~1%    {4}    | REWRITE WITH Tmp.3 := 1, Out.3 := (Tmp.3 + In.4), Tmp.5 := 0, TEST Out.3 != Tmp.5 KEEPING 4
        41691564   ~1%    {4}    | JOIN WITH `TypeInference::M2::SatisfiesConstraintWithTypeMatching<TypeInference::FunctionCallMatching::AccessConstraint::RelevantAccess,TypeMention::TypeMention,TypeInference::FunctionCallMatching::AccessConstraint::SatisfiesTypeParameterConstraintInput>::TermIsInstantiationOfCondition::typeParametersEqual/5#ddfcf430#prev` ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3

        42097188   ~1%    {6} r3 = SCAN `TypeInference::M2::SatisfiesConstraintWithTypeMatching<TypeInference::FunctionCallMatching::AccessConstraint::RelevantAccess,TypeMention::TypeMention,TypeInference::FunctionCallMatching::AccessConstraint::SatisfiesTypeParameterConstraintInput>::TermIsInstantiationOfCondition::typeParametersEqual/5#ddfcf430#prev_delta` OUTPUT In.0, In.1, In.2, In.3, In.4, _
                          {5}    | REWRITE WITH Tmp.5 := 0, TEST InOut.3 != Tmp.5 KEEPING 5
        41691564   ~1%    {5}    | SCAN OUTPUT In.0, In.1, In.2, _, In.3
        41691564   ~1%    {5}    | REWRITE WITH Tmp.3 := 1, Out.3 := (InOut.4 - Tmp.3)
               0   ~0%    {4}    | JOIN WITH `TypeInference::M2::SatisfiesConstraintWithTypeMatching<TypeInference::FunctionCallMatching::AccessConstraint::RelevantAccess,TypeMention::TypeMention,TypeInference::FunctionCallMatching::AccessConstraint::SatisfiesTypeParameterConstraintInput>::TermIsInstantiationOfCondition::typeParametersHaveEqualInstantiationToIndex/4#dde26112#prev` ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.4

        42097188   ~1%    {4} r4 = r1 UNION r2 UNION r3
        42097188   ~1%    {4}    | AND NOT `TypeInference::M2::SatisfiesConstraintWithTypeMatching<TypeInference::FunctionCallMatching::AccessConstraint::RelevantAccess,TypeMention::TypeMention,TypeInference::FunctionCallMatching::AccessConstraint::SatisfiesTypeParameterConstraintInput>::TermIsInstantiationOfCondition::typeParametersHaveEqualInstantiationToIndex/4#dde26112#prev`(FIRST 4)
                          return r4
```
2026-04-14 09:34:13 +02:00
Jeroen Ketema
26715fc95c C++: Rename rst to convSpec 2026-04-14 08:03:51 +02:00
dependabot[bot]
b19f2c6874 Bump the extractor-dependencies group in /go/extractor with 2 updates
Bumps the extractor-dependencies group in /go/extractor with 2 updates: [golang.org/x/mod](https://github.com/golang/mod) and [golang.org/x/tools](https://github.com/golang/tools).


Updates `golang.org/x/mod` from 0.34.0 to 0.35.0
- [Commits](https://github.com/golang/mod/compare/v0.34.0...v0.35.0)

Updates `golang.org/x/tools` from 0.43.0 to 0.44.0
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.43.0...v0.44.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-version: 0.35.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: extractor-dependencies
- dependency-name: golang.org/x/tools
  dependency-version: 0.44.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: extractor-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-14 03:04:45 +00:00
murderteeth
47915328e6 Address Copilot review nits
Fixes US spelling (recognised -> recognized) across docs, QLDoc,
change note, and test fixture comments. Clarifies the handler QLDoc
to note sync/async support. Renames the supported-frameworks entry
from "vercel" to "Vercel (@vercel/node)" to avoid implying broader
platform coverage.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 17:35:08 +00:00
murderteeth
cff07342f5 Recognize legacy @now/node type aliases
Extends the Vercel serverless handler detection to also match the
deprecated Zeit-era @now/node package with NowRequest/NowResponse
types. Per-review feedback from asgerf, these aliases still appear
in real-world code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 17:31:29 +00:00
Tom Hvitved
f6fb613962 Merge pull request #21700 from hvitved/js/fastify-per-route-rate-limiting
JS: Recognize Fastify per-route rate limiting
2026-04-13 17:28:34 +02:00
Jeroen Ketema
e0ce5bcf40 Merge pull request #21699 from jketema/join-fix
C++: Fix `isCompiledAsC` join order
2026-04-13 16:03:38 +02:00
Jeroen Ketema
19c4b2ff8f C++: Use getConvSpecString instead of getConvSpecOffset and substring 2026-04-13 15:44:41 +02:00
Anders Schack-Mulligen
d3e580fd0e C#: Introduce Expr.getIntValue. 2026-04-13 14:52:38 +02:00
Taus
2eeb31b472 Python: Add tests for lazy from ... import * as well 2026-04-13 11:49:06 +00:00
Taus
81468daf9c Merge pull request #21603 from github/tausbn/python-port-use-of-exit
Python: Port UseOfExit.ql
2026-04-13 13:20:29 +02:00
Taus
720ea702fe Merge pull request #21602 from github/tausbn/python-port-modification-of-locals
Python: Port ModificationOfLocals.ql
2026-04-13 13:19:40 +02:00
Taus
36bbc8ca14 Merge pull request #21601 from github/tausbn/python-port-unused-exception-object
Python: Port UnusedExceptionObject.ql
2026-04-13 13:19:12 +02:00
Taus
cc9bc746a1 Merge pull request #21597 from github/tausbn/python-port-unreachable-code
Python: Port UnreachableCode.ql
2026-04-13 13:17:59 +02:00
Tom Hvitved
fcfb8c9c6b Add change note 2026-04-13 12:22:30 +02:00
Tom Hvitved
7a48409e38 JS: Recognize Fastify per-route rate limiting 2026-04-13 11:31:34 +02:00
Tom Hvitved
fef582c858 JS: Add test case for Fastify per-route rate limiting 2026-04-13 11:24:41 +02:00
Jeroen Ketema
bee39c9d51 C++: Fix isCompiledAsC join order
Before on Abseil Windows for `cpp/too-few-arguments:`:
```
Pipeline standard for TooFewArguments::isCompiledAsC/1#52fe29e8@994f9bgp was evaluated in 12 iterations totaling 2ms (delta sizes total: 50).
        1198778   ~3%    {1} r1 = JOIN `TooFewArguments::isCompiledAsC/1#52fe29e8#prev_delta` WITH `Element::Element.getFile/0#2b8c8740_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1
             83  ~26%    {1}    | JOIN WITH includes ON FIRST 1 OUTPUT Rhs.1
             50   ~4%    {1}    | AND NOT `TooFewArguments::isCompiledAsC/1#52fe29e8#prev`(FIRST 1)
                         return r1
```

After:
```
Pipeline standard for #File::File.getAnIncludedFile/0#dispred#e8d44cd1Plus#bf@b8d290i6 was evaluated in 11 iterations totaling 0ms (delta sizes total: 43).
        47   ~0%    {2} r1 = SCAN `#File::File.getAnIncludedFile/0#dispred#e8d44cd1Plus#bf#prev_delta` OUTPUT In.1, In.0
        78  ~28%    {2}    | JOIN WITH `File::File.getAnIncludedFile/0#dispred#e8d44cd1` ON FIRST 1 OUTPUT Lhs.1, Rhs.1
        43   ~0%    {2}    | AND NOT `#File::File.getAnIncludedFile/0#dispred#e8d44cd1Plus#bf#prev`(FIRST 2)
                    return r1

[2026-04-13 11:05:25] Evaluated non-recursive predicate TooFewArguments::isCompiledAsC/1#52fe29e8@4a3eb9jk in 0ms (size: 49).
Evaluated relational algebra for predicate TooFewArguments::isCompiledAsC/1#52fe29e8@4a3eb9jk with tuple counts:
         1   ~0%    {3} r1 = CONSTANT(unique int, unique string, unique string)[1,"compiled as c","1"]
         1   ~0%    {1}    | JOIN WITH #fileannotationsMerge_1230#join_rhs ON FIRST 3 OUTPUT Rhs.3

        48   ~0%    {1} r2 = JOIN r1 WITH `#File::File.getAnIncludedFile/0#dispred#e8d44cd1Plus#bf` ON FIRST 1 OUTPUT Rhs.1

        49   ~0%    {1} r3 = r1 UNION r2
                    return r3
```
2026-04-13 11:13:52 +02:00
Tom Hvitved
40eff6525d Rust: Replace special handling of index expressions 2026-04-13 10:30:01 +02:00
Anders Schack-Mulligen
88160ef2e2 C#: Add change note. 2026-04-13 10:05:30 +02:00
murderteeth
dfe05599d3 JS: Add support for @vercel/node serverless functions
This adds a framework model for Vercel serverless functions so that
CodeQL's existing JavaScript security queries can detect vulnerabilities
in handlers of the form

    export default function handler(req: VercelRequest, res: VercelResponse) { ... }

Handlers are identified as the default export of a module whose first
two parameters are typed as `VercelRequest`/`VercelResponse` from
`@vercel/node`. The default-export constraint excludes private helpers
that share the same signature. Type-based detection follows the same
pattern already used by `NextReqResHandler` in `Next.qll`.

The framework model covers:
- Route handler recognition (default-exported typed handlers only)
- Request input sources: `query`, `body`, `cookies`, and `url`
  (the last inherited from Node's `IncomingMessage`)
- Named header accesses like `req.headers.host` and `req.headers.referer`,
  modelled as `Http::RequestHeaderAccess` so header-specific queries fire
- Response sinks: `res.send`, `res.status(...).send`, `res.redirect`
- Header definitions via `res.setHeader`

Includes a library test exercising each model predicate (including a
negative case for private helpers) and query consistency fixtures
demonstrating end-to-end detection for js/reflected-xss,
js/request-forgery, js/sql-injection, and js/command-line-injection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 19:17:18 +00:00
Geoffrey White
ae85ada669 Merge pull request #21634 from geoffw0/compwidertype2
C++: Upgrade cpp/comparison-with-wider-type to high precision
2026-04-10 16:08:11 +01:00
Taus
86020d9eed Python: Add change note 2026-04-10 14:43:30 +00:00
Taus
6b7d47ee7d Python: Add QL test for the new syntax 2026-04-10 14:39:13 +00:00
Taus
1ddfed6b6b Python: Add QL support for lazy imports
Adds a new `isLazy` predicate to the relevant classes, and adds the
relevant dbscheme (and up/downgrade) changes. On upgrades we do nothing,
and on downgrades we remove the `is_lazy` bits.
2026-04-10 14:25:08 +00:00
Taus
fe94828fe4 Python: Add overlay annotations to AST template
Otherwise these will disappear every time we regenerate the AST.
2026-04-10 14:23:29 +00:00
Taus
2c79f9d828 Python: Regenerate parser files 2026-04-10 13:50:59 +00:00
Taus
ad4018f399 Python: Add parser support for lazy imports
As defined in PEP-810. We implement this in much the same way as how we
handle `async` annotations currently. The relevant nodes get an
`is_lazy` field that defaults to being false.
2026-04-10 13:50:43 +00:00
Anders Schack-Mulligen
d5c9fd1085 C#/Cfg: A bit more qldoc. 2026-04-10 15:47:25 +02:00
Anders Schack-Mulligen
452913f336 C#: Improve perf of UnsynchronizedStaticAccess.ql. 2026-04-10 15:47:25 +02:00
Anders Schack-Mulligen
aaf9bb2e9e C#: Accept fewer CallContextSpecificCall due to no splitting. 2026-04-10 15:47:24 +02:00
Anders Schack-Mulligen
2d5a1840f4 C#: Accept new CFG in tests. 2026-04-10 15:47:24 +02:00
Anders Schack-Mulligen
bbd403dbc3 C#: Rework DataFlowCallable-to-cfg relation in terms of basic blocks for performance. 2026-04-10 15:47:23 +02:00
Anders Schack-Mulligen
bfbd0f77e8 C#: Fix some bad join orders. 2026-04-10 15:47:23 +02:00
Anders Schack-Mulligen
1d9c0ae388 C#: Fix perf. 2026-04-10 15:47:22 +02:00
Anders Schack-Mulligen
371bc3012e C#: CFG and data flow nodes now exist for LHSs. 2026-04-10 15:47:22 +02:00
Anders Schack-Mulligen
a7d4b00d06 C#: Accept changed location for phi nodes. 2026-04-10 15:47:21 +02:00
Anders Schack-Mulligen
a69581966b C#: Accept CFG changes for "first" relation. 2026-04-10 15:47:21 +02:00
Anders Schack-Mulligen
a997d9f80c C#: Accept fixed consistency check. 2026-04-10 15:47:20 +02:00
Anders Schack-Mulligen
773881f333 C#: Accept data flow inconsistency check for read+write calls. 2026-04-10 15:47:20 +02:00
Anders Schack-Mulligen
88256eeee8 C#: GuardedExpr no longer contains expressions guarded solely by disjunctions. 2026-04-10 15:47:19 +02:00
Anders Schack-Mulligen
e90243c348 C#: Accept irrelevant changes.
The additions are unintentional, but the fault lies with the shared
SignAnalysis code. The removals are due to compile-time constant
initializers no longer having CFG nodes.
2026-04-10 15:47:19 +02:00
Anders Schack-Mulligen
49cc931f92 C#: Compile-time constants no longer have CFG nodes. 2026-04-10 15:47:18 +02:00
Anders Schack-Mulligen
5d589093cf C#: Accept CFG changes. 2026-04-10 15:47:18 +02:00
Anders Schack-Mulligen
a5c99f9693 C#: Accept harmless CFG changes. 2026-04-10 15:47:17 +02:00
Anders Schack-Mulligen
6010640cea C#: Accept bugfix. 2026-04-10 15:47:17 +02:00
Anders Schack-Mulligen
1a6670a6bb C#: Phi nodes are not expected to have associated Elements. 2026-04-10 15:47:16 +02:00
Anders Schack-Mulligen
43fe411585 C#: Accept SSA location changes. 2026-04-10 15:47:16 +02:00
Anders Schack-Mulligen
093eb57ad0 C#: Fix CFG position of property setter calls. 2026-04-10 15:47:15 +02:00
Anders Schack-Mulligen
ac88b73b65 C#: Bugfix in enclosing callable. 2026-04-10 15:47:15 +02:00
Anders Schack-Mulligen
700d56f3ab C#: Fix UncheckedCastInEquals. 2026-04-10 15:47:14 +02:00
Anders Schack-Mulligen
b1790335c0 C#: Fix test. 2026-04-10 15:47:14 +02:00
Anders Schack-Mulligen
ff978d1a8c C#: Replace CFG. 2026-04-10 15:47:13 +02:00
Anders Schack-Mulligen
9cf9a36d0d C#: Rename ControlFlow::BasicBlock to BasicBlock. 2026-04-10 15:47:12 +02:00
Anders Schack-Mulligen
13a4141cc6 C#: Rename remaining references to ControlFlow::Nodes. 2026-04-10 15:47:12 +02:00
Anders Schack-Mulligen
b878ae3f21 C#: Update some references to ControlFlow::Nodes. 2026-04-10 15:47:11 +02:00
Anders Schack-Mulligen
03f6bdbdd2 C#: Update some references in preparation for CFG swap. 2026-04-10 15:47:11 +02:00
Anders Schack-Mulligen
b85b02abb4 Cfg: Add dominance predicates to shared ControlFlowNode. 2026-04-10 15:47:10 +02:00
Anders Schack-Mulligen
61976e3ef0 C#: Rename ControlFlow::Node to ControlFlowNode. 2026-04-10 15:47:10 +02:00
Anders Schack-Mulligen
88aaff863b Cfg: Extend consistency checks. 2026-04-10 15:47:09 +02:00
Anders Schack-Mulligen
6ffed8523c Cfg/Java: Move InstanceOfExpr CFG into shared lib. 2026-04-10 15:47:09 +02:00
Anders Schack-Mulligen
035b83c0e4 C#: Introduce ControlFlowElementOrCallable. 2026-04-10 15:47:08 +02:00
Anders Schack-Mulligen
0b6c416fd4 Cfg: Support short-circuiting compound assignments. 2026-04-10 15:47:08 +02:00
Anders Schack-Mulligen
a53cffc121 Cfg: Support GotoStmt. 2026-04-10 15:47:07 +02:00
Anders Schack-Mulligen
93a594e9c0 Cfg: Support Throw expressions. 2026-04-10 15:47:07 +02:00
Taus
6078df524b Merge pull request #21683 from github/tausbn/python-add-extractor-pack-build-script
Python: Add `create-extractor-pack.sh` for Python
2026-04-10 15:16:54 +02:00
Jeroen Ketema
888d392040 Merge pull request #21636 from jketema/actions-perm
Actions: Correctly check reusable workflow permissions in `actions/missing-workflow-permissions`
2026-04-10 15:02:36 +02:00
Geoffrey White
b9226a359a Merge pull request #21633 from geoffw0/intmultlong2
C++: Upgrade cpp/integer-multiplication-cast-to-long to high precision
2026-04-10 14:02:34 +01:00
Geoffrey White
814c0ae7a8 Merge pull request #21632 from geoffw0/wrongtype2
C++: Upgrade cpp/wrong-type-format-argument to high precision
2026-04-10 14:01:07 +01:00
Geoffrey White
9ea33bc5bb Merge pull request #21553 from geoffw0/implicitfn
C++: Disable cpp/implicit-function-declaration on build mode none databases
2026-04-10 14:00:06 +01:00
Geoffrey White
bcf612e6fe Merge branch 'main' into compwidertype2 2026-04-10 13:58:35 +01:00
Anders Schack-Mulligen
dfa8d72dd3 Merge pull request #21685 from aschackmull/csharp/unbind-new
C#: Replace old-style unbind with pragmas.
2026-04-10 13:55:01 +02:00
Tom Hvitved
27f7f747a4 Rust: Check whole blanket constraints, not just the root trait type 2026-04-10 13:20:36 +02:00
Tom Hvitved
be329c8ab4 Rust: Replace recursion through forall with ranked recursion 2026-04-10 13:18:57 +02:00
Geoffrey White
bcdbf141bc Merge pull request #21671 from geoffw0/neutralperf
Rust: Fix performance issue with additionalExternalFile
2026-04-10 12:08:27 +01:00
Geoffrey White
0714ca816a Merge branch 'main' into suspicioussizeof2 2026-04-10 10:10:45 +01:00
Tom Hvitved
42fe2d5002 Rust: Add another type inference test 2026-04-10 10:18:54 +02:00
Paolo Tranquilli
7de8ce961c Merge pull request #21677 from github/dependabot/bazel/gazelle-0.50.0
Bump gazelle from 0.47.0 to 0.50.0
2026-04-10 10:07:25 +02:00
Michael Nebel
66278fcd10 Merge pull request #21690 from samchang-msft/update-net10-support
Support added in Jan 2026
2026-04-10 08:40:29 +02:00
Sam Chang
7883fab44f Qualify the limited support for .NET 10 and C# 14 2026-04-09 12:06:54 -07:00
Sam Chang
38440d96b8 Support added in Jan 2026 2026-04-09 10:48:08 -07:00
Jeroen Ketema
43f48001e3 Swift: Clear override 2026-04-09 16:32:43 +02:00
Jeroen Ketema
4ada727bab Swift: Add staged archives to LFS 2026-04-09 16:32:36 +02:00
Anders Schack-Mulligen
cf4ab1d106 C#: Replace old-style unbind with pragmas. 2026-04-09 15:57:19 +02:00
Tom Hvitved
23f081006e Rust: Track closure types in data flow 2026-04-09 15:25:52 +02:00
Tom Hvitved
3fa5c952b3 Rust: Add more closure flow tests 2026-04-09 15:25:50 +02:00
Jeroen Ketema
85c42ae932 Swift: Update supported versions 2026-04-09 15:19:29 +02:00
Jeroen Ketema
94fb011b90 Swift: Add change note 2026-04-09 15:17:13 +02:00
Taus
d622dabf3e Python: Add create-extractor-pack.sh for Python
This allows us to build and test the extractor (for actual QL extraction
-- not just the extractor unit tests) entirely from within the
`github/codeql` repo, just as we do with Ruby. All that's needed is a
`--search-path` argument that points to the repo root.
2026-04-09 13:06:45 +00:00
Jeroen Ketema
21937c2415 Swift: Add dbscheme upgrade and downgrade scripts 2026-04-09 15:05:30 +02:00
Jeroen Ketema
7879d0a006 Swift: Fix OpaqueTypeArchetypeType name mangling 2026-04-09 15:05:28 +02:00
Jeroen Ketema
34b626e8bb Swift: Update expected integration test results 2026-04-09 15:05:27 +02:00
Jeroen Ketema
d09e2f66cd Swift: Assign indexes to fileprivate ValueDecls
At least in the case of function declarations there can be multiple
identical ones within the same module, causing data set check errors
if not differentiated.
2026-04-09 15:05:16 +02:00
Tom Hvitved
33cc887be0 Merge pull request #21592 from hvitved/dataflow/source-call-context-type-flow
Data flow: Add hook for preventing lambda dispatch in source call contexts
2026-04-09 13:44:42 +02:00
Geoffrey White
e72c116664 Rust: Proposed improved solution. 2026-04-09 11:18:25 +01:00
Tom Hvitved
d704b753c8 Fix CP in typeFlowParamType
Forgot to link `p` with `c` using `nodeEnclosingCallable(p, c)`.
2026-04-09 09:19:55 +02:00
dependabot[bot]
7833a0a2e8 Bump gazelle from 0.47.0 to 0.50.0
Bumps [gazelle](https://github.com/bazel-contrib/bazel-gazelle) from 0.47.0 to 0.50.0.
- [Release notes](https://github.com/bazel-contrib/bazel-gazelle/releases)
- [Commits](https://github.com/bazel-contrib/bazel-gazelle/compare/v0.47.0...v0.50.0)

---
updated-dependencies:
- dependency-name: gazelle
  dependency-version: 0.50.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-09 03:08:02 +00:00
Geoffrey White
95681bfad4 Rust: Fix performance issue with File.fromSource. 2026-04-08 15:04:03 +01:00
Jeroen Ketema
7bf78de167 Swift: Fix AnyFunctionType name mangling 2026-04-08 15:53:24 +02:00
Kristen Newbury
fb0ee5b987 Merge pull request #21640 from knewbury01/knewbury01/adjust-actions-queries-alerts
Adjust alert messages CWE-829/ArtifactPoisoning[Critical|Medium]
2026-04-08 09:44:00 -04:00
Jeroen Ketema
f7de0abe60 Swift: Fix BuiltinFixedArrayType mangling 2026-04-08 15:41:57 +02:00
Kristen Newbury
7b7411f7df Change alert location CWE-829/ArtifactPoisoning queries 2026-04-08 08:57:45 -04:00
Jeroen Ketema
5eb8db0d48 Swift: Update expected QL test results after 6.3 update 2026-04-08 13:21:33 +02:00
Jeroen Ketema
6b2494c3e5 Swift: Update generated files 2026-04-08 13:21:03 +02:00
Jeroen Ketema
d473c7143d Swift: Update schema 2026-04-08 13:20:06 +02:00
Jeroen Ketema
fd83515843 Swift: Make extractor compile 2026-04-08 13:19:40 +02:00
Jeroen Ketema
2fbfcb970e Swift: Use Swift 6.3 artifacts 2026-04-08 13:19:00 +02:00
Taus
e3688444d7 Python: Also exclude class scope
Changing the `locals()` dictionary actually _does_ change the attributes
of the class being defined, so we shouldn't alert in this case.
2026-04-07 23:46:03 +02:00
Taus
8d79248ea7 Python: Port ModificationOfLocals.ql 2026-04-07 23:46:03 +02:00
Taus
16683aee0e Merge pull request #21590 from github/tausbn/python-improve-bind-all-interfaces-query
Python: Improve "bind all interfaces" query
2026-04-07 17:59:48 +02:00
Jeroen Ketema
e7d3eedc80 Merge pull request #21661 from jketema/autoconf
C++: Add heuristic for GNU autoconf config files
2026-04-07 15:38:06 +02:00
Taus
4cb238f1af Merge pull request #21598 from github/tausbn/python-port-should-use-with
Python: Port ShouldUseWithStatement.ql
2026-04-07 14:16:41 +02:00
Geoffrey White
b21dba6131 C++: Update code scanning suite .expected. 2026-04-07 13:06:34 +01:00
Geoffrey White
201af3fffc C++: Update code scanning suite .expected. 2026-04-07 12:59:31 +01:00
Geoffrey White
f2292643a3 C++: Update code scanning suite .expected. 2026-04-07 12:53:53 +01:00
Geoffrey White
3769a8a482 C++: Update code scanning suite .expected. 2026-04-07 12:51:56 +01:00
Mathias Vorreiter Pedersen
5e145aa27d Merge pull request #21631 from MathiasVP/expose-fwd-stage-1
Dataflow: Expose stage 1's `fwdFlow`
2026-04-07 11:29:56 +01:00
Mathias Vorreiter Pedersen
e06294bcb4 Shared: Respond to review comments. 2026-04-07 11:11:04 +01:00
Idriss Riouak
39f92e992a Merge pull request #21494 from github/idrissrio/java/jdk26
Java: Accept new test results after JDK 26 extractor upgrade
2026-04-07 12:03:36 +02:00
Tom Hvitved
0d4524f8f3 Address review comments 2026-04-07 11:40:10 +02:00
Tom Hvitved
1e1a8732a3 Data flow: Add hook for preventing lambda dispatch in source call contexts 2026-04-07 11:40:08 +02:00
Tom Hvitved
eb64fcd208 C#: Add test that shows unintended flow summary generation 2026-04-07 11:40:07 +02:00
Jeroen Ketema
04cfd37f53 C++: Fix comments in tests 2026-04-07 10:52:12 +02:00
Jeroen Ketema
b19c648965 C++: Add heuristic for GNU autoconf config files 2026-04-07 10:43:15 +02:00
Michael Nebel
e259ebe258 Merge pull request #21627 from michaelnebel/csharp/cleanup
C#: Deprecate get[L|R]Value predicates.
2026-04-07 10:23:59 +02:00
idrissrio
6f199b90ba Java: Accept new test results for JDK 26
Accept new ByteOrder.getEntries, List.ofLazy, and Map.ofLazy entries
in kotlin2 test expected files.
2026-04-07 09:28:25 +02:00
idrissrio
3ccbd8032c Java: Accept new test results for JDK 26
JDK 26 added ofLazy methods to List, Map, and Set collections.
Update expected test output to include these new methods.
2026-04-07 09:28:23 +02:00
idrissrio
5a6eb79470 Java: Pin CWE-676 test to --release 25
Thread.stop() was removed in JDK 26. Pin the test to --release 25.
2026-04-07 09:28:22 +02:00
idrissrio
74b0e8c19a Java: Accept new test results after JDK 26 extractor upgrade 2026-04-07 09:28:20 +02:00
Tom Hvitved
7d184d0c7f Merge pull request #21206 from hvitved/rust/type-inference-closure-param-context-typed
Rust: Infer argument types based on trait bounds on parameters
2026-04-07 09:17:30 +02:00
github-actions[bot]
242090e0ac Post-release preparation for codeql-cli-2.25.2 2026-04-06 13:49:20 +00:00
Óscar San José
868ccfbb04 Merge pull request #21657 from github/release-prep/2.25.2
Release preparation for version 2.25.2
2026-04-06 12:50:52 +02:00
github-actions[bot]
4fe2f6d2b4 Release preparation for version 2.25.2 2026-04-06 10:30:38 +00:00
MarkLee131
b49c6dcbd4 Add @Pattern annotation test case and javax-validation-constraints stub
Adds a dedicated test verifying that fields annotated with
@javax.validation.constraints.Pattern are recognized as sanitized
by RegexpCheckBarrier, in addition to the existing String.matches()
guard test.
2026-04-04 22:04:05 +08:00
Kaixuan Li
258a53e146 Update java/ql/test/query-tests/security/CWE-501/TrustBoundaryViolations.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-04 22:02:00 +08:00
MarkLee131
46ef0204ef Remove secretQuestion from FP exclusion list
secretQuestion is ambiguous: it could be the question text (not
sensitive) or a security question answer. Worse, the regex
secrets?(question) also matches secretQuestionAnswer, which is
clearly sensitive. Drop it to avoid false negatives.
2026-04-04 21:58:32 +08:00
MarkLee131
345b842edc Java: add RegexpCheckBarrier to trust-boundary-violation sanitizers
The trust-boundary-violation query only recognized OWASP ESAPI validators
as sanitizers. ESAPI is rarely used in modern Java projects, while regex
validation via String.matches() and @javax.validation.constraints.Pattern
is the standard approach in Spring/Jakarta applications.

RegexpCheckBarrier already exists in Sanitizers.qll and is used by other
queries (e.g., RequestForgery). This wires it into TrustBoundaryConfig,
so patterns like input.matches("[a-zA-Z0-9]+") and @Pattern annotations
are recognized as sanitizers, consistent with the existing ESAPI treatment.
2026-04-04 21:36:37 +08:00
MarkLee131
f338ded349 Java: treat hash/encrypt/digest methods as sensitive-log sanitizers
The sensitive-log query (CWE-532) lacked sanitizers for hashed or
encrypted data, while the sibling cleartext-storage query (CWE-312)
already recognized methods with "encrypt", "hash", or "digest" in their
names as sanitizers (CleartextStorageQuery.qll:86).

This adds an EncryptionBarrier to SensitiveLoggingQuery that applies the
same name-based heuristic, making the two queries consistent. Calls like
DigestUtils.sha256Hex(password) or hashPassword(secret) are no longer
flagged when their results are logged.
2026-04-04 21:35:36 +08:00
MarkLee131
20cfe29199 Java: reduce false positives in sensitive-log by expanding FP exclusion regex
The getCommonSensitiveInfoFPRegex() only excluded "null", "tokenizer", and
"tokenImage", causing widespread false positives for common non-sensitive
variable names containing "token" or "secret".

This adds exclusions for three categories:
- Pagination/iteration tokens: nextToken (AWS SDK), pageToken (GCP),
  continuationToken (Azure), etc.
- Token metadata: tokenType (OAuth), tokenEndpoint (OIDC), tokenCount,
  tokenIndex, tokenLength, tokenUrl, etc.
- Secret metadata: secretName (K8s/AWS), secretId (Azure),
  secretVersion, secretArn, secretPath, etc.

All truly sensitive variable names (accessToken, clientSecret, secretKey,
refreshToken, etc.) remain correctly flagged.
2026-04-04 21:33:35 +08:00
MarkLee131
9ff4ed286f Java: recognize Path.toRealPath() as path normalization sanitizer
PathNormalizeSanitizer recognized Path.normalize() and
File.getCanonicalPath()/getCanonicalFile(), but not Path.toRealPath().

toRealPath() is strictly stronger than normalize() (resolves symlinks
and verifies file existence in addition to normalizing ".." components),
and is functionally equivalent to File.getCanonicalPath() for the NIO.2
API. CERT FIO16-J and OWASP both recommend it for path traversal defense.

This adds toRealPath to PathNormalizeSanitizer alongside normalize,
reducing false positives for code using idiomatic NIO.2 path handling.
2026-04-04 20:59:45 +08:00
Mario Campos
fb8b5699f2 Merge pull request #21639 from github/mario-campos/test-go-registries
Add tests for multiple Git sources and GoProxy servers in registry config parsing
2026-04-02 11:12:51 -05:00
Kristen Newbury
41714656ec Adjust alert messages actions CWE-829 2026-04-02 11:58:58 -04:00
Kristen Newbury
e69e30aa84 Adjust alert messages CWE-829/ArtifactPoisoning[Critical|Medium] 2026-04-02 11:32:37 -04:00
Mario Campos
fb871cdfb8 Add tests for multiple Git sources and GoProxy servers in registry config parsing 2026-04-02 10:12:48 -05:00
Paolo Tranquilli
cedacc91db Merge pull request #21583 from github/redsun82/update-kotlin-2.3.20
Kotlin: update to 2.3.20
2026-04-02 15:58:22 +02:00
Jeroen Ketema
87f9b9581e Actions: Add change note 2026-04-02 15:48:45 +02:00
Jeroen Ketema
47409d1c59 Actions: Update expected test results 2026-04-02 15:43:49 +02:00
Jeroen Ketema
74e6d3474d Actions: Correctly check permissions in actions/missing-workflow-permissions 2026-04-02 15:42:45 +02:00
Jeroen Ketema
5866bcc881 Actions: Add FP test for actions/missing-workflow-permissions 2026-04-02 15:41:41 +02:00
Geoffrey White
cc89b6ea91 C++: Change note. 2026-04-02 11:52:37 +01:00
Geoffrey White
70b72f70e1 C++: Upgrade query precision. 2026-04-02 11:52:36 +01:00
Geoffrey White
56af9a84ab Update cpp/ql/src/Likely Bugs/Underspecified Functions/ImplicitFunctionDeclaration.qhelp 2026-04-02 11:40:51 +01:00
Geoffrey White
9eabfc5fdc Update cpp/ql/src/Likely Bugs/Underspecified Functions/ImplicitFunctionDeclaration.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2026-04-02 11:39:45 +01:00
Geoffrey White
e83658ed06 C++: Upgrade query precision. 2026-04-02 11:38:09 +01:00
Geoffrey White
2d02056e5c C++: Second change note. 2026-04-02 11:34:54 +01:00
Geoffrey White
9dbbdef4cb C++: Change note. 2026-04-02 11:30:52 +01:00
Geoffrey White
520e95d92c C++: Upgrade query precision. 2026-04-02 11:30:34 +01:00
Geoffrey White
909b55a40a C++: Change note. 2026-04-02 11:28:34 +01:00
Geoffrey White
b41a4ff5e4 C++: Upgrade query precision. 2026-04-02 11:28:19 +01:00
Geoffrey White
fca567f6ea C++: Change note. 2026-04-02 11:26:50 +01:00
Geoffrey White
84c01bc255 C++: Upgrade query precision. 2026-04-02 11:26:49 +01:00
Mathias Vorreiter Pedersen
4d8b782695 Shared: Also expose dataflow stage 1's forward flow predicate. 2026-04-02 10:56:09 +01:00
Paolo Tranquilli
88a893efca Kotlin: update supported versions in documentation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-02 08:34:22 +02:00
Michael Nebel
6d5aff4822 C#: Add change-note. 2026-04-01 13:17:52 +02:00
Michael Nebel
9c095bc580 C#: Deprecate get[L|R]Value predicates. 2026-04-01 12:50:37 +02:00
Paolo Tranquilli
1836a63122 Merge remote-tracking branch 'origin/main' into wild-crest-ql 2026-03-31 11:35:24 +02:00
Paolo Tranquilli
628f85aebc Kotlin: accept test changes 2026-03-30 15:35:19 +02:00
Paolo Tranquilli
106d6b91f3 Merge remote-tracking branch 'origin/main' into wild-crest-ql 2026-03-30 14:21:28 +02:00
Paolo Tranquilli
6433b80b25 Kotlin: accept integration test changes
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-30 14:21:19 +02:00
Paolo Tranquilli
1d028382da Merge branch 'main' into wild-crest-ql 2026-03-30 12:04:16 +02:00
Paolo Tranquilli
6fad5b823c Kotlin: accept test changes
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-30 10:07:17 +02:00
Taus
a0b3c2f13a Python: Update change note
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-27 23:46:50 +01:00
Taus
187f7c7bcf Python: Move isNetworkBind check into isSink 2026-03-27 22:45:26 +00:00
Owen Mansel-Chan
37aac05964 Replace branch with acceptingValue 2026-03-27 22:39:10 +00:00
Taus
c5ef1f6342 Python: Port UseOfExit.ql 2026-03-27 22:28:38 +00:00
Owen Mansel-Chan
a7fdc4b543 Replace acceptingvalue with acceptingValue 2026-03-27 22:15:45 +00:00
Geoffrey White
a9cce1c0fa C++: Undo increasing query precision. 2026-03-27 17:32:03 +00:00
Geoffrey White
4f3108c444 C++: Update change note. 2026-03-27 17:04:05 +00:00
Taus
4f74d421b9 Python: Exclude AF_UNIX sockets from BindToAllInterfaces
Looking at the results of the the previous DCA run, there was a bunch of
false positives where `bind` was being used with a `AF_UNIX` socket (a
filesystem path encoded as a string), not a `(host, port)` tuple. These
results should be excluded from the query, as they are not vulnerable.

Ideally, we would just add `.TupleElement[0]` to the MaD sink, except we
don't actually support this in Python MaD...

So, instead I opted for a more low-tech solution: check that the
argument in question flows from a tuple in the local scope.

This eliminates a bunch of false positives on `python/cpython` leaving
behind four true positive results.
2026-03-27 16:55:10 +00:00
Geoffrey White
50681a3c42 C++: Add note to the .qhelp. 2026-03-27 16:47:31 +00:00
Geoffrey White
bb9873dc8f C++: Increase the query precision to high. 2026-03-27 16:40:45 +00:00
Taus
47d24632e6 Python: Port ShouldUseWithStatement.ql
Only trivial test changes.
2026-03-27 12:34:20 +00:00
Taus
0ea80ac184 Python: Port UnusedExceptionObject.ql
Depending on whether other queries depend on this, we may end up moving
the exception utility functions to a more central location.
2026-03-27 12:34:14 +00:00
Taus
60f9ce4ce7 Python: Port UnreachableCode.ql 2026-03-27 12:33:04 +00:00
Owen Mansel-Chan
b3285c6ae2 Make description of acceptingvalue column clearer 2026-03-27 11:35:22 +00:00
Tom Hvitved
6dc98cfd01 Rust: Infer argument types based on trait bounds on parameters 2026-03-27 11:39:03 +01:00
Owen Mansel-Chan
5451424e75 Rust: Fix columns for neutrals 2026-03-27 09:47:36 +00:00
Owen Mansel-Chan
886a16bfad C++: Add provenance column 2026-03-27 09:47:34 +00:00
Owen Mansel-Chan
e680d49c93 Shared: document extensible relations rather than CSV 2026-03-27 09:47:32 +00:00
Owen Mansel-Chan
df842665b7 Rust: Add neutrals to MaD format explanation 2026-03-27 09:47:30 +00:00
Owen Mansel-Chan
805d2ec46c Go: Add provenance to MaD format explanation 2026-03-27 09:47:28 +00:00
Owen Mansel-Chan
61b13d5702 C++: Add provenance to MaD format explanation 2026-03-27 09:47:26 +00:00
Owen Mansel-Chan
10fddc7b96 Add barriers and barrier guards to MaD format explanations 2026-03-27 09:47:24 +00:00
Taus
c9832c330a Python: Convert BindToAllInterfaces to path-problem
Now that we're using global data-flow, we might as well make use of the
fact that we know where the source is.
2026-03-26 21:10:43 +00:00
Henry Mercer
4f79d6a2de Merge branch 'main' into henrymercer/yaml-regression-test 2026-03-26 19:36:21 +00:00
Tom Hvitved
b8a8a160c5 Rust: More type inference tests 2026-03-26 18:06:32 +01:00
Taus
c0ce6699a5 Python: Add change note 2026-03-26 15:35:33 +00:00
Taus
c439fc5d45 Python: Replace type tracking with global data-flow
This takes care of most of the false negatives from the preceding
commit.

Additionally, we add models for some known wrappers of `socket.socket`
from the `gevent` and `eventlet` packages.
2026-03-26 15:35:33 +00:00
Taus
1ecd9e83b8 Python: Add test cases for BindToAllInterfaces FNs
Adds test cases from github/codeql#21582 demonstrating false negatives:
- Address stored in class attribute (`self.bind_addr`)
- `os.environ.get` with insecure default value
- `gevent.socket` (alternative socket module)
2026-03-26 14:57:24 +00:00
Taus
824d004a27 Python: Convert BindToAllInterfaces test to inline expectations 2026-03-26 14:56:57 +00:00
Paolo Tranquilli
2a3d2b882d Merge branch 'main' into redsun82/update-kotlin-2.3.20 2026-03-26 14:59:59 +01:00
Paolo Tranquilli
4e6d94bc4f Kotlin: reinstante trailing whitespace 2026-03-26 14:59:49 +01:00
Paolo Tranquilli
c2e1ae3b9c Kotlin: accept test changes 2026-03-26 12:20:59 +01:00
Paolo Tranquilli
ded6968558 Kotlin: update to 2.3.20 2026-03-26 11:43:37 +01:00
Henry Mercer
389630a95d Merge branch 'main' into henrymercer/yaml-regression-test 2026-03-26 10:40:17 +00:00
Paolo Tranquilli
e0bc18c228 Add changenote for false positive sink model removals 2026-03-26 09:19:34 +01:00
Paolo Tranquilli
e807545591 Remove false positive docker/build-push-action context sink model
The `context` input is passed as a single array element through
`docker/actions-toolkit` and `@actions/exec` all the way to
`child_process.spawn()`, which does not perform shell splitting.
No code injection is possible.

Fixes https://github.com/github/codeql/issues/21428
2026-03-26 09:08:34 +01:00
Paolo Tranquilli
55d16e8781 Remove false-positive command-injection sink model for step-security/harden-runner
The `allowed-endpoints` input only flows to `execFileSync("echo", [content])`
(no shell) and `fs.writeFileSync` (JSON config), neither of which is a
command injection vector.

Fixes https://github.com/github/codeql/issues/21568
2026-03-25 10:58:16 +01:00
Henry Mercer
c9fcdf3e80 JS: Add regression test for YAML extraction
SnakeYAML 2.3 has [a bug](https://bitbucket.org/snakeyaml/snakeyaml/issues/1098) where it crashes with an `IndexOutOfBoundsException` when a Unicode surrogate pair (e.g. an emoji) straddles the 1024 character internal buffer boundary.  This happens because the high surrogate can end up as the last character in the data window, and the reader tries to read the low surrogate past the end of the buffer.

This caused languages that extract YAML, most notably JavaScript and Actions, to fail when the codebase contained a YAML file with an emoji at an unlucky position in the file.
2026-03-24 18:47:52 +00:00
Geoffrey White
39056e4477 C++: Change note. 2026-03-23 12:28:17 +00:00
Geoffrey White
5a77128a8b C++: Disable cpp/implicit-function-declaration on BMN databases. 2026-03-23 11:27:15 +00:00
1353 changed files with 164809 additions and 105213 deletions

View File

@@ -7,9 +7,9 @@ repos:
rev: v3.2.0
hooks:
- id: trailing-whitespace
exclude: /test/.*$(?<!\.qlref)|.*\.patch$|.*\.qll?$
exclude: /test([^/]*)/.*$(?<!\.qlref)|.*\.patch$|.*\.qll?$
- id: end-of-file-fixer
exclude: Cargo.lock$|/test/.*$(?<!\.qlref)|.*\.patch$|.*\.qll?$
exclude: Cargo.lock$|/test([^/]*)/.*$(?<!\.qlref)|.*\.patch$|.*\.qll?$
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6

View File

@@ -27,7 +27,7 @@ bazel_dep(name = "abseil-cpp", version = "20260107.1", repo_name = "absl")
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json")
bazel_dep(name = "fmt", version = "12.1.0-codeql.1")
bazel_dep(name = "rules_kotlin", version = "2.2.2-codeql.1")
bazel_dep(name = "gazelle", version = "0.47.0")
bazel_dep(name = "gazelle", version = "0.50.0")
bazel_dep(name = "rules_dotnet", version = "0.21.5-codeql.1")
bazel_dep(name = "googletest", version = "1.17.0.bcr.2")
bazel_dep(name = "rules_rust", version = "0.69.0")
@@ -242,6 +242,7 @@ use_repo(
"kotlin-compiler-2.2.0-Beta1",
"kotlin-compiler-2.2.20-Beta2",
"kotlin-compiler-2.3.0",
"kotlin-compiler-2.3.20",
"kotlin-compiler-embeddable-1.8.0",
"kotlin-compiler-embeddable-1.9.0-Beta",
"kotlin-compiler-embeddable-1.9.20-Beta",
@@ -252,6 +253,7 @@ use_repo(
"kotlin-compiler-embeddable-2.2.0-Beta1",
"kotlin-compiler-embeddable-2.2.20-Beta2",
"kotlin-compiler-embeddable-2.3.0",
"kotlin-compiler-embeddable-2.3.20",
"kotlin-stdlib-1.8.0",
"kotlin-stdlib-1.9.0-Beta",
"kotlin-stdlib-1.9.20-Beta",
@@ -262,6 +264,7 @@ use_repo(
"kotlin-stdlib-2.2.0-Beta1",
"kotlin-stdlib-2.2.20-Beta2",
"kotlin-stdlib-2.3.0",
"kotlin-stdlib-2.3.20",
)
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")

View File

@@ -1,3 +1,17 @@
## 0.4.35
No user-facing changes.
## 0.4.34
### Minor Analysis Improvements
* Removed false positive injection sink models for the `context` input of `docker/build-push-action` and the `allowed-endpoints` input of `step-security/harden-runner`.
## 0.4.33
No user-facing changes.
## 0.4.32
No user-facing changes.

View File

@@ -0,0 +1,3 @@
## 0.4.33
No user-facing changes.

View File

@@ -0,0 +1,5 @@
## 0.4.34
### Minor Analysis Improvements
* Removed false positive injection sink models for the `context` input of `docker/build-push-action` and the `allowed-endpoints` input of `step-security/harden-runner`.

View File

@@ -0,0 +1,3 @@
## 0.4.35
No user-facing changes.

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.4.32
lastReleaseVersion: 0.4.35

View File

@@ -1,6 +0,0 @@
extensions:
- addsTo:
pack: codeql/actions-all
extensible: actionsSinkModel
data:
- ["docker/build-push-action", "*", "input.context", "code-injection", "manual"]

View File

@@ -1,6 +0,0 @@
extensions:
- addsTo:
pack: codeql/actions-all
extensible: actionsSinkModel
data:
- ["step-security/harden-runner", "*", "input.allowed-endpoints", "command-injection", "manual"]

View File

@@ -1,5 +1,5 @@
name: codeql/actions-all
version: 0.4.33-dev
version: 0.4.35
library: true
warnOnImplicitThis: true
dependencies:

View File

@@ -1,3 +1,21 @@
## 0.6.27
No user-facing changes.
## 0.6.26
### Major Analysis Improvements
* Fixed alert messages in `actions/artifact-poisoning/critical` and `actions/artifact-poisoning/medium` as they previously included a redundant placeholder in the alert message that would on occasion contain a long block of yml that makes the alert difficult to understand. Also improved the wording to make it clearer that it is not the artifact that is being poisoned, but instead a potentially untrusted artifact that is consumed. Finally, changed the alert location to be the source, to align more with other queries reporting an artifact (e.g. zipslip) which is more useful.
### Minor Analysis Improvements
* The query `actions/missing-workflow-permissions` no longer produces false positive results on reusable workflows where all callers set permissions.
## 0.6.25
No user-facing changes.
## 0.6.24
No user-facing changes.

View File

@@ -26,10 +26,23 @@ string permissionsForJob(Job job) {
"{" + concat(string permission | permission = jobNeedsPermission(job) | permission, ", ") + "}"
}
predicate jobHasPermissions(Job job) {
exists(job.getPermissions())
or
exists(job.getEnclosingWorkflow().getPermissions())
or
// The workflow is reusable and cannot be triggered in any other way; check callers
exists(ReusableWorkflow r | r = job.getEnclosingWorkflow() |
not exists(Event e | e = r.getOn().getAnEvent() | e.getName() != "workflow_call") and
forall(Job caller | caller = job.getEnclosingWorkflow().(ReusableWorkflow).getACaller() |
jobHasPermissions(caller)
)
)
}
from Job job, string permissions
where
not exists(job.getPermissions()) and
not exists(job.getEnclosingWorkflow().getPermissions()) and
not jobHasPermissions(job) and
// exists a trigger event that is not a workflow_call
exists(Event e |
e = job.getATriggerEvent() and

View File

@@ -20,6 +20,6 @@ from ArtifactPoisoningFlow::PathNode source, ArtifactPoisoningFlow::PathNode sin
where
ArtifactPoisoningFlow::flowPath(source, sink) and
event = getRelevantEventInPrivilegedContext(sink.getNode())
select sink.getNode(), source, sink,
"Potential artifact poisoning in $@, which may be controlled by an external user ($@).", sink,
sink.getNode().toString(), event, event.getName()
select source.getNode(), source, sink,
"Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@).",
event, event.getName()

View File

@@ -20,6 +20,5 @@ from ArtifactPoisoningFlow::PathNode source, ArtifactPoisoningFlow::PathNode sin
where
ArtifactPoisoningFlow::flowPath(source, sink) and
inNonPrivilegedContext(sink.getNode().asExpr())
select sink.getNode(), source, sink,
"Potential artifact poisoning in $@, which may be controlled by an external user.", sink,
sink.getNode().toString()
select source.getNode(), source, sink,
"Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user."

View File

@@ -0,0 +1,3 @@
## 0.6.25
No user-facing changes.

View File

@@ -0,0 +1,9 @@
## 0.6.26
### Major Analysis Improvements
* Fixed alert messages in `actions/artifact-poisoning/critical` and `actions/artifact-poisoning/medium` as they previously included a redundant placeholder in the alert message that would on occasion contain a long block of yml that makes the alert difficult to understand. Also improved the wording to make it clearer that it is not the artifact that is being poisoned, but instead a potentially untrusted artifact that is consumed. Finally, changed the alert location to be the source, to align more with other queries reporting an artifact (e.g. zipslip) which is more useful.
### Minor Analysis Improvements
* The query `actions/missing-workflow-permissions` no longer produces false positive results on reusable workflows where all callers set permissions.

View File

@@ -0,0 +1,3 @@
## 0.6.27
No user-facing changes.

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.6.24
lastReleaseVersion: 0.6.27

View File

@@ -1,5 +1,5 @@
name: codeql/actions-queries
version: 0.6.25-dev
version: 0.6.27
library: false
warnOnImplicitThis: true
groups: [actions, queries]

View File

@@ -0,0 +1,9 @@
on:
workflow_call:
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/deploy-pages

View File

@@ -0,0 +1,11 @@
on:
workflow_dispatch:
permissions:
contents: read
id-token: write
pages: write
jobs:
call-workflow:
uses: ./.github/workflows/perms11.yml

View File

@@ -55,21 +55,21 @@ nodes
| .github/workflows/test25.yml:39:14:40:45 | ./gradlew buildScanPublishPrevious\n | semmle.label | ./gradlew buildScanPublishPrevious\n |
subpaths
#select
| .github/workflows/artifactpoisoning11.yml:38:11:38:77 | ./sonarcloud-data/x.py build -j$(nproc) --compiler gcc --skip-build | .github/workflows/artifactpoisoning11.yml:13:9:32:6 | Uses Step | .github/workflows/artifactpoisoning11.yml:38:11:38:77 | ./sonarcloud-data/x.py build -j$(nproc) --compiler gcc --skip-build | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/artifactpoisoning11.yml:38:11:38:77 | ./sonarcloud-data/x.py build -j$(nproc) --compiler gcc --skip-build | ./sonarcloud-data/x.py build -j$(nproc) --compiler gcc --skip-build | .github/workflows/artifactpoisoning11.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning12.yml:38:11:38:25 | python foo/x.py | .github/workflows/artifactpoisoning12.yml:13:9:32:6 | Uses Step | .github/workflows/artifactpoisoning12.yml:38:11:38:25 | python foo/x.py | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/artifactpoisoning12.yml:38:11:38:25 | python foo/x.py | python foo/x.py | .github/workflows/artifactpoisoning12.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning21.yml:19:14:20:21 | sh foo/cmd\n | .github/workflows/artifactpoisoning21.yml:13:9:18:6 | Uses Step | .github/workflows/artifactpoisoning21.yml:19:14:20:21 | sh foo/cmd\n | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/artifactpoisoning21.yml:19:14:20:21 | sh foo/cmd\n | sh foo/cmd\n | .github/workflows/artifactpoisoning21.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning22.yml:18:14:18:19 | sh cmd | .github/workflows/artifactpoisoning22.yml:13:9:17:6 | Uses Step | .github/workflows/artifactpoisoning22.yml:18:14:18:19 | sh cmd | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/artifactpoisoning22.yml:18:14:18:19 | sh cmd | sh cmd | .github/workflows/artifactpoisoning22.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning31.yml:19:14:19:22 | ./foo/cmd | .github/workflows/artifactpoisoning31.yml:13:9:15:6 | Run Step | .github/workflows/artifactpoisoning31.yml:19:14:19:22 | ./foo/cmd | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/artifactpoisoning31.yml:19:14:19:22 | ./foo/cmd | ./foo/cmd | .github/workflows/artifactpoisoning31.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning32.yml:17:14:18:20 | ./bar/cmd\n | .github/workflows/artifactpoisoning32.yml:13:9:16:6 | Run Step | .github/workflows/artifactpoisoning32.yml:17:14:18:20 | ./bar/cmd\n | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/artifactpoisoning32.yml:17:14:18:20 | ./bar/cmd\n | ./bar/cmd\n | .github/workflows/artifactpoisoning32.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning33.yml:17:14:18:20 | ./bar/cmd\n | .github/workflows/artifactpoisoning33.yml:13:9:16:6 | Run Step | .github/workflows/artifactpoisoning33.yml:17:14:18:20 | ./bar/cmd\n | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/artifactpoisoning33.yml:17:14:18:20 | ./bar/cmd\n | ./bar/cmd\n | .github/workflows/artifactpoisoning33.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning34.yml:20:14:22:23 | npm install\nnpm run lint\n | .github/workflows/artifactpoisoning34.yml:13:9:16:6 | Run Step | .github/workflows/artifactpoisoning34.yml:20:14:22:23 | npm install\nnpm run lint\n | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/artifactpoisoning34.yml:20:14:22:23 | npm install\nnpm run lint\n | npm install\nnpm run lint\n | .github/workflows/artifactpoisoning34.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning41.yml:22:14:22:22 | ./foo/cmd | .github/workflows/artifactpoisoning41.yml:13:9:21:6 | Run Step | .github/workflows/artifactpoisoning41.yml:22:14:22:22 | ./foo/cmd | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/artifactpoisoning41.yml:22:14:22:22 | ./foo/cmd | ./foo/cmd | .github/workflows/artifactpoisoning41.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning42.yml:22:14:22:18 | ./cmd | .github/workflows/artifactpoisoning42.yml:13:9:21:6 | Run Step | .github/workflows/artifactpoisoning42.yml:22:14:22:18 | ./cmd | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/artifactpoisoning42.yml:22:14:22:18 | ./cmd | ./cmd | .github/workflows/artifactpoisoning42.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning71.yml:17:14:18:40 | sed -f config foo.md > bar.md\n | .github/workflows/artifactpoisoning71.yml:9:9:16:6 | Uses Step | .github/workflows/artifactpoisoning71.yml:17:14:18:40 | sed -f config foo.md > bar.md\n | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/artifactpoisoning71.yml:17:14:18:40 | sed -f config foo.md > bar.md\n | sed -f config foo.md > bar.md\n | .github/workflows/artifactpoisoning71.yml:4:5:4:16 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning81.yml:31:14:31:27 | python test.py | .github/workflows/artifactpoisoning81.yml:28:9:31:6 | Uses Step | .github/workflows/artifactpoisoning81.yml:31:14:31:27 | python test.py | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/artifactpoisoning81.yml:31:14:31:27 | python test.py | python test.py | .github/workflows/artifactpoisoning81.yml:3:5:3:23 | pull_request_target | pull_request_target |
| .github/workflows/artifactpoisoning92.yml:28:9:29:6 | Uses Step | .github/actions/download-artifact-2/action.yaml:6:7:25:4 | Uses Step | .github/workflows/artifactpoisoning92.yml:28:9:29:6 | Uses Step | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/artifactpoisoning92.yml:28:9:29:6 | Uses Step | Uses Step | .github/workflows/artifactpoisoning92.yml:3:3:3:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning92.yml:29:14:29:26 | make snapshot | .github/actions/download-artifact-2/action.yaml:6:7:25:4 | Uses Step | .github/workflows/artifactpoisoning92.yml:29:14:29:26 | make snapshot | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/artifactpoisoning92.yml:29:14:29:26 | make snapshot | make snapshot | .github/workflows/artifactpoisoning92.yml:3:3:3:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning96.yml:18:14:18:24 | npm install | .github/workflows/artifactpoisoning96.yml:13:9:18:6 | Uses Step | .github/workflows/artifactpoisoning96.yml:18:14:18:24 | npm install | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/artifactpoisoning96.yml:18:14:18:24 | npm install | npm install | .github/workflows/artifactpoisoning96.yml:2:3:2:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning101.yml:17:14:19:59 | PR_NUMBER=$(./get_pull_request_number.sh pr_number.txt)\necho "PR_NUMBER=$PR_NUMBER" >> $GITHUB_OUTPUT \n | .github/workflows/artifactpoisoning101.yml:10:9:16:6 | Uses Step | .github/workflows/artifactpoisoning101.yml:17:14:19:59 | PR_NUMBER=$(./get_pull_request_number.sh pr_number.txt)\necho "PR_NUMBER=$PR_NUMBER" >> $GITHUB_OUTPUT \n | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/artifactpoisoning101.yml:17:14:19:59 | PR_NUMBER=$(./get_pull_request_number.sh pr_number.txt)\necho "PR_NUMBER=$PR_NUMBER" >> $GITHUB_OUTPUT \n | PR_NUMBER=$(./get_pull_request_number.sh pr_number.txt)\necho "PR_NUMBER=$PR_NUMBER" >> $GITHUB_OUTPUT \n | .github/workflows/artifactpoisoning101.yml:4:3:4:21 | pull_request_target | pull_request_target |
| .github/workflows/test18.yml:36:15:40:58 | Uses Step | .github/workflows/test18.yml:12:15:33:12 | Uses Step | .github/workflows/test18.yml:36:15:40:58 | Uses Step | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/test18.yml:36:15:40:58 | Uses Step | Uses Step | .github/workflows/test18.yml:3:5:3:16 | workflow_run | workflow_run |
| .github/workflows/test25.yml:39:14:40:45 | ./gradlew buildScanPublishPrevious\n | .github/workflows/test25.yml:22:9:32:6 | Uses Step: downloadBuildScan | .github/workflows/test25.yml:39:14:40:45 | ./gradlew buildScanPublishPrevious\n | Potential artifact poisoning in $@, which may be controlled by an external user ($@). | .github/workflows/test25.yml:39:14:40:45 | ./gradlew buildScanPublishPrevious\n | ./gradlew buildScanPublishPrevious\n | .github/workflows/test25.yml:2:3:2:14 | workflow_run | workflow_run |
| .github/actions/download-artifact-2/action.yaml:6:7:25:4 | Uses Step | .github/actions/download-artifact-2/action.yaml:6:7:25:4 | Uses Step | .github/workflows/artifactpoisoning92.yml:28:9:29:6 | Uses Step | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/artifactpoisoning92.yml:3:3:3:14 | workflow_run | workflow_run |
| .github/actions/download-artifact-2/action.yaml:6:7:25:4 | Uses Step | .github/actions/download-artifact-2/action.yaml:6:7:25:4 | Uses Step | .github/workflows/artifactpoisoning92.yml:29:14:29:26 | make snapshot | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/artifactpoisoning92.yml:3:3:3:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning11.yml:13:9:32:6 | Uses Step | .github/workflows/artifactpoisoning11.yml:13:9:32:6 | Uses Step | .github/workflows/artifactpoisoning11.yml:38:11:38:77 | ./sonarcloud-data/x.py build -j$(nproc) --compiler gcc --skip-build | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/artifactpoisoning11.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning12.yml:13:9:32:6 | Uses Step | .github/workflows/artifactpoisoning12.yml:13:9:32:6 | Uses Step | .github/workflows/artifactpoisoning12.yml:38:11:38:25 | python foo/x.py | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/artifactpoisoning12.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning21.yml:13:9:18:6 | Uses Step | .github/workflows/artifactpoisoning21.yml:13:9:18:6 | Uses Step | .github/workflows/artifactpoisoning21.yml:19:14:20:21 | sh foo/cmd\n | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/artifactpoisoning21.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning22.yml:13:9:17:6 | Uses Step | .github/workflows/artifactpoisoning22.yml:13:9:17:6 | Uses Step | .github/workflows/artifactpoisoning22.yml:18:14:18:19 | sh cmd | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/artifactpoisoning22.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning31.yml:13:9:15:6 | Run Step | .github/workflows/artifactpoisoning31.yml:13:9:15:6 | Run Step | .github/workflows/artifactpoisoning31.yml:19:14:19:22 | ./foo/cmd | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/artifactpoisoning31.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning32.yml:13:9:16:6 | Run Step | .github/workflows/artifactpoisoning32.yml:13:9:16:6 | Run Step | .github/workflows/artifactpoisoning32.yml:17:14:18:20 | ./bar/cmd\n | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/artifactpoisoning32.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning33.yml:13:9:16:6 | Run Step | .github/workflows/artifactpoisoning33.yml:13:9:16:6 | Run Step | .github/workflows/artifactpoisoning33.yml:17:14:18:20 | ./bar/cmd\n | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/artifactpoisoning33.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning34.yml:13:9:16:6 | Run Step | .github/workflows/artifactpoisoning34.yml:13:9:16:6 | Run Step | .github/workflows/artifactpoisoning34.yml:20:14:22:23 | npm install\nnpm run lint\n | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/artifactpoisoning34.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning41.yml:13:9:21:6 | Run Step | .github/workflows/artifactpoisoning41.yml:13:9:21:6 | Run Step | .github/workflows/artifactpoisoning41.yml:22:14:22:22 | ./foo/cmd | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/artifactpoisoning41.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning42.yml:13:9:21:6 | Run Step | .github/workflows/artifactpoisoning42.yml:13:9:21:6 | Run Step | .github/workflows/artifactpoisoning42.yml:22:14:22:18 | ./cmd | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/artifactpoisoning42.yml:4:3:4:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning71.yml:9:9:16:6 | Uses Step | .github/workflows/artifactpoisoning71.yml:9:9:16:6 | Uses Step | .github/workflows/artifactpoisoning71.yml:17:14:18:40 | sed -f config foo.md > bar.md\n | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/artifactpoisoning71.yml:4:5:4:16 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning81.yml:28:9:31:6 | Uses Step | .github/workflows/artifactpoisoning81.yml:28:9:31:6 | Uses Step | .github/workflows/artifactpoisoning81.yml:31:14:31:27 | python test.py | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/artifactpoisoning81.yml:3:5:3:23 | pull_request_target | pull_request_target |
| .github/workflows/artifactpoisoning96.yml:13:9:18:6 | Uses Step | .github/workflows/artifactpoisoning96.yml:13:9:18:6 | Uses Step | .github/workflows/artifactpoisoning96.yml:18:14:18:24 | npm install | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/artifactpoisoning96.yml:2:3:2:14 | workflow_run | workflow_run |
| .github/workflows/artifactpoisoning101.yml:10:9:16:6 | Uses Step | .github/workflows/artifactpoisoning101.yml:10:9:16:6 | Uses Step | .github/workflows/artifactpoisoning101.yml:17:14:19:59 | PR_NUMBER=$(./get_pull_request_number.sh pr_number.txt)\necho "PR_NUMBER=$PR_NUMBER" >> $GITHUB_OUTPUT \n | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/artifactpoisoning101.yml:4:3:4:21 | pull_request_target | pull_request_target |
| .github/workflows/test18.yml:12:15:33:12 | Uses Step | .github/workflows/test18.yml:12:15:33:12 | Uses Step | .github/workflows/test18.yml:36:15:40:58 | Uses Step | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/test18.yml:3:5:3:16 | workflow_run | workflow_run |
| .github/workflows/test25.yml:22:9:32:6 | Uses Step: downloadBuildScan | .github/workflows/test25.yml:22:9:32:6 | Uses Step: downloadBuildScan | .github/workflows/test25.yml:39:14:40:45 | ./gradlew buildScanPublishPrevious\n | Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@). | .github/workflows/test25.yml:2:3:2:14 | workflow_run | workflow_run |

View File

@@ -7,10 +7,12 @@ ql/cpp/ql/src/Diagnostics/ExtractedFiles.ql
ql/cpp/ql/src/Diagnostics/ExtractionWarnings.ql
ql/cpp/ql/src/Diagnostics/FailedExtractorInvocations.ql
ql/cpp/ql/src/Likely Bugs/Arithmetic/BadAdditionOverflowCheck.ql
ql/cpp/ql/src/Likely Bugs/Arithmetic/IntMultToLong.ql
ql/cpp/ql/src/Likely Bugs/Arithmetic/SignedOverflowCheck.ql
ql/cpp/ql/src/Likely Bugs/Conversion/CastArrayPointerArithmetic.ql
ql/cpp/ql/src/Likely Bugs/Format/SnprintfOverflow.ql
ql/cpp/ql/src/Likely Bugs/Format/WrongNumberOfFormatArguments.ql
ql/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.ql
ql/cpp/ql/src/Likely Bugs/Memory Management/AllocaInLoop.ql
ql/cpp/ql/src/Likely Bugs/Memory Management/PointerOverflow.ql
ql/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.ql
@@ -28,6 +30,7 @@ ql/cpp/ql/src/Security/CWE/CWE-120/VeryLikelyOverrunWrite.ql
ql/cpp/ql/src/Security/CWE/CWE-131/NoSpaceForZeroTerminator.ql
ql/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatString.ql
ql/cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql
ql/cpp/ql/src/Security/CWE/CWE-190/ComparisonWithWiderType.ql
ql/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql
ql/cpp/ql/src/Security/CWE/CWE-253/HResultBooleanConversion.ql
ql/cpp/ql/src/Security/CWE/CWE-311/CleartextFileWrite.ql
@@ -40,6 +43,7 @@ ql/cpp/ql/src/Security/CWE/CWE-367/TOCTOUFilesystemRace.ql
ql/cpp/ql/src/Security/CWE/CWE-416/IteratorToExpiredContainer.ql
ql/cpp/ql/src/Security/CWE/CWE-416/UseOfStringAfterLifetimeEnds.ql
ql/cpp/ql/src/Security/CWE/CWE-416/UseOfUniquePointerAfterLifetimeEnds.ql
ql/cpp/ql/src/Security/CWE/CWE-468/SuspiciousAddWithSizeof.ql
ql/cpp/ql/src/Security/CWE/CWE-497/ExposedSystemData.ql
ql/cpp/ql/src/Security/CWE/CWE-611/XXE.ql
ql/cpp/ql/src/Security/CWE/CWE-676/DangerousFunctionOverflow.ql

View File

@@ -1,3 +1,45 @@
## 10.1.0
### New Features
* A new predicate `getSwitchCase` was added to the `SwitchStmt` class, which yields the `n`th `case` statement from a `switch` statement.
* Data flow barriers and barrier guards can now be added using data extensions. For more information see [Customizing library models for C and C++](https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-cpp/).
### Minor Analysis Improvements
* Added taint flow models for the `Strsafe.h` header from the Windows SDK.
## 10.0.0
### Breaking Changes
* The deprecated `NonThrowingFunction` class has been removed, use `NonCppThrowingFunction` instead.
* The deprecated `ThrowingFunction` class has been removed, use `AlwaysSehThrowingFunction` instead.
### New Features
* Added a subclass `AutoconfConfigureTestFile` of `ConfigurationTestFile` that represents files created by GNU autoconf configure scripts to test the build configuration.
## 9.0.0
### Breaking Changes
* The `SourceModelCsv`, `SinkModelCsv`, and `SummaryModelCsv` classes and the associated CSV parsing infrastructure have been removed from `ExternalFlow.qll`. New models should be added as `.model.yml` files in the `ext/` directory.
### New Features
* Added a subclass `MesonPrivateTestFile` of `ConfigurationTestFile` that represents files created by Meson to test the build configuration.
* Added a class `ConstructorDirectFieldInit` to represent field initializations that occur in member initializer lists.
* Added a class `ConstructorDefaultFieldInit` to represent default field initializations.
* Added a class `DataFlow::IndirectParameterNode` to represent the indirection of a parameter as a dataflow node.
* Added a predicate `Node::asIndirectInstruction` which returns the `Instruction` that defines the indirect dataflow node, if any.
* Added a class `IndirectUninitializedNode` to represent the indirection of an uninitialized local variable as a dataflow node.
### Minor Analysis Improvements
* Added `HttpReceiveHttpRequest`, `HttpReceiveRequestEntityBody`, and `HttpReceiveClientCertificate` from Win32's `http.h` as remote flow sources.
* Added dataflow through members initialized via non-static data member initialization (NSDMI).
## 8.0.3
No user-facing changes.

View File

@@ -1,4 +0,0 @@
---
category: feature
---
* Added a class `IndirectUninitializedNode` to represent the indirection of an uninitialized local variable as a dataflow node.

View File

@@ -1,5 +0,0 @@
---
category: feature
---
* Added a class `DataFlow::IndirectParameterNode` to represent the indirection of a parameter as a dataflow node.
* Added a predicate `Node::asIndirectInstruction` which returns the `Instruction` that defines the indirect dataflow node, if any.

View File

@@ -1,5 +0,0 @@
---
category: feature
---
* Added a class `ConstructorDirectFieldInit` to represent field initializations that occur in member initializer lists.
* Added a class `ConstructorDefaultFieldInit` to represent default field initializations.

View File

@@ -1,4 +0,0 @@
---
category: breaking
---
* The `SourceModelCsv`, `SinkModelCsv`, and `SummaryModelCsv` classes and the associated CSV parsing infrastructure have been removed from `ExternalFlow.qll`. New models should be added as `.model.yml` files in the `ext/` directory.

View File

@@ -1,4 +0,0 @@
---
category: minorAnalysis
---
* Added dataflow through members initialized via non-static data member initialization (NSDMI).

View File

@@ -1,4 +0,0 @@
---
category: minorAnalysis
---
* Added `HttpReceiveHttpRequest`, `HttpReceiveRequestEntityBody`, and `HttpReceiveClientCertificate` from Win32's `http.h` as remote flow sources.

View File

@@ -1,4 +0,0 @@
---
category: feature
---
* Added a subclass `MesonPrivateTestFile` of `ConfigurationTestFile` that represents files created by Meson to test the build configuration.

View File

@@ -0,0 +1,10 @@
## 10.0.0
### Breaking Changes
* The deprecated `NonThrowingFunction` class has been removed, use `NonCppThrowingFunction` instead.
* The deprecated `ThrowingFunction` class has been removed, use `AlwaysSehThrowingFunction` instead.
### New Features
* Added a subclass `AutoconfConfigureTestFile` of `ConfigurationTestFile` that represents files created by GNU autoconf configure scripts to test the build configuration.

View File

@@ -0,0 +1,10 @@
## 10.1.0
### New Features
* A new predicate `getSwitchCase` was added to the `SwitchStmt` class, which yields the `n`th `case` statement from a `switch` statement.
* Data flow barriers and barrier guards can now be added using data extensions. For more information see [Customizing library models for C and C++](https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-cpp/).
### Minor Analysis Improvements
* Added taint flow models for the `Strsafe.h` header from the Windows SDK.

View File

@@ -0,0 +1,19 @@
## 9.0.0
### Breaking Changes
* The `SourceModelCsv`, `SinkModelCsv`, and `SummaryModelCsv` classes and the associated CSV parsing infrastructure have been removed from `ExternalFlow.qll`. New models should be added as `.model.yml` files in the `ext/` directory.
### New Features
* Added a subclass `MesonPrivateTestFile` of `ConfigurationTestFile` that represents files created by Meson to test the build configuration.
* Added a class `ConstructorDirectFieldInit` to represent field initializations that occur in member initializer lists.
* Added a class `ConstructorDefaultFieldInit` to represent default field initializations.
* Added a class `DataFlow::IndirectParameterNode` to represent the indirection of a parameter as a dataflow node.
* Added a predicate `Node::asIndirectInstruction` which returns the `Instruction` that defines the indirect dataflow node, if any.
* Added a class `IndirectUninitializedNode` to represent the indirection of an uninitialized local variable as a dataflow node.
### Minor Analysis Improvements
* Added `HttpReceiveHttpRequest`, `HttpReceiveRequestEntityBody`, and `HttpReceiveClientCertificate` from Win32's `http.h` as remote flow sources.
* Added dataflow through members initialized via non-static data member initialization (NSDMI).

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 8.0.3
lastReleaseVersion: 10.1.0

View File

@@ -0,0 +1,94 @@
# Models for strsafe.h safe string functions
extensions:
- addsTo:
pack: codeql/cpp-all
extensible: sourceModel
data: # namespace, type, subtypes, name, signature, ext, output, kind, provenance
# StringCchGets: (pszDest, cchDest)
- ["", "", False, "StringCchGetsA", "", "", "Argument[*0]", "local", "manual"]
- ["", "", False, "StringCchGetsW", "", "", "Argument[*0]", "local", "manual"]
# StringCbGets: (pszDest, cbDest)
- ["", "", False, "StringCbGetsA", "", "", "Argument[*0]", "local", "manual"]
- ["", "", False, "StringCbGetsW", "", "", "Argument[*0]", "local", "manual"]
# StringCchGetsEx: (pszDest, cchDest, ppszDestEnd, pcchRemaining, dwFlags)
- ["", "", False, "StringCchGetsExA", "", "", "Argument[*0]", "local", "manual"]
- ["", "", False, "StringCchGetsExW", "", "", "Argument[*0]", "local", "manual"]
# StringCbGetsEx: (pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags)
- ["", "", False, "StringCbGetsExA", "", "", "Argument[*0]", "local", "manual"]
- ["", "", False, "StringCbGetsExW", "", "", "Argument[*0]", "local", "manual"]
- addsTo:
pack: codeql/cpp-all
extensible: summaryModel
data: # namespace, type, subtypes, name, signature, ext, input, output, kind, provenance
# StringCchCopy: (pszDest, cchDest, pszSrc)
- ["", "", False, "StringCchCopyA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCchCopyW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCbCopy: (pszDest, cbDest, pszSrc)
- ["", "", False, "StringCbCopyA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCbCopyW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCchCopyEx: (pszDest, cchDest, pszSrc, ppszDestEnd, pcchRemaining, dwFlags)
- ["", "", False, "StringCchCopyExA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCchCopyExW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCbCopyEx: (pszDest, cbDest, pszSrc, ppszDestEnd, pcbRemaining, dwFlags)
- ["", "", False, "StringCbCopyExA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCbCopyExW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCchCopyN: (pszDest, cchDest, pszSrc, cchToCopy)
- ["", "", False, "StringCchCopyNA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCchCopyNW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCbCopyN: (pszDest, cbDest, pszSrc, cbToCopy)
- ["", "", False, "StringCbCopyNA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCbCopyNW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCchCopyNEx: (pszDest, cchDest, pszSrc, cchToCopy, ppszDestEnd, pcchRemaining, dwFlags)
- ["", "", False, "StringCchCopyNExA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCchCopyNExW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCbCopyNEx: (pszDest, cbDest, pszSrc, cbToCopy, ppszDestEnd, pcbRemaining, dwFlags)
- ["", "", False, "StringCbCopyNExA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCbCopyNExW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCchCat: (pszDest, cchDest, pszSrc)
- ["", "", False, "StringCchCatA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCchCatW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCbCat: (pszDest, cbDest, pszSrc)
- ["", "", False, "StringCbCatA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCbCatW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCchCatEx: (pszDest, cchDest, pszSrc, ppszDestEnd, pcchRemaining, dwFlags)
- ["", "", False, "StringCchCatExA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCchCatExW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCbCatEx: (pszDest, cbDest, pszSrc, ppszDestEnd, pcbRemaining, dwFlags)
- ["", "", False, "StringCbCatExA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCbCatExW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCchCatN: (pszDest, cchDest, pszSrc, cchToAppend)
- ["", "", False, "StringCchCatNA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCchCatNW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCbCatN: (pszDest, cbDest, pszSrc, cbToAppend)
- ["", "", False, "StringCbCatNA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCbCatNW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCchCatNEx: (pszDest, cchDest, pszSrc, cchToAppend, ppszDestEnd, pcchRemaining, dwFlags)
- ["", "", False, "StringCchCatNExA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCchCatNExW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCbCatNEx: (pszDest, cbDest, pszSrc, cbToAppend, ppszDestEnd, pcbRemaining, dwFlags)
- ["", "", False, "StringCbCatNExA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCbCatNExW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCchPrintf: (pszDest, cchDest, pszFormat, ...)
- ["", "", False, "StringCchPrintfA", "", "", "Argument[*2..8]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCchPrintfW", "", "", "Argument[*2..8]", "Argument[*0]", "taint", "manual"]
# StringCbPrintf: (pszDest, cbDest, pszFormat, ...)
- ["", "", False, "StringCbPrintfA", "", "", "Argument[*2..8]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCbPrintfW", "", "", "Argument[*2..8]", "Argument[*0]", "taint", "manual"]
# StringCchPrintfEx: (pszDest, cchDest, ppszDestEnd, pcchRemaining, dwFlags, pszFormat, ...)
- ["", "", False, "StringCchPrintfExA", "", "", "Argument[*5..11]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCchPrintfExW", "", "", "Argument[*5..11]", "Argument[*0]", "taint", "manual"]
# StringCbPrintfEx: (pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, ...)
- ["", "", False, "StringCbPrintfExA", "", "", "Argument[*5..11]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCbPrintfExW", "", "", "Argument[*5..11]", "Argument[*0]", "taint", "manual"]
# StringCchVPrintf: (pszDest, cchDest, pszFormat, argList)
- ["", "", False, "StringCchVPrintfA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCchVPrintfW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCbVPrintf: (pszDest, cbDest, pszFormat, argList)
- ["", "", False, "StringCbVPrintfA", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCbVPrintfW", "", "", "Argument[*2]", "Argument[*0]", "taint", "manual"]
# StringCchVPrintfEx: (pszDest, cchDest, ppszDestEnd, pcchRemaining, dwFlags, pszFormat, argList)
- ["", "", False, "StringCchVPrintfExA", "", "", "Argument[*5]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCchVPrintfExW", "", "", "Argument[*5]", "Argument[*0]", "taint", "manual"]
# StringCbVPrintfEx: (pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, argList)
- ["", "", False, "StringCbVPrintfExA", "", "", "Argument[*5]", "Argument[*0]", "taint", "manual"]
- ["", "", False, "StringCbVPrintfExW", "", "", "Argument[*5]", "Argument[*0]", "taint", "manual"]

View File

@@ -12,4 +12,7 @@ extensions:
- ["", "", False, "_malloca", "0", "", "", False]
- ["", "", False, "calloc", "1", "0", "", True]
- ["std", "", False, "calloc", "1", "0", "", True]
- ["bsl", "", False, "calloc", "1", "0", "", True]
- ["bsl", "", False, "calloc", "1", "0", "", True]
- ["", "", False, "aligned_alloc", "1", "", "", True]
- ["std", "", False, "aligned_alloc", "1", "", "", True]
- ["bsl", "", False, "aligned_alloc", "1", "", "", True]

View File

@@ -1,5 +1,5 @@
name: codeql/cpp-all
version: 8.0.4-dev
version: 10.1.0
groups: cpp
dbscheme: semmlecode.cpp.dbscheme
extractor: cpp

View File

@@ -42,3 +42,10 @@ class MesonPrivateTestFile extends ConfigurationTestFile {
)
}
}
/**
* A file created by a GNU autoconf configure script to test the system configuration.
*/
class AutoconfConfigureTestFile extends ConfigurationTestFile {
AutoconfConfigureTestFile() { this.getBaseName().regexpMatch("conftest[0-9]*\\.c(pp)?") }
}

View File

@@ -459,6 +459,13 @@ class FormatLiteral extends Literal instanceof StringLiteral {
*/
int getConvSpecOffset(int n) { result = this.getFormat().indexOf("%", n, 0) }
/**
* Gets the nth conversion specifier string.
*/
private string getConvSpecString(int n) {
n >= 0 and result = "%" + this.getFormat().splitAt("%", n + 1)
}
/*
* Each of these predicates gets a regular expressions to match each individual
* parts of a conversion specifier.
@@ -524,22 +531,20 @@ class FormatLiteral extends Literal instanceof StringLiteral {
int n, string spec, string params, string flags, string width, string prec, string len,
string conv
) {
exists(int offset, string fmt, string rst, string regexp |
offset = this.getConvSpecOffset(n) and
fmt = this.getFormat() and
rst = fmt.substring(offset, fmt.length()) and
exists(string convSpec, string regexp |
convSpec = this.getConvSpecString(n) and
regexp = this.getConvSpecRegexp() and
(
spec = rst.regexpCapture(regexp, 1) and
params = rst.regexpCapture(regexp, 2) and
flags = rst.regexpCapture(regexp, 3) and
width = rst.regexpCapture(regexp, 4) and
prec = rst.regexpCapture(regexp, 5) and
len = rst.regexpCapture(regexp, 6) and
conv = rst.regexpCapture(regexp, 7)
spec = convSpec.regexpCapture(regexp, 1) and
params = convSpec.regexpCapture(regexp, 2) and
flags = convSpec.regexpCapture(regexp, 3) and
width = convSpec.regexpCapture(regexp, 4) and
prec = convSpec.regexpCapture(regexp, 5) and
len = convSpec.regexpCapture(regexp, 6) and
conv = convSpec.regexpCapture(regexp, 7)
or
spec = rst.regexpCapture(regexp, 1) and
not exists(rst.regexpCapture(regexp, 2)) and
spec = convSpec.regexpCapture(regexp, 1) and
not exists(convSpec.regexpCapture(regexp, 2)) and
params = "" and
flags = "" and
width = "" and
@@ -554,12 +559,10 @@ class FormatLiteral extends Literal instanceof StringLiteral {
* Gets the nth conversion specifier (including the initial `%`).
*/
string getConvSpec(int n) {
exists(int offset, string fmt, string rst, string regexp |
offset = this.getConvSpecOffset(n) and
fmt = this.getFormat() and
rst = fmt.substring(offset, fmt.length()) and
exists(string convSpec, string regexp |
convSpec = this.getConvSpecString(n) and
regexp = this.getConvSpecRegexp() and
result = rst.regexpCapture(regexp, 1)
result = convSpec.regexpCapture(regexp, 1)
)
}

View File

@@ -194,6 +194,13 @@ class ScanfFormatLiteral extends Expr {
)
}
/**
* Gets the nth conversion specifier string.
*/
private string getConvSpecString(int n) {
n >= 0 and result = "%" + this.getFormat().splitAt("%", n + 1)
}
/**
* Gets the regular expression to match each individual part of a conversion specifier.
*/
@@ -227,16 +234,14 @@ class ScanfFormatLiteral extends Expr {
* specifier.
*/
predicate parseConvSpec(int n, string spec, string width, string len, string conv) {
exists(int offset, string fmt, string rst, string regexp |
offset = this.getConvSpecOffset(n) and
fmt = this.getFormat() and
rst = fmt.substring(offset, fmt.length()) and
exists(string convSpec, string regexp |
convSpec = this.getConvSpecString(n) and
regexp = this.getConvSpecRegexp() and
(
spec = rst.regexpCapture(regexp, 1) and
width = rst.regexpCapture(regexp, 2) and
len = rst.regexpCapture(regexp, 3) and
conv = rst.regexpCapture(regexp, 4)
spec = convSpec.regexpCapture(regexp, 1) and
width = convSpec.regexpCapture(regexp, 2) and
len = convSpec.regexpCapture(regexp, 3) and
conv = convSpec.regexpCapture(regexp, 4)
)
)
}

View File

@@ -6,11 +6,15 @@
*
* The extensible relations have the following columns:
* - Sources:
* `namespace; type; subtypes; name; signature; ext; output; kind`
* `namespace; type; subtypes; name; signature; ext; output; kind; provenance`
* - Sinks:
* `namespace; type; subtypes; name; signature; ext; input; kind`
* `namespace; type; subtypes; name; signature; ext; input; kind; provenance`
* - Summaries:
* `namespace; type; subtypes; name; signature; ext; input; output; kind`
* `namespace; type; subtypes; name; signature; ext; input; output; kind; provenance`
* - Barriers:
* `namespace; type; subtypes; name; signature; ext; output; kind; provenance`
* - BarrierGuards:
* `namespace; type; subtypes; name; signature; ext; input; acceptingValue; kind; provenance`
*
* The interpretation of a row is similar to API-graphs with a left-to-right
* reading.
@@ -87,11 +91,23 @@
* value, and
* - flow from the _second_ indirection of the 0th argument to the first
* indirection of the return value, etc.
* 8. The `kind` column is a tag that can be referenced from QL to determine to
* 8. The `acceptingValue` column of barrier guard models specifies the condition
* under which the guard blocks flow. It can be one of "true" or "false". In
* the future "no-exception", "not-zero", "null", "not-null" may be supported.
* 9. The `kind` column is a tag that can be referenced from QL to determine to
* which classes the interpreted elements should be added. For example, for
* sources "remote" indicates a default remote flow source, and for summaries
* "taint" indicates a default additional taint step and "value" indicates a
* globally applicable value-preserving step.
* 10. The `provenance` column is a tag to indicate the origin and verification of a model.
* The format is {origin}-{verification} or just "manual" where the origin describes
* the origin of the model and verification describes how the model has been verified.
* Some examples are:
* - "df-generated": The model has been generated by the model generator tool.
* - "df-manual": The model has been generated by the model generator and verified by a human.
* - "manual": The model has been written by hand.
* This information is used in a heuristic for dataflow analysis to determine, if a
* model or source code should be used for determining flow.
*/
import cpp
@@ -931,13 +947,13 @@ private module Cached {
private predicate barrierGuardChecks(IRGuardCondition g, Expr e, boolean gv, TKindModelPair kmp) {
exists(
SourceSinkInterpretationInput::InterpretNode n, Public::AcceptingValue acceptingvalue,
SourceSinkInterpretationInput::InterpretNode n, Public::AcceptingValue acceptingValue,
string kind, string model
|
isBarrierGuardNode(n, acceptingvalue, kind, model) and
isBarrierGuardNode(n, acceptingValue, kind, model) and
n.asNode().asExpr() = e and
kmp = TMkPair(kind, model) and
gv = convertAcceptingValue(acceptingvalue).asBooleanValue() and
gv = convertAcceptingValue(acceptingValue).asBooleanValue() and
n.asNode().(Private::ArgumentNode).getCall().asCallInstruction() = g
)
}
@@ -954,14 +970,14 @@ private module Cached {
) {
exists(
SourceSinkInterpretationInput::InterpretNode interpretNode,
Public::AcceptingValue acceptingvalue, string kind, string model, int indirectionIndex,
Public::AcceptingValue acceptingValue, string kind, string model, int indirectionIndex,
Private::ArgumentNode arg
|
isBarrierGuardNode(interpretNode, acceptingvalue, kind, model) and
isBarrierGuardNode(interpretNode, acceptingValue, kind, model) and
arg = interpretNode.asNode() and
arg.asIndirectExpr(indirectionIndex) = e and
kmp = MkKindModelPairIntPair(TMkPair(kind, model), indirectionIndex) and
gv = convertAcceptingValue(acceptingvalue).asBooleanValue() and
gv = convertAcceptingValue(acceptingValue).asBooleanValue() and
arg.getCall().asCallInstruction() = g
)
}

View File

@@ -33,7 +33,7 @@ extensible predicate barrierModel(
*/
extensible predicate barrierGuardModel(
string namespace, string type, boolean subtypes, string name, string signature, string ext,
string input, string acceptingvalue, string kind, string provenance, QlBuiltins::ExtensionId madId
string input, string acceptingValue, string kind, string provenance, QlBuiltins::ExtensionId madId
);
/**

View File

@@ -162,13 +162,13 @@ module SourceSinkInterpretationInput implements
}
predicate barrierGuardElement(
Element e, string input, Public::AcceptingValue acceptingvalue, string kind,
Element e, string input, Public::AcceptingValue acceptingValue, string kind,
Public::Provenance provenance, string model
) {
exists(
string package, string type, boolean subtypes, string name, string signature, string ext
|
barrierGuardModel(package, type, subtypes, name, signature, ext, input, acceptingvalue, kind,
barrierGuardModel(package, type, subtypes, name, signature, ext, input, acceptingValue, kind,
provenance, model) and
e = interpretElement(package, type, subtypes, name, signature, ext)
)

View File

@@ -18,7 +18,7 @@ class Namespace extends @namespace {
if namespacembrs(_, this)
then
exists(Namespace ns |
namespacembrs(ns, this) and
namespacembrs(ns, pragma[only_bind_out](this)) and
result = ns.getQualifiedName() + "::" + this.getName()
)
else result = this.getName()
@@ -37,7 +37,7 @@ class Namespace extends @namespace {
string getAQualifierForMembers() {
if namespacembrs(_, this)
then
exists(Namespace ns | namespacembrs(ns, this) |
exists(Namespace ns | namespacembrs(ns, pragma[only_bind_out](this)) |
result = ns.getAQualifierForMembers() + "::" + this.getName()
or
// If this is an inline namespace, its members are also visible in any

View File

@@ -114,6 +114,7 @@ private predicate parseArgument(string arg, string s, int i, Opcode opcode) {
private Element getAChildScope(Element scope) { result.getParentScope() = scope }
pragma[nomagic]
private predicate hasAVariable(MacroInvocation mi, Stmt s, Element scope) {
assertion0(mi, s, _) and
s.getParent() = scope
@@ -121,15 +122,32 @@ private predicate hasAVariable(MacroInvocation mi, Stmt s, Element scope) {
hasAVariable(mi, s, getAChildScope(scope))
}
private LocalScopeVariable getVariable(MacroInvocation mi, int i) {
exists(string operand, string arg, Stmt s |
private predicate hasParentScope(Variable v, Element scope) { v.getParentScope() = scope }
pragma[nomagic]
private predicate hasAssertionOperand(MacroInvocation mi, int i, Stmt s, string operand) {
exists(string arg |
assertion0(mi, s, arg) and
parseArgument(arg, operand, i, _) and
parseArgument(arg, operand, i, _)
)
}
pragma[nomagic]
private predicate hasNameAndParentScope(string name, Element scope, Variable v) {
v.hasName(name) and
hasParentScope(v, scope)
}
pragma[nomagic]
private LocalScopeVariable getVariable(MacroInvocation mi, int i) {
exists(string name, Stmt s |
hasAssertionOperand(mi, i, s, name) and
result =
unique(Variable v |
unique(Variable v, Element parentScope |
hasAssertionOperand(mi, _, s, name) and
v.getLocation().getStartLine() < s.getLocation().getStartLine() and
hasAVariable(mi, s, v.getParentScope()) and
v.hasName(operand)
hasAVariable(mi, s, parentScope) and
hasNameAndParentScope(name, parentScope, v)
|
v
)

View File

@@ -11,10 +11,3 @@ import semmle.code.cpp.models.Models
* The function may still raise a structured exception handling (SEH) exception.
*/
abstract class NonCppThrowingFunction extends Function { }
/**
* A function that is guaranteed to never throw.
*
* DEPRECATED: use `NonCppThrowingFunction` instead.
*/
deprecated class NonThrowingFunction = NonCppThrowingFunction;

View File

@@ -10,19 +10,6 @@ import semmle.code.cpp.Function
import semmle.code.cpp.models.Models
import semmle.code.cpp.models.interfaces.FunctionInputsAndOutputs
/**
* A function that is known to raise an exception.
*
* DEPRECATED: use `AlwaysSehThrowingFunction` instead.
*/
abstract deprecated class ThrowingFunction extends Function {
/**
* Holds if this function may throw an exception during evaluation.
* If `unconditional` is `true` the function always throws an exception.
*/
abstract predicate mayThrowException(boolean unconditional);
}
/**
* A function that unconditionally raises a structured exception handling (SEH) exception.
*/

View File

@@ -1412,9 +1412,9 @@ private int indexOfSwitchCaseRank(BlockStmt b, int rnk) {
* switch (i)
* {
* case 5:
* ...
* ...
* default:
* ...
* ...
* }
* ```
*/
@@ -1516,8 +1516,10 @@ class SwitchCase extends Stmt, @stmt_switch_case {
* which has result `default:`, which has no result.
*/
SwitchCase getNextSwitchCase() {
result.getSwitchStmt() = this.getSwitchStmt() and
result.getChildNum() = this.getChildNum() + 1
exists(SwitchStmt s, int n |
this = s.getSwitchCase(n) and
result = s.getSwitchCase(n + 1)
)
}
/**
@@ -1707,9 +1709,9 @@ class SwitchCase extends Stmt, @stmt_switch_case {
* switch (i)
* {
* case 5:
* ...
* ...
* default:
* ...
* ...
* }
* ```
*/
@@ -1731,9 +1733,9 @@ class DefaultCase extends SwitchCase {
* switch (i)
* {
* case 5:
* ...
* ...
* default:
* ...
* ...
* }
* ```
*/
@@ -1768,10 +1770,10 @@ class SwitchStmt extends ConditionalStmt, @stmt_switch {
* For example, for
* ```
* switch(i) {
* case 1:
* case 2:
* case 1:
* case 2:
* break;
* default:
* default:
* break;
* }
* ```
@@ -1790,20 +1792,20 @@ class SwitchStmt extends ConditionalStmt, @stmt_switch {
* For example, for
* ```
* switch(i) {
* case 1:
* case 2:
* case 1:
* case 2:
* break;
* default:
* default:
* break;
* }
* ```
* the result is
* ```
* {
* case 1:
* case 2:
* case 1:
* case 2:
* break;
* default:
* default:
* break;
* }
* ```
@@ -1816,10 +1818,10 @@ class SwitchStmt extends ConditionalStmt, @stmt_switch {
* For example, for
* ```
* switch(i) {
* case 1:
* case 2:
* case 1:
* case 2:
* break;
* default:
* default:
* break;
* }
* ```
@@ -1827,6 +1829,23 @@ class SwitchStmt extends ConditionalStmt, @stmt_switch {
*/
SwitchCase getASwitchCase() { switch_case(underlyingElement(this), _, unresolveElement(result)) }
/**
* Gets the `n`th 'switch case' statement of this 'switch' statement, where
* `n` is 0-based.
*
* For example, for
* ```
* switch(i) {
* case 5:
* case 6:
* default:
* } * ```
* 0 yields `case 5:`, 1 yields `case 6:`, and 2 yields `default:`.
*/
SwitchCase getSwitchCase(int n) {
switch_case(underlyingElement(this), n, unresolveElement(result))
}
/**
* Gets the 'default case' statement of this 'switch' statement,
* if any.
@@ -1834,18 +1853,18 @@ class SwitchStmt extends ConditionalStmt, @stmt_switch {
* For example, for
* ```
* switch(i) {
* case 1:
* case 2:
* case 1:
* case 2:
* break;
* default:
* default:
* break;
* }
* ```
* the result is `default:`, but there is no result for
* ```
* switch(i) {
* case 1:
* case 2:
* case 1:
* case 2:
* break;
* }
* ```
@@ -1858,18 +1877,18 @@ class SwitchStmt extends ConditionalStmt, @stmt_switch {
* For example, this holds for
* ```
* switch(i) {
* case 1:
* case 2:
* case 1:
* case 2:
* break;
* default:
* default:
* break;
* }
* ```
* but not for
* ```
* switch(i) {
* case 1:
* case 2:
* case 1:
* case 2:
* break;
* }
* ```

View File

@@ -1,3 +1,32 @@
## 1.6.2
No user-facing changes.
## 1.6.1
### Minor Analysis Improvements
* Added `AllocationFunction` models for `aligned_alloc`, `std::aligned_alloc`, and `bsl::aligned_alloc`.
* The "Comparison of narrow type with wide type in loop condition" (`cpp/comparison-with-wider-type`) query has been upgraded to `high` precision. This query will now run in the default code scanning suite.
* The "Multiplication result converted to larger type" (`cpp/integer-multiplication-cast-to-long`) query has been upgraded to `high` precision. This query will now run in the default code scanning suite.
* The "Suspicious add with sizeof" (`cpp/suspicious-add-sizeof`) query has been upgraded to `high` precision. This query will now run in the default code scanning suite.
* The "Wrong type of arguments to formatting function" (`cpp/wrong-type-format-argument`) query has been upgraded to `high` precision. This query will now run in the default code scanning suite.
* The "Implicit function declaration" (`cpp/implicit-function-declaration`) query has been upgraded to `high` precision. However, for `build-mode: none` databases, it no longer produces any results. The results in this mode were found to be very noisy and fundamentally imprecise.
## 1.6.0
### Query Metadata Changes
* The `@security-severity` metadata of `cpp/cgi-xss` has been increased from 6.1 (medium) to 7.8 (high).
### Minor Analysis Improvements
* The "Extraction warnings" (`cpp/diagnostics/extraction-warnings`) diagnostics query no longer yields `ExtractionRecoverableWarning`s for `build-mode: none` databases. The results were found to significantly increase the sizes of the produced SARIF files, making them unprocessable in some cases.
* Fixed an issue with the "Suspicious add with sizeof" (`cpp/suspicious-add-sizeof`) query causing false positive results in `build-mode: none` databases.
* Fixed an issue with the "Uncontrolled format string" (`cpp/tainted-format-string`) query involving certain kinds of formatting function implementations.
* Fixed an issue with the "Wrong type of arguments to formatting function" (`cpp/wrong-type-format-argument`) query causing false positive results in `build-mode: none` databases.
* Fixed an issue with the "Multiplication result converted to larger type" (`cpp/integer-multiplication-cast-to-long`) query causing false positive results in `build-mode: none` databases.
## 1.5.15
No user-facing changes.

View File

@@ -5,7 +5,7 @@
* @kind problem
* @problem.severity warning
* @security-severity 8.1
* @precision medium
* @precision high
* @id cpp/integer-multiplication-cast-to-long
* @tags reliability
* security

View File

@@ -5,7 +5,7 @@
* @kind problem
* @problem.severity error
* @security-severity 7.5
* @precision medium
* @precision high
* @id cpp/wrong-type-format-argument
* @tags reliability
* correctness

View File

@@ -227,6 +227,30 @@ class IgnorableUnaryBitwiseOperation extends IgnorableOperation instanceof Unary
class IgnorableAssignmentBitwiseOperation extends IgnorableOperation instanceof AssignBitwiseOperation
{ }
class YearFieldAssignmentNode extends DataFlow::Node {
YearFieldAccess access;
YearFieldAssignmentNode() {
exists(Function f |
f = this.getEnclosingCallable().getUnderlyingCallable() and not f instanceof IgnorableFunction
|
this.asDefinition().(Assignment).getLValue() = access
or
this.asDefinition().(CrementOperation).getOperand() = access
or
exists(Call c | c.getAnArgument() = access and this.asDefiningArgument() = access)
or
exists(Call c, AddressOfExpr aoe |
c.getAnArgument() = aoe and
aoe.getOperand() = access and
this.asDefiningArgument() = aoe
)
)
}
YearFieldAccess getYearFieldAccess() { result = access }
}
/**
* An arithmetic operation where one of the operands is a pointer or char type, ignore it
*/
@@ -287,24 +311,7 @@ predicate isOperationSourceCandidate(Expr e) {
}
/**
* A data flow that tracks an ignorable operation (such as a bitwise operation) to an operation source, so we may disqualify it.
*/
module IgnorableOperationToOperationSourceCandidateConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node n) { n.asExpr() instanceof IgnorableOperation }
predicate isSink(DataFlow::Node n) { isOperationSourceCandidate(n.asExpr()) }
// looking for sources and sinks in the same function
DataFlow::FlowFeature getAFeature() {
result instanceof DataFlow::FeatureEqualSourceSinkCallContext
}
}
module IgnorableOperationToOperationSourceCandidateFlow =
TaintTracking::Global<IgnorableOperationToOperationSourceCandidateConfig>;
/**
* The set of all expressions which is a candidate expression and also does not flow from to to some ignorable expression (eg. bitwise op)
* The set of all expressions that are candidate expression.
* ```
* a = something <<< 2;
* myDate.year = a + 1; // invalid
@@ -314,49 +321,16 @@ module IgnorableOperationToOperationSourceCandidateFlow =
* ```
*/
class OperationSource extends Expr {
OperationSource() {
isOperationSourceCandidate(this) and
// If the candidate came from an ignorable operation, ignore the candidate
// NOTE: we cannot easily flow the candidate to an ignorable operation as that can
// be tricky in practice, e.g., a mod operation on a year would be part of a leap year check
// but a mod operation ending in a year is more indicative of something to ignore (a conversion)
not exists(IgnorableOperationToOperationSourceCandidateFlow::PathNode sink |
sink.getNode().asExpr() = this and
sink.isSink()
)
}
}
class YearFieldAssignmentNode extends DataFlow::Node {
YearFieldAccess access;
YearFieldAssignmentNode() {
exists(Function f |
f = this.getEnclosingCallable().getUnderlyingCallable() and not f instanceof IgnorableFunction
) and
(
this.asDefinition().(Assignment).getLValue() = access
or
this.asDefinition().(CrementOperation).getOperand() = access
or
exists(Call c | c.getAnArgument() = access and this.asDefiningArgument() = access)
or
exists(Call c, AddressOfExpr aoe |
c.getAnArgument() = aoe and
aoe.getOperand() = access and
this.asDefiningArgument() = aoe
)
)
}
YearFieldAccess getYearFieldAccess() { result = access }
OperationSource() { isOperationSourceCandidate(this) }
}
/**
* A DataFlow configuration for identifying flows from an identified source
* to the Year field of a date object.
* An initial DataFlow configuration for identifying flows from an identified source
* to the Year field of a date object. This is used to restrict the sinks of
* `IgnorableOperationToOperationSourceCandidateConfig` and the sinks of the
* final `OperationToYearAssignmentConfig`.
*/
module OperationToYearAssignmentConfig implements DataFlow::ConfigSig {
module OperationToYearAssignmentConfig0 implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node n) { n.asExpr() instanceof OperationSource }
predicate isSink(DataFlow::Node n) {
@@ -411,6 +385,62 @@ module OperationToYearAssignmentConfig implements DataFlow::ConfigSig {
predicate isBarrierOut(DataFlow::Node n) { isSink(n) }
}
module OperationToYearAssignmentFlow0 = TaintTracking::Global<OperationToYearAssignmentConfig0>;
predicate yearAssignmentFlowsFromSource(DataFlow::Node source, DataFlow::Node sink) {
OperationToYearAssignmentFlow0::flow(source, sink)
}
/**
* A data flow that tracks an ignorable operation (such as a bitwise operation) to an operation source, so we may disqualify it.
* Sinks are restricted to operation source candidates that have a flow to a year assignment in `OperationToYearAssignmentFlow0`.
*/
module IgnorableOperationToOperationSourceCandidateConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node n) { n.asExpr() instanceof IgnorableOperation }
predicate isSink(DataFlow::Node n) {
isOperationSourceCandidate(n.asExpr()) and
yearAssignmentFlowsFromSource(n, _)
}
// looking for sources and sinks in the same function
DataFlow::FlowFeature getAFeature() {
result instanceof DataFlow::FeatureEqualSourceSinkCallContext
}
}
module IgnorableOperationToOperationSourceCandidateFlow =
TaintTracking::Global<IgnorableOperationToOperationSourceCandidateConfig>;
/**
* The final DataFlow configuration that refines `OperationToYearAssignmentConfig0` by
* additionally filtering out operation sources that flow from an ignorable operation
* (via `IgnorableOperationToOperationSourceCandidateFlow`).
*/
module OperationToYearAssignmentConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node n) { yearAssignmentFlowsFromSource(n, _) }
predicate isSink(DataFlow::Node n) {
exists(DataFlow::Node operation |
yearAssignmentFlowsFromSource(operation, n) and
// If the candidate came from an ignorable operation, ignore the candidate
// NOTE: we cannot easily flow the candidate to an ignorable operation as that can
// be tricky in practice, e.g., a mod operation on a year would be part of a leap year check
// but a mod operation ending in a year is more indicative of something to ignore (a conversion)
not exists(IgnorableOperationToOperationSourceCandidateFlow::PathNode sink |
sink.getNode() = operation and
sink.isSink()
)
)
}
predicate isBarrier(DataFlow::Node n) { OperationToYearAssignmentConfig0::isBarrier(n) }
predicate isBarrierIn(DataFlow::Node n) { isSource(n) }
predicate isBarrierOut(DataFlow::Node n) { isSink(n) }
}
module OperationToYearAssignmentFlow = TaintTracking::Global<OperationToYearAssignmentConfig>;
predicate isLeapYearCheckSink(DataFlow::Node sink) {

View File

@@ -14,6 +14,9 @@ function may behave unpredictably.</p>
<p>This may indicate a misspelled function name, or that the required header containing
the function declaration has not been included.</p>
<p>Note: This query is not compatible with <code>build-mode: none</code> databases, and produces
no results on those databases.</p>
</overview>
<recommendation>
<p>Provide an explicit declaration of the function before invoking it.</p>
@@ -26,4 +29,4 @@ the function declaration has not been included.</p>
<references>
<li>SEI CERT C Coding Standard: <a href="https://wiki.sei.cmu.edu/confluence/display/c/DCL31-C.+Declare+identifiers+before+using+them">DCL31-C. Declare identifiers before using them</a></li>
</references>
</qhelp>
</qhelp>

View File

@@ -5,7 +5,7 @@
* may lead to unpredictable behavior.
* @kind problem
* @problem.severity warning
* @precision medium
* @precision high
* @id cpp/implicit-function-declaration
* @tags correctness
* maintainability
@@ -17,6 +17,11 @@ import TooFewArguments
import TooManyArguments
import semmle.code.cpp.commons.Exclusions
/*
* This query is not compatible with build-mode: none databases, and produces
* no results on those databases.
*/
predicate locInfo(Locatable e, File file, int line, int col) {
e.getFile() = file and
e.getLocation().getStartLine() = line and
@@ -39,6 +44,7 @@ predicate isCompiledAsC(File f) {
from FunctionDeclarationEntry fdeIm, FunctionCall fc
where
isCompiledAsC(fdeIm.getFile()) and
not any(Compilation c).buildModeNone() and
not isFromMacroDefinition(fc) and
fdeIm.isImplicit() and
sameLocation(fdeIm, fc) and

View File

@@ -79,9 +79,7 @@ private predicate hasZeroParamDecl(Function f) {
// True if this file (or header) was compiled as a C file
private predicate isCompiledAsC(File f) {
f.compiledAsC()
or
exists(File src | isCompiledAsC(src) | src.getAnIncludedFile() = f)
exists(File src | src.compiledAsC() | src.getAnIncludedFile*() = f)
}
predicate mistypedFunctionArguments(FunctionCall fc, Function f, Parameter p) {

View File

@@ -28,9 +28,7 @@ private predicate hasZeroParamDecl(Function f) {
/* Holds if this file (or header) was compiled as a C file. */
private predicate isCompiledAsC(File f) {
f.compiledAsC()
or
exists(File src | isCompiledAsC(src) | src.getAnIncludedFile() = f)
exists(File src | src.compiledAsC() | src.getAnIncludedFile*() = f)
}
/** Holds if `fc` is a call to `f` with too few arguments. */

View File

@@ -19,9 +19,7 @@ private predicate hasZeroParamDecl(Function f) {
// True if this file (or header) was compiled as a C file
private predicate isCompiledAsC(File f) {
f.compiledAsC()
or
exists(File src | isCompiledAsC(src) | src.getAnIncludedFile() = f)
exists(File src | src.compiledAsC() | src.getAnIncludedFile*() = f)
}
predicate tooManyArguments(FunctionCall fc, Function f) {

View File

@@ -6,7 +6,7 @@
* @kind problem
* @problem.severity warning
* @security-severity 7.8
* @precision medium
* @precision high
* @tags reliability
* security
* external/cwe/cwe-190

View File

@@ -6,7 +6,7 @@
* @kind problem
* @problem.severity warning
* @security-severity 8.8
* @precision medium
* @precision high
* @id cpp/suspicious-add-sizeof
* @tags security
* external/cwe/cwe-468

View File

@@ -1,4 +0,0 @@
---
category: minorAnalysis
---
* Fixed an issue with the "Multiplication result converted to larger type" (`cpp/integer-multiplication-cast-to-long`) query causing false positive results in `build-mode: none` databases.

View File

@@ -1,4 +0,0 @@
---
category: queryMetadata
---
* The `@security-severity` metadata of `cpp/cgi-xss` has been increased from 6.1 (medium) to 7.8 (high).

View File

@@ -1,4 +0,0 @@
---
category: minorAnalysis
---
* Fixed an issue with the "Wrong type of arguments to formatting function" (`cpp/wrong-type-format-argument`) query causing false positive results in `build-mode: none` databases.

View File

@@ -1,4 +0,0 @@
---
category: minorAnalysis
---
* Fixed an issue with the "Suspicious add with sizeof" (`cpp/suspicious-add-sizeof`) query causing false positive results in `build-mode: none` databases.

View File

@@ -1,4 +0,0 @@
---
category: minorAnalysis
---
* Fixed an issue with the "Uncontrolled format string" (`cpp/tainted-format-string`) query involving certain kinds of formatting function implementations.

View File

@@ -1,4 +0,0 @@
---
category: minorAnalysis
---
* The "Extraction warnings" (`cpp/diagnostics/extraction-warnings`) diagnostics query no longer yields `ExtractionRecoverableWarning`s for `build-mode: none` databases. The results were found to significantly increase the sizes of the produced SARIF files, making them unprocessable in some cases.

View File

@@ -0,0 +1,13 @@
## 1.6.0
### Query Metadata Changes
* The `@security-severity` metadata of `cpp/cgi-xss` has been increased from 6.1 (medium) to 7.8 (high).
### Minor Analysis Improvements
* The "Extraction warnings" (`cpp/diagnostics/extraction-warnings`) diagnostics query no longer yields `ExtractionRecoverableWarning`s for `build-mode: none` databases. The results were found to significantly increase the sizes of the produced SARIF files, making them unprocessable in some cases.
* Fixed an issue with the "Suspicious add with sizeof" (`cpp/suspicious-add-sizeof`) query causing false positive results in `build-mode: none` databases.
* Fixed an issue with the "Uncontrolled format string" (`cpp/tainted-format-string`) query involving certain kinds of formatting function implementations.
* Fixed an issue with the "Wrong type of arguments to formatting function" (`cpp/wrong-type-format-argument`) query causing false positive results in `build-mode: none` databases.
* Fixed an issue with the "Multiplication result converted to larger type" (`cpp/integer-multiplication-cast-to-long`) query causing false positive results in `build-mode: none` databases.

View File

@@ -0,0 +1,10 @@
## 1.6.1
### Minor Analysis Improvements
* Added `AllocationFunction` models for `aligned_alloc`, `std::aligned_alloc`, and `bsl::aligned_alloc`.
* The "Comparison of narrow type with wide type in loop condition" (`cpp/comparison-with-wider-type`) query has been upgraded to `high` precision. This query will now run in the default code scanning suite.
* The "Multiplication result converted to larger type" (`cpp/integer-multiplication-cast-to-long`) query has been upgraded to `high` precision. This query will now run in the default code scanning suite.
* The "Suspicious add with sizeof" (`cpp/suspicious-add-sizeof`) query has been upgraded to `high` precision. This query will now run in the default code scanning suite.
* The "Wrong type of arguments to formatting function" (`cpp/wrong-type-format-argument`) query has been upgraded to `high` precision. This query will now run in the default code scanning suite.
* The "Implicit function declaration" (`cpp/implicit-function-declaration`) query has been upgraded to `high` precision. However, for `build-mode: none` databases, it no longer produces any results. The results in this mode were found to be very noisy and fundamentally imprecise.

View File

@@ -0,0 +1,3 @@
## 1.6.2
No user-facing changes.

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 1.5.15
lastReleaseVersion: 1.6.2

View File

@@ -1,5 +1,5 @@
name: codeql/cpp-queries
version: 1.5.16-dev
version: 1.6.2
groups:
- cpp
- queries

View File

@@ -1,4 +1,4 @@
| complex.c:3:23:3:51 | __builtin_complex | file://:0:0:0:0 | _Complex double | complex.c:3:41:3:44 | real | file://:0:0:0:0 | double | complex.c:3:47:3:50 | imag | file://:0:0:0:0 | double |
| complex.c:4:23:4:57 | __builtin_complex | file://:0:0:0:0 | _Complex double | complex.c:4:41:4:47 | 2.71828000000000003 | file://:0:0:0:0 | double | complex.c:4:50:4:56 | 3.141589999999999883 | file://:0:0:0:0 | double |
| complex.c:4:23:4:57 | __builtin_complex | file://:0:0:0:0 | _Complex double | complex.c:4:41:4:47 | 2.71828 | file://:0:0:0:0 | double | complex.c:4:50:4:56 | 3.14159 | file://:0:0:0:0 | double |
| complex.c:8:22:8:52 | __builtin_complex | file://:0:0:0:0 | _Complex float | complex.c:8:40:8:44 | realf | file://:0:0:0:0 | float | complex.c:8:47:8:51 | imagf | file://:0:0:0:0 | float |
| complex.c:9:22:9:52 | __builtin_complex | file://:0:0:0:0 | _Complex float | complex.c:9:40:9:44 | 1.230000019 | file://:0:0:0:0 | float | complex.c:9:47:9:51 | 4.559999943 | file://:0:0:0:0 | float |
| complex.c:9:22:9:52 | __builtin_complex | file://:0:0:0:0 | _Complex float | complex.c:9:40:9:44 | 1.23 | file://:0:0:0:0 | float | complex.c:9:47:9:51 | 4.56 | file://:0:0:0:0 | float |

View File

@@ -298,16 +298,16 @@
| test.c:182:8:182:34 | ! ... | ! ... == 1 when ! ... is true |
| test.c:182:8:182:34 | ! ... | ... && ... != 0 when ! ... is false |
| test.c:182:8:182:34 | ! ... | ... && ... == 0 when ! ... is true |
| test.c:182:10:182:20 | ... >= ... | 9.999999999999999547e-07 < foo+1 when ... >= ... is true |
| test.c:182:10:182:20 | ... >= ... | 9.999999999999999547e-07 >= foo+1 when ... >= ... is false |
| test.c:182:10:182:20 | ... >= ... | 1.0E-6 < foo+1 when ... >= ... is true |
| test.c:182:10:182:20 | ... >= ... | 1.0E-6 >= foo+1 when ... >= ... is false |
| test.c:182:10:182:20 | ... >= ... | ... >= ... != 0 when ... >= ... is true |
| test.c:182:10:182:20 | ... >= ... | ... >= ... != 1 when ... >= ... is false |
| test.c:182:10:182:20 | ... >= ... | ... >= ... == 0 when ... >= ... is false |
| test.c:182:10:182:20 | ... >= ... | ... >= ... == 1 when ... >= ... is true |
| test.c:182:10:182:20 | ... >= ... | foo < 9.999999999999999547e-07+0 when ... >= ... is false |
| test.c:182:10:182:20 | ... >= ... | foo >= 9.999999999999999547e-07+0 when ... >= ... is true |
| test.c:182:10:182:20 | ... >= ... | foo < 1.0E-6+0 when ... >= ... is false |
| test.c:182:10:182:20 | ... >= ... | foo >= 1.0E-6+0 when ... >= ... is true |
| test.c:182:10:182:33 | ... && ... | 1.0 >= foo+1 when ... && ... is true |
| test.c:182:10:182:33 | ... && ... | 9.999999999999999547e-07 < foo+1 when ... && ... is true |
| test.c:182:10:182:33 | ... && ... | 1.0E-6 < foo+1 when ... && ... is true |
| test.c:182:10:182:33 | ... && ... | ! ... != 0 when ... && ... is false |
| test.c:182:10:182:33 | ... && ... | ! ... != 1 when ... && ... is true |
| test.c:182:10:182:33 | ... && ... | ! ... == 0 when ... && ... is true |
@@ -319,7 +319,7 @@
| test.c:182:10:182:33 | ... && ... | ... >= ... != 0 when ... && ... is true |
| test.c:182:10:182:33 | ... && ... | ... >= ... == 1 when ... && ... is true |
| test.c:182:10:182:33 | ... && ... | foo < 1.0+0 when ... && ... is true |
| test.c:182:10:182:33 | ... && ... | foo >= 9.999999999999999547e-07+0 when ... && ... is true |
| test.c:182:10:182:33 | ... && ... | foo >= 1.0E-6+0 when ... && ... is true |
| test.c:182:25:182:33 | ... < ... | 1.0 < foo+1 when ... < ... is false |
| test.c:182:25:182:33 | ... < ... | 1.0 >= foo+1 when ... < ... is true |
| test.c:182:25:182:33 | ... < ... | ... < ... != 0 when ... < ... is true |

View File

@@ -169,12 +169,12 @@ binary
| test.c:176:8:176:15 | ! ... | test.c:176:14:176:14 | b | < | test.c:176:10:176:10 | a | 1 | test.c:176:18:178:5 | { ... } |
| test.c:176:10:176:14 | ... < ... | test.c:176:10:176:10 | a | >= | test.c:176:14:176:14 | b | 0 | test.c:176:18:178:5 | { ... } |
| test.c:176:10:176:14 | ... < ... | test.c:176:14:176:14 | b | < | test.c:176:10:176:10 | a | 1 | test.c:176:18:178:5 | { ... } |
| test.c:182:10:182:20 | ... >= ... | test.c:182:10:182:12 | foo | >= | test.c:182:17:182:20 | 9.999999999999999547e-07 | 0 | test.c:181:25:182:20 | { ... } |
| test.c:182:10:182:20 | ... >= ... | test.c:182:10:182:12 | foo | >= | test.c:182:17:182:20 | 9.999999999999999547e-07 | 0 | test.c:182:25:182:33 | foo |
| test.c:182:10:182:20 | ... >= ... | test.c:182:17:182:20 | 9.999999999999999547e-07 | < | test.c:182:10:182:12 | foo | 1 | test.c:181:25:182:20 | { ... } |
| test.c:182:10:182:20 | ... >= ... | test.c:182:17:182:20 | 9.999999999999999547e-07 | < | test.c:182:10:182:12 | foo | 1 | test.c:182:25:182:33 | foo |
| test.c:182:10:182:33 | ... && ... | test.c:182:10:182:12 | foo | >= | test.c:182:17:182:20 | 9.999999999999999547e-07 | 0 | test.c:181:25:182:20 | { ... } |
| test.c:182:10:182:33 | ... && ... | test.c:182:17:182:20 | 9.999999999999999547e-07 | < | test.c:182:10:182:12 | foo | 1 | test.c:181:25:182:20 | { ... } |
| test.c:182:10:182:20 | ... >= ... | test.c:182:10:182:12 | foo | >= | test.c:182:17:182:20 | 1.0E-6 | 0 | test.c:181:25:182:20 | { ... } |
| test.c:182:10:182:20 | ... >= ... | test.c:182:10:182:12 | foo | >= | test.c:182:17:182:20 | 1.0E-6 | 0 | test.c:182:25:182:33 | foo |
| test.c:182:10:182:20 | ... >= ... | test.c:182:17:182:20 | 1.0E-6 | < | test.c:182:10:182:12 | foo | 1 | test.c:181:25:182:20 | { ... } |
| test.c:182:10:182:20 | ... >= ... | test.c:182:17:182:20 | 1.0E-6 | < | test.c:182:10:182:12 | foo | 1 | test.c:182:25:182:33 | foo |
| test.c:182:10:182:33 | ... && ... | test.c:182:10:182:12 | foo | >= | test.c:182:17:182:20 | 1.0E-6 | 0 | test.c:181:25:182:20 | { ... } |
| test.c:182:10:182:33 | ... && ... | test.c:182:17:182:20 | 1.0E-6 | < | test.c:182:10:182:12 | foo | 1 | test.c:181:25:182:20 | { ... } |
| test.c:182:10:182:33 | ... && ... | test.c:182:25:182:27 | foo | < | test.c:182:31:182:33 | 1.0 | 0 | test.c:181:25:182:20 | { ... } |
| test.c:182:10:182:33 | ... && ... | test.c:182:31:182:33 | 1.0 | >= | test.c:182:25:182:27 | foo | 1 | test.c:181:25:182:20 | { ... } |
| test.c:182:25:182:33 | ... < ... | test.c:182:25:182:27 | foo | < | test.c:182:31:182:33 | 1.0 | 0 | test.c:181:25:182:20 | { ... } |

View File

@@ -115,3 +115,19 @@ void test_zmc(void *socket) {
// ...
}
}
long StringCchGetsA(char *, size_t);
long StringCchGetsExA(char *, size_t, char **, size_t *, unsigned long);
void test_strsafe_gets() {
{
char dest[256] = {0};
StringCchGetsA(dest, sizeof(dest)); // $ local_source
}
{
char dest[256] = {0};
char *end;
size_t remaining;
StringCchGetsExA(dest, sizeof(dest), &end, &remaining, 0); // $ local_source
}
}

View File

@@ -8008,6 +8008,174 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future
| taint.cpp:866:26:866:34 | ref arg & ... | taint.cpp:866:27:866:34 | size_out [inner post update] | |
| taint.cpp:866:27:866:34 | size_out | taint.cpp:866:26:866:34 | & ... | |
| taint.cpp:867:8:867:8 | p | taint.cpp:867:7:867:8 | * ... | TAINT |
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:897:38:897:43 | source | |
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:907:37:907:42 | source | |
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:914:40:914:45 | source | |
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:919:39:919:44 | source | |
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:926:41:926:46 | source | |
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:931:37:931:42 | source | |
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:941:36:941:41 | source | |
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:948:39:948:44 | source | |
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:953:38:953:43 | source | |
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:960:40:960:45 | source | |
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:965:46:965:51 | source | |
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:975:45:975:50 | source | |
| taint.cpp:892:17:892:31 | call to indirect_source | taint.cpp:982:69:982:74 | source | |
| taint.cpp:893:32:893:46 | call to indirect_source | taint.cpp:902:38:902:44 | wsource | |
| taint.cpp:893:32:893:46 | call to indirect_source | taint.cpp:936:37:936:43 | wsource | |
| taint.cpp:893:32:893:46 | call to indirect_source | taint.cpp:970:47:970:53 | wsource | |
| taint.cpp:896:19:896:22 | {...} | taint.cpp:897:18:897:21 | dest | |
| taint.cpp:896:19:896:22 | {...} | taint.cpp:897:31:897:34 | dest | |
| taint.cpp:896:19:896:22 | {...} | taint.cpp:898:9:898:12 | dest | |
| taint.cpp:896:21:896:21 | 0 | taint.cpp:896:19:896:22 | {...} | TAINT |
| taint.cpp:897:18:897:21 | ref arg dest | taint.cpp:898:9:898:12 | dest | |
| taint.cpp:898:9:898:12 | dest | taint.cpp:898:8:898:12 | * ... | |
| taint.cpp:901:22:901:25 | {...} | taint.cpp:902:18:902:21 | dest | |
| taint.cpp:901:22:901:25 | {...} | taint.cpp:902:31:902:34 | dest | |
| taint.cpp:901:22:901:25 | {...} | taint.cpp:903:9:903:12 | dest | |
| taint.cpp:901:24:901:24 | 0 | taint.cpp:901:22:901:25 | {...} | TAINT |
| taint.cpp:902:18:902:21 | ref arg dest | taint.cpp:903:9:903:12 | dest | |
| taint.cpp:903:9:903:12 | dest | taint.cpp:903:8:903:12 | * ... | |
| taint.cpp:906:19:906:22 | {...} | taint.cpp:907:17:907:20 | dest | |
| taint.cpp:906:19:906:22 | {...} | taint.cpp:907:30:907:33 | dest | |
| taint.cpp:906:19:906:22 | {...} | taint.cpp:908:9:908:12 | dest | |
| taint.cpp:906:21:906:21 | 0 | taint.cpp:906:19:906:22 | {...} | TAINT |
| taint.cpp:907:17:907:20 | ref arg dest | taint.cpp:908:9:908:12 | dest | |
| taint.cpp:908:9:908:12 | dest | taint.cpp:908:8:908:12 | * ... | |
| taint.cpp:911:19:911:22 | {...} | taint.cpp:914:20:914:23 | dest | |
| taint.cpp:911:19:911:22 | {...} | taint.cpp:914:33:914:36 | dest | |
| taint.cpp:911:19:911:22 | {...} | taint.cpp:915:9:915:12 | dest | |
| taint.cpp:911:21:911:21 | 0 | taint.cpp:911:19:911:22 | {...} | TAINT |
| taint.cpp:912:9:912:11 | end | taint.cpp:914:49:914:51 | end | |
| taint.cpp:913:10:913:18 | remaining | taint.cpp:914:55:914:63 | remaining | |
| taint.cpp:914:20:914:23 | ref arg dest | taint.cpp:915:9:915:12 | dest | |
| taint.cpp:914:48:914:51 | ref arg & ... | taint.cpp:914:49:914:51 | end [inner post update] | |
| taint.cpp:914:49:914:51 | end | taint.cpp:914:48:914:51 | & ... | |
| taint.cpp:914:54:914:63 | ref arg & ... | taint.cpp:914:55:914:63 | remaining [inner post update] | |
| taint.cpp:914:55:914:63 | remaining | taint.cpp:914:54:914:63 | & ... | |
| taint.cpp:915:9:915:12 | dest | taint.cpp:915:8:915:12 | * ... | |
| taint.cpp:918:19:918:22 | {...} | taint.cpp:919:19:919:22 | dest | |
| taint.cpp:918:19:918:22 | {...} | taint.cpp:919:32:919:35 | dest | |
| taint.cpp:918:19:918:22 | {...} | taint.cpp:920:9:920:12 | dest | |
| taint.cpp:918:21:918:21 | 0 | taint.cpp:918:19:918:22 | {...} | TAINT |
| taint.cpp:919:19:919:22 | ref arg dest | taint.cpp:920:9:920:12 | dest | |
| taint.cpp:920:9:920:12 | dest | taint.cpp:920:8:920:12 | * ... | |
| taint.cpp:923:19:923:22 | {...} | taint.cpp:926:21:926:24 | dest | |
| taint.cpp:923:19:923:22 | {...} | taint.cpp:926:34:926:37 | dest | |
| taint.cpp:923:19:923:22 | {...} | taint.cpp:927:8:927:11 | dest | |
| taint.cpp:923:21:923:21 | 0 | taint.cpp:923:19:923:22 | {...} | TAINT |
| taint.cpp:924:9:924:11 | end | taint.cpp:926:55:926:57 | end | |
| taint.cpp:925:10:925:18 | remaining | taint.cpp:926:61:926:69 | remaining | |
| taint.cpp:926:21:926:24 | ref arg dest | taint.cpp:927:8:927:11 | dest | |
| taint.cpp:926:54:926:57 | ref arg & ... | taint.cpp:926:55:926:57 | end [inner post update] | |
| taint.cpp:926:55:926:57 | end | taint.cpp:926:54:926:57 | & ... | |
| taint.cpp:926:60:926:69 | ref arg & ... | taint.cpp:926:61:926:69 | remaining [inner post update] | |
| taint.cpp:926:61:926:69 | remaining | taint.cpp:926:60:926:69 | & ... | |
| taint.cpp:930:20:930:27 | prefix | taint.cpp:931:17:931:20 | dest | |
| taint.cpp:930:20:930:27 | prefix | taint.cpp:931:30:931:33 | dest | |
| taint.cpp:930:20:930:27 | prefix | taint.cpp:932:9:932:12 | dest | |
| taint.cpp:931:17:931:20 | ref arg dest | taint.cpp:932:9:932:12 | dest | |
| taint.cpp:932:9:932:12 | dest | taint.cpp:932:8:932:12 | * ... | |
| taint.cpp:935:23:935:31 | prefix | taint.cpp:936:17:936:20 | dest | |
| taint.cpp:935:23:935:31 | prefix | taint.cpp:936:30:936:33 | dest | |
| taint.cpp:935:23:935:31 | prefix | taint.cpp:937:9:937:12 | dest | |
| taint.cpp:936:17:936:20 | ref arg dest | taint.cpp:937:9:937:12 | dest | |
| taint.cpp:937:9:937:12 | dest | taint.cpp:937:8:937:12 | * ... | |
| taint.cpp:940:20:940:27 | prefix | taint.cpp:941:16:941:19 | dest | |
| taint.cpp:940:20:940:27 | prefix | taint.cpp:941:29:941:32 | dest | |
| taint.cpp:940:20:940:27 | prefix | taint.cpp:942:9:942:12 | dest | |
| taint.cpp:941:16:941:19 | ref arg dest | taint.cpp:942:9:942:12 | dest | |
| taint.cpp:942:9:942:12 | dest | taint.cpp:942:8:942:12 | * ... | |
| taint.cpp:945:20:945:27 | prefix | taint.cpp:948:19:948:22 | dest | |
| taint.cpp:945:20:945:27 | prefix | taint.cpp:948:32:948:35 | dest | |
| taint.cpp:945:20:945:27 | prefix | taint.cpp:949:9:949:12 | dest | |
| taint.cpp:946:9:946:11 | end | taint.cpp:948:48:948:50 | end | |
| taint.cpp:947:10:947:18 | remaining | taint.cpp:948:54:948:62 | remaining | |
| taint.cpp:948:19:948:22 | ref arg dest | taint.cpp:949:9:949:12 | dest | |
| taint.cpp:948:47:948:50 | ref arg & ... | taint.cpp:948:48:948:50 | end [inner post update] | |
| taint.cpp:948:48:948:50 | end | taint.cpp:948:47:948:50 | & ... | |
| taint.cpp:948:53:948:62 | ref arg & ... | taint.cpp:948:54:948:62 | remaining [inner post update] | |
| taint.cpp:948:54:948:62 | remaining | taint.cpp:948:53:948:62 | & ... | |
| taint.cpp:949:9:949:12 | dest | taint.cpp:949:8:949:12 | * ... | |
| taint.cpp:952:20:952:27 | prefix | taint.cpp:953:18:953:21 | dest | |
| taint.cpp:952:20:952:27 | prefix | taint.cpp:953:31:953:34 | dest | |
| taint.cpp:952:20:952:27 | prefix | taint.cpp:954:9:954:12 | dest | |
| taint.cpp:953:18:953:21 | ref arg dest | taint.cpp:954:9:954:12 | dest | |
| taint.cpp:954:9:954:12 | dest | taint.cpp:954:8:954:12 | * ... | |
| taint.cpp:957:20:957:27 | prefix | taint.cpp:960:20:960:23 | dest | |
| taint.cpp:957:20:957:27 | prefix | taint.cpp:960:33:960:36 | dest | |
| taint.cpp:957:20:957:27 | prefix | taint.cpp:961:9:961:12 | dest | |
| taint.cpp:958:9:958:11 | end | taint.cpp:960:54:960:56 | end | |
| taint.cpp:959:10:959:18 | remaining | taint.cpp:960:60:960:68 | remaining | |
| taint.cpp:960:20:960:23 | ref arg dest | taint.cpp:961:9:961:12 | dest | |
| taint.cpp:960:53:960:56 | ref arg & ... | taint.cpp:960:54:960:56 | end [inner post update] | |
| taint.cpp:960:54:960:56 | end | taint.cpp:960:53:960:56 | & ... | |
| taint.cpp:960:59:960:68 | ref arg & ... | taint.cpp:960:60:960:68 | remaining [inner post update] | |
| taint.cpp:960:60:960:68 | remaining | taint.cpp:960:59:960:68 | & ... | |
| taint.cpp:961:9:961:12 | dest | taint.cpp:961:8:961:12 | * ... | |
| taint.cpp:964:19:964:22 | {...} | taint.cpp:965:20:965:23 | dest | |
| taint.cpp:964:19:964:22 | {...} | taint.cpp:965:33:965:36 | dest | |
| taint.cpp:964:19:964:22 | {...} | taint.cpp:966:9:966:12 | dest | |
| taint.cpp:964:21:964:21 | 0 | taint.cpp:964:19:964:22 | {...} | TAINT |
| taint.cpp:965:20:965:23 | ref arg dest | taint.cpp:966:9:966:12 | dest | |
| taint.cpp:965:40:965:43 | %s | taint.cpp:965:20:965:23 | ref arg dest | TAINT |
| taint.cpp:965:46:965:51 | ref arg source | taint.cpp:975:45:975:50 | source | |
| taint.cpp:965:46:965:51 | ref arg source | taint.cpp:982:69:982:74 | source | |
| taint.cpp:965:46:965:51 | source | taint.cpp:965:20:965:23 | ref arg dest | TAINT |
| taint.cpp:966:9:966:12 | dest | taint.cpp:966:8:966:12 | * ... | |
| taint.cpp:969:22:969:25 | {...} | taint.cpp:970:20:970:23 | dest | |
| taint.cpp:969:22:969:25 | {...} | taint.cpp:970:33:970:36 | dest | |
| taint.cpp:969:22:969:25 | {...} | taint.cpp:971:9:971:12 | dest | |
| taint.cpp:969:24:969:24 | 0 | taint.cpp:969:22:969:25 | {...} | TAINT |
| taint.cpp:970:20:970:23 | ref arg dest | taint.cpp:971:9:971:12 | dest | |
| taint.cpp:970:40:970:44 | %s | taint.cpp:970:20:970:23 | ref arg dest | TAINT |
| taint.cpp:970:47:970:53 | wsource | taint.cpp:970:20:970:23 | ref arg dest | TAINT |
| taint.cpp:971:9:971:12 | dest | taint.cpp:971:8:971:12 | * ... | |
| taint.cpp:974:19:974:22 | {...} | taint.cpp:975:19:975:22 | dest | |
| taint.cpp:974:19:974:22 | {...} | taint.cpp:975:32:975:35 | dest | |
| taint.cpp:974:19:974:22 | {...} | taint.cpp:976:9:976:12 | dest | |
| taint.cpp:974:21:974:21 | 0 | taint.cpp:974:19:974:22 | {...} | TAINT |
| taint.cpp:975:19:975:22 | ref arg dest | taint.cpp:976:9:976:12 | dest | |
| taint.cpp:975:39:975:42 | %s | taint.cpp:975:19:975:22 | ref arg dest | TAINT |
| taint.cpp:975:45:975:50 | ref arg source | taint.cpp:982:69:982:74 | source | |
| taint.cpp:975:45:975:50 | source | taint.cpp:975:19:975:22 | ref arg dest | TAINT |
| taint.cpp:976:9:976:12 | dest | taint.cpp:976:8:976:12 | * ... | |
| taint.cpp:979:19:979:22 | {...} | taint.cpp:982:22:982:25 | dest | |
| taint.cpp:979:19:979:22 | {...} | taint.cpp:982:35:982:38 | dest | |
| taint.cpp:979:19:979:22 | {...} | taint.cpp:983:9:983:12 | dest | |
| taint.cpp:979:21:979:21 | 0 | taint.cpp:979:19:979:22 | {...} | TAINT |
| taint.cpp:980:9:980:11 | end | taint.cpp:982:43:982:45 | end | |
| taint.cpp:981:10:981:18 | remaining | taint.cpp:982:49:982:57 | remaining | |
| taint.cpp:982:22:982:25 | ref arg dest | taint.cpp:983:9:983:12 | dest | |
| taint.cpp:982:42:982:45 | ref arg & ... | taint.cpp:982:43:982:45 | end [inner post update] | |
| taint.cpp:982:43:982:45 | end | taint.cpp:982:42:982:45 | & ... | |
| taint.cpp:982:48:982:57 | ref arg & ... | taint.cpp:982:49:982:57 | remaining [inner post update] | |
| taint.cpp:982:49:982:57 | remaining | taint.cpp:982:48:982:57 | & ... | |
| taint.cpp:982:63:982:66 | %s | taint.cpp:982:22:982:25 | ref arg dest | TAINT |
| taint.cpp:982:69:982:74 | source | taint.cpp:982:22:982:25 | ref arg dest | TAINT |
| taint.cpp:983:9:983:12 | dest | taint.cpp:983:8:983:12 | * ... | |
| taint.cpp:986:19:986:22 | {...} | taint.cpp:988:20:988:23 | dest | |
| taint.cpp:986:19:986:22 | {...} | taint.cpp:988:33:988:36 | dest | |
| taint.cpp:986:19:986:22 | {...} | taint.cpp:989:9:989:12 | dest | |
| taint.cpp:986:21:986:21 | 0 | taint.cpp:986:19:986:22 | {...} | TAINT |
| taint.cpp:987:15:987:29 | call to indirect_source | taint.cpp:988:40:988:42 | fmt | |
| taint.cpp:988:20:988:23 | ref arg dest | taint.cpp:989:9:989:12 | dest | |
| taint.cpp:988:40:988:42 | fmt | taint.cpp:988:20:988:23 | ref arg dest | TAINT |
| taint.cpp:989:9:989:12 | dest | taint.cpp:989:8:989:12 | * ... | |
| taint.cpp:992:19:992:22 | {...} | taint.cpp:993:20:993:23 | dest | |
| taint.cpp:992:19:992:22 | {...} | taint.cpp:993:33:993:36 | dest | |
| taint.cpp:992:19:992:22 | {...} | taint.cpp:994:9:994:12 | dest | |
| taint.cpp:992:21:992:21 | 0 | taint.cpp:992:19:992:22 | {...} | TAINT |
| taint.cpp:993:20:993:23 | ref arg dest | taint.cpp:994:9:994:12 | dest | |
| taint.cpp:993:40:993:43 | %d | taint.cpp:993:20:993:23 | ref arg dest | TAINT |
| taint.cpp:993:46:993:47 | 42 | taint.cpp:993:20:993:23 | ref arg dest | TAINT |
| taint.cpp:994:9:994:12 | dest | taint.cpp:994:8:994:12 | * ... | |
| taint.cpp:997:19:997:22 | {...} | taint.cpp:998:18:998:21 | dest | |
| taint.cpp:997:19:997:22 | {...} | taint.cpp:998:31:998:34 | dest | |
| taint.cpp:997:19:997:22 | {...} | taint.cpp:999:9:999:12 | dest | |
| taint.cpp:997:21:997:21 | 0 | taint.cpp:997:19:997:22 | {...} | TAINT |
| taint.cpp:998:18:998:21 | ref arg dest | taint.cpp:999:9:999:12 | dest | |
| taint.cpp:999:9:999:12 | dest | taint.cpp:999:8:999:12 | * ... | |
| thread.cpp:10:27:10:27 | s | thread.cpp:10:27:10:27 | s | |
| thread.cpp:10:27:10:27 | s | thread.cpp:11:8:11:8 | s | |
| thread.cpp:14:26:14:26 | s | thread.cpp:15:8:15:8 | s | |

View File

@@ -866,3 +866,136 @@ void test_iconv(size_t size) {
iconv(0, &s, &size, &p, &size_out);
sink(*p); // $ ast,ir
}
using va_list = void*;
long StringCchCopyA(char *, size_t, const char *);
long StringCchCopyW(wchar_t *, size_t, const wchar_t *);
long StringCbCopyA(char *, size_t, const char *);
long StringCchCopyExA(char *, size_t, const char *, char **, size_t *, unsigned long);
long StringCchCopyNA(char *, size_t, const char *, size_t);
long StringCchCopyNExA(char *, size_t, const char *, size_t, char **, size_t *, unsigned long);
long StringCchCatA(char *, size_t, const char *);
long StringCchCatW(wchar_t *, size_t, const wchar_t *);
long StringCbCatA(char *, size_t, const char *);
long StringCchCatExA(char *, size_t, const char *, char **, size_t *, unsigned long);
long StringCchCatNA(char *, size_t, const char *, size_t);
long StringCchCatNExA(char *, size_t, const char *, size_t, char **, size_t *, unsigned long);
long StringCchPrintfA(char *, size_t, const char *, ...);
long StringCchPrintfW(wchar_t *, size_t, const wchar_t *, ...);
long StringCbPrintfA(char *, size_t, const char *, ...);
long StringCchPrintfExA(char *, size_t, char **, size_t *, unsigned long, const char *, ...);
long StringCchVPrintfA(char *, size_t, const char *, va_list);
long StringCchVPrintfExA(char *, size_t, char **, size_t *, unsigned long, const char *, va_list);
void test_strsafe() {
char *source = indirect_source();
wchar_t *wsource = (wchar_t *)indirect_source();
{
char dest[256] = {0};
StringCchCopyA(dest, sizeof(dest), source);
sink(*dest); // $ ir MISSING: ast
}
{
wchar_t dest[256] = {0};
StringCchCopyW(dest, sizeof(dest), wsource);
sink(*dest); // $ ir MISSING: ast
}
{
char dest[256] = {0};
StringCbCopyA(dest, sizeof(dest), source);
sink(*dest); // $ ir MISSING: ast
}
{
char dest[256] = {0};
char *end;
size_t remaining;
StringCchCopyExA(dest, sizeof(dest), source, &end, &remaining, 0);
sink(*dest); // $ ir MISSING: ast
}
{
char dest[256] = {0};
StringCchCopyNA(dest, sizeof(dest), source, 128);
sink(*dest); // $ ir MISSING: ast
}
{
char dest[256] = {0};
char *end;
size_t remaining;
StringCchCopyNExA(dest, sizeof(dest), source, 128, &end, &remaining, 0);
sink(dest); // $ ir MISSING: ast
}
{
char dest[256] = "prefix";
StringCchCatA(dest, sizeof(dest), source);
sink(*dest); // $ ir MISSING: ast
}
{
wchar_t dest[256] = L"prefix";
StringCchCatW(dest, sizeof(dest), wsource);
sink(*dest); // $ ir MISSING: ast
}
{
char dest[256] = "prefix";
StringCbCatA(dest, sizeof(dest), source);
sink(*dest); // $ ir MISSING: ast
}
{
char dest[256] = "prefix";
char *end;
size_t remaining;
StringCchCatExA(dest, sizeof(dest), source, &end, &remaining, 0);
sink(*dest); // $ ir MISSING: ast
}
{
char dest[256] = "prefix";
StringCchCatNA(dest, sizeof(dest), source, 128);
sink(*dest); // $ ir MISSING: ast
}
{
char dest[256] = "prefix";
char *end;
size_t remaining;
StringCchCatNExA(dest, sizeof(dest), source, 128, &end, &remaining, 0);
sink(*dest); // $ ir MISSING: ast
}
{
char dest[256] = {0};
StringCchPrintfA(dest, sizeof(dest), "%s", source);
sink(*dest); // $ ir MISSING: ast
}
{
wchar_t dest[256] = {0};
StringCchPrintfW(dest, sizeof(dest), L"%s", wsource);
sink(*dest); // $ ir MISSING: ast
}
{
char dest[256] = {0};
StringCbPrintfA(dest, sizeof(dest), "%s", source);
sink(*dest); // $ ir MISSING: ast
}
{
char dest[256] = {0};
char *end;
size_t remaining;
StringCchPrintfExA(dest, sizeof(dest), &end, &remaining, 0, "%s", source);
sink(*dest); // $ ir MISSING: ast
}
{
char dest[256] = {0};
char *fmt = indirect_source();
StringCchPrintfA(dest, sizeof(dest), fmt);
sink(*dest); // $ ir MISSING: ast
}
{
char dest[256] = {0};
StringCchPrintfA(dest, sizeof(dest), "%d", 42);
sink(*dest); // clean
}
{
char dest[256] = {0};
StringCchCopyA(dest, sizeof(dest), "hello");
sink(*dest); // clean
}
}

View File

@@ -28044,6 +28044,118 @@ getParameterTypeName
| taint.cpp:859:8:859:12 | iconv | 4 | unsigned long * |
| taint.cpp:861:6:861:15 | test_iconv | 0 | size_t |
| taint.cpp:861:6:861:15 | test_iconv | 0 | unsigned long |
| taint.cpp:872:6:872:19 | StringCchCopyA | 0 | char * |
| taint.cpp:872:6:872:19 | StringCchCopyA | 1 | size_t |
| taint.cpp:872:6:872:19 | StringCchCopyA | 1 | unsigned long |
| taint.cpp:872:6:872:19 | StringCchCopyA | 2 | const char * |
| taint.cpp:873:6:873:19 | StringCchCopyW | 0 | wchar_t * |
| taint.cpp:873:6:873:19 | StringCchCopyW | 1 | size_t |
| taint.cpp:873:6:873:19 | StringCchCopyW | 1 | unsigned long |
| taint.cpp:873:6:873:19 | StringCchCopyW | 2 | const wchar_t * |
| taint.cpp:874:6:874:18 | StringCbCopyA | 0 | char * |
| taint.cpp:874:6:874:18 | StringCbCopyA | 1 | size_t |
| taint.cpp:874:6:874:18 | StringCbCopyA | 1 | unsigned long |
| taint.cpp:874:6:874:18 | StringCbCopyA | 2 | const char * |
| taint.cpp:875:6:875:21 | StringCchCopyExA | 0 | char * |
| taint.cpp:875:6:875:21 | StringCchCopyExA | 1 | size_t |
| taint.cpp:875:6:875:21 | StringCchCopyExA | 1 | unsigned long |
| taint.cpp:875:6:875:21 | StringCchCopyExA | 2 | const char * |
| taint.cpp:875:6:875:21 | StringCchCopyExA | 3 | char ** |
| taint.cpp:875:6:875:21 | StringCchCopyExA | 4 | size_t * |
| taint.cpp:875:6:875:21 | StringCchCopyExA | 4 | unsigned long * |
| taint.cpp:875:6:875:21 | StringCchCopyExA | 5 | unsigned long |
| taint.cpp:876:6:876:20 | StringCchCopyNA | 0 | char * |
| taint.cpp:876:6:876:20 | StringCchCopyNA | 1 | size_t |
| taint.cpp:876:6:876:20 | StringCchCopyNA | 1 | unsigned long |
| taint.cpp:876:6:876:20 | StringCchCopyNA | 2 | const char * |
| taint.cpp:876:6:876:20 | StringCchCopyNA | 3 | size_t |
| taint.cpp:876:6:876:20 | StringCchCopyNA | 3 | unsigned long |
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 0 | char * |
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 1 | size_t |
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 1 | unsigned long |
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 2 | const char * |
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 3 | size_t |
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 3 | unsigned long |
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 4 | char ** |
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 5 | size_t * |
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 5 | unsigned long * |
| taint.cpp:877:6:877:22 | StringCchCopyNExA | 6 | unsigned long |
| taint.cpp:878:6:878:18 | StringCchCatA | 0 | char * |
| taint.cpp:878:6:878:18 | StringCchCatA | 1 | size_t |
| taint.cpp:878:6:878:18 | StringCchCatA | 1 | unsigned long |
| taint.cpp:878:6:878:18 | StringCchCatA | 2 | const char * |
| taint.cpp:879:6:879:18 | StringCchCatW | 0 | wchar_t * |
| taint.cpp:879:6:879:18 | StringCchCatW | 1 | size_t |
| taint.cpp:879:6:879:18 | StringCchCatW | 1 | unsigned long |
| taint.cpp:879:6:879:18 | StringCchCatW | 2 | const wchar_t * |
| taint.cpp:880:6:880:17 | StringCbCatA | 0 | char * |
| taint.cpp:880:6:880:17 | StringCbCatA | 1 | size_t |
| taint.cpp:880:6:880:17 | StringCbCatA | 1 | unsigned long |
| taint.cpp:880:6:880:17 | StringCbCatA | 2 | const char * |
| taint.cpp:881:6:881:20 | StringCchCatExA | 0 | char * |
| taint.cpp:881:6:881:20 | StringCchCatExA | 1 | size_t |
| taint.cpp:881:6:881:20 | StringCchCatExA | 1 | unsigned long |
| taint.cpp:881:6:881:20 | StringCchCatExA | 2 | const char * |
| taint.cpp:881:6:881:20 | StringCchCatExA | 3 | char ** |
| taint.cpp:881:6:881:20 | StringCchCatExA | 4 | size_t * |
| taint.cpp:881:6:881:20 | StringCchCatExA | 4 | unsigned long * |
| taint.cpp:881:6:881:20 | StringCchCatExA | 5 | unsigned long |
| taint.cpp:882:6:882:19 | StringCchCatNA | 0 | char * |
| taint.cpp:882:6:882:19 | StringCchCatNA | 1 | size_t |
| taint.cpp:882:6:882:19 | StringCchCatNA | 1 | unsigned long |
| taint.cpp:882:6:882:19 | StringCchCatNA | 2 | const char * |
| taint.cpp:882:6:882:19 | StringCchCatNA | 3 | size_t |
| taint.cpp:882:6:882:19 | StringCchCatNA | 3 | unsigned long |
| taint.cpp:883:6:883:21 | StringCchCatNExA | 0 | char * |
| taint.cpp:883:6:883:21 | StringCchCatNExA | 1 | size_t |
| taint.cpp:883:6:883:21 | StringCchCatNExA | 1 | unsigned long |
| taint.cpp:883:6:883:21 | StringCchCatNExA | 2 | const char * |
| taint.cpp:883:6:883:21 | StringCchCatNExA | 3 | size_t |
| taint.cpp:883:6:883:21 | StringCchCatNExA | 3 | unsigned long |
| taint.cpp:883:6:883:21 | StringCchCatNExA | 4 | char ** |
| taint.cpp:883:6:883:21 | StringCchCatNExA | 5 | size_t * |
| taint.cpp:883:6:883:21 | StringCchCatNExA | 5 | unsigned long * |
| taint.cpp:883:6:883:21 | StringCchCatNExA | 6 | unsigned long |
| taint.cpp:884:6:884:21 | StringCchPrintfA | 0 | char * |
| taint.cpp:884:6:884:21 | StringCchPrintfA | 1 | size_t |
| taint.cpp:884:6:884:21 | StringCchPrintfA | 1 | unsigned long |
| taint.cpp:884:6:884:21 | StringCchPrintfA | 2 | const char * |
| taint.cpp:884:6:884:21 | StringCchPrintfA | 3 | ... |
| taint.cpp:885:6:885:21 | StringCchPrintfW | 0 | wchar_t * |
| taint.cpp:885:6:885:21 | StringCchPrintfW | 1 | size_t |
| taint.cpp:885:6:885:21 | StringCchPrintfW | 1 | unsigned long |
| taint.cpp:885:6:885:21 | StringCchPrintfW | 2 | const wchar_t * |
| taint.cpp:885:6:885:21 | StringCchPrintfW | 3 | ... |
| taint.cpp:886:6:886:20 | StringCbPrintfA | 0 | char * |
| taint.cpp:886:6:886:20 | StringCbPrintfA | 1 | size_t |
| taint.cpp:886:6:886:20 | StringCbPrintfA | 1 | unsigned long |
| taint.cpp:886:6:886:20 | StringCbPrintfA | 2 | const char * |
| taint.cpp:886:6:886:20 | StringCbPrintfA | 3 | ... |
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 0 | char * |
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 1 | size_t |
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 1 | unsigned long |
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 2 | char ** |
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 3 | size_t * |
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 3 | unsigned long * |
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 4 | unsigned long |
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 5 | const char * |
| taint.cpp:887:6:887:23 | StringCchPrintfExA | 6 | ... |
| taint.cpp:888:6:888:22 | StringCchVPrintfA | 0 | char * |
| taint.cpp:888:6:888:22 | StringCchVPrintfA | 1 | size_t |
| taint.cpp:888:6:888:22 | StringCchVPrintfA | 1 | unsigned long |
| taint.cpp:888:6:888:22 | StringCchVPrintfA | 2 | const char * |
| taint.cpp:888:6:888:22 | StringCchVPrintfA | 3 | va_list |
| taint.cpp:888:6:888:22 | StringCchVPrintfA | 3 | void * |
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 0 | char * |
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 1 | size_t |
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 1 | unsigned long |
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 2 | char ** |
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 3 | size_t * |
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 3 | unsigned long * |
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 4 | unsigned long |
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 5 | const char * |
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 6 | va_list |
| taint.cpp:889:6:889:24 | StringCchVPrintfExA | 6 | void * |
| thread.cpp:4:6:4:9 | sink | 0 | int |
| thread.cpp:6:8:6:8 | operator= | 0 | S && |
| thread.cpp:6:8:6:8 | operator= | 0 | const S & |

View File

@@ -25796,9 +25796,9 @@ ir.cpp:
# 2919| getExpr(): [FunctionCall] call to VariableTemplateFunc
# 2919| Type = [DoubleType] double
# 2919| ValueCategory = prvalue
# 2919| getArgument(0): [Literal] 2.299999999999999822
# 2919| getArgument(0): [Literal] 2.3
# 2919| Type = [DoubleType] double
# 2919| Value = [Literal] 2.299999999999999822
# 2919| Value = [Literal] 2.3
# 2919| ValueCategory = prvalue
# 2919| getExpr().getFullyConverted(): [CStyleCast] (int)...
# 2919| Conversion = [FloatingPointToIntegralConversion] floating point to integral conversion

View File

@@ -12954,21 +12954,21 @@ ir.cpp:
# 1592| double StructuredBindingTupleRefGet::d
# 1592| Block 0
# 1592| v1592_1(void) = EnterFunction :
# 1592| m1592_2(unknown) = AliasedDefinition :
# 1592| m1592_3(unknown) = InitializeNonLocal :
# 1592| m1592_4(unknown) = Chi : total:m1592_2, partial:m1592_3
# 1592| r1592_5(glval<unknown>) = VariableAddress[#this] :
# 1592| m1592_6(glval<StructuredBindingTupleRefGet>) = InitializeParameter[#this] : &:r1592_5
# 1592| r1592_7(glval<StructuredBindingTupleRefGet>) = Load[#this] : &:r1592_5, m1592_6
# 1592| m1592_8(StructuredBindingTupleRefGet) = InitializeIndirection[#this] : &:r1592_7
# 1592| r1592_9(glval<double>) = FieldAddress[d] : r1592_7
# 1592| r1592_10(double) = Constant[2.200000000000000178] :
# 1592| m1592_11(double) = Store[?] : &:r1592_9, r1592_10
# 1592| m1592_12(unknown) = Chi : total:m1592_8, partial:m1592_11
# 1592| v1592_13(void) = ReturnVoid :
# 1592| v1592_14(void) = AliasedUse : m1592_3
# 1592| v1592_15(void) = ExitFunction :
# 1592| v1592_1(void) = EnterFunction :
# 1592| m1592_2(unknown) = AliasedDefinition :
# 1592| m1592_3(unknown) = InitializeNonLocal :
# 1592| m1592_4(unknown) = Chi : total:m1592_2, partial:m1592_3
# 1592| r1592_5(glval<unknown>) = VariableAddress[#this] :
# 1592| m1592_6(glval<StructuredBindingTupleRefGet>) = InitializeParameter[#this] : &:r1592_5
# 1592| r1592_7(glval<StructuredBindingTupleRefGet>) = Load[#this] : &:r1592_5, m1592_6
# 1592| m1592_8(StructuredBindingTupleRefGet) = InitializeIndirection[#this] : &:r1592_7
# 1592| r1592_9(glval<double>) = FieldAddress[d] : r1592_7
# 1592| r1592_10(double) = Constant[2.2] :
# 1592| m1592_11(double) = Store[?] : &:r1592_9, r1592_10
# 1592| m1592_12(unknown) = Chi : total:m1592_8, partial:m1592_11
# 1592| v1592_13(void) = ReturnVoid :
# 1592| v1592_14(void) = AliasedUse : m1592_3
# 1592| v1592_15(void) = ExitFunction :
# 1593| int& StructuredBindingTupleRefGet::r
# 1593| Block 0
@@ -21761,7 +21761,7 @@ ir.cpp:
# 2919| m2919_2(unknown) = AliasedDefinition :
# 2919| r2919_3(glval<int>) = VariableAddress[VariableTemplateFuncUse] :
# 2919| r2919_4(glval<unknown>) = FunctionAddress[VariableTemplateFunc] :
# 2919| r2919_5(double) = Constant[2.299999999999999822] :
# 2919| r2919_5(double) = Constant[2.3] :
# 2919| r2919_6(double) = Call[VariableTemplateFunc] : func:r2919_4, 0:r2919_5
# 2919| m2919_7(unknown) = ^CallSideEffect : ~m2919_2
# 2919| m2919_8(unknown) = Chi : total:m2919_2, partial:m2919_7

View File

@@ -11861,19 +11861,19 @@ ir.cpp:
# 1592| double StructuredBindingTupleRefGet::d
# 1592| Block 0
# 1592| v1592_1(void) = EnterFunction :
# 1592| mu1592_2(unknown) = AliasedDefinition :
# 1592| mu1592_3(unknown) = InitializeNonLocal :
# 1592| r1592_4(glval<unknown>) = VariableAddress[#this] :
# 1592| mu1592_5(glval<StructuredBindingTupleRefGet>) = InitializeParameter[#this] : &:r1592_4
# 1592| r1592_6(glval<StructuredBindingTupleRefGet>) = Load[#this] : &:r1592_4, ~m?
# 1592| mu1592_7(StructuredBindingTupleRefGet) = InitializeIndirection[#this] : &:r1592_6
# 1592| r1592_8(glval<double>) = FieldAddress[d] : r1592_6
# 1592| r1592_9(double) = Constant[2.200000000000000178] :
# 1592| mu1592_10(double) = Store[?] : &:r1592_8, r1592_9
# 1592| v1592_11(void) = ReturnVoid :
# 1592| v1592_12(void) = AliasedUse : ~m?
# 1592| v1592_13(void) = ExitFunction :
# 1592| v1592_1(void) = EnterFunction :
# 1592| mu1592_2(unknown) = AliasedDefinition :
# 1592| mu1592_3(unknown) = InitializeNonLocal :
# 1592| r1592_4(glval<unknown>) = VariableAddress[#this] :
# 1592| mu1592_5(glval<StructuredBindingTupleRefGet>) = InitializeParameter[#this] : &:r1592_4
# 1592| r1592_6(glval<StructuredBindingTupleRefGet>) = Load[#this] : &:r1592_4, ~m?
# 1592| mu1592_7(StructuredBindingTupleRefGet) = InitializeIndirection[#this] : &:r1592_6
# 1592| r1592_8(glval<double>) = FieldAddress[d] : r1592_6
# 1592| r1592_9(double) = Constant[2.2] :
# 1592| mu1592_10(double) = Store[?] : &:r1592_8, r1592_9
# 1592| v1592_11(void) = ReturnVoid :
# 1592| v1592_12(void) = AliasedUse : ~m?
# 1592| v1592_13(void) = ExitFunction :
# 1593| int& StructuredBindingTupleRefGet::r
# 1593| Block 0
@@ -19768,7 +19768,7 @@ ir.cpp:
# 2919| mu2919_2(unknown) = AliasedDefinition :
# 2919| r2919_3(glval<int>) = VariableAddress[VariableTemplateFuncUse] :
# 2919| r2919_4(glval<unknown>) = FunctionAddress[VariableTemplateFunc] :
# 2919| r2919_5(double) = Constant[2.299999999999999822] :
# 2919| r2919_5(double) = Constant[2.3] :
# 2919| r2919_6(double) = Call[VariableTemplateFunc] : func:r2919_4, 0:r2919_5
# 2919| mu2919_7(unknown) = ^CallSideEffect : ~m?
# 2919| r2919_8(int) = Convert : r2919_6

View File

@@ -1293,12 +1293,12 @@ estimateNrOfBounds
| test.c:415:26:415:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:415:30:415:30 | q | 1.0 | 1.0 | 1.0 |
| test.c:415:30:415:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:415:34:415:43 | 0.4743882700000000008 | 1.0 | -1.0 | -1.0 |
| test.c:415:47:415:56 | 0.1433388700000000071 | 1.0 | -1.0 | -1.0 |
| test.c:415:60:415:69 | 0.3527920299999999787 | 1.0 | -1.0 | -1.0 |
| test.c:415:73:415:82 | 0.3920645799999999959 | 1.0 | -1.0 | -1.0 |
| test.c:415:86:415:95 | 0.2154022499999999896 | 1.0 | -1.0 | -1.0 |
| test.c:415:99:415:108 | 0.4049680500000000238 | 1.0 | -1.0 | -1.0 |
| test.c:415:34:415:43 | 0.47438827 | 1.0 | -1.0 | -1.0 |
| test.c:415:47:415:56 | 0.14333887 | 1.0 | -1.0 | -1.0 |
| test.c:415:60:415:69 | 0.35279203 | 1.0 | -1.0 | -1.0 |
| test.c:415:73:415:82 | 0.39206458 | 1.0 | -1.0 | -1.0 |
| test.c:415:86:415:95 | 0.21540225 | 1.0 | -1.0 | -1.0 |
| test.c:415:99:415:108 | 0.40496805 | 1.0 | -1.0 | -1.0 |
| test.c:416:14:416:14 | m | 2.0 | 1.0 | 1.0 |
| test.c:416:14:416:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:416:18:416:18 | n | 3.0 | 1.0 | 1.0 |
@@ -1309,12 +1309,12 @@ estimateNrOfBounds
| test.c:416:26:416:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:416:30:416:30 | q | 3.0 | 1.0 | 1.0 |
| test.c:416:30:416:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:416:34:416:43 | 0.3418334800000000229 | 1.0 | -1.0 | -1.0 |
| test.c:416:47:416:56 | 0.3533464000000000049 | 1.0 | -1.0 | -1.0 |
| test.c:416:60:416:69 | 0.2224785300000000077 | 1.0 | -1.0 | -1.0 |
| test.c:416:73:416:82 | 0.326618929999999974 | 1.0 | -1.0 | -1.0 |
| test.c:416:86:416:95 | 0.5927046500000000551 | 1.0 | -1.0 | -1.0 |
| test.c:416:99:416:108 | 0.5297741000000000255 | 1.0 | -1.0 | -1.0 |
| test.c:416:34:416:43 | 0.34183348 | 1.0 | -1.0 | -1.0 |
| test.c:416:47:416:56 | 0.3533464 | 1.0 | -1.0 | -1.0 |
| test.c:416:60:416:69 | 0.22247853 | 1.0 | -1.0 | -1.0 |
| test.c:416:73:416:82 | 0.32661893 | 1.0 | -1.0 | -1.0 |
| test.c:416:86:416:95 | 0.59270465 | 1.0 | -1.0 | -1.0 |
| test.c:416:99:416:108 | 0.5297741 | 1.0 | -1.0 | -1.0 |
| test.c:417:14:417:14 | m | 3.5 | 1.0 | 1.0 |
| test.c:417:14:417:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:417:18:417:18 | n | 8.0 | 1.0 | 1.0 |
@@ -1325,12 +1325,12 @@ estimateNrOfBounds
| test.c:417:26:417:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:417:30:417:30 | q | 8.0 | 1.0 | 1.0 |
| test.c:417:30:417:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:417:34:417:43 | 0.774296030000000024 | 1.0 | -1.0 | -1.0 |
| test.c:417:47:417:56 | 0.3147808400000000062 | 1.0 | -1.0 | -1.0 |
| test.c:417:60:417:69 | 0.3123551399999999756 | 1.0 | -1.0 | -1.0 |
| test.c:417:73:417:82 | 0.05121255999999999725 | 1.0 | -1.0 | -1.0 |
| test.c:417:86:417:95 | 0.7931074500000000471 | 1.0 | -1.0 | -1.0 |
| test.c:417:99:417:108 | 0.6798145100000000385 | 1.0 | -1.0 | -1.0 |
| test.c:417:34:417:43 | 0.77429603 | 1.0 | -1.0 | -1.0 |
| test.c:417:47:417:56 | 0.31478084 | 1.0 | -1.0 | -1.0 |
| test.c:417:60:417:69 | 0.31235514 | 1.0 | -1.0 | -1.0 |
| test.c:417:73:417:82 | 0.05121256 | 1.0 | -1.0 | -1.0 |
| test.c:417:86:417:95 | 0.79310745 | 1.0 | -1.0 | -1.0 |
| test.c:417:99:417:108 | 0.67981451 | 1.0 | -1.0 | -1.0 |
| test.c:418:14:418:14 | m | 5.75 | 1.0 | 1.0 |
| test.c:418:14:418:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:418:18:418:18 | n | 20.5 | 1.0 | 1.0 |
@@ -1341,12 +1341,12 @@ estimateNrOfBounds
| test.c:418:26:418:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:418:30:418:30 | q | 20.5 | 1.0 | 1.0 |
| test.c:418:30:418:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:418:34:418:43 | 0.4472955599999999809 | 1.0 | -1.0 | -1.0 |
| test.c:418:47:418:56 | 0.8059920200000000312 | 1.0 | -1.0 | -1.0 |
| test.c:418:60:418:69 | 0.9899726199999999698 | 1.0 | -1.0 | -1.0 |
| test.c:418:73:418:82 | 0.5995273199999999747 | 1.0 | -1.0 | -1.0 |
| test.c:418:86:418:95 | 0.3697694799999999837 | 1.0 | -1.0 | -1.0 |
| test.c:418:99:418:108 | 0.8386683499999999514 | 1.0 | -1.0 | -1.0 |
| test.c:418:34:418:43 | 0.44729556 | 1.0 | -1.0 | -1.0 |
| test.c:418:47:418:56 | 0.80599202 | 1.0 | -1.0 | -1.0 |
| test.c:418:60:418:69 | 0.98997262 | 1.0 | -1.0 | -1.0 |
| test.c:418:73:418:82 | 0.59952732 | 1.0 | -1.0 | -1.0 |
| test.c:418:86:418:95 | 0.36976948 | 1.0 | -1.0 | -1.0 |
| test.c:418:99:418:108 | 0.83866835 | 1.0 | -1.0 | -1.0 |
| test.c:419:14:419:14 | m | 9.125 | 1.0 | 1.0 |
| test.c:419:14:419:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:419:18:419:18 | n | 51.75 | 1.0 | 1.0 |
@@ -1357,12 +1357,12 @@ estimateNrOfBounds
| test.c:419:26:419:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:419:30:419:30 | q | 51.75 | 1.0 | 1.0 |
| test.c:419:30:419:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:419:34:419:43 | 0.4931182800000000199 | 1.0 | -1.0 | -1.0 |
| test.c:419:47:419:56 | 0.9038991100000000056 | 1.0 | -1.0 | -1.0 |
| test.c:419:60:419:69 | 0.1059771199999999941 | 1.0 | -1.0 | -1.0 |
| test.c:419:73:419:82 | 0.2177842600000000073 | 1.0 | -1.0 | -1.0 |
| test.c:419:86:419:95 | 0.7248596600000000167 | 1.0 | -1.0 | -1.0 |
| test.c:419:99:419:108 | 0.6873487400000000136 | 1.0 | -1.0 | -1.0 |
| test.c:419:34:419:43 | 0.49311828 | 1.0 | -1.0 | -1.0 |
| test.c:419:47:419:56 | 0.90389911 | 1.0 | -1.0 | -1.0 |
| test.c:419:60:419:69 | 0.10597712 | 1.0 | -1.0 | -1.0 |
| test.c:419:73:419:82 | 0.21778426 | 1.0 | -1.0 | -1.0 |
| test.c:419:86:419:95 | 0.72485966 | 1.0 | -1.0 | -1.0 |
| test.c:419:99:419:108 | 0.68734874 | 1.0 | -1.0 | -1.0 |
| test.c:420:14:420:14 | m | 14.1875 | 1.0 | 1.0 |
| test.c:420:14:420:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:420:18:420:18 | n | 129.875 | 1.0 | 1.0 |
@@ -1373,12 +1373,12 @@ estimateNrOfBounds
| test.c:420:26:420:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:420:30:420:30 | q | 129.875 | 1.0 | 1.0 |
| test.c:420:30:420:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:420:34:420:43 | 0.4745284799999999747 | 1.0 | -1.0 | -1.0 |
| test.c:420:47:420:56 | 0.107866500000000004 | 1.0 | -1.0 | -1.0 |
| test.c:420:60:420:69 | 0.1188457599999999947 | 1.0 | -1.0 | -1.0 |
| test.c:420:73:420:82 | 0.7616405200000000431 | 1.0 | -1.0 | -1.0 |
| test.c:420:86:420:95 | 0.3480889200000000239 | 1.0 | -1.0 | -1.0 |
| test.c:420:99:420:108 | 0.584408649999999974 | 1.0 | -1.0 | -1.0 |
| test.c:420:34:420:43 | 0.47452848 | 1.0 | -1.0 | -1.0 |
| test.c:420:47:420:56 | 0.1078665 | 1.0 | -1.0 | -1.0 |
| test.c:420:60:420:69 | 0.11884576 | 1.0 | -1.0 | -1.0 |
| test.c:420:73:420:82 | 0.76164052 | 1.0 | -1.0 | -1.0 |
| test.c:420:86:420:95 | 0.34808892 | 1.0 | -1.0 | -1.0 |
| test.c:420:99:420:108 | 0.58440865 | 1.0 | -1.0 | -1.0 |
| test.c:421:14:421:14 | m | 21.78125 | 1.0 | 1.0 |
| test.c:421:14:421:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:421:18:421:18 | n | 325.1875 | 1.0 | 1.0 |
@@ -1390,11 +1390,11 @@ estimateNrOfBounds
| test.c:421:30:421:30 | q | 325.1875 | 1.0 | 1.0 |
| test.c:421:30:421:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:421:34:421:43 | 0.02524326 | 1.0 | -1.0 | -1.0 |
| test.c:421:47:421:56 | 0.8290504600000000446 | 1.0 | -1.0 | -1.0 |
| test.c:421:60:421:69 | 0.95823075000000002 | 1.0 | -1.0 | -1.0 |
| test.c:421:73:421:82 | 0.1251655799999999985 | 1.0 | -1.0 | -1.0 |
| test.c:421:86:421:95 | 0.8523517900000000536 | 1.0 | -1.0 | -1.0 |
| test.c:421:99:421:108 | 0.3623238400000000081 | 1.0 | -1.0 | -1.0 |
| test.c:421:47:421:56 | 0.82905046 | 1.0 | -1.0 | -1.0 |
| test.c:421:60:421:69 | 0.95823075 | 1.0 | -1.0 | -1.0 |
| test.c:421:73:421:82 | 0.12516558 | 1.0 | -1.0 | -1.0 |
| test.c:421:86:421:95 | 0.85235179 | 1.0 | -1.0 | -1.0 |
| test.c:421:99:421:108 | 0.36232384 | 1.0 | -1.0 | -1.0 |
| test.c:422:14:422:14 | m | 33.171875 | 1.0 | 1.0 |
| test.c:422:14:422:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:422:18:422:18 | n | 813.46875 | 1.0 | 1.0 |
@@ -1405,12 +1405,12 @@ estimateNrOfBounds
| test.c:422:26:422:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:422:30:422:30 | q | 813.46875 | 1.0 | 1.0 |
| test.c:422:30:422:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:422:34:422:43 | 0.3870862600000000153 | 1.0 | -1.0 | -1.0 |
| test.c:422:47:422:56 | 0.3287604399999999871 | 1.0 | -1.0 | -1.0 |
| test.c:422:60:422:69 | 0.1496348500000000137 | 1.0 | -1.0 | -1.0 |
| test.c:422:73:422:82 | 0.4504110800000000192 | 1.0 | -1.0 | -1.0 |
| test.c:422:86:422:95 | 0.4864090899999999884 | 1.0 | -1.0 | -1.0 |
| test.c:422:99:422:108 | 0.8433127200000000157 | 1.0 | -1.0 | -1.0 |
| test.c:422:34:422:43 | 0.38708626 | 1.0 | -1.0 | -1.0 |
| test.c:422:47:422:56 | 0.32876044 | 1.0 | -1.0 | -1.0 |
| test.c:422:60:422:69 | 0.14963485 | 1.0 | -1.0 | -1.0 |
| test.c:422:73:422:82 | 0.45041108 | 1.0 | -1.0 | -1.0 |
| test.c:422:86:422:95 | 0.48640909 | 1.0 | -1.0 | -1.0 |
| test.c:422:99:422:108 | 0.84331272 | 1.0 | -1.0 | -1.0 |
| test.c:423:14:423:14 | m | 50.2578125 | 1.0 | 1.0 |
| test.c:423:14:423:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:423:18:423:18 | n | 2034.171875 | 1.0 | 1.0 |
@@ -1421,12 +1421,12 @@ estimateNrOfBounds
| test.c:423:26:423:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:423:30:423:30 | q | 2034.171875 | 1.0 | 1.0 |
| test.c:423:30:423:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:423:34:423:43 | 0.1575506299999999971 | 1.0 | -1.0 | -1.0 |
| test.c:423:47:423:56 | 0.7708683299999999905 | 1.0 | -1.0 | -1.0 |
| test.c:423:60:423:69 | 0.2642848099999999811 | 1.0 | -1.0 | -1.0 |
| test.c:423:73:423:82 | 0.1480050800000000111 | 1.0 | -1.0 | -1.0 |
| test.c:423:86:423:95 | 0.374281430000000026 | 1.0 | -1.0 | -1.0 |
| test.c:423:99:423:108 | 0.05328182000000000057 | 1.0 | -1.0 | -1.0 |
| test.c:423:34:423:43 | 0.15755063 | 1.0 | -1.0 | -1.0 |
| test.c:423:47:423:56 | 0.77086833 | 1.0 | -1.0 | -1.0 |
| test.c:423:60:423:69 | 0.26428481 | 1.0 | -1.0 | -1.0 |
| test.c:423:73:423:82 | 0.14800508 | 1.0 | -1.0 | -1.0 |
| test.c:423:86:423:95 | 0.37428143 | 1.0 | -1.0 | -1.0 |
| test.c:423:99:423:108 | 0.05328182 | 1.0 | -1.0 | -1.0 |
| test.c:424:14:424:14 | m | 75.88671875 | 1.0 | 1.0 |
| test.c:424:14:424:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:424:18:424:18 | n | 5085.9296875 | 1.0 | 1.0 |
@@ -1437,12 +1437,12 @@ estimateNrOfBounds
| test.c:424:26:424:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:424:30:424:30 | q | 5085.9296875 | 1.0 | 1.0 |
| test.c:424:30:424:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:424:34:424:43 | 0.4173653600000000186 | 1.0 | -1.0 | -1.0 |
| test.c:424:47:424:56 | 0.7682662799999999681 | 1.0 | -1.0 | -1.0 |
| test.c:424:60:424:69 | 0.2764323799999999776 | 1.0 | -1.0 | -1.0 |
| test.c:424:73:424:82 | 0.5567927400000000082 | 1.0 | -1.0 | -1.0 |
| test.c:424:86:424:95 | 0.3946885700000000163 | 1.0 | -1.0 | -1.0 |
| test.c:424:99:424:108 | 0.6907214400000000198 | 1.0 | -1.0 | -1.0 |
| test.c:424:34:424:43 | 0.41736536 | 1.0 | -1.0 | -1.0 |
| test.c:424:47:424:56 | 0.76826628 | 1.0 | -1.0 | -1.0 |
| test.c:424:60:424:69 | 0.27643238 | 1.0 | -1.0 | -1.0 |
| test.c:424:73:424:82 | 0.55679274 | 1.0 | -1.0 | -1.0 |
| test.c:424:86:424:95 | 0.39468857 | 1.0 | -1.0 | -1.0 |
| test.c:424:99:424:108 | 0.69072144 | 1.0 | -1.0 | -1.0 |
| test.c:425:14:425:14 | m | 114.330078125 | 1.0 | 1.0 |
| test.c:425:14:425:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:425:18:425:18 | n | 12715.32421875 | 1.0 | 1.0 |
@@ -1453,12 +1453,12 @@ estimateNrOfBounds
| test.c:425:26:425:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:425:30:425:30 | q | 12715.32421875 | 1.0 | 1.0 |
| test.c:425:30:425:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:425:34:425:43 | 0.8895534499999999678 | 1.0 | -1.0 | -1.0 |
| test.c:425:47:425:56 | 0.2990482400000000207 | 1.0 | -1.0 | -1.0 |
| test.c:425:60:425:69 | 0.7624258299999999711 | 1.0 | -1.0 | -1.0 |
| test.c:425:73:425:82 | 0.2051910999999999874 | 1.0 | -1.0 | -1.0 |
| test.c:425:86:425:95 | 0.8874555899999999609 | 1.0 | -1.0 | -1.0 |
| test.c:425:99:425:108 | 0.8137279800000000174 | 1.0 | -1.0 | -1.0 |
| test.c:425:34:425:43 | 0.88955345 | 1.0 | -1.0 | -1.0 |
| test.c:425:47:425:56 | 0.29904824 | 1.0 | -1.0 | -1.0 |
| test.c:425:60:425:69 | 0.76242583 | 1.0 | -1.0 | -1.0 |
| test.c:425:73:425:82 | 0.2051911 | 1.0 | -1.0 | -1.0 |
| test.c:425:86:425:95 | 0.88745559 | 1.0 | -1.0 | -1.0 |
| test.c:425:99:425:108 | 0.81372798 | 1.0 | -1.0 | -1.0 |
| test.c:426:14:426:14 | m | 171.9951171875 | 1.0 | 1.0 |
| test.c:426:14:426:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:426:18:426:18 | n | 31788.810546875 | 1.0 | 1.0 |
@@ -1469,12 +1469,12 @@ estimateNrOfBounds
| test.c:426:26:426:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:426:30:426:30 | q | 31788.810546875 | 1.0 | 1.0 |
| test.c:426:30:426:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 |
| test.c:426:34:426:43 | 0.4218627600000000033 | 1.0 | -1.0 | -1.0 |
| test.c:426:47:426:56 | 0.5384335799999999672 | 1.0 | -1.0 | -1.0 |
| test.c:426:60:426:69 | 0.4499667900000000054 | 1.0 | -1.0 | -1.0 |
| test.c:426:73:426:82 | 0.1320411400000000013 | 1.0 | -1.0 | -1.0 |
| test.c:426:86:426:95 | 0.5203124099999999475 | 1.0 | -1.0 | -1.0 |
| test.c:426:99:426:108 | 0.4276264699999999808 | 1.0 | -1.0 | -1.0 |
| test.c:426:34:426:43 | 0.42186276 | 1.0 | -1.0 | -1.0 |
| test.c:426:47:426:56 | 0.53843358 | 1.0 | -1.0 | -1.0 |
| test.c:426:60:426:69 | 0.44996679 | 1.0 | -1.0 | -1.0 |
| test.c:426:73:426:82 | 0.13204114 | 1.0 | -1.0 | -1.0 |
| test.c:426:86:426:95 | 0.52031241 | 1.0 | -1.0 | -1.0 |
| test.c:426:99:426:108 | 0.42762647 | 1.0 | -1.0 | -1.0 |
| test.c:432:19:432:19 | a | 1.0 | 1.0 | 1.0 |
| test.c:432:19:432:23 | ... + ... | 1.0 | 1.0 | 1.0 |
| test.c:432:19:432:27 | ... + ... | 1.0 | 1.0 | 1.0 |

View File

@@ -11,8 +11,13 @@ edges
| nested.cpp:86:19:86:46 | *call to __builtin_alloca | nested.cpp:87:18:87:20 | *fmt | provenance | |
| test.cpp:46:27:46:30 | **argv | test.cpp:130:20:130:26 | *access to array | provenance | |
| test.cpp:167:31:167:34 | *data | test.cpp:170:12:170:14 | *res | provenance | DataFlowFunction |
| test.cpp:179:6:179:21 | [summary param] *2 in StringCchPrintfW | test.cpp:179:6:179:21 | [summary param] *0 in StringCchPrintfW [Return] | provenance | MaD:403 |
| test.cpp:193:32:193:34 | *str | test.cpp:195:31:195:33 | *str | provenance | |
| test.cpp:193:32:193:34 | *str | test.cpp:195:31:195:33 | *str | provenance | |
| test.cpp:193:32:193:34 | *str | test.cpp:197:11:197:14 | *wstr | provenance | TaintFunction |
| test.cpp:195:20:195:23 | StringCchPrintfW output argument | test.cpp:197:11:197:14 | *wstr | provenance | |
| test.cpp:195:31:195:33 | *str | test.cpp:179:6:179:21 | [summary param] *2 in StringCchPrintfW | provenance | |
| test.cpp:195:31:195:33 | *str | test.cpp:195:20:195:23 | StringCchPrintfW output argument | provenance | MaD:403 |
| test.cpp:204:25:204:36 | *call to get_string | test.cpp:204:25:204:36 | *call to get_string | provenance | |
| test.cpp:204:25:204:36 | *call to get_string | test.cpp:205:12:205:20 | *... + ... | provenance | |
| test.cpp:204:25:204:36 | *call to get_string | test.cpp:206:12:206:16 | *hello | provenance | |
@@ -55,7 +60,11 @@ nodes
| test.cpp:130:20:130:26 | *access to array | semmle.label | *access to array |
| test.cpp:167:31:167:34 | *data | semmle.label | *data |
| test.cpp:170:12:170:14 | *res | semmle.label | *res |
| test.cpp:179:6:179:21 | [summary param] *0 in StringCchPrintfW [Return] | semmle.label | [summary param] *0 in StringCchPrintfW [Return] |
| test.cpp:179:6:179:21 | [summary param] *2 in StringCchPrintfW | semmle.label | [summary param] *2 in StringCchPrintfW |
| test.cpp:193:32:193:34 | *str | semmle.label | *str |
| test.cpp:195:20:195:23 | StringCchPrintfW output argument | semmle.label | StringCchPrintfW output argument |
| test.cpp:195:31:195:33 | *str | semmle.label | *str |
| test.cpp:195:31:195:33 | *str | semmle.label | *str |
| test.cpp:197:11:197:14 | *wstr | semmle.label | *wstr |
| test.cpp:204:25:204:36 | *call to get_string | semmle.label | *call to get_string |
@@ -88,6 +97,7 @@ nodes
| test.cpp:245:25:245:36 | *call to get_string | semmle.label | *call to get_string |
| test.cpp:247:12:247:16 | *hello | semmle.label | *hello |
subpaths
| test.cpp:195:31:195:33 | *str | test.cpp:179:6:179:21 | [summary param] *2 in StringCchPrintfW | test.cpp:179:6:179:21 | [summary param] *0 in StringCchPrintfW [Return] | test.cpp:195:20:195:23 | StringCchPrintfW output argument |
#select
| NonConstantFormat.c:30:10:30:16 | *access to array | NonConstantFormat.c:28:27:28:30 | **argv | NonConstantFormat.c:30:10:30:16 | *access to array | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | NonConstantFormat.c:30:3:30:8 | call to printf | printf |
| NonConstantFormat.c:41:9:41:45 | *call to any_random_function | NonConstantFormat.c:41:9:41:45 | *call to any_random_function | NonConstantFormat.c:41:9:41:45 | *call to any_random_function | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | NonConstantFormat.c:41:2:41:7 | call to printf | printf |

View File

@@ -0,0 +1,2 @@
| conftest.c.c:4:3:4:8 | call to strlen | This expression has no effect (because $@ has no external side effects). | conftest.h:3:8:3:13 | strlen | strlen |
| conftest_abc.c:4:3:4:8 | call to strlen | This expression has no effect (because $@ has no external side effects). | conftest.h:3:8:3:13 | strlen | strlen |

View File

@@ -0,0 +1 @@
Likely Bugs/Likely Typos/ExprHasNoEffect.ql

View File

@@ -0,0 +1,6 @@
#include "conftest.h"
int main2() {
strlen(""); // GOOD: conftest files are ignored
return 0;
}

View File

@@ -0,0 +1,6 @@
#include "conftest.h"
int main3() {
strlen(""); // BAD: not a `conftest` file, as `conftest` is not directly followed by the extension or a sequence of numbers.
return 0;
}

View File

@@ -0,0 +1,6 @@
#include "conftest.h"
int main4() {
strlen(""); // GOOD: conftest files are ignored
return 0;
}

View File

@@ -0,0 +1,3 @@
typedef long long size_t;
size_t strlen(const char *s);

View File

@@ -0,0 +1,6 @@
#include "conftest.h"
int main5() {
strlen(""); // GOOD: conftest files are ignored
return 0;
}

Some files were not shown because too many files have changed in this diff Show More