Commit Graph

1524 Commits

Author SHA1 Message Date
Asger F
aea676df3c Merge pull request #19445 from asgerf/js/summaries-with-fallback
JS: Generate flow summaries from summaryModels; only generate steps as a fallback
2025-05-13 14:49:38 +02:00
Michael Nebel
a94cffa27e Shared: Adjust the printing of heuristic value summaries (and fix a minor issue with output printing in captureSink). 2025-05-13 13:44:39 +01:00
Michael Nebel
6c9f248fdb Shared: Avoid generating taint based heuristic summaries when a content sensitive summary can be generated. 2025-05-13 13:44:38 +01:00
Nicolas Will
5334e90717 Make FlowAwareElement private 2025-05-12 14:58:04 +02:00
Nicolas Will
c66ec63333 Fix query compilation errors 2025-05-12 14:48:58 +02:00
Nicolas Will
8f36624171 Add AsymmetricAlgorithmNode, refactor and address feedback 2025-05-12 14:37:44 +02:00
Simon Friis Vindum
bc8580159c Merge branch 'main' into rust-ti-implementing-type-method 2025-05-12 11:35:48 +02:00
Simon Friis Vindum
0cf60c4e2d Rust: Address comments on documentation 2025-05-12 11:07:46 +02:00
Asger F
891b2b8335 DataFlow: Support a bare Argument[n] as a valid output stack 2025-05-12 09:42:45 +02:00
Asger F
8fab235d66 DataFlow: Fix typo in a comment 2025-05-12 09:41:49 +02:00
Nicolas Will
cd59ce5b04 Rename shared pack to quantum from experimental 2025-05-09 14:36:12 +02:00
Mathias Vorreiter Pedersen
64371688d7 Shared: Fix QLDoc to make QL4QL happy. 2025-05-08 10:16:09 -04:00
Nicolas Will
d0510bc672 Merge branch 'main' into quantum-experimental 2025-05-08 04:37:37 +02:00
Nicolas Will
ac72abd3a6 Refactor directory structure (shared experimental) 2025-05-08 02:35:09 +02:00
Nicolas Will
c19291be88 Refactor 'cryptography' and 'Quantum' to 'quantum' 2025-05-08 01:38:53 +02:00
Simon Friis Vindum
06cfa9a89c Rust: Address format fixes suggested in review 2025-05-05 15:21:50 -04:00
REDMOND\brodes
0a0be41527 Intermediate progress towards getting hashing upgraded. Still need to handle the final and update mechanics, matching the JCA. Similarly need to update cipher to follow the JCA for update/final as well. 2025-05-02 16:33:52 -04:00
REDMOND\brodes
7481de75cb Updating the model to infer implicit cipher key sizes. 2025-05-02 14:07:38 -04:00
Mathias Vorreiter Pedersen
37bc2bf5b3 Shared: Deduplicate flow summaries. 2025-05-02 16:51:15 +01:00
Mathias Vorreiter Pedersen
4d2f2b89e7 Shared/Java/C#/Rust/C++: Rename 'captureHeuristicFlow' to 'captureFlow'. 2025-05-02 14:02:41 +01:00
Mathias Vorreiter Pedersen
54f0eed2c6 Shared: Rename 'asLiftedTaintModel' to 'asLiftedModel'. 2025-05-02 13:54:58 +01:00
Mathias Vorreiter Pedersen
d5bc95daeb Merge branch 'main' into generate-more-value-preserving-summaries-2 2025-05-02 10:51:11 +01:00
Asger F
0fc1ae272e DataFlow: expose from FlowSummaries whether a summary is supported 2025-05-01 15:22:12 +02:00
Simon Friis Vindum
e45b5c557d Rust: Implement type inference support for non-universal impl blocks 2025-05-01 11:59:15 +02:00
Mathias Vorreiter Pedersen
607a1e46da Shared: Generate value-preserving summaries when possible. 2025-04-30 20:34:27 +01:00
Nicolas Will
83617e099f Merge pull request #2 from nicolaswill/knewbury01/JCA-sample
Implement first stage cryptography modelling and queries
2025-04-30 16:39:56 +02:00
Nicolas Will
27c7bf3047 Merge branch 'github:main' into crypto-test 2025-04-30 16:35:26 +02:00
Nicolas Will
9c87ad8293 Merge branch 'brodes/key_agreement' of https://github.com/nicolaswill/codeql into brodes/key_agreement 2025-04-30 16:28:35 +02:00
Nicolas Will
7f24a2557d Add modelling for JCA key gen cipher algorithm 2025-04-30 16:28:31 +02:00
Michael Nebel
c9d01bc607 Shared: Sprinkle some predicate defaults and clean up. 2025-04-29 15:22:13 +02:00
Michael Nebel
bb6530fcf8 Shared: Make the summary, source and sink model generation a parameterized module. 2025-04-29 15:22:03 +02:00
Michael Nebel
b5c596b2ce Shared: Split model printing of summaries and sources/sinks into separate param modules. 2025-04-29 15:21:59 +02:00
Mathias Vorreiter Pedersen
daf953fabe Merge pull request #19404 from MathiasVP/cleanup-PropagateFlowConfig
Shared: Use `isSink/1` in `PropagateFlowConfig`
2025-04-29 10:30:01 +01:00
Asger F
2ce01bfb9a Add Folder::Resolve as a generalisation of Folder::Append 2025-04-29 09:42:23 +02:00
Asger F
eb059969e3 Move getAChildContainer one scope up 2025-04-29 09:42:22 +02:00
REDMOND\brodes
ac798f2bc6 Cipher Algorithm Slices 2025-04-28 16:03:41 -04:00
REDMOND\brodes
ce3eabf05a Updating model to support slicing. 2025-04-28 14:56:28 -04:00
Mathias Vorreiter Pedersen
b91a2cc159 Shared: Use 'isSink/1' in 'PropagateFlowConfig'. 2025-04-28 17:36:37 +01:00
REDMOND\brodes
28ccc83346 Adding a means to distinguish asymmetric algorithms. 2025-04-28 11:33:37 -04:00
github-actions[bot]
2e0699ab2b Post-release preparation for codeql-cli-2.21.2 2025-04-28 14:03:28 +00:00
github-actions[bot]
625354c46e Release preparation for version 2.21.2 2025-04-28 10:55:22 +00:00
Michael Nebel
f6135d507b Shared: Address review comments. 2025-04-25 15:50:06 +02:00
Michael Nebel
f78be91af2 Shared: Re-factor the model generator and put the heuristic queries in its own module. 2025-04-25 15:49:45 +02:00
Jeroen Ketema
46b21af3ef Dataflow: Make default field flow branch limit configurable per language 2025-04-24 11:02:49 +02:00
Michael Nebel
617f4729d8 Shared: Match line information on Alert and Sink locations. 2025-04-23 12:35:17 +02:00
Tom Hvitved
ae5ac11387 Shared: Fix join in FileSystem.qll
Before
```
Evaluated relational algebra for predicate FileSystem::Folder::Append<PathResolution::shouldAppend>::appendStep/3#bed54f6d@d2a7eeoa on iteration 2 running pipeline standard with tuple counts:
         120   ~2%    {4} r1 = SCAN `FileSystem::Folder::Append<PathResolution::shouldAppend>::appendStep/3#bed54f6d#prev_delta` OUTPUT In.1, In.0, In.2, In.3

           0   ~0%    {6} r2 = JOIN r1 WITH `_FileSystem::Folder::Append<PathResolution::shouldAppend>::getComponent/2#a6e36a04#join_rhs#1` ON FIRST 1 OUTPUT Lhs.0, Rhs.1, Lhs.1, Lhs.2, Lhs.3, _
                      {6}    | REWRITE WITH Tmp.5 := 1, Out.5 := (InOut.1 - Tmp.5), TEST Out.5 = InOut.3
           0   ~0%    {4}    | SCAN OUTPUT In.2, In.0, In.1, In.4

          91   ~3%    {6} r3 = JOIN r1 WITH `_FileSystem::Folder::Append<PathResolution::shouldAppend>::getComponent/2#a6e36a04#join_rhs` ON FIRST 1 OUTPUT Lhs.0, Rhs.1, Lhs.1, Lhs.2, Lhs.3, _
                      {6}    | REWRITE WITH Tmp.5 := 1, Out.5 := (InOut.1 - Tmp.5), TEST Out.5 = InOut.3
          81   ~0%    {4}    | SCAN OUTPUT In.4, In.0, In.1, In.2
          81   ~3%    {4}    | JOIN WITH containerparent_10#join_rhs ON FIRST 1 OUTPUT Lhs.3, Lhs.1, Lhs.2, Rhs.1

         269   ~0%    {7} r4 = JOIN r1 WITH `_FileSystem::Folder::Append<PathResolution::shouldAppend>::getComponent/2#a6e36a04#join_rhs#2` ON FIRST 1 OUTPUT Lhs.0, Rhs.1, Rhs.2, Lhs.1, Lhs.2, Lhs.3, _
                      {7}    | REWRITE WITH Tmp.6 := 1, Out.6 := (InOut.1 - Tmp.6), TEST Out.6 = InOut.4
          39   ~1%    {5}    | SCAN OUTPUT In.5, In.0, In.1, In.2, In.3
        1295   ~0%    {6}    | JOIN WITH containerparent ON FIRST 1 OUTPUT Rhs.1, Lhs.3, _, Lhs.1, Lhs.2, Lhs.4
        1295   ~0%    {6}    | REWRITE WITH Out.2 := 1
          34   ~1%    {4}    | JOIN WITH `cached_FileSystem::Container.splitAbsolutePath/2#dispred#dc97b0cc` ON FIRST 3 OUTPUT Lhs.5, Lhs.3, Lhs.4, Lhs.0

         115   ~0%    {4} r5 = r2 UNION r3 UNION r4
         115   ~0%    {4}    | AND NOT `FileSystem::Folder::Append<PathResolution::shouldAppend>::appendStep/3#bed54f6d#prev`(FIRST 4)
                      return r5
```

After
```
Evaluated relational algebra for predicate FileSystem::Folder::Append<PathResolution::shouldAppend>::appendStep/3#bed54f6d@4fb6e6v7 on iteration 2 running pipeline standard with tuple counts:
        120   ~0%    {4} r1 = SCAN `FileSystem::Folder::Append<PathResolution::shouldAppend>::appendStep/3#bed54f6d#prev_delta` OUTPUT In.1, In.0, In.2, In.3

          0   ~0%    {6} r2 = JOIN r1 WITH `_FileSystem::Folder::Append<PathResolution::shouldAppend>::getComponent/2#a6e36a04#join_rhs#1` ON FIRST 1 OUTPUT Lhs.0, Rhs.1, Lhs.1, Lhs.2, Lhs.3, _
                     {6}    | REWRITE WITH Tmp.5 := 1, Out.5 := (InOut.1 - Tmp.5), TEST Out.5 = InOut.3
          0   ~0%    {4}    | SCAN OUTPUT In.2, In.0, In.1, In.4

         91   ~0%    {6} r3 = JOIN r1 WITH `_FileSystem::Folder::Append<PathResolution::shouldAppend>::getComponent/2#a6e36a04#join_rhs` ON FIRST 1 OUTPUT Lhs.0, Rhs.1, Lhs.1, Lhs.2, Lhs.3, _
                     {6}    | REWRITE WITH Tmp.5 := 1, Out.5 := (InOut.1 - Tmp.5), TEST Out.5 = InOut.3
         81   ~0%    {4}    | SCAN OUTPUT In.4, In.0, In.1, In.2
         81   ~5%    {4}    | JOIN WITH containerparent_10#join_rhs ON FIRST 1 OUTPUT Lhs.3, Lhs.1, Lhs.2, Rhs.1

        269   ~0%    {7} r4 = JOIN r1 WITH `_FileSystem::Folder::Append<PathResolution::shouldAppend>::getComponent/2#a6e36a04#join_rhs#2` ON FIRST 1 OUTPUT Lhs.0, Rhs.1, Rhs.2, Lhs.1, Lhs.2, Lhs.3, _
                     {7}    | REWRITE WITH Tmp.6 := 1, Out.6 := (InOut.1 - Tmp.6), TEST Out.6 = InOut.4
         39   ~3%    {5}    | SCAN OUTPUT In.5, In.2, In.0, In.1, In.3
         34   ~0%    {4}    | JOIN WITH `FileSystem::Folder::Append<PathResolution::shouldAppend>::getAChildContainer/2#2e91feca` ON FIRST 2 OUTPUT Lhs.4, Lhs.2, Lhs.3, Rhs.2

        115   ~2%    {4} r5 = r2 UNION r3 UNION r4
        115   ~2%    {4}    | AND NOT `FileSystem::Folder::Append<PathResolution::shouldAppend>::appendStep/3#bed54f6d#prev`(FIRST 4)
                     return r5
```
2025-04-22 12:16:59 +02:00
Nicolas Will
1958c192ec Reimplement EC, MAC, key creation logic + consumer 2025-04-15 23:00:12 -04:00
github-actions[bot]
d78736b1bf Post-release preparation for codeql-cli-2.21.1 2025-04-15 16:33:15 +00:00
github-actions[bot]
b961c5961d Release preparation for version 2.21.1 2025-04-14 09:53:06 +00:00
Mathias Vorreiter Pedersen
11aef7019e Merge pull request #19273 from MathiasVP/prepare-shared-mad-generation-for-cpp
Shared: Prepare model generation for C++ adoption
2025-04-11 07:22:56 -07:00