Compare commits

...

5018 Commits

Author SHA1 Message Date
Rasmus Wriedt Larsen
629f32a609 Python: Fix problem if import is used
I fixed it in both predicates... I think we might still be able to remove
`newDirectAlias` -- but with it being better, it will allow us to better test if `newImportAlias` actually cover everything we need!
2023-10-20 13:33:54 +02:00
Rasmus Wriedt Larsen
a3bc16cea8 Python: Add test highlight problem is import is used :O 2023-10-20 13:31:26 +02:00
Rasmus Wriedt Larsen
be9ed1d90d Python: Fix underlying problem of not using Alias 2023-10-20 11:13:48 +02:00
Rasmus Wriedt Larsen
208c1b9df4 Python: Use django View instead of MethodView
Due to the 'only model most specific spec' logic highlighted in previous
commit, I'm changing away from MethodView/View, and use Django view instead.

In practice this shouldn't matter at all, but for writing tests it would
have been a nice fix to only have the "same name but more specific"
logic apply when it's the same _definition_ location. We used to have
this information available, but right now we don't... so instead of
spending a lot of time rewriting the core library, I simply used a
different class :D :O :(
2023-10-20 11:01:15 +02:00
Rasmus Wriedt Larsen
3d5d4ca983 Python: Explain the funky logic in Find.ql 2023-10-20 10:55:23 +02:00
Rasmus Wriedt Larsen
0236d8ea69 Python: Ensure no deps visible in FindSubclass tests 2023-10-20 10:25:57 +02:00
Rasmus Wriedt Larsen
b8bd653c6b Python: More examples of things to handle in find-subclass 2023-10-20 10:24:39 +02:00
Rasmus Wriedt Larsen
eb9ee33adc Python: Workaround for module level items from import * not being LocalSourceNodes 2023-10-10 17:11:10 +02:00
Rasmus Wriedt Larsen
60903a48e7 Python: Also capture alias with new name 2023-10-09 17:54:24 +02:00
Rasmus Wriedt Larsen
ce5fc60c8f Python: Add test of find-subclass code 2023-10-09 17:53:29 +02:00
Rasmus Wriedt Larsen
2e4d7447a9 Python: Improve speed of process-mrva-results.py
Same trick as 'generate-code-scanning-query-list.py'
2023-10-09 17:53:22 +02:00
Rasmus Wriedt Larsen
c90bbb07ea Python: auto model 2023-09-20 17:12:25 +02:00
Rasmus Wriedt Larsen
2610c13053 Python: Enable auto-model for Django Model 2023-09-20 17:11:54 +02:00
Rasmus Wriedt Larsen
6d210c5fe8 Python: auto model 2023-09-18 20:34:41 +02:00
Rasmus Wriedt Larsen
9249b529d7 Python: auto model 2023-09-18 17:31:15 +02:00
Rasmus Wriedt Larsen
ce2fd928f5 Python: Enable auto-model for cgi.FieldStorage 2023-09-18 17:01:34 +02:00
Rasmus Wriedt Larsen
a27c2e0603 Python: auto model 2023-09-18 16:37:56 +02:00
Rasmus Wriedt Larsen
db6509e3ac Python: auto model 2023-09-18 16:25:38 +02:00
Rasmus Wriedt Larsen
244346bc1c Python: auto model 2023-09-18 14:35:28 +02:00
Rasmus Wriedt Larsen
48cb075b3b Python: More import fixes
:thinkies: turns out that .getASubclass*() had to be applied everywhere...
2023-09-18 14:25:04 +02:00
Rasmus Wriedt Larsen
ec32de59a6 Python: More auto-modeling 2023-09-18 14:24:03 +02:00
Rasmus Wriedt Larsen
b93d470364 Python: Enable auto-model BaseHttpRequestHandler 2023-09-18 13:48:24 +02:00
Rasmus Wriedt Larsen
6d4b4d6838 Python: Modernize modeling of BaseHTTPRequestHandler 2023-09-18 13:40:41 +02:00
Rasmus Wriedt Larsen
af9b1e73f8 Python: Improve auto-model from better import alias handling 2023-09-18 12:11:10 +02:00
Rasmus Wriedt Larsen
ff069f345d Python: Improve SelfRefMixin
This is important to model mixins correctly, for example when they help
handle incoming requests, and therefore need to know that `self.kwargs`
contains data controlled by a user.
2023-09-18 12:05:40 +02:00
Rasmus Wriedt Larsen
6877697837 Python: Allow any results.bqrs file 2023-09-18 11:36:12 +02:00
Rasmus Wriedt Larsen
3abfcc59ca Python: Improve import * handling 2023-09-18 11:32:29 +02:00
Rasmus Wriedt Larsen
b1cfe27d17 Python: More automatic modeling 2023-09-15 15:27:10 +02:00
Rasmus Wriedt Larsen
0bf1ca7550 Python: Automodel for WSGIServer 2023-09-15 14:58:42 +02:00
Rasmus Wriedt Larsen
1328bfd7d0 Python: Automodel for tornado 2023-09-15 14:58:23 +02:00
Rasmus Wriedt Larsen
8b82732040 Python: Make Django use auto-modeling
Ooops
2023-09-15 14:57:32 +02:00
Rasmus Wriedt Larsen
ab0313828c Python: Remove manual MaD modeling
Everything is covered now 👍
2023-09-14 11:52:41 +02:00
Rasmus Wriedt Larsen
975ed47c53 Python: Add more auto-generated models
This time using old set of projects
2023-09-14 11:52:41 +02:00
Rasmus Wriedt Larsen
523f7e2ed4 Python: Sort MaD rows
(makes future diffing much easier)
2023-09-14 11:52:41 +02:00
Rasmus Wriedt Larsen
38911e63d2 FIXME already fixed 2023-09-14 11:52:41 +02:00
Rasmus Wriedt Larsen
0f1b120a03 Python: Add manual modeling still missing from auto modeling 2023-09-14 11:52:41 +02:00
Rasmus Wriedt Larsen
68985db3f6 Python: Add auto-modeling from current venv in MRVA top 1000 projects 2023-09-14 11:52:41 +02:00
Rasmus Wriedt Larsen
e96e67cdb9 Python: Add script to process results from MRVA (bqrs files)
Also makes `empty.model.yml` empty once again
2023-09-14 11:52:41 +02:00
Rasmus Wriedt Larsen
6024ca0167 Python: Remove query predicate annotation 2023-09-14 11:52:41 +02:00
Rasmus Wriedt Larsen
e5aae0d7e7 Python: Add query metadata 2023-09-14 11:52:41 +02:00
Rasmus Wriedt Larsen
fb63e73142 Python: Streamline what modules to allow for now 2023-09-14 11:52:41 +02:00
Rasmus Wriedt Larsen
f29e8894bf Python: Adjust test-code predicate 2023-09-14 11:52:41 +02:00
Rasmus Wriedt Larsen
b980b82d59 Python: Improve docs/names around already modeled classes 2023-09-14 11:52:41 +02:00
Rasmus Wriedt Larsen
562d9c63b4 WIP rest of modeling done so far 2023-09-14 11:52:40 +02:00
Rasmus Wriedt Larsen
8e9636a6d8 WIP: Flask View class modeling for restplus
Based on some DBs I had that contained dependencies
2023-09-14 11:52:40 +02:00
Chuan-kai Lin
1a575ef297 Merge pull request #14167 from asgerf/ts/tolerate-out-of-order-requests
JS: tolerate out of order requests in TypeScript extractor
2023-09-08 12:33:44 -07:00
Robert Marsh
e1ffc8d886 Merge pull request #14171 from MathiasVP/fix-dataflow-out-of-post-update-nodes
C++: Fix dataflow out of post update nodes
2023-09-08 14:56:41 -04:00
Mathias Vorreiter Pedersen
9f89c63771 C++: Accept test changes. 2023-09-08 17:07:26 +01:00
Mathias Vorreiter Pedersen
0be61be07a C++: Handle flow out of post-update nodes when there's another use of the variable in the call that we need to skip. 2023-09-08 17:07:26 +01:00
Mathias Vorreiter Pedersen
d5442ec9c5 C++: Add regression test. 2023-09-08 13:10:04 +01:00
Tom Hvitved
354a55c735 Merge pull request #14169 from hvitved/backport-fix
Revert "C#: Bump all dependencies"
2023-09-08 13:37:12 +02:00
Tom Hvitved
e6a6a7931b Revert "C#: Bump all dependencies" 2023-09-08 11:19:00 +02:00
Asger F
ea384b340a JS: Change note 2023-09-08 10:31:04 +02:00
Asger F
e08a873829 JS: Tolerate TypeScript files being requested out of order 2023-09-08 10:31:04 +02:00
Chuan-kai Lin
163252d5f6 Merge pull request #14147 from github/release-prep/2.14.4
Release preparation for version 2.14.4
2023-09-05 13:50:45 -07:00
github-actions[bot]
abf2b12b1c Release preparation for version 2.14.4 2023-09-05 16:56:14 +00:00
Ian Lynagh
a2659eecfb Merge pull request #14018 from igfoo/igfoo/extractor_information_kotlin1
Kotlin: Write usesK2 ("uses Kotlin 2") information to the database
2023-09-04 13:38:23 +01:00
Michael B. Gale
77369a09a4 Merge pull request #13872 from Kwstubbs/Kevin_error_sanitizer
Go: Add sanitizer to remove paths passing through http.Error
2023-09-04 13:25:55 +01:00
Ian Lynagh
03ad04bc8e Merge pull request #14118 from igfoo/igfoo/kotlin_master
Kotlin: Make it possible to build with master
2023-09-04 12:12:25 +01:00
AlexDenisov
e2602fbbc4 Merge pull request #14119 from github/alexdenisov/sequence-expr
Swift: fix SequenceExpr extraction
2023-09-04 12:29:07 +02:00
Paolo Tranquilli
7d89028688 Merge pull request #14106 from github/alexdenisov/rename-xcode-autobuilder
Swift: rename autobuilder. NFC
2023-09-04 12:28:47 +02:00
Ian Lynagh
bbf441f87a Kotlin: Add an integration test for Kotlin 2 2023-09-04 11:28:31 +01:00
Alex Denisov
888dd786b4 Swift: fix SequenceExpr extraction
Before we extracted all the subexpressions from the `SequenceExpr` while we should've only extracted the expressions at odd indices:
```
...
/// SequenceExpr - A list of binary operations which has not yet been
/// folded into a tree.  The operands all have even indices, while the
/// subexpressions with odd indices are all (potentially overloaded)
/// references to binary operators.
class SequenceExpr final : public Expr,
...
```

The AST for a `SequenceExpr` looks like this:

```
sequence_expr:
  unresolved_dot_expr:
    ...
  assign_expr:
    member_ref_expr:
      ...
    dot_syntax_call_expr:
      ...
  unresolved_member_chain_expr:
    ...
```

however, what's is not visible with the "final" AST is that `unresolved_dot_expr` is the unresolved version of `assign_expr.member_ref_expr` and the `unresolved_member_chain_expr` is the unresolved version of `assign_expr.dot_syntax_call_expr`.
This becomes visible when I enable typechecker debugging:

```c++
auto &typeCheckerOptions = invocation.getTypeCheckerOptions();
typeCheckerOptions.DebugConstraintSolver = true;
```

Which prints the following snippets:

```
---Initial constraints for the given expression---
(assign_expr type='()' location=foo.swift:25:54 range=[foo.swift:25:13 - line:25:57]
  (unresolved_dot_expr type='$T2' location=foo.swift:25:29 range=[foo.swift:25:13 - line:25:29] field 'preferredDatePickerStyle' function_ref=unapplied
    (unresolved_dot_expr type='$T1' location=foo.swift:25:18 range=[foo.swift:25:13 - line:25:18] field 'datePicker' function_ref=unapplied
      (declref_expr type='DatePickerCell' location=foo.swift:25:13 range=[foo.swift:25:13 - line:25:13] decl=foo.(file).DatePickerRowProtocol extension.configurePickerStyle(_:_:).cell@foo.swift:15:33 function_ref=unapplied)))
  (unresolved_member_chain_expr implicit type='$T5' location=foo.swift:25:57 range=[foo.swift:25:56 - line:25:57]
    (unresolved_member_expr type='$T4' location=foo.swift:25:57 range=[foo.swift:25:56 - line:25:57] name='wheels' function_ref=unapplied)))

// ...

---Type-checked expression---
(assign_expr type='()' location=foo.swift:25:54 range=[foo.swift:25:13 - line:25:57]
  (member_ref_expr type='@lvalue UIDatePickerStyle' location=foo.swift:25:29 range=[foo.swift:25:13 - line:25:29] decl=UIKit.(file).UIDatePicker.preferredDatePickerStyle
    (force_value_expr implicit type='UIDatePicker' location=foo.swift:25:18 range=[foo.swift:25:13 - line:25:18] implicit_iuo_unwrap
      (load_expr implicit type='UIDatePicker?' location=foo.swift:25:18 range=[foo.swift:25:13 - line:25:18]
        (member_ref_expr type='@lvalue UIDatePicker?' location=foo.swift:25:18 range=[foo.swift:25:13 - line:25:18] decl=foo.(file).DatePickerCell.datePicker@foo.swift:10:29
          (declref_expr type='DatePickerCell' location=foo.swift:25:13 range=[foo.swift:25:13 - line:25:13] decl=foo.(file).DatePickerRowProtocol extension.configurePickerStyle(_:_:).cell@foo.swift:15:33 function_ref=unapplied)))))
  (dot_syntax_call_expr type='UIDatePickerStyle' location=foo.swift:25:57 range=[foo.swift:25:56 - line:25:57]
    (declref_expr type='(UIDatePickerStyle.Type) -> UIDatePickerStyle' location=foo.swift:25:57 range=[foo.swift:25:57 - line:25:57] decl=UIKit.(file).UIDatePickerStyle.wheels function_ref=unapplied)
    (argument_list implicit
      (argument
        (type_expr implicit type='UIDatePickerStyle.Type' location=foo.swift:25:56 range=[foo.swift:25:56 - line:25:56] typerepr='UIDatePickerStyle')))))
```

The proposed solution is to only extract subexpressions at indices from `SequenceExpr` thus ignoring all the unresolved leftovers.

Note: I'm not entirely sure about the case when there is only child (`elements.size() == 1`) so I'm always extracting it.

This patch fixes the last source of unresolved expressions.
2023-09-04 11:42:12 +02:00
Rasmus Wriedt Larsen
a58c9e91ea Merge pull request #14130 from RasmusWL/fixup-accept-ci-changes
Misc: Fixup for `accept-expected-changes-from-ci.py`
2023-09-04 09:47:31 +02:00
Rasmus Wriedt Larsen
301133ad94 Misc: Fixup for accept-expected-changes-from-ci.py
Allow empty lines while looking for diff (between `---expected` and `FAILED`). This can happen when there is `Locations outside the test directory` since an empty line is printed after that warning message (this output can be interleaved with the diff due to parallel execution).
2023-09-04 09:32:06 +02:00
Erik Krogh Kristensen
284ca5e4ee Merge pull request #14129 from github/dependabot/cargo/ql/regex-1.9.5
Bump regex from 1.9.3 to 1.9.5 in /ql
2023-09-04 08:11:51 +02:00
dependabot[bot]
4919cc4c4e Bump regex from 1.9.3 to 1.9.5 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.9.3 to 1.9.5.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.9.3...1.9.5)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 03:47:05 +00:00
Ian Lynagh
181594badb Kotlin: Add packageFqName and IrSymbolInternals compatibility
In master, we need to switch to these, but for building for older
versions we need to add our own support.

Currently the v_1_9_255 files are nto used, but we will need them (in a
differently-named directory) for a future release.
2023-09-01 11:20:58 +01:00
Ian Lynagh
72e08a9277 Kotlin: Tweak the build system
You can now make a versions/* directory that the build system doesn't
know about. This can be used to add support for not-yet-supported
versions.
2023-09-01 11:08:54 +01:00
Mathias Vorreiter Pedersen
67a0112fcb Merge pull request #14115 from MathiasVP/fix-incorrect-load-of-constant
C++: Don't generate `Load`s for constant expressions
2023-09-01 08:50:44 +01:00
Mathias Vorreiter Pedersen
72d9812fea C++: Accept more test changes. 2023-08-31 21:56:35 +01:00
Mathias Vorreiter Pedersen
dfefd62089 C++: Accept test changes. 2023-08-31 20:38:46 +01:00
Mathias Vorreiter Pedersen
aed14f2924 C++: Don't insert loads for constants. 2023-08-31 20:38:40 +01:00
Mathias Vorreiter Pedersen
b575747357 C++: Add testcase with invalid IR. 2023-08-31 20:35:33 +01:00
yoff
da64ea40b9 Merge pull request #13782 from jorgectf/jorgectf/shlex-quote
Python: Add `shlex.quote` as `py/shell-command-constructed-from-input` sanitizer
2023-08-31 21:08:58 +02:00
Ian Lynagh
eb59bc04cd Kotlin: Add missing imports 2023-08-31 19:28:05 +01:00
Ian Lynagh
3009f40814 Kotlin: Opt in to org.jetbrains.kotlin.ir.symbols.IrSymbolInternals
Needed for upstream master.
2023-08-31 19:28:05 +01:00
Ian Lynagh
1ec29bffbb Kotlin: Don't use deprecated createBlockBody
The function that takes a list of statements is hidden in upstream
master.
2023-08-31 19:28:05 +01:00
Ian Lynagh
d511d46cde Kotlin: Use packageFqName rather than fqName
Upstream master says:
   error: using 'fqName: FqName' is an error. Please use `packageFqName` instead
2023-08-31 19:28:05 +01:00
Mathias Vorreiter Pedersen
10548b57d7 Merge pull request #14103 from MathiasVP/non-certain-def-is-a-use
C++: Non-certain definitions should always be uses
2023-08-31 16:15:30 +01:00
Erik Krogh Kristensen
cd590d356d Merge pull request #14053 from erik-krogh/ts52
JS: Add support for TypeScript 5.2
2023-08-31 14:39:50 +02:00
Tom Hvitved
23857267db Merge pull request #14110 from hvitved/ruby/remove-emptiness-successor
Ruby: Get rid of unused `EmptinessSuccessor`
2023-08-31 13:41:25 +02:00
Tom Hvitved
50db6916c8 Ruby: Get rid of unused EmptinessSuccessor 2023-08-31 13:17:05 +02:00
Tom Hvitved
73370e7282 Merge pull request #14100 from hvitved/dataflow/consistency-pack
Data flow: Add consistency checks to shared ql pack
2023-08-31 11:47:40 +02:00
Tom Hvitved
756886808d Merge pull request #14098 from hvitved/csharp/cil-best-impl
C#: Speedup `bestImplementation`
2023-08-31 10:57:28 +02:00
Mathias Vorreiter Pedersen
f5509da4bb Merge pull request #14038 from alexet/delete-ir
CPP: Add delete/delete[] calls to the IR.
2023-08-31 09:22:34 +01:00
Asger F
2d5c40db31 Merge pull request #14048 from asgerf/shared/variable-capture-write-source-node
Variable capture: allow arbitrary data-flow nodes to be the source of a write
2023-08-31 10:20:48 +02:00
Tom Hvitved
c68d0bc936 Merge pull request #14099 from hvitved/csharp/transitive-capture-call-unique
C#: Do not embed target callable in `TransitiveCapturedCall`
2023-08-31 10:12:26 +02:00
Alex Denisov
c1da2dfa73 Swift: fix autobuild.sh 2023-08-31 09:40:13 +02:00
Michael Nebel
ded49015e0 Merge pull request #13970 from michaelnebel/csharp/usereferenceassemlblies
C#: Compile against the reference assemblies in the standalone extractor (if possible)
2023-08-31 09:00:30 +02:00
Erik Krogh Kristensen
cd289f8207 Merge pull request #14105 from github/dependabot/cargo/ql/chrono-0.4.28
Bump chrono from 0.4.27 to 0.4.28 in /ql
2023-08-31 08:16:42 +02:00
Alex Denisov
803adae9c6 Swift: rename autobuilder. NFC 2023-08-31 08:12:52 +02:00
dependabot[bot]
4770eb0328 Bump chrono from 0.4.27 to 0.4.28 in /ql
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.27 to 0.4.28.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.27...v0.4.28)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-31 03:44:01 +00:00
Mathias Vorreiter Pedersen
1159508e4f Merge pull request #14008 from MathiasVP/reuse-even-more-nodes
C++: Reuse even more `DataFlow::Node`s
2023-08-30 19:38:52 +01:00
Alex Eyers-Taylor
59a77666a6 CPP: Remove uneeded indirection around delete calls in the IR. 2023-08-30 16:31:51 +01:00
Michael Nebel
3afa4aa91e C#: Add change note. 2023-08-30 16:51:16 +02:00
Mathias Vorreiter Pedersen
261ba8e02d C++: Add QLDoc to 'isDereference'. 2023-08-30 14:34:30 +01:00
Tom Hvitved
253f932d2a Python: Use data flow consistency checks from shared pack 2023-08-30 15:29:41 +02:00
Tom Hvitved
9af706c2a5 Swift: Use data flow consistency checks from shared pack 2023-08-30 15:29:41 +02:00
Tom Hvitved
db304d118b C++: Use data flow consistency checks from shared pack 2023-08-30 15:29:41 +02:00
Tom Hvitved
fefe64bf0c Java: Use data flow consistency checks from shared pack 2023-08-30 15:29:41 +02:00
Tom Hvitved
5c8367a695 C#: Use data flow consistency checks from shared pack 2023-08-30 15:29:41 +02:00
Tom Hvitved
c4b626a416 Ruby: Use data flow consistency checks from shared pack 2023-08-30 15:29:41 +02:00
Tom Hvitved
de7c9bdd9b Data flow: Add consistency checks to shared ql pack 2023-08-30 15:29:41 +02:00
Michael Nebel
291d7b3e05 C#: Use reference assemblies instead of implementation assemblies. 2023-08-30 14:19:11 +02:00
Michael Nebel
a966c0e1eb C#: Do not include the mscorlib assembly and remove the option. 2023-08-30 14:19:11 +02:00
Tom Hvitved
ce229fe21f Merge pull request #14096 from hvitved/ruby/expected-test-fix
Ruby: Update expected test output
2023-08-30 13:50:49 +02:00
Tom Hvitved
29982fe30e C#: Do not embed target callable in TransitiveCapturedCall 2023-08-30 13:48:44 +02:00
Tom Hvitved
66f5e4a05b C#: Speedup bestImplementation
Avoids an expensive anti-join:

```
[2023-08-29 15:25:48] Evaluated non-recursive predicate _FileSystem#df18ed9a::Make#File#1a556f64::Input#::Container::toString#0#dispred#bf_Method#621e9e2e::__#antijoin_rhs@96d08bc8 in 272332ms (size: 1841891).
Evaluated relational algebra for predicate _FileSystem#df18ed9a::Make#File#1a556f64::Input#::Container::toString#0#dispred#bf_Method#621e9e2e::__#antijoin_rhs@96d08bc8 with tuple counts:
         4632443     ~2%    {3} r1 = JOIN _cil_instruction_3#antijoin_rhs_cil_method_implementation#shared WITH cil_method_implementation ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1

        71945701     ~3%    {3} r2 = JOIN r1 WITH cil_method_implementation_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2
        71945701  ~1329%    {3} r3 = JOIN r2 WITH Method#621e9e2e::MethodImplementation::getNumberOfInstructions#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Rhs.1
         5016836     ~4%    {4} r4 = JOIN r3 WITH Method#621e9e2e::MethodImplementation::getNumberOfInstructions#0#dispred#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, Rhs.1
                            {4} r5 = SELECT r4 ON In.3 < In.2
           65637     ~3%    {2} r6 = SCAN r5 OUTPUT In.0, In.1

        71945701     ~0%    {3} r7 = JOIN r1 WITH cil_method_implementation_10#join_rhs ON FIRST 1 OUTPUT Lhs.2, Lhs.1, Rhs.1
        71945701     ~1%    {4} r8 = JOIN r7 WITH assemblies ON FIRST 1 OUTPUT Lhs.2, Lhs.1, Lhs.0, Rhs.1
        71945701     ~0%    {5} r9 = JOIN r8 WITH cil_method_implementation ON FIRST 1 OUTPUT Rhs.2, Lhs.1, Lhs.2, Lhs.0, Lhs.3
        71945701     ~0%    {5} r10 = JOIN r9 WITH assemblies ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3, Lhs.4
        71945701     ~0%    {5} r11 = JOIN r10 WITH FileSystem#df18ed9a::Make#File#1a556f64::Input#::Container::toString#0#dispred#bf ON FIRST 1 OUTPUT Lhs.4, Lhs.1, Lhs.2, Lhs.3, Rhs.1
        71945701     ~2%    {5} r12 = JOIN r11 WITH FileSystem#df18ed9a::Make#File#1a556f64::Input#::Container::toString#0#dispred#bf ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.1
                            {5} r13 = SELECT r12 ON In.4 > In.3
        33509342     ~0%    {3} r14 = SCAN r13 OUTPUT In.0, In.1, In.2
        33509342     ~0%    {4} r15 = JOIN r14 WITH Method#621e9e2e::MethodImplementation::getNumberOfInstructions#0#dispred#ff ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.0, Lhs.1
        33051362  ~1670%    {2} r16 = JOIN r15 WITH Method#621e9e2e::MethodImplementation::getNumberOfInstructions#0#dispred#ff ON FIRST 2 OUTPUT Lhs.2, Lhs.3

        33116999  ~1646%    {2} r17 = r6 UNION r16
                            return r17
```
2023-08-30 13:46:11 +02:00
Tom Hvitved
7e77c77d92 Ruby: Update expected test output 2023-08-30 13:33:48 +02:00
erik-krogh
984795ee46 fix off-by-one 2023-08-30 13:29:23 +02:00
Anders Starcke Henriksen
44a83a71a8 Merge pull request #13879 from github/starcke/automodel-pack
Create separate automodel pack
2023-08-30 13:24:25 +02:00
Rasmus Wriedt Larsen
62c2316124 Merge pull request #14084 from RasmusWL/flask-jsonify
Python: Remove XSS FP from use of `flask.jsonify`
2023-08-30 13:07:54 +02:00
Mathias Vorreiter Pedersen
4ca259b200 C++: Non-exact definitions should always be a use. 2023-08-30 11:50:57 +01:00
Mathias Vorreiter Pedersen
6a21fa04cd Merge pull request #14034 from geoffw0/hostname
Swift: New query: Incomplete regular expression for hostnames
2023-08-30 11:33:36 +01:00
Mathias Vorreiter Pedersen
b092da485d C++: Accept more test changes. 2023-08-30 11:26:40 +01:00
Tom Hvitved
c32c4bb6d2 Merge pull request #14086 from hvitved/csharp/perf-fixes
C#: Various performance fixes
2023-08-30 12:13:52 +02:00
Geoffrey White
39b45fa24f Merge pull request #13943 from geoffw0/weakhashexample
Swift: Update the weak sensitive data hashing examples and qhelp
2023-08-30 10:36:23 +01:00
Michael Nebel
f88428f3fd Merge pull request #14085 from michaelnebel/csharp/use-stubs-5
C#: Use stubs in unit tests.
2023-08-30 11:07:53 +02:00
Anders Starcke Henriksen
361ae1747e Merge branch 'main' into starcke/automodel-pack 2023-08-30 09:25:28 +02:00
erik-krogh
2643ab3dbf using is not a keyword 2023-08-30 08:44:59 +02:00
Michael Nebel
a966944fd8 Merge pull request #14083 from michaelnebel/csharp/autobuilderimports
C#: Re-factor using statements order in autobuilder.
2023-08-30 08:16:03 +02:00
erik-krogh
5e11fe74f7 Merge branch 'main' into ts52 2023-08-30 07:57:55 +02:00
Erik Krogh Kristensen
9bf5999ca0 Merge pull request #14093 from github/dependabot/cargo/ql/chrono-0.4.27
Bump chrono from 0.4.26 to 0.4.27 in /ql
2023-08-30 07:42:44 +02:00
dependabot[bot]
e3ff7644f7 Bump chrono from 0.4.26 to 0.4.27 in /ql
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.26 to 0.4.27.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.26...v0.4.27)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 03:14:05 +00:00
Geoffrey White
125629a7e2 Swift: Delete 'usually'. 2023-08-29 23:25:22 +01:00
Geoffrey White
210a5bfff2 Update swift/ql/src/queries/Security/CWE-328/WeakSensitiveDataHashing.qhelp
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2023-08-29 23:24:12 +01:00
Geoffrey White
7006cfd8f8 Swif: Fix paragraph breaks. 2023-08-29 23:00:17 +01:00
Kevin Stubbings
84d52b94a3 Forgot delete 2023-08-29 08:38:18 -07:00
Kevin Stubbings
ffa3bdc8bb Change note changes 2023-08-29 08:37:15 -07:00
Michael Nebel
e226c564b6 C#: Base WriteOnlyContainer test on stubs. 2023-08-29 16:24:01 +02:00
Michael Nebel
35a1dd8ba9 C#: Base Useless Code tests on stubs. 2023-08-29 16:20:59 +02:00
Mathias Vorreiter Pedersen
e4a11b86d9 Merge branch 'main' into reuse-even-more-nodes 2023-08-29 15:08:30 +01:00
Michael Nebel
e9b3f1282a C#: Base UseBraces tests on stubs. 2023-08-29 16:05:15 +02:00
Tom Hvitved
8624ff12be Merge pull request #14082 from hvitved/csharp/bump-dependencies
C#: Bump all dependencies
2023-08-29 15:52:40 +02:00
Michael Nebel
fc850b18fe C#: Base ReadOnlyContainer tests on stubs. 2023-08-29 15:36:03 +02:00
Michael Nebel
7d7a893b55 C#: Base Performance tests on stubs. 2023-08-29 15:34:33 +02:00
Jean Helie
41726f52a2 Merge pull request #13954 from github/kaeluka/add-provenance-to-metadata
Java: Automodel: Add Candidates for Regression Testing
2023-08-29 14:33:02 +01:00
Michael Nebel
6760dd9121 C#: Base Nullness tests on stubs. 2023-08-29 15:30:24 +02:00
Michael Nebel
b3be4797e2 C#: Base the Metrics tests on stubs. 2023-08-29 15:23:42 +02:00
Michael Nebel
c906009e5b C#: Base the MagicConstants tests on stubs. 2023-08-29 15:19:19 +02:00
Michael Nebel
4c16f1be8b C#: Base the Likely Bugs tests on stubs. 2023-08-29 15:16:48 +02:00
Mathias Vorreiter Pedersen
99cc4171f8 C++: Fix FPs by making 'isArgumentOfCallable' more robust. 2023-08-29 14:12:09 +01:00
yoff
ae4c76c788 Merge pull request #13975 from yoff/python/parsemodechars-not-chars 2023-08-29 14:05:57 +02:00
Alex Eyers-Taylor
9df5e30034 CPP: Add changenote for adding delete to the IR. 2023-08-29 12:13:40 +01:00
Alex Eyers-Taylor
24b679d5a0 CPP: Fix IR formatting. 2023-08-29 11:17:44 +01:00
Alex Eyers-Taylor
8b1b1618c4 CPP: Add tests for false positive in memory vulnerability queries. 2023-08-29 11:17:44 +01:00
Alex Eyers-Taylor
3b344c3578 CPP: Handle cases where the deallocator function is determined dynamically. 2023-08-29 11:17:44 +01:00
Alex Eyers-Taylor
689fda43ed CPP: Add delete/delete[] calls to the IR. 2023-08-29 11:17:43 +01:00
Michael Nebel
08c24930ac C#: Base the Language Abuse tests on stubs. 2023-08-29 11:39:47 +02:00
Tom Hvitved
7611bfb149 C#: Apply closed-world assumption for type-parameter qualifiers in dynamic calls 2023-08-29 11:27:45 +02:00
Tom Hvitved
1da885fae2 C#: Fix bad join in SSA library
```
[2023-08-29 10:10:29] Evaluated non-recursive predicate SsaImpl#75014cd4::Cached::lastRefBeforeRedefExt#4#ffff@4207c208 in 27604ms (size: 7511062).
Evaluated relational algebra for predicate SsaImpl#75014cd4::Cached::lastRefBeforeRedefExt#4#ffff@4207c208 with tuple counts:
           9905038   ~9%    {5} r1 = SCAN Ssa#da392372::Make#SsaImpl#75014cd4::SsaInput#::lastRefRedefExt#5#fffff OUTPUT In.2, In.3, In.1, In.0, In.4
                            {5} r2 = r1 AND NOT _SsaImpl#75014cd4::SsaInput::variableRead#4#ffff_3012#join_rhs_const_false#antijoin_rhs(Lhs.0, Lhs.1, Lhs.2)
           4605608   ~0%    {4} r3 = SCAN r2 OUTPUT In.3, In.0, In.1, In.4

        4510888816   ~0%    {5} r4 = JOIN _SsaImpl#75014cd4::SsaInput::variableRead#4#ffff_3012#join_rhs_const_false#antijoin_rhs WITH project#Ssa#da392372::Make#SsaImpl#75014cd4::SsaInput#::lastRefRedefExt#5#fffff_1203#join_rhs ON FIRST 2 OUTPUT Rhs.2, Lhs.2, Lhs.0, Lhs.1, Rhs.3
           5294405  ~82%    {4} r5 = JOIN r4 WITH SsaImpl#75014cd4::adjacentDefReachesReadExt#6#ffffff_014523#join_rhs ON FIRST 4 OUTPUT Lhs.0, Rhs.4, Rhs.5, Lhs.4

           9900013  ~28%    {4} r6 = r3 UNION r5
                            return r6
```
2023-08-29 11:26:30 +02:00
Tom Hvitved
e219281016 C#: Speed up ForwarderAssertMethod
Avoids the following bad predicate

```
[2023-08-29 10:03:13] (252s) Tuple counts for _Callable#f85cebf6::Callable::getBody#0#dispred#ff_Variable#afb43847::Variable::getAnAccess#0#dispre__#join_rhs/5@43feb6tl after 4m0s:
                      4416261    ~203%     {4} r1 = JOIN _Callable#f85cebf6::Callable::getAParameter#0#dispred#ff_10#join_rhs_Variable#afb43847::Variable::ge__#shared WITH Callable#f85cebf6::Callable::getBody#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1 'arg1', Lhs.2 'arg2', Lhs.0 'arg3', Rhs.1 'arg4'
                      1189565718 ~152%     {5} r2 = JOIN r1 WITH Variable#afb43847::Variable::getAnAccess#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1 'arg0', Lhs.0 'arg1', Lhs.1 'arg2', Lhs.2 'arg3', Lhs.3 'arg4'
                                           return r2
```
2023-08-29 11:25:20 +02:00
Michael Nebel
946854bd17 C#: Base the EmptyBlock test on stubs. 2023-08-29 11:24:10 +02:00
Tom Hvitved
1ac9d2ee5b CFG: Compute splitsToString using concat, and exclude partial split sets 2023-08-29 11:23:56 +02:00
Michael Nebel
7068da25f0 C#: Base the Documentation tests on stubs. 2023-08-29 11:22:51 +02:00
Michael Nebel
dd274422d1 Merge pull request #14079 from bgrainger/fix-unsynchronized-static-access-docs
Delete thin space from documentation
2023-08-29 11:17:52 +02:00
Michael Nebel
f2bf540209 C#: Base the Dead Code tests on stubs. 2023-08-29 11:15:43 +02:00
Rasmus Wriedt Larsen
49d510018d Python: Add change-note 2023-08-29 11:11:32 +02:00
Rasmus Wriedt Larsen
0b2458d065 Python: Improve modeling of Flask jsonify
I also tested whether `Flask.jsonify` or `Flask().jsonify` worked, but
they do not.
2023-08-29 11:11:32 +02:00
Rasmus Wriedt Larsen
26319bfc04 Python: Fix Flask jsonify XSS regression
The reason the result was found before, is that `jsonify(data)` was
modeled as TWO separate subclasses of `Http::Server::HttpResponse`, one
because of the implicit construction in return
(FlaskRouteHandlerReturn), and one from the `jsonify` call
(FlaskJsonifyCall). Due to the QL evaluation, we got a combination from
the two, meaning mime-type from FlaskRouteHandlerReturn and body from
FlaskJsonifyCall...
2023-08-29 11:11:32 +02:00
Jean Helie
de76c0749a Java: Automodel Framework Mode: Add Candidates for Regression Testing 2023-08-29 09:53:55 +01:00
Mathias Vorreiter Pedersen
d14ad92dbd Merge pull request #14006 from MathiasVP/promote-invalid-pointer-deref-out-of-experimental
C++: Promote `cpp/invalid-pointer-deref` out of experimental
2023-08-29 09:38:56 +01:00
Rasmus Wriedt Larsen
b36fd9fdab Python: Add jsonify XSS regression example 2023-08-29 10:38:49 +02:00
Mathias Vorreiter Pedersen
f3a77c6006 Merge pull request #14060 from MathiasVP/fix-compare-where-assign-meant-fp
C++: Fix FP in `cpp/compare-where-assign-meant`
2023-08-29 09:38:39 +01:00
Mathias Vorreiter Pedersen
dbdb433957 Merge pull request #14058 from alexet/delete-or-delete-array
CPP: Add parent class for delete and delete[]
2023-08-29 09:38:07 +01:00
Michael Nebel
d3ba7e6b3c C#: Re-factor using statements order in autobuilder. 2023-08-29 10:10:30 +02:00
Michael Nebel
5f4861f72e Merge pull request #14069 from michaelnebel/csharp/nugetexe
C#: Download `nuget.exe` in the dependency manager (if not present).
2023-08-29 10:04:50 +02:00
Michael Nebel
5de8d9181d C#: Address review comments. 2023-08-29 09:33:11 +02:00
Jeroen Ketema
0d1fd88729 Merge pull request #14050 from jketema/inline-6
Consolidate all `InlineFlowTest` libraries in the dataflow qlpack
2023-08-29 09:30:35 +02:00
Tom Hvitved
bce47fe344 C#: Bump all dependencies 2023-08-29 09:24:39 +02:00
Kevin Stubbings
29e14f7d8d Feedback, Format, Add Change Notes 2023-08-28 14:15:21 -07:00
Bradley Grainger
d10597f69d Delete thin space from documentation.
Update the MSDN link to avoid an unnecessary redirection and use the correct anchor.
2023-08-28 11:02:38 -07:00
Dave Bartolomeo
3343b78015 Merge pull request #14074 from github/post-release-prep/codeql-cli-2.14.3
Post-release preparation for codeql-cli-2.14.3
2023-08-28 13:34:10 -04:00
github-actions[bot]
3eba77421a Post-release preparation for codeql-cli-2.14.3 2023-08-28 15:53:49 +00:00
Mathias Vorreiter Pedersen
f65fe34513 C++: Add false positive caused by flowing back into a function after doing reverse reads. 2023-08-28 14:45:16 +01:00
Asger F
d4cfa8c2b8 Java: autoformatting changes 2023-08-28 15:35:06 +02:00
Asger F
d2fe4d235a Java: Inline VariableWrite.getSource() 2023-08-28 15:34:48 +02:00
Michael Nebel
e19c7758ed C#: Cleanup NugetPackages.cs. 2023-08-28 15:19:16 +02:00
Michael Nebel
6e4865ddd9 C#: Download nuget.exe to the source directory in case it is not installed. 2023-08-28 15:14:13 +02:00
Michael Nebel
b6c2ea520b C#: Some re-factoring of NugetPackages and logic for file downloading. 2023-08-28 15:14:13 +02:00
yoff
2e981e330b Merge pull request #14059 from RasmusWL/fix-loginjection-tests
Python: Fix stdlib sinks in LogInjection query
2023-08-28 14:44:51 +02:00
yoff
6e05246daa Merge pull request #13935 from yoff/python/mad-on-externals
Python: MaD on externals
2023-08-28 14:04:54 +02:00
Rasmus Wriedt Larsen
c807ab4216 Python: Apply suggestions from code review
Co-authored-by: yoff <lerchedahl@gmail.com>
2023-08-28 14:04:22 +02:00
yoff
826b8e6aa5 Merge pull request #14067 from RasmusWL/modern-dataflowquerytests
Python: Adopt tests to new `DataflowQueryTest`
2023-08-28 13:54:34 +02:00
erik-krogh
78487d437f add test for await using in TypeScript 2023-08-28 13:30:35 +02:00
erik-krogh
1e3387f2c5 Merge branch 'main' into ts52 2023-08-28 13:22:56 +02:00
Michael Nebel
e7dbe9f289 Merge pull request #14028 from michaelnebel/csharp/dependencygetfiles
C#: Improve GetFiles in the Dependency Manager.
2023-08-28 12:53:28 +02:00
Rasmus Wriedt Larsen
38b78128c0 Merge pull request #13990 from RasmusWL/experimental-cleanup
Python: Port old experimental points-to based queries
2023-08-28 12:11:17 +02:00
Rasmus Wriedt Larsen
889cb7a95b Python: Adopt tests to new DataflowQueryTest
Co-authored-by: Rasmus Lerchedahl Petersen <yoff@github.com>
2023-08-28 11:44:01 +02:00
Rasmus Wriedt Larsen
9c44235782 Python: Modernize DataflowQueryTest.qll
Co-authored-by: Rasmus Lerchedahl Petersen <yoff@github.com>
2023-08-28 11:40:41 +02:00
Rasmus Wriedt Larsen
7cba6cd1d8 Python: Update .expected files
Due to change in path-graph, and including LHS of assignments
2023-08-28 11:33:44 +02:00
Rasmus Wriedt Larsen
0f242475f2 Merge branch 'main' into experimental-cleanup 2023-08-28 11:01:22 +02:00
Rasmus Wriedt Larsen
0dca8a5d86 Python: Remove old points-to modeling file
Since all of this was ported already
2023-08-28 10:40:45 +02:00
Rasmus Wriedt Larsen
39e2b133e9 Python: Fix naming 2023-08-28 10:40:33 +02:00
erik-krogh
be2712698b add support for await using in the JS parser 2023-08-28 09:34:13 +02:00
erik-krogh
1cbee6a8a4 delete leftover todo comment that was implemented 2023-08-28 08:40:35 +02:00
Mathias Vorreiter Pedersen
bb1712b489 Merge branch 'main' into reuse-even-more-nodes 2023-08-26 18:08:58 +01:00
Alex Ford
9957e2683b Merge pull request #13313 from maikypedia/maikypedia/ldap-improper-auth
Ruby: Add Improper LDAP Authentication query (CWE-287)
2023-08-25 20:52:34 +01:00
Alexander Eyers-Taylor
ea2140dc7d Apply suggestions from code review
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-08-25 17:15:08 +01:00
Alex Eyers-Taylor
8badf10a53 CPP: Add change notes for changes to DeleteExpr/DeleteArrayExpr 2023-08-25 17:13:34 +01:00
Alex Ford
ae635c609f Ruby: autoformat 2023-08-25 17:11:07 +01:00
Mathias Vorreiter Pedersen
9542646a5d C++: Add change note. 2023-08-25 16:45:53 +01:00
Mathias Vorreiter Pedersen
104416cc59 C++: Accept test changes. 2023-08-25 16:40:06 +01:00
Mathias Vorreiter Pedersen
cb2f7b0f95 C++: Exclude results in macro expansions from 'cpp/compare-where-assign-meant'. 2023-08-25 16:39:47 +01:00
Mathias Vorreiter Pedersen
759f939edd C++: Add false positive. 2023-08-25 16:38:48 +01:00
Rasmus Wriedt Larsen
bf9a0dab2a Python: Fix stdlib sinks in LogInjection query 2023-08-25 17:04:48 +02:00
Rasmus Wriedt Larsen
7852429df2 Python: Accept LogInjection .expected changes
I don't know how this had gone unnoticed for so long, but I realized when I tried to run this query locally
2023-08-25 17:04:40 +02:00
Alex Eyers-Taylor
d699201ad0 CPP: Add a test demonstating when a deallocator call exists. 2023-08-25 15:45:50 +01:00
Alex Eyers-Taylor
027ed5e909 CPP: Docs improvements to DeleteOrDeleteArrayExpr 2023-08-25 15:45:50 +01:00
Alex Eyers-Taylor
417b9c9a32 CPP: Use DeleteOrDeleteArrayExpr in another place. 2023-08-25 15:45:50 +01:00
Alex Eyers-Taylor
a3711e1df0 CPP: Replace getAllocatorCall with getDeallocator call. 2023-08-25 15:45:50 +01:00
Shati Patel
c5612ae522 Merge pull request #14051 from github/shati-patel/mrva-results-view
Docs: Update screenshots of variant analysis results view
2023-08-25 15:42:49 +01:00
Mathias Vorreiter Pedersen
68bccfdb93 Merge pull request #14013 from alexet/only-taint-argv-indirections
CPP:Only taint argv indirections
2023-08-25 15:19:51 +01:00
Mathias Vorreiter Pedersen
b948ed9045 C++: Accept test changes and add a few non-field flow tests to make up for the fact that we're no longer using field flow in the query. 2023-08-25 15:18:15 +01:00
Mathias Vorreiter Pedersen
89b91ec5c8 C++: Disable field flow from the 'cpp/invalid-pointer-deref' query. 2023-08-25 15:01:37 +01:00
Mathias Vorreiter Pedersen
c3cf48b38a C++: Add a 'fieldFlowBranchLimit' override to the product flow library. 2023-08-25 14:58:56 +01:00
Michael Nebel
02b8adf717 C#: Address review comments and some light re-factoring. 2023-08-25 15:33:54 +02:00
Maiky
ffd618d6cc Revert "Add "" and nil as sources"
This reverts commit 664c1eba72.
2023-08-25 15:23:55 +02:00
Alex Eyers-Taylor
04f8ed6af0 CPP: Simplify code using DeleteOrDeleteArrayExpr 2023-08-25 13:57:16 +01:00
Alex Eyers-Taylor
c43ba456e5 CPP: Remove old DeleteOrDeleteArrayExpr from a query. 2023-08-25 13:57:16 +01:00
Alex Eyers-Taylor
4ca98bd6fd CPP: Add parent class for delete and delete[] 2023-08-25 13:57:16 +01:00
AlexDenisov
0fe7740dda Merge pull request #14052 from github/sashabu/swift-logging-compiler
Swift: Route compiler diagnostics through our log.
2023-08-25 14:47:24 +02:00
Alex Eyers-Taylor
1afcf8c8a8 Add changenotes. 2023-08-25 13:05:10 +01:00
Alex Eyers-Taylor
9f8fbf8a1a CPP: Update tests for argv change 2023-08-25 13:05:10 +01:00
Alex Eyers-Taylor
45ddb4832c CPP: Make wordexp take an indirect argument. 2023-08-25 13:05:10 +01:00
Alex Eyers-Taylor
a2f2b6c33f CPP:Only consider **argv as tainted. 2023-08-25 13:05:10 +01:00
Michael Nebel
61a523510e C#: Only use small files during file content reference analysis. 2023-08-25 14:04:52 +02:00
Michael Nebel
a81d982c90 C#: Fetch file info fewer times and make dependencies more clear. 2023-08-25 14:04:52 +02:00
Tony Torralba
6573b1f772 Merge pull request #14056 from atorralba/atorralba/java/jenkins-stapler-regenerate
Java: Re-generate Jenkins and Stapler models
2023-08-25 13:15:21 +02:00
Tom Hvitved
42fd9f0c54 Merge pull request #14047 from hvitved/dataflow/join-fix
Data flow: Fix a bad join order
2023-08-25 12:18:24 +02:00
Ian Lynagh
a7de0f96e2 Merge pull request #14049 from igfoo/igfoo/kot1.9.10
Kotlin: We now support 1.9.10
2023-08-25 11:11:14 +01:00
Rasmus Lerchedahl Petersen
ad49eada48 Python: Do not alter codeql-workspaces.yml
And remove the qlpack referred to therein.
Instead we rename and duplicate the extesion file
that this qlpack pointed to.
These two extension files are kept in sync by `identical-files.json`.
2023-08-25 11:46:41 +02:00
Rasmus Lerchedahl Petersen
68cd422788 Python: Fix test expectations 2023-08-25 11:27:53 +02:00
Tony Torralba
5367fb99d9 Manually update a couple of models affected by the nested name change 2023-08-25 11:25:40 +02:00
Mathias Vorreiter Pedersen
9c5d7350dc C++: Add a small amount of pruning to 'SizeBarrierConfig'. 2023-08-25 10:25:28 +01:00
Mathias Vorreiter Pedersen
ded06a77d0 C++: More pruning. 2023-08-25 10:22:55 +01:00
Mathias Vorreiter Pedersen
2fd627b460 Merge pull request #13827 from geoffw0/closuremodels
Swift: Model withUnsafeBytes and similar closure methods
2023-08-25 10:01:52 +01:00
Tony Torralba
50a9c31b4a Merge pull request #14055 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-08-25 10:04:51 +02:00
Tony Torralba
2ed01d06b4 Java: Re-generate Jenkins and Stapler models
Re-generated the Jenkins and Stapler models to pick up the changes from github/codeql#14032
2023-08-25 10:01:28 +02:00
github-actions[bot]
c9d64b6b4f Add changed framework coverage reports 2023-08-25 00:14:40 +00:00
Jeroen Ketema
b550c067a1 Java: Remove redundant inline expectation test imports 2023-08-25 00:18:55 +02:00
Jeroen Ketema
9d573e5544 Consolidate all InlineFlowTest libraries in the dataflow qlpack 2023-08-24 21:38:46 +02:00
Rasmus Lerchedahl Petersen
137f9e7234 Python: Adress review comments
- make qldoc accurate
- fix ql4ql alert
2023-08-24 21:28:07 +02:00
Rasmus Lerchedahl Petersen
d3c24ba110 PythonÆ fix test expectations 2023-08-24 21:21:49 +02:00
Rasmus Lerchedahl Petersen
e9e6bce80a shared: handle empty groups in delta 2023-08-24 21:21:49 +02:00
Rasmus Lerchedahl Petersen
88fc96e8d7 Python: Add test with prefix 2023-08-24 21:21:49 +02:00
Rasmus Lerchedahl Petersen
7ad1a21c2d Python: make mode characters not be characters
They are simply considered part of the group start.
2023-08-24 21:21:49 +02:00
yoff
a834703195 Merge pull request #13779 from geoffw0/pythonparsemode
Python: Understand multiple parse mode flags specified in a regular expression string
2023-08-24 21:20:45 +02:00
Tom Hvitved
763216b932 Merge pull request #14045 from hvitved/csharp/standalone-resolve-target-framework
C#: Favor DLLs with most recent .NET Core target framework when resolving dependencies in standalone
2023-08-24 20:56:26 +02:00
erik-krogh
56f1ff8af1 bump from release candidate to final release 2023-08-24 20:32:27 +02:00
erik-krogh
0273b20c75 add downgrade and upgrade script 🤞 2023-08-24 20:30:26 +02:00
erik-krogh
ce97d38a18 add to the stat file 2023-08-24 20:30:26 +02:00
erik-krogh
cb66d62959 add test for the new type-stuff in TS 5.2 we get for free 2023-08-24 20:30:26 +02:00
erik-krogh
dc454d3a72 add support for the new using keyword in TypeScript 2023-08-24 20:30:26 +02:00
erik-krogh
a7d92b3473 add JS support the using keyword 2023-08-24 20:30:26 +02:00
erik-krogh
dfc83d844a very initial support for TypeScript 5.2 2023-08-24 20:30:25 +02:00
Geoffrey White
415d9e0674 Swift: Address review comments. 2023-08-24 18:41:48 +01:00
Alexandre Boulgakov
7e05551f16 Swift: Check whether a SourceLoc is valid before using it. 2023-08-24 18:14:34 +01:00
Ian Lynagh
5dff1852e1 Kotlin: We now support 1.9.10 2023-08-24 17:36:45 +01:00
Geoffrey White
242a49e6f1 Apply suggestions from code review
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2023-08-24 17:19:01 +01:00
shati-patel
c44b8249a5 Docs: Update screenshots of variant analysis results view 2023-08-24 17:15:04 +01:00
Mathias Vorreiter Pedersen
bdad9e197b C++: Fix more joins.
Before:
```
[2023-08-24 15:47:20] Evaluated non-recursive predicate _IRBlock#896e97af::IRBlock::dominates#1#dispred#ff_Ssa#da392372::Make#SsaInternals#7b362d2f::SsaInpu__#antijoin_rhs@94b1847k in 9831ms (size: 70660).
Evaluated relational algebra for predicate _IRBlock#896e97af::IRBlock::dominates#1#dispred#ff_Ssa#da392372::Make#SsaInternals#7b362d2f::SsaInpu__#antijoin_rhs@94b1847k with tuple counts:
    1121232  ~0%    {4} r1 = JOIN _DataFlowUtil#47741e1f::Cached::simpleLocalFlowStep#2#ff_10#join_rhs_DataFlowUtil#47741e1f::TSsaPhiN__#shared WITH Ssa#da392372::Make#SsaInternals#7b362d2f::SsaInput#::DefinitionExt::definesAt#4#dispred#fffff ON FIRST 1 OUTPUT Rhs.2, Lhs.0, Lhs.1, Lhs.2
  265759166  ~2%    {4} r2 = JOIN r1 WITH IRBlock#896e97af::IRBlock::dominates#1#dispred#ff ON FIRST 1 OUTPUT Lhs.3, Rhs.1, Lhs.1, Lhs.2
      70684  ~5%    {3} r3 = JOIN r2 WITH project#DataFlowUtil#47741e1f::Node::hasIndexInBlock#fff ON FIRST 2 OUTPUT Lhs.2, Lhs.3, Lhs.0
                    return r3

[2023-08-24 15:47:29] Evaluated non-recursive predicate DataFlowUtil#47741e1f::SsaPhiNode::getAnInput#1#dispred#fff@b6f296tl in 8943ms (size: 1121232).
Evaluated relational algebra for predicate DataFlowUtil#47741e1f::SsaPhiNode::getAnInput#1#dispred#fff@b6f296tl with tuple counts:
    1050572   ~2%    {3} r1 = _DataFlowUtil#47741e1f::Cached::simpleLocalFlowStep#2#ff_10#join_rhs_DataFlowUtil#47741e1f::TSsaPhiN__#shared AND NOT _IRBlock#896e97af::IRBlock::dominates#1#dispred#ff_Ssa#da392372::Make#SsaInternals#7b362d2f::SsaInpu__#antijoin_rhs(Lhs.0, Lhs.1, Lhs.2)
    1050572   ~3%    {3} r2 = SCAN r1 OUTPUT In.1, false, In.2

    1121232   ~0%    {3} r3 = JOIN _DataFlowUtil#47741e1f::Cached::simpleLocalFlowStep#2#ff_10#join_rhs_DataFlowUtil#47741e1f::TSsaPhiN__#shared WITH Ssa#da392372::Make#SsaInternals#7b362d2f::SsaInput#::DefinitionExt::definesAt#4#dispred#fffff ON FIRST 1 OUTPUT Rhs.2, Lhs.1, Lhs.2
  265759166   ~1%    {3} r4 = JOIN r3 WITH IRBlock#896e97af::IRBlock::dominates#1#dispred#ff ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1
      70684   ~0%    {2} r5 = JOIN r4 WITH project#DataFlowUtil#47741e1f::Node::hasIndexInBlock#fff ON FIRST 2 OUTPUT Lhs.2, Lhs.0
      70684   ~0%    {3} r6 = SCAN r5 OUTPUT In.0, true, In.1

    1121256   ~2%    {3} r7 = r2 UNION r6
                      return r7
```

After:
```
Evaluated non-recursive predicate DataFlowUtil#47741e1f::SsaPhiNode::getAnInput#1#dispred#fff@59ab2a2e in 456ms (size: 1117096).
Evaluated relational algebra for predicate DataFlowUtil#47741e1f::SsaPhiNode::getAnInput#1#dispred#fff@59ab2a2e with tuple counts:
    384518   ~0%    {2} r1 = JOIN DataFlowUtil#47741e1f::TSsaPhiNode#ff WITH Ssa#da392372::Make#SsaInternals#7b362d2f::SsaInput#::DefinitionExt::definesAt#4#dispred#fffff ON FIRST 1 OUTPUT Lhs.1, Rhs.2
  1121232   ~0%    {3} r2 = JOIN r1 WITH DataFlowUtil#47741e1f::Cached::simpleLocalFlowStep#2#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1

  1117447   ~0%    {4} r3 = JOIN r2 WITH project#DataFlowUtil#47741e1f::Node::hasIndexInBlock#fff ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1, Lhs.0
    70684   ~0%    {2} r4 = JOIN r3 WITH IRBlock#896e97af::IRBlock::dominates#1#dispred#ff ON FIRST 2 OUTPUT Lhs.2, Lhs.3
    70684   ~0%    {3} r5 = SCAN r4 OUTPUT In.0, true, In.1

  1117447   ~0%    {4} r6 = JOIN r2 WITH project#DataFlowUtil#47741e1f::Node::hasIndexInBlock#fff ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1, Lhs.0
                    {4} r7 = r6 AND NOT IRBlock#896e97af::IRBlock::dominates#1#dispred#ff(Lhs.0, Lhs.1)
  1046763   ~0%    {2} r8 = SCAN r7 OUTPUT In.2, In.3
  1046763   ~3%    {3} r9 = SCAN r8 OUTPUT In.0, false, In.1

  1117447   ~2%    {3} r10 = r5 UNION r9
                    return r10
```
2023-08-24 15:57:39 +01:00
Jeroen Ketema
da403c1a79 Merge pull request #14039 from jketema/non-constant-assign
C++: Omit assign case from `cpp/non-constant-format`
2023-08-24 16:54:19 +02:00
Jeroen Ketema
45c56fbce7 Update cpp/ql/src/change-notes/2023-08-24-remove-non-constant-assign-sources.md
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-08-24 16:17:59 +02:00
Jeroen Ketema
607f729339 C++: Add change note 2023-08-24 16:11:39 +02:00
Asger F
6c664e93ef Merge pull request #14035 from asgerf/shared/variable-capture-nested
Variable capture: synchronize with aliases in nested scopes
2023-08-24 15:39:34 +02:00
Paolo Tranquilli
e3d6b3e537 Swift: route compiler diagnostics through our log
(cherry picked from commit b8c55612e5)
2023-08-24 14:20:15 +01:00
Asger F
f17518ace2 Java: update to reflect changes in VariableCapture.qll 2023-08-24 14:06:44 +02:00
Asger F
cd7c851d64 VariableCapture: add VariableWriteSourceNode 2023-08-24 14:06:44 +02:00
Asger F
1286235773 Address review comments 2023-08-24 13:58:33 +02:00
Anders Schack-Mulligen
7af1e96943 Merge pull request #14032 from aschackmull/java/mad-nestednames
Java: Use nested names in MaD signatures.
2023-08-24 13:53:55 +02:00
Tony Torralba
6b58d11eeb Merge pull request #13900 from atorralba/atorralba/java/jaxws-getaremotemethod-improv
Java: Improve `JaxWsEndpoint::getARemoteMethod`
2023-08-24 13:37:15 +02:00
Mathias Vorreiter Pedersen
d42e892097 Fix more joins.
Before:
```
Tuple counts for valueFlowStepSsa#4#ffff/4@2cddce6j after 11.4s:
  11571217  ~3%     {3} r1 = SCAN semSsaUpdateStep#3#fff OUTPUT In.0 'v', In.1 'e', f2i(In.2)
  11992425  ~0%     {4} r2 = JOIN r1 WITH SemanticSSA#aa9d1d08::SemSsaReadPosition::hasReadOfVar#1#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.0 'v', Rhs.1 'pos', Lhs.1 'e', Lhs.2 'delta'

  869481225 ~2%     {4} r3 = JOIN SemanticGuard#7b46a302::semGuardDirectlyControlsSsaRead#3#fff_102#join_rhs WITH SemanticSSA#aa9d1d08::SemSsaReadPosition::hasReadOfVar#1#dispred#ff ON FIRST 1 OUTPUT Rhs.1 'v', Lhs.2, Lhs.1, Lhs.0 'pos'
  5749      ~0%     {4} r4 = JOIN r3 WITH semEqFlowCond#5#fffbff#cpe#12356_03412#join_rhs ON FIRST 3 OUTPUT Lhs.3 'pos', Lhs.0 'v', Rhs.3 'e', Rhs.4
  5749      ~1%     {4} r5 = SCAN r4 OUTPUT In.0 'pos', In.1 'v', In.2 'e', f2i(In.3)
  5749      ~0%     {4} r6 = SCAN r5 OUTPUT In.1 'v', In.0 'pos', In.2 'e', In.3 'delta'

  11998174  ~0%     {4} r7 = r2 UNION r6
                    return r7
```

After:
```
Tuple counts for valueFlowStepSsaEqFlowCond#4#ffff/4@f196e4ok after 37ms:
  59567  ~0%     {5} r1 = JOIN const_true WITH semEqFlowCond#5#ffffff_301245#join_rhs ON FIRST 1 OUTPUT Rhs.1 'v', Rhs.2 'e', Rhs.4, Rhs.5, Rhs.3
  59567  ~0%     {5} r2 = SCAN r1 OUTPUT In.0 'v', In.1 'e', In.2, In.3, f2i(In.4)
  59567  ~4%     {5} r3 = SCAN r2 OUTPUT In.3, In.2, In.0 'v', In.1 'e', In.4 'delta'
  176881 ~0%     {4} r4 = JOIN r3 WITH SemanticGuard#7b46a302::semGuardDirectlyControlsSsaRead#3#fff_021#join_rhs ON FIRST 2 OUTPUT Rhs.2 'pos', Lhs.2 'v', Lhs.3 'e', Lhs.4 'delta'
                  return r4

Tuple counts for valueFlowStepSsa#4#ffff/4@e22d39v5 after 1s:
  5749     ~0%     {4} r1 = JOIN SemanticSSA#aa9d1d08::SemSsaReadPosition::hasReadOfVar#1#dispred#ff WITH valueFlowStepSsaEqFlowCond#4#ffff ON FIRST 2 OUTPUT Lhs.1 'v', Lhs.0 'pos', Rhs.2 'e', Rhs.3 'delta'

  11571217 ~0%     {3} r2 = SCAN semSsaUpdateStep#3#fff OUTPUT In.0 'v', In.1 'e', f2i(In.2)
  11992425 ~0%     {4} r3 = JOIN r2 WITH SemanticSSA#aa9d1d08::SemSsaReadPosition::hasReadOfVar#1#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.0 'v', Rhs.1 'pos', Lhs.1 'e', Lhs.2 'delta'

  11998174 ~0%     {4} r4 = r1 UNION r3
                    return r4
```
2023-08-24 12:20:41 +01:00
Erik Krogh Kristensen
59de92ce64 Merge pull request #14027 from erik-krogh/py-reg-app
ReDoS: limit concretize to strings of at most length 100
2023-08-24 12:57:42 +02:00
Tom Hvitved
f2eed4d8c4 Data flow: Fix a bad join order
Before
```
Evaluated relational algebra for predicate DataFlowImpl#248dabc3::MakeImpl#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Impl#DataFlow#167ac380::DataFlowMake#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Global#XSS#e59174e9::OrmTracking::Config#::C#::MkStage#Stage2#::Stage#Stage3Param#::flowThroughIntoCall#6#ffffff@0ea4e2mt with tuple counts:
           1065437   ~0%    {4} r1 = SCAN project#DataFlowImpl#248dabc3::MakeImpl#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Impl#DataFlow#167ac380::DataFlowMake#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Global#XSS#e59174e9::OrmTracking::Config#::C#::MkStage#Stage2#::Stage#Stage3Param#::fwdFlow#9#fffffffff#2 OUTPUT In.0, In.3, In.1, In.2
        1158508760   ~0%    {6} r2 = JOIN r1 WITH project#DataFlowImpl#248dabc3::MakeImpl#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Impl#DataFlow#167ac380::DataFlowMake#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Global#XSS#e59174e9::OrmTracking::Config#::C#::MkStage#Stage2#::Stage#Stage3Param#::flowIntoCallApa#6#ffffff_14023#join_rhs ON FIRST 2 OUTPUT Lhs.0, Lhs.2, Lhs.3, Rhs.2, Rhs.3, Rhs.4

                            {6} r3 = SELECT r2 ON In.5 != false
        1158470345   ~4%    {6} r4 = SCAN r3 OUTPUT In.4, In.1, In.2, In.0, In.3, In.5

                            {6} r5 = SELECT r2 ON In.5 = false
             38415   ~0%    {5} r6 = SCAN r5 OUTPUT In.2, In.0, In.1, In.3, In.4
                 4   ~0%    {5} r7 = JOIN r6 WITH DataFlowImplCommon#f7de413b::MakeImplCommon#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Cached::TApproxFrontNil#f ON FIRST 1 OUTPUT Lhs.4, Lhs.2, Lhs.0, Lhs.1, Lhs.3
                 4   ~0%    {6} r8 = SCAN r7 OUTPUT In.0, In.1, In.2, In.3, In.4, false

        1158470349   ~4%    {6} r9 = r4 UNION r8
             44065   ~3%    {6} r10 = JOIN r9 WITH project#DataFlowImpl#248dabc3::MakeImpl#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Impl#DataFlow#167ac380::DataFlowMake#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Global#XSS#e59174e9::OrmTracking::Config#::C#::MkStage#Stage2#::Stage#Stage3Param#::returnFlowsThrough#8#ffffffff ON FIRST 3 OUTPUT Lhs.4, Lhs.3, Lhs.0, Lhs.5, Lhs.2, Rhs.3
                            return r10
```

After
```
Evaluated relational algebra for predicate DataFlowImpl#248dabc3::MakeImpl#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Impl#DataFlow#167ac380::DataFlowMake#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Global#XSS#e59174e9::OrmTracking::Config#::C#::MkStage#Stage2#::Stage#Stage3Param#::flowThroughIntoCall#6#ffffff@979c54q9 with tuple counts:
         11095   ~0%    {4} r1 = SCAN project#DataFlowImpl#248dabc3::MakeImpl#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Impl#DataFlow#167ac380::DataFlowMake#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Global#XSS#e59174e9::OrmTracking::Config#::C#::MkStage#Stage2#::Stage#Stage3Param#::returnFlowsThrough#8#ffffffff OUTPUT In.0, In.3, In.1, In.2
        470154   ~1%    {8} r2 = JOIN r1 WITH project#DataFlowImpl#248dabc3::MakeImpl#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Impl#DataFlow#167ac380::DataFlowMake#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Global#XSS#e59174e9::OrmTracking::Config#::C#::MkStage#Stage2#::Stage#Stage3Param#::flowIntoCallApa#6#ffffff_20134#join_rhs ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Lhs.2, Lhs.3, Rhs.1, Rhs.2, Rhs.3, Rhs.4

                        {8} r3 = SELECT r2 ON In.6 != false
        470152   ~0%    {8} r4 = SCAN r3 OUTPUT In.5, In.2, In.3, In.7, In.0, In.1, In.4, In.6

                        {8} r5 = SELECT r2 ON In.6 = false
             2   ~0%    {7} r6 = SCAN r5 OUTPUT In.3, In.0, In.1, In.2, In.4, In.5, In.7
             0   ~0%    {7} r7 = JOIN r6 WITH DataFlowImplCommon#f7de413b::MakeImplCommon#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Cached::TApproxFrontNil#f ON FIRST 1 OUTPUT Lhs.5, Lhs.3, Lhs.0, Lhs.6, Lhs.1, Lhs.2, Lhs.4
             0   ~0%    {8} r8 = SCAN r7 OUTPUT In.0, In.1, In.2, In.3, In.4, In.5, In.6, false

        470152   ~0%    {8} r9 = r4 UNION r8
         44065   ~3%    {6} r10 = JOIN r9 WITH project#DataFlowImpl#248dabc3::MakeImpl#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Impl#DataFlow#167ac380::DataFlowMake#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Global#XSS#e59174e9::OrmTracking::Config#::C#::MkStage#Stage2#::Stage#Stage3Param#::fwdFlow#9#fffffffff#2 ON FIRST 4 OUTPUT Lhs.6, Lhs.0, Lhs.5, Lhs.7, Lhs.2, Lhs.4
                        return r10
```
2023-08-24 12:08:34 +02:00
Geoffrey White
f07f97a94e Python: Accept test changes. I think these reflect the 'parse mode chars should not be considered chars' issue. 2023-08-24 10:52:52 +01:00
Tom Hvitved
7723dbc6d7 Merge pull request #14026 from hvitved/dataflow/stage3-call-ctx
Data flow: Use call contexts in stage 3
2023-08-24 11:52:08 +02:00
Tony Torralba
8c32919381 Merge pull request #13903 from atorralba/atorralba/jaxrs-mad-models
Java: New models for JAX-RS
2023-08-24 11:43:13 +02:00
Tom Hvitved
554a2c26c3 C#: Favor DLLs with most recent .NET Core target framework when resolving dependencies in standalone 2023-08-24 11:42:06 +02:00
Tony Torralba
3f9701cea7 Two fixes:
* Consider that the @WebService annotation (et al) can be in a supertype or interface

* getARemoteMethod should only return public methods, since protected, package-private, and private methods are not exposed
2023-08-24 11:35:52 +02:00
Mathias Vorreiter Pedersen
4e6707fee5 Fix joins.
Before:
```
Pipeline standard for boundedSsa#8#ffffffff@d4d576wg was evaluated in 651 iterations totaling 39789ms (delta sizes total: 235714).
        3482    ~0%    {8} r1 = JOIN unequalIntegralSsa#5#fffff#prev_delta WITH boundedSsa#8#ffffffff#prev ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.4, Rhs.5, Rhs.6

        1747    ~0%    {8} r2 = SELECT r1 ON In.5 = false
        1747    ~3%    {8} r3 = SCAN r2 OUTPUT In.0, In.1, In.2, (In.3 + i2f(1)), false, In.6, In.7, In.4

        1735    ~4%    {8} r4 = SELECT r1 ON In.5 = true
        1735    ~6%    {8} r5 = SCAN r4 OUTPUT In.0, In.1, In.2, (In.3 - i2f(1)), true, In.6, In.7, In.4

        1843   ~97%    {8} r6 = JOIN unequalIntegralSsa#5#fffff#prev WITH boundedSsa#8#ffffffff#prev_delta ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.4, Rhs.5, Rhs.6

        907   ~99%    {8} r7 = SELECT r6 ON In.5 = false
        907  ~108%    {8} r8 = SCAN r7 OUTPUT In.0, In.1, In.2, (In.3 + i2f(1)), false, In.6, In.7, In.4

        2642   ~41%    {8} r9 = r5 UNION r8
        4389   ~22%    {8} r10 = r3 UNION r9

        936   ~99%    {8} r11 = SELECT r6 ON In.5 = true
        936  ~100%    {8} r12 = SCAN r11 OUTPUT In.0, In.1, In.2, (In.3 - i2f(1)), true, In.6, In.7, In.4

      512745    ~2%    {6} r13 = SCAN bounded#7#fffffff#prev_delta OUTPUT In.0, In.3, In.1, In.2, In.4, In.5
      229218    ~0%    {9} r14 = JOIN r13 WITH boundFlowStepSsa#6#ffffff_240135#join_rhs ON FIRST 2 OUTPUT Rhs.5, Rhs.2, Rhs.3, Lhs.2, Rhs.4, Lhs.3, Lhs.1, Lhs.4, Lhs.5
      229218    ~0%    {8} r15 = SCAN r14 OUTPUT In.0, In.1, In.2, In.3, (In.4 + In.5), In.6, In.7, In.8
                      {8} r16 = r15 AND NOT num#TSemNoReason#f(Lhs.0)
        5397    ~0%    {8} r17 = SCAN r16 OUTPUT In.1, In.2, In.3, In.4, In.5, In.6, In.7, In.0

      557965    ~0%    {5} r18 = SCAN unequalIntegralSsa#5#fffff#prev_delta OUTPUT In.0, In.2, In.3, In.1, In.4
          0    ~0%    {8} r19 = JOIN r18 WITH boundedPhi#7#fffffff#prev ON FIRST 3 OUTPUT Lhs.0, Lhs.3, Lhs.1, Lhs.2, Lhs.4, Rhs.3, Rhs.4, Rhs.5

          0    ~0%    {8} r20 = SELECT r19 ON In.5 = false
          0    ~0%    {8} r21 = SCAN r20 OUTPUT In.0, In.1, In.2, (In.3 + i2f(1)), false, In.6, In.7, In.4

        5397    ~0%    {8} r22 = r17 UNION r21
        6333   ~12%    {8} r23 = r12 UNION r22
      10722   ~16%    {8} r24 = r10 UNION r23

          0    ~0%    {8} r25 = SELECT r19 ON In.5 = true
          0    ~0%    {8} r26 = SCAN r25 OUTPUT In.0, In.1, In.2, (In.3 - i2f(1)), true, In.6, In.7, In.4

  362119282    ~1%    {5} r27 = SCAN unequalIntegralSsa#5#fffff#prev OUTPUT In.0, In.2, In.3, In.1, In.4
          41    ~8%    {8} r28 = JOIN r27 WITH boundedPhi#7#fffffff#prev_delta ON FIRST 3 OUTPUT Lhs.0, Lhs.3, Lhs.1, Lhs.2, Lhs.4, Rhs.3, Rhs.4, Rhs.5

          27    ~0%    {8} r29 = SELECT r28 ON In.5 = false
          27    ~4%    {8} r30 = SCAN r29 OUTPUT In.0, In.1, In.2, (In.3 + i2f(1)), false, In.6, In.7, In.4

          14   ~42%    {8} r31 = SELECT r28 ON In.5 = true
          14   ~42%    {8} r32 = SCAN r31 OUTPUT In.0, In.1, In.2, (In.3 - i2f(1)), true, In.6, In.7, In.4

          41   ~12%    {8} r33 = r30 UNION r32
          41   ~12%    {8} r34 = r26 UNION r33

      512745    ~0%    {7} r35 = SCAN bounded#7#fffffff#prev_delta OUTPUT In.0, In.3, In.1, In.2, In.4, In.5, In.6
      229272    ~0%    {10} r36 = JOIN r35 WITH boundFlowStepSsa#6#ffffff_240135#join_rhs ON FIRST 2 OUTPUT Rhs.5, Lhs.2, Lhs.1, Lhs.4, Lhs.5, Lhs.6, Rhs.2, Rhs.3, Rhs.4, Lhs.3
      229272    ~0%    {9} r37 = SCAN r36 OUTPUT In.0, In.1, In.2, In.3, In.4, In.5, In.6, In.7, (In.8 + In.9)
      223867    ~0%    {8} r38 = JOIN r37 WITH num#TSemNoReason#f ON FIRST 1 OUTPUT Lhs.6, Lhs.7, Lhs.1, Lhs.8, Lhs.2, Lhs.3, Lhs.4, Lhs.5

        3482    ~1%    {8} r39 = JOIN unequalIntegralSsa#5#fffff#prev_delta WITH boundedSsa#8#ffffffff#prev ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Rhs.4, Rhs.5, Rhs.6, Rhs.7

        1747    ~0%    {8} r40 = SELECT r39 ON In.4 = false
        1747    ~0%    {8} r41 = SCAN r40 OUTPUT In.7, In.0, In.1, In.2, (In.3 + i2f(1)), false, In.5, In.6

        1735    ~0%    {8} r42 = SELECT r39 ON In.4 = true
        1735    ~0%    {8} r43 = SCAN r42 OUTPUT In.7, In.0, In.1, In.2, (In.3 - i2f(1)), true, In.5, In.6

        3482    ~0%    {8} r44 = r41 UNION r43

      557965    ~0%    {4} r45 = SCAN unequalIntegralSsa#5#fffff#prev_delta OUTPUT In.0, In.2, In.3, In.1
          0    ~0%    {8} r46 = JOIN r45 WITH boundedPhi#7#fffffff#prev ON FIRST 3 OUTPUT Lhs.0, Lhs.3, Lhs.1, Lhs.2, Rhs.3, Rhs.4, Rhs.5, Rhs.6

          0    ~0%    {8} r47 = SELECT r46 ON In.4 = false
          0    ~0%    {8} r48 = SCAN r47 OUTPUT In.7, In.0, In.1, In.2, (In.3 + i2f(1)), false, In.5, In.6

          0    ~0%    {8} r49 = SELECT r46 ON In.4 = true
          0    ~0%    {8} r50 = SCAN r49 OUTPUT In.7, In.0, In.1, In.2, (In.3 - i2f(1)), true, In.5, In.6

          0    ~0%    {8} r51 = r48 UNION r50
        3482    ~0%    {8} r52 = r44 UNION r51
                      {8} r53 = r52 AND NOT num#TSemNoReason#f(Lhs.0)
          20    ~0%    {8} r54 = SCAN r53 OUTPUT In.1, In.2, In.3, In.4, In.5, In.6, In.7, In.0

        1843    ~0%    {8} r55 = JOIN unequalIntegralSsa#5#fffff#prev WITH boundedSsa#8#ffffffff#prev_delta ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Rhs.4, Rhs.5, Rhs.6, Rhs.7

        907    ~0%    {8} r56 = SELECT r55 ON In.4 = false
        907    ~1%    {8} r57 = SCAN r56 OUTPUT In.7, In.0, In.1, In.2, (In.3 + i2f(1)), false, In.5, In.6

        936    ~0%    {8} r58 = SELECT r55 ON In.4 = true
        936    ~1%    {8} r59 = SCAN r58 OUTPUT In.7, In.0, In.1, In.2, (In.3 - i2f(1)), true, In.5, In.6

        1843    ~3%    {8} r60 = r57 UNION r59

  362119282    ~0%    {4} r61 = SCAN unequalIntegralSsa#5#fffff#prev OUTPUT In.0, In.2, In.3, In.1
          41    ~0%    {8} r62 = JOIN r61 WITH boundedPhi#7#fffffff#prev_delta ON FIRST 3 OUTPUT Lhs.0, Lhs.3, Lhs.1, Lhs.2, Rhs.3, Rhs.4, Rhs.5, Rhs.6

          27    ~0%    {8} r63 = SELECT r62 ON In.4 = false
          27    ~0%    {8} r64 = SCAN r63 OUTPUT In.7, In.0, In.1, In.2, (In.3 + i2f(1)), false, In.5, In.6

          14    ~0%    {8} r65 = SELECT r62 ON In.4 = true
          14    ~0%    {8} r66 = SCAN r65 OUTPUT In.7, In.0, In.1, In.2, (In.3 - i2f(1)), true, In.5, In.6

          41    ~0%    {8} r67 = r64 UNION r66
        1884    ~3%    {8} r68 = r60 UNION r67
                      {8} r69 = r68 AND NOT num#TSemNoReason#f(Lhs.0)
        1853    ~0%    {8} r70 = SCAN r69 OUTPUT In.1, In.2, In.3, In.4, In.5, In.6, In.7, In.0

        1873    ~0%    {8} r71 = r54 UNION r70
      225740    ~0%    {8} r72 = r38 UNION r71
      225781    ~0%    {8} r73 = r34 UNION r72
      236503    ~2%    {8} r74 = r24 UNION r73
      235722    ~1%    {8} r75 = r74 AND NOT boundedSsa#8#ffffffff#prev(Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5, Lhs.6, Lhs.7)
                      return r75
```

After:
```
Pipeline standard for boundedSsa#8#ffffffff@2122e6w8 was evaluated in 651 iterations totaling 343ms (delta sizes total: 235815).
      0    ~0%    {8} r1 = JOIN unequalIntegralSsa#5#fffff#prev_delta WITH boundedPhi#7#fffffff#prev ON FIRST 3 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.3, Rhs.4, Rhs.5

      0    ~0%    {8} r2 = SELECT r1 ON In.5 = false
      0    ~0%    {8} r3 = SCAN r2 OUTPUT In.0, In.1, (In.2 + i2f(1)), In.3, false, In.6, In.7, In.4

      0    ~0%    {8} r4 = SELECT r1 ON In.5 = true
      0    ~0%    {8} r5 = SCAN r4 OUTPUT In.0, In.1, (In.2 - i2f(1)), In.3, true, In.6, In.7, In.4

    41    ~8%    {8} r6 = JOIN unequalIntegralSsa#5#fffff#prev WITH boundedPhi#7#fffffff#prev_delta ON FIRST 3 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.3, Rhs.4, Rhs.5

    27    ~0%    {8} r7 = SELECT r6 ON In.5 = false
    27    ~0%    {8} r8 = SCAN r7 OUTPUT In.0, In.1, (In.2 + i2f(1)), In.3, false, In.6, In.7, In.4

    27    ~0%    {8} r9 = r5 UNION r8
    27    ~0%    {8} r10 = r3 UNION r9

    14   ~42%    {8} r11 = SELECT r6 ON In.5 = true
    14   ~42%    {8} r12 = SCAN r11 OUTPUT In.0, In.1, (In.2 - i2f(1)), In.3, true, In.6, In.7, In.4

  3482    ~0%    {8} r13 = JOIN unequalIntegralSsa#5#fffff#prev_delta WITH boundedSsa#8#ffffffff#prev ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.4, Rhs.5, Rhs.6

  1747    ~0%    {8} r14 = SELECT r13 ON In.5 = false
  1747    ~3%    {8} r15 = SCAN r14 OUTPUT In.0, In.1, (In.2 + i2f(1)), In.3, false, In.6, In.7, In.4

  1735    ~3%    {8} r16 = SELECT r13 ON In.5 = true
  1735    ~3%    {8} r17 = SCAN r16 OUTPUT In.0, In.1, (In.2 - i2f(1)), In.3, true, In.6, In.7, In.4

  3482    ~0%    {8} r18 = r15 UNION r17
  3496    ~0%    {8} r19 = r12 UNION r18
  3523    ~0%    {8} r20 = r10 UNION r19

  1843  ~103%    {8} r21 = JOIN unequalIntegralSsa#5#fffff#prev WITH boundedSsa#8#ffffffff#prev_delta ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.4, Rhs.5, Rhs.6

    907  ~105%    {8} r22 = SELECT r21 ON In.5 = false
    907  ~108%    {8} r23 = SCAN r22 OUTPUT In.0, In.1, (In.2 + i2f(1)), In.3, false, In.6, In.7, In.4

    936  ~101%    {8} r24 = SELECT r21 ON In.5 = true
    936  ~109%    {8} r25 = SCAN r24 OUTPUT In.0, In.1, (In.2 - i2f(1)), In.3, true, In.6, In.7, In.4

512745    ~4%    {6} r26 = SCAN bounded#7#fffffff#prev_delta OUTPUT In.0, In.3, In.1, In.2, In.4, In.5
229313    ~0%    {9} r27 = JOIN r26 WITH boundFlowStepSsa#6#ffffff_240135#join_rhs ON FIRST 2 OUTPUT Rhs.5, Rhs.2, Lhs.2, Rhs.4, Lhs.3, Rhs.3, Lhs.1, Lhs.4, Lhs.5
229313    ~0%    {8} r28 = SCAN r27 OUTPUT In.0, In.1, In.2, (In.3 + In.4), In.5, In.6, In.7, In.8
                  {8} r29 = r28 AND NOT num#TSemNoReason#f(Lhs.0)
  5492    ~2%    {8} r30 = SCAN r29 OUTPUT In.1, In.2, In.3, In.4, In.5, In.6, In.7, In.0

  6428   ~15%    {8} r31 = r25 UNION r30
  7335   ~27%    {8} r32 = r23 UNION r31

512745    ~0%    {7} r33 = SCAN bounded#7#fffffff#prev_delta OUTPUT In.0, In.3, In.1, In.2, In.4, In.5, In.6
229367    ~0%    {10} r34 = JOIN r33 WITH boundFlowStepSsa#6#ffffff_240135#join_rhs ON FIRST 2 OUTPUT Rhs.5, Lhs.2, Lhs.1, Lhs.4, Lhs.5, Lhs.6, Rhs.2, Rhs.3, Rhs.4, Lhs.3
229367    ~0%    {9} r35 = SCAN r34 OUTPUT In.0, In.1, In.2, In.3, In.4, In.5, In.6, In.7, (In.8 + In.9)
223867    ~0%    {8} r36 = JOIN r35 WITH num#TSemNoReason#f ON FIRST 1 OUTPUT Lhs.6, Lhs.1, Lhs.8, Lhs.7, Lhs.2, Lhs.3, Lhs.4, Lhs.5

      0    ~0%    {8} r37 = JOIN unequalIntegralSsa#5#fffff#prev_delta WITH boundedPhi#7#fffffff#prev ON FIRST 3 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Rhs.3, Rhs.4, Rhs.5, Rhs.6

      0    ~0%    {8} r38 = SELECT r37 ON In.4 = false
      0    ~0%    {8} r39 = SCAN r38 OUTPUT In.7, In.0, In.1, (In.2 + i2f(1)), In.3, false, In.5, In.6

      0    ~0%    {8} r40 = SELECT r37 ON In.4 = true
      0    ~0%    {8} r41 = SCAN r40 OUTPUT In.7, In.0, In.1, (In.2 - i2f(1)), In.3, true, In.5, In.6

      0    ~0%    {8} r42 = r39 UNION r41

  3482    ~0%    {8} r43 = JOIN unequalIntegralSsa#5#fffff#prev_delta WITH boundedSsa#8#ffffffff#prev ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Rhs.4, Rhs.5, Rhs.6, Rhs.7

  1747    ~0%    {8} r44 = SELECT r43 ON In.4 = false
  1747    ~0%    {8} r45 = SCAN r44 OUTPUT In.7, In.0, In.1, (In.2 + i2f(1)), In.3, false, In.5, In.6

  1735    ~1%    {8} r46 = SELECT r43 ON In.4 = true
  1735    ~2%    {8} r47 = SCAN r46 OUTPUT In.7, In.0, In.1, (In.2 - i2f(1)), In.3, true, In.5, In.6

  3482    ~2%    {8} r48 = r45 UNION r47
  3482    ~2%    {8} r49 = r42 UNION r48
                  {8} r50 = r49 AND NOT num#TSemNoReason#f(Lhs.0)
    20    ~0%    {8} r51 = SCAN r50 OUTPUT In.1, In.2, In.3, In.4, In.5, In.6, In.7, In.0

    41    ~2%    {8} r52 = JOIN unequalIntegralSsa#5#fffff#prev WITH boundedPhi#7#fffffff#prev_delta ON FIRST 3 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Rhs.3, Rhs.4, Rhs.5, Rhs.6

    27    ~0%    {8} r53 = SELECT r52 ON In.4 = false
    27    ~0%    {8} r54 = SCAN r53 OUTPUT In.7, In.0, In.1, (In.2 + i2f(1)), In.3, false, In.5, In.6

    14    ~0%    {8} r55 = SELECT r52 ON In.4 = true
    14    ~0%    {8} r56 = SCAN r55 OUTPUT In.7, In.0, In.1, (In.2 - i2f(1)), In.3, true, In.5, In.6

    41    ~0%    {8} r57 = r54 UNION r56

  1843    ~1%    {8} r58 = JOIN unequalIntegralSsa#5#fffff#prev WITH boundedSsa#8#ffffffff#prev_delta ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Rhs.4, Rhs.5, Rhs.6, Rhs.7

    907    ~0%    {8} r59 = SELECT r58 ON In.4 = false
    907    ~1%    {8} r60 = SCAN r59 OUTPUT In.7, In.0, In.1, (In.2 + i2f(1)), In.3, false, In.5, In.6

    936    ~0%    {8} r61 = SELECT r58 ON In.4 = true
    936    ~0%    {8} r62 = SCAN r61 OUTPUT In.7, In.0, In.1, (In.2 - i2f(1)), In.3, true, In.5, In.6

  1843    ~0%    {8} r63 = r60 UNION r62
  1884    ~0%    {8} r64 = r57 UNION r63
                  {8} r65 = r64 AND NOT num#TSemNoReason#f(Lhs.0)
  1853    ~1%    {8} r66 = SCAN r65 OUTPUT In.1, In.2, In.3, In.4, In.5, In.6, In.7, In.0

  1873    ~1%    {8} r67 = r51 UNION r66
225740    ~0%    {8} r68 = r36 UNION r67
233075    ~0%    {8} r69 = r32 UNION r68
236598    ~0%    {8} r70 = r20 UNION r69
235817    ~0%    {8} r71 = r70 AND NOT boundedSsa#8#ffffffff#prev(Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5, Lhs.6, Lhs.7)
                  return r71
```
2023-08-24 10:29:04 +01:00
Asger F
b424f3fe83 Update a comment to be more accurate 2023-08-24 11:12:39 +02:00
Jeroen Ketema
9f7413eded C++: Omit assign case from cpp/non-constant-format 2023-08-24 11:02:40 +02:00
Anders Schack-Mulligen
ebe3f61ef6 Java: Fix models in qltest. 2023-08-24 09:44:43 +02:00
Jeroen Ketema
f996fa2f8b Merge pull request #14043 from jketema/ir-regres
C++: Add IR test case that shows regression after frontend update
2023-08-24 09:23:58 +02:00
AlexDenisov
d89a86fea4 Merge pull request #13979 from github/alexdenisov/autobuilder-spm
Swift: teach autobuilder about SPM, CocoaPods, and Carthage
2023-08-24 08:50:04 +02:00
Jeroen Ketema
c882945e30 C++: Add IR test case that shows regression after frontend update 2023-08-24 08:36:22 +02:00
erik-krogh
db2b8d4bcc remove some test code I accidentially commited 2023-08-24 07:56:05 +02:00
Mathias Vorreiter Pedersen
123e58767b C++: Share RangeAnalysisUtil with 'cpp/overrun-write'. 2023-08-23 22:42:00 +01:00
Harry Maclean
96e9dfc7b2 Merge pull request #13969 from hmac/shared-extractor-globs
Shared extractor: support file path globs
2023-08-23 16:41:39 +01:00
Harry Maclean
b76842ad3d Shared: Fix clippy lint 2023-08-23 16:24:57 +01:00
Harry Maclean
3680613f2d Shared: Restrict extractor file globs to filenames 2023-08-23 16:09:56 +01:00
Mathias Vorreiter Pedersen
6cf99688e1 Merge pull request #13985 from alexet/ir-tainted-sql
CPP: Convert SQL tainted away from away from DefaultTaintTracking.
2023-08-23 15:40:55 +01:00
Rasmus Wriedt Larsen
89b790d048 Merge pull request #14037 from RasmusWL/fix-tests
Python: Fix tests
2023-08-23 16:37:40 +02:00
Rasmus Wriedt Larsen
f33359bd5c Python: Fix tests 2023-08-23 15:37:55 +02:00
Asger F
2b540e251a Merge pull request #14007 from asgerf/js/import-path-string
JS: Follow immediate predecessors in path resolution
2023-08-23 15:28:22 +02:00
Harry Maclean
54c2221f35 Merge pull request #14033 from hmac/excon-bugfix
Ruby: Fix bug in excon model
2023-08-23 14:24:53 +01:00
Harry Maclean
cc7ef5dac1 Shared: Fix clippy lint in shared extractor 2023-08-23 14:11:22 +01:00
Harry Maclean
ed40d72e4f Shared: Bump extractor version 2023-08-23 14:11:22 +01:00
Harry Maclean
24ac6c0596 QL: Update for shared extractor changes 2023-08-23 14:11:21 +01:00
Harry Maclean
7e2abf20c6 Shared: Support glob patterns in shared extractor
Replace the `file_extensions` field with `file_globs`, which supports
UNIX style glob patterns powered by the `globset` crate.

This allows files with no extension (e.g. Dockerfiles) to be extracted,
by specifying a glob such as `*Dockerfile`.

One surprising aspect of this change is that the globs match against the
whole path, rather than just the file name.

This is a breaking change.
2023-08-23 14:11:21 +01:00
Asger F
d146514275 Merge pull request #13928 from asgerf/js/ignore-huge-files
JS: Ignore files larger than 10 MB during extraction
2023-08-23 15:09:58 +02:00
Asger F
d2fca1b804 Merge pull request #13926 from asgerf/js/fix-cyclic-alias-extraction
JS: fix crash in case of cyclic alias
2023-08-23 15:09:39 +02:00
Geoffrey White
46fc1fdaa1 Swift: Suggestions from review. 2023-08-23 14:04:56 +01:00
Geoffrey White
15c49eeee9 Update swift/ql/lib/codeql/swift/regex/Regex.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-08-23 13:58:05 +01:00
Asger F
ee1b3fd7e9 Java: update test after VariableCapture.qll change 2023-08-23 14:57:26 +02:00
Asger F
8aec87ea57 Update VariableCapture.qll 2023-08-23 14:57:26 +02:00
Alex Eyers-Taylor
949b0a2613 CPP:Move import to start of file 2023-08-23 13:39:29 +01:00
Alex Eyers-Taylor
7d99d61662 CPP: Convert SQL tainted to IR dataflow. 2023-08-23 13:39:29 +01:00
Michael Nebel
08d44c1bdc Merge pull request #14019 from michaelnebel/csharp/excludedlls
C#: Exclude dll files when getting files in the dependency manager.
2023-08-23 14:15:32 +02:00
Asger F
b8fc84e8e4 JS: Change note 2023-08-23 14:11:07 +02:00
Asger F
c6a757e085 JS: More robust handling of cyclic aliases 2023-08-23 14:11:07 +02:00
Asger F
794a459c1b JS: Add reproduction test 2023-08-23 14:11:07 +02:00
Asger F
b93e404441 JS: Change log 2023-08-23 14:05:21 +02:00
Geoffrey White
02fbb47b64 Swift: Change note. 2023-08-23 13:04:49 +01:00
Geoffrey White
03ca29ab96 Swift: Adapt the IncompleteHostnameRegex qhelp for Swift. 2023-08-23 13:04:49 +01:00
Geoffrey White
1805b070dc Swift: Adapt the IncompleteHostnameRegex test for Swift. 2023-08-23 13:04:48 +01:00
Harry Maclean
d18ca3f5d7 Ruby: Fix bug in excon model
If a codebase included a definition for `Excon.new`, we matched
connection nodes to unrelated request nodes.
2023-08-23 12:55:36 +01:00
Tony Torralba
0f3918af16 Merge pull request #13773 from atorralba/atorralba/java/mdht-xxe-sink
Java: Add XXE sinks for MDHT
2023-08-23 13:49:49 +02:00
Asger F
ae2a1c7399 JS: Change note 2023-08-23 13:39:56 +02:00
Anders Schack-Mulligen
736c4beb9e Java: Add change note. 2023-08-23 13:26:41 +02:00
Anders Schack-Mulligen
6c02e30f56 Java: Update models. 2023-08-23 13:24:55 +02:00
Anders Schack-Mulligen
4b0a1cf74b Java: Remove old interpretation. 2023-08-23 13:19:16 +02:00
Anders Schack-Mulligen
410c09270f Java: Use nested names in MaD signatures. 2023-08-23 13:17:52 +02:00
Geoffrey White
efcadbda69 Swift: Get the IncompleteHostnameRegex query working for Swift. 2023-08-23 10:32:10 +01:00
Harry Maclean
a5c8917ff0 Merge pull request #14031 from hmac/hmac-fix-test
Ruby: Update test fixture
2023-08-23 10:15:23 +01:00
Harry Maclean
842da58269 Ruby: Update test fixture 2023-08-23 09:59:04 +01:00
Harry Maclean
fb4b774c0d Merge pull request #13967 from hmac/remove-splat-all
Ruby: Remove isSplatAll
2023-08-23 09:40:06 +01:00
Michael Nebel
1f1d48f768 Merge pull request #14020 from tamasvajk/fix/dependency-fetching-1
C#: Fix lazy evaluation of not yet downloaded packages
2023-08-23 10:39:29 +02:00
Michael Nebel
95193633fe Update csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs
Co-authored-by: Tom Hvitved <hvitved@github.com>
2023-08-23 10:35:20 +02:00
erik-krogh
25e4f2c3a2 limit concretize to strings of at most length 100 2023-08-23 10:26:29 +02:00
Tom Hvitved
3810b796a0 Data flow: Use call contexts in stage 3 2023-08-23 10:05:57 +02:00
Geoffrey White
6deaf4e5f8 Swift: Rework ParsedStringRegex and introduce the needed RegexPatternSource class. 2023-08-23 09:01:15 +01:00
Asger F
d8462ad1b3 JS: Add a file size limit to extractor 2023-08-23 09:54:55 +02:00
Asger F
bc47646a79 JS: Move getMegabyteCountFromPrefixedEnv into a shared place 2023-08-23 09:54:55 +02:00
Asger F
dec6039469 JS: Follow immediate predecessors in path resolution 2023-08-23 09:53:51 +02:00
Geoffrey White
6fb1058e73 Swift: Copy IncompleteHostnameRegex query from JS. 2023-08-23 08:46:13 +01:00
Michael Nebel
672d1637ab C#: Exclude dll files when getting files in the dependency manager. 2023-08-23 09:28:49 +02:00
Maiky
664c1eba72 Add "" and nil as sources 2023-08-22 18:10:33 +02:00
Ian Lynagh
deaf912cb8 Kotlin: Add an integration test for extractor information 2023-08-22 16:39:18 +01:00
Jeroen Ketema
cf53956d39 Merge pull request #14021 from jketema/non-const-format-test
C++: Add `cpp/non-constant-format` test
2023-08-22 17:38:45 +02:00
Jeroen Ketema
6566b91355 C++: Add indication that the test result is good 2023-08-22 16:38:46 +02:00
Robert Marsh
5734e475d4 Merge pull request #14014 from rdmarsh2/rdmarsh2/swift/keypath-force-steps
Swift: flow through keypath optional components
2023-08-22 10:35:36 -04:00
Jeroen Ketema
1e8daff02a C++: Add cpp/non-constant-format test 2023-08-22 16:23:47 +02:00
Robert Marsh
e94781fa8f Swift: fix comment 2023-08-22 13:27:17 +00:00
Michael Nebel
c1f167ceee C#: Move package filtering logic from FileContent to DependencyManager. 2023-08-22 14:51:33 +02:00
Tamas Vajk
87d0d723ed C#: Fix lazy evaluation of not yet downloaded packages 2023-08-22 14:50:03 +02:00
Mathias Vorreiter Pedersen
530c950b41 C++: Fix formatting. 2023-08-22 13:40:00 +01:00
Mathias Vorreiter Pedersen
66f11d427b C++: Simplify description. 2023-08-22 13:39:38 +01:00
Mathias Vorreiter Pedersen
bbce7ee96d C++: Cache 'getAnInput' since it's now used in several queries. 2023-08-22 13:37:24 +01:00
Tamás Vajk
afe1e9c453 Merge pull request #13957 from tamasvajk/razor-standalone-2
C#: Generate source files from cshtml files in standalone
2023-08-22 14:22:11 +02:00
Michael Nebel
fe36230061 Merge pull request #14015 from michaelnebel/csharp/vscodesettings
C#: Update of VS Code settings.
2023-08-22 14:16:31 +02:00
Mathias Vorreiter Pedersen
1c3a0d1632 Update cpp/ql/src/Security/CWE/CWE-193/InvalidPointerDeref.qhelp
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2023-08-22 13:03:07 +01:00
Mathias Vorreiter Pedersen
e88277bd3b Update cpp/ql/src/Security/CWE/CWE-193/InvalidPointerDeref.qhelp
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2023-08-22 13:02:37 +01:00
Mathias Vorreiter Pedersen
abe28cb106 Update cpp/ql/src/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2023-08-22 13:02:29 +01:00
Ian Lynagh
c67cc23e07 Kotlin: Write usesK2 information to the database 2023-08-22 12:37:01 +01:00
Tom Hvitved
31738a37ae Merge pull request #14016 from hvitved/csharp/codeql-threads
C#: Respect `$CODEQL_THREADS` environment variable
2023-08-22 13:04:48 +02:00
Maiky
f301e46175 Remove isEmptyPassword predicate 2023-08-22 12:23:32 +02:00
yoff
00c0ebe9e4 Merge pull request #13738 from RasmusWL/path-steps
Python: Include all assignments in data flow paths
2023-08-22 11:58:11 +02:00
Michael Nebel
2b718fbc62 Merge pull request #13995 from michaelnebel/csharp/refactorimports
C#: Re-factor imports.
2023-08-22 11:52:02 +02:00
Tom Hvitved
6bb37ca465 C#: Respect $CODEQL_THREADS environment variable 2023-08-22 11:46:03 +02:00
Michael Nebel
b4c903fd15 C#: tasks.json no longer needed if C# Dev kit is installed. 2023-08-22 11:45:53 +02:00
Michael Nebel
8441b54bd8 C#: Set the extractor solution file as the default solution for the C# Dev Kit and add config for the Format usings plugin. 2023-08-22 11:35:47 +02:00
Michael Nebel
e9b1c933ed C#: Recommend the C# Dev Kit and C# Format usings plugins. 2023-08-22 11:34:50 +02:00
Tom Hvitved
5192d7c137 Merge pull request #13997 from hvitved/ruby/type-tracking-splats
Ruby: Include more (hash) splat flow in type tracking
2023-08-22 11:33:39 +02:00
Tom Hvitved
3f54ecbcc2 Update ruby/ql/lib/codeql/ruby/typetracking/TypeTrackerSpecific.qll
Co-authored-by: Harry Maclean <hmac@github.com>
2023-08-22 11:18:12 +02:00
Alex Denisov
5cce37baa9 Swift: update test expectations 2023-08-22 11:11:28 +02:00
Alex Denisov
48607e3ad7 Swift: address code review comments 2023-08-22 10:01:16 +02:00
AlexDenisov
b98a966729 Apply suggestions from code review
Co-authored-by: Paolo Tranquilli <redsun82@github.com>
2023-08-22 09:57:25 +02:00
Anders Starcke Henriksen
3b8b33a94d Released pack. 2023-08-22 09:45:52 +02:00
Anders Starcke Henriksen
3aeacf6df3 Update publish script to have right path. 2023-08-22 09:37:31 +02:00
Anders Schack-Mulligen
bdc5f9cdea Merge pull request #14012 from knewbury01/knewbury01/add-sanitizer-command-query
Java: add sanitizer to command injection query
2023-08-22 08:40:49 +02:00
Michael Nebel
ce6fd8ac5f Merge pull request #13432 from michaelnebel/updateissupported
Java/C#: Update telemetry queries to report callables with sink/source neutrals as being supported.
2023-08-22 08:39:38 +02:00
Sid Shankar
a9ea61f0b2 Merge pull request #14001 from github/sidshank/clarify-js-and-ts-requirements
Clarify system requirements for TypeScript extraction
2023-08-21 20:59:11 -04:00
Robert Marsh
a335ece5e5 Swift: change note for keypath optional flows 2023-08-21 20:11:37 +00:00
Robert Marsh
1634fa2e25 Swift: support for optional chaining in keypaths 2023-08-21 20:09:28 +00:00
Robert Marsh
81bf415b50 Swift: modify test so implicit read isn't needed at sink 2023-08-21 20:08:30 +00:00
Robert Marsh
246d5c530e Swift: flow through keypath force components 2023-08-21 19:07:40 +00:00
Geoffrey White
f7776f812c Swift: 'good enough' fix for UnsafeJsEval flow. 2023-08-21 18:30:30 +01:00
Henry Mercer
5a76b9f59e Merge pull request #14010 from github/henrymercer/cs/add-alias
C#: Add "c#" alias to language pack
2023-08-21 18:26:54 +01:00
Geoffrey White
317757b7ae Swift: Create proper models for JavaScriptCore. 2023-08-21 18:24:26 +01:00
Kristen Newbury
5e01e1d464 Java: add sanitizer to command injection query 2023-08-21 12:33:05 -04:00
Mathias Vorreiter Pedersen
e1ed49f3ac Merge pull request #14011 from github/revert-13991-redsun82/swift-use-concepts
Revert "Swift: use C++20 constraints and concepts to simplify code"
2023-08-21 17:21:42 +01:00
Paolo Tranquilli
1daedd9fb6 Revert "Swift: use C++20 constraints and concepts to simplify code" 2023-08-21 17:40:15 +02:00
Henry Mercer
cbce0736c2 C#: Add "c#" alias to language pack
This will allow users to reference the C# extractor using
`--language c#` in future versions of the CLI.
2023-08-21 16:27:39 +01:00
Harry Maclean
414ae76ae1 Ruby: Add another splat flow test 2023-08-21 16:21:55 +01:00
Harry Maclean
c615f183c1 Ruby: Add test for spurious splat flow
We don't yet properly model splat flow when a positional argument
follows a splat argument.
2023-08-21 16:11:10 +01:00
Tamas Vajk
2575db356d Improve code quality: fix review findings 2023-08-21 16:07:56 +02:00
Paolo Tranquilli
6d85d0d0f7 Merge pull request #13991 from github/redsun82/swift-use-concepts
Swift: use C++20 constraints and concepts to simplify code
2023-08-21 15:45:44 +02:00
Mathias Vorreiter Pedersen
ef9d342a99 C++: Accept more test changes. 2023-08-21 14:02:18 +01:00
Mathias Vorreiter Pedersen
c46f9e4572 C++: Don't consider additional loads when reusing dataflow operands. 2023-08-21 12:51:41 +01:00
Mathias Vorreiter Pedersen
50190efe1c C++: Don't limit instruction and operand reuse to those cases where we have a result for 'isUseImpl'. 2023-08-21 12:51:00 +01:00
Tom Hvitved
12d1d04592 Merge pull request #13983 from hvitved/dataflow/reduced-dispatch-early-join
Data flow: Earlier call-context based dispatch filtering
2023-08-21 13:20:08 +02:00
Tom Hvitved
1b4520b058 Data flow: Update QL doc 2023-08-21 12:56:37 +02:00
Sid Shankar
671eb0f82f Updates requirements for TypeScript only
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-08-21 06:51:30 -04:00
Jeroen Ketema
2d0f73d7c2 Merge pull request #13881 from jketema/shared-taint-tracking
Introduce shared taint tracking library
2023-08-21 12:45:49 +02:00
Geoffrey White
6ef6be7291 Swift: UnsafeJSEval regression. 2023-08-21 11:28:48 +01:00
Geoffrey White
997984c529 Swift: Minor test .expected changes. 2023-08-21 11:15:43 +01:00
Geoffrey White
a54747f850 Swift: Fix mysterious taint flow issue. 2023-08-21 11:06:04 +01:00
Rasmus Wriedt Larsen
c8c69aac9b Merge pull request #13561 from amammad/amammad-python-WebAppsConstatntSecretKeys
Python: Flask & Django Constant Secret Key initialization
2023-08-21 11:39:19 +02:00
Mathias Vorreiter Pedersen
e776178be5 C++: Add some whitespace to make stuff appear in the diff. 2023-08-21 10:23:41 +01:00
Mathias Vorreiter Pedersen
0a41acc0a6 C++: Add change note. 2023-08-21 10:23:41 +01:00
Mathias Vorreiter Pedersen
70fdfc2ae3 C++: Set precision to medium and add security severity. 2023-08-21 10:23:23 +01:00
Mathias Vorreiter Pedersen
4daabdae2b C++: Promote 'cpp/invalid-pointer-deref' out of experimental. 2023-08-21 10:23:22 +01:00
Geoffrey White
b4db68af80 Swift: Add content to the string models. 2023-08-21 10:16:40 +01:00
Geoffrey White
a6f29fa417 Swift: Address pointer/pointee conflation in the string tests themselves. 2023-08-21 10:16:39 +01:00
Tamas Vajk
b5cdaa2f94 Fix compile issues after rebase 2023-08-21 10:43:36 +02:00
Tamas Vajk
62666915b4 Adjust integration test to opt into cshtml extraction 2023-08-21 10:38:22 +02:00
Tamas Vajk
84a78e7a8d Add opt-in environment variable for cshtml generation 2023-08-21 10:38:22 +02:00
Tamas Vajk
ba0cc76da1 Minor cleanup of dotnet CLI invocations 2023-08-21 10:38:22 +02:00
Tamas Vajk
ad3cc8e1c7 Change backslash to forward slash in file paths in the analyzer config file 2023-08-21 10:38:22 +02:00
Tamas Vajk
c2eb2e9c69 Add more logging 2023-08-21 10:38:22 +02:00
Tamas Vajk
a644133d8f Write CSC arguments to file and pass that to the execution 2023-08-21 10:38:22 +02:00
Michael Nebel
166633dac0 C#: Only apply Path.combine to OS agnostic parts of the path. 2023-08-21 10:38:21 +02:00
Michael Nebel
d48ab36273 C#: Run dotnet exec command silently. 2023-08-21 10:38:21 +02:00
Tamas Vajk
d391246f27 C#: Generate source files from .cshtml files in standalone 2023-08-21 10:38:21 +02:00
Tamas Vajk
ba0f07b66c C#: Add integration test for cshtml extraction in standalone mode 2023-08-21 10:38:21 +02:00
Tamas Vajk
af1a0b9a6c C#: Include cshtml files in integration test results 2023-08-21 10:38:21 +02:00
Jeroen Ketema
a2bb7dee18 Java: Delete copy of shared taint tracking library 2023-08-21 10:32:28 +02:00
Michael Nebel
51f166d71e Java: Address review comments. 2023-08-21 10:22:28 +02:00
Paolo Tranquilli
bda516e9ea C++: tweak dispatcher clauses 2023-08-21 10:01:45 +02:00
Michael Nebel
106ba11e10 Address review comments. 2023-08-21 09:59:02 +02:00
Michael Nebel
d66fe08661 Add QLDoc for the getKind predicate. 2023-08-21 09:59:02 +02:00
Michael Nebel
a9f7994b7d Swift: Sync files and make manual changes. 2023-08-21 09:59:01 +02:00
Michael Nebel
4c06fbdc65 Ruby: Sync files and make manual changes. 2023-08-21 09:59:01 +02:00
Michael Nebel
42c7006378 Python: Sync files and make manual changes. 2023-08-21 09:59:01 +02:00
Michael Nebel
25cc561e50 Go: Sync files and make manual adjustments. 2023-08-21 09:59:01 +02:00
Michael Nebel
764581cc3e C#: Update FlowSummaries expected output. 2023-08-21 09:59:01 +02:00
Michael Nebel
807faf2c70 C#: Only include Neutral summary callables in the FlowSummaries test case. 2023-08-21 09:59:01 +02:00
Michael Nebel
6840a6dafe C#: Re-factor NeutralCallable to include all neutrals and introduce NeutralSummaryCallable. Also include printing of the neutral kind in FlowSummaries testcase. 2023-08-21 09:59:00 +02:00
Michael Nebel
8b5b153a21 C#: Update outdated comments in supported external APIs test case file. 2023-08-21 09:59:00 +02:00
Michael Nebel
699ed107f3 Java: Update SupportedExternalApis expected test output. 2023-08-21 09:59:00 +02:00
Michael Nebel
5623ccf4a0 Java: Re-factor NeutralCallable to include all neutrals and introduce NeutralSummaryCallable. 2023-08-21 09:59:00 +02:00
Michael Nebel
6deeb36a97 Java: Update the comments in SupportedExternalApis to include the neutral kind and add a sink neutral example. 2023-08-21 09:58:59 +02:00
Michael Nebel
864f60f90f C#: Re-arrange using statements. 2023-08-21 09:41:28 +02:00
Tony Torralba
71a36fcf0f Merge pull request #14003 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-08-21 09:28:05 +02:00
Michael Nebel
034db52c5c Merge pull request #13986 from michaelnebel/csharp/refactordepencyfetching
C#: Re-factor dependency fetching into a separate project.
2023-08-21 09:24:58 +02:00
Michael Nebel
4fb73ea191 C#: Address review comments. 2023-08-21 08:53:17 +02:00
Michael Nebel
1de86b4313 C#: Address review comments. 2023-08-21 07:37:27 +02:00
github-actions[bot]
181b3d0e33 Add changed framework coverage reports 2023-08-21 00:14:44 +00:00
Sid Shankar
79ab27bfed Clarifies JS and TS system requirements 2023-08-18 15:50:00 -04:00
Dave Bartolomeo
9798fcddfa Merge pull request #13998 from github/release-prep/2.14.3
Release preparation for version 2.14.3
2023-08-18 14:59:47 -04:00
github-actions[bot]
098dfb4242 Release preparation for version 2.14.3 2023-08-18 14:48:15 +00:00
Edward Minnix III
d109637e2d Merge pull request #13413 from egregius313/egregius313/trust-boundary
Java: Trust Boundary Violation Query
2023-08-18 10:33:32 -04:00
Michael B. Gale
a1c9deea61 Merge pull request #13867 from github/mbg/go/1.21-support
Go: Basic Go 1.21 support
2023-08-18 14:37:11 +01:00
Paolo Tranquilli
b78f12481f Swift: tweak priority of location information sources 2023-08-18 15:18:48 +02:00
Jeroen Ketema
1643a83678 Merge pull request #13996 from jbj/accept-BadlyBoundedWrite
C++: Accept regression in test after evaluator fix
2023-08-18 14:28:46 +02:00
Alex Denisov
7e36f7dcaf Swift: fix autobuilder crash 2023-08-18 14:26:16 +02:00
Paolo Tranquilli
386dedb9df Swift: fix location extractor hitting swift assertion 2023-08-18 14:21:30 +02:00
Tom Hvitved
deaa37d9d3 Ruby: Include more (hash)splat flow in type tracking 2023-08-18 14:07:12 +02:00
Paolo Tranquilli
c17a582b34 Revert "Swift: upgrade clang-formatting to 15.0.7"
This reverts commit 970b3d06be.
2023-08-18 13:59:41 +02:00
Tom Hvitved
da05e3e0e8 Ruby: Add more type tracking tests 2023-08-18 13:51:29 +02:00
Jonas Jensen
a002f59f58 C++: Undo BadlyBoundedWrite change from #13929
This rolls back the query change, ensuring that there is no need for a
change note.
2023-08-18 13:48:58 +02:00
Jonas Jensen
478a105e21 C++: delete change note
Since the previous commit removed the best evidence we had for the
change described in this note, I'm removing the note for now.
2023-08-18 13:35:32 +02:00
Jonas Jensen
cd1f196848 C++: Accept regression in test after evaluator fix 2023-08-18 13:30:20 +02:00
Alex Denisov
6a5e539833 Swift: update test expectations 2023-08-18 13:18:02 +02:00
Alex Denisov
202a4cd1a2 Swift: teach autobuilder about SPM, CocoaPods, and Carthage 2023-08-18 13:17:57 +02:00
Harry Maclean
0bbda992fb Ruby: Remove isSplatAll arg/parameter position
This is equivalent to isSplat(0).
2023-08-18 12:09:04 +01:00
Harry Maclean
222aa41bbf Merge pull request #13938 from hmac/splat-flow-2
Ruby: More precise flow into splat parameters
2023-08-18 12:07:58 +01:00
Erik Krogh Kristensen
08ef31d452 Merge pull request #13916 from erik-krogh/limit-java-field-reg
Java: limit field flow when tracking regex strings
2023-08-18 12:14:31 +02:00
Michael Nebel
d968a91799 C#: Introduce convenience constructor for the DependencyManager. 2023-08-18 11:49:07 +02:00
Michael Nebel
c0d1179c8a C#: Minimal update of relevant code to minimize project dependencies and hide some implementation details behind interfaces. 2023-08-18 11:42:12 +02:00
Michael Nebel
f47e59dff1 C#: Move dependency related files into a new project. 2023-08-18 11:42:12 +02:00
Michael Nebel
b48567f6a5 C#: Add shared dependency fetching project. 2023-08-18 11:42:12 +02:00
Michael Nebel
15dd130d31 C#: Remove unused parameter in DownloadMissingPackages. 2023-08-18 11:42:11 +02:00
Rasmus Wriedt Larsen
b579ab0694 Python: Accept .expected change 2023-08-18 11:12:55 +02:00
Tom Hvitved
81ed72c96a Data flow: Revert join order changes 2023-08-18 10:49:33 +02:00
Stephan Brandauer
480e3bf506 Java: update model exclusions logic to cope with new automodel test location 2023-08-18 10:28:51 +02:00
Rasmus Wriedt Larsen
38577e6a5c Python: Remove duplicated SSTI tests
Besides the Cheetah tests, which were missing from the query tests.
2023-08-18 10:20:16 +02:00
Rasmus Wriedt Larsen
33f8998c2e Python: Minor fix in test 2023-08-18 10:19:44 +02:00
Paolo Tranquilli
3c4e755233 Swift: fix macOS not having std::ranges::sized_range 2023-08-18 10:18:53 +02:00
Rasmus Wriedt Larsen
843f2681bb Python: Apply suggestions from code review
Co-authored-by: yoff <lerchedahl@gmail.com>
2023-08-18 10:09:45 +02:00
Paolo Tranquilli
8b3e32fa97 Swift: add missing include 2023-08-18 09:10:44 +02:00
Paolo Tranquilli
53ed39065c Swift: tweak location extractor using new concept 2023-08-18 06:45:11 +02:00
Paolo Tranquilli
eb8997dc7a Swift: fix print_unextracted 2023-08-18 06:44:42 +02:00
Tom Hvitved
4d951d8df1 Address review comments 2023-08-17 21:04:58 +02:00
Geoffrey White
86a73fa0e7 Swift: Accept fixed spurious test results. 2023-08-17 19:41:21 +01:00
Geoffrey White
0fd4f6180f Swift: Allow subscript content reads from collections. 2023-08-17 19:37:55 +01:00
Geoffrey White
1ac9d2c618 Swift: Update models with CollectionElement, value flow. 2023-08-17 18:49:19 +01:00
Michael B. Gale
9082fd218e Add taint flow tests for clear 2023-08-17 18:39:32 +01:00
Edward Minnix III
8d88af1af0 Apply docs review suggestions
Co-authored-by: Sam Browning <106113886+sabrowning1@users.noreply.github.com>
2023-08-17 13:05:38 -04:00
Ed Minnix
4eb1035dfe Documentation fixes 2023-08-17 13:05:38 -04:00
Ed Minnix
655a98452a Remove escapeHTML models 2023-08-17 13:05:37 -04:00
Ed Minnix
f53496b2a7 Added documentation for trust-boundary-violation sink 2023-08-17 13:05:37 -04:00
Ed Minnix
d468ea9e90 Add default sanitizers 2023-08-17 13:05:37 -04:00
Ed Minnix
b305962c9a Use more appropriate description 2023-08-17 13:05:37 -04:00
Ed Minnix
a36c12ff1f Add trust-boundary-violation sink kind 2023-08-17 13:05:37 -04:00
Ed Minnix
60642c52aa Use non-extending subtype 2023-08-17 13:05:37 -04:00
Ed Minnix
e22a67e7fe Remove unnecessary methods 2023-08-17 13:05:37 -04:00
Ed Minnix
a3a4c31911 Replace servlet source node with RemoteFlowSource 2023-08-17 13:05:37 -04:00
Edward Minnix III
929090a847 Typos and style fixes
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-08-17 13:05:37 -04:00
Ed Minnix
52ebf9fff6 Java: Add trust boundary change note 2023-08-17 13:05:37 -04:00
Ed Minnix
172b8a6967 Documentation fixes 2023-08-17 13:05:37 -04:00
Ed Minnix
b567ec875a Documentation 2023-08-17 13:05:37 -04:00
Ed Minnix
55fae2daaa Added ESAPI sanitizer 2023-08-17 13:05:37 -04:00
Ed Minnix
97d6e82869 Stubs for org.owasp.esapi 2023-08-17 13:05:37 -04:00
Ed Minnix
f58590c6a9 Trust Boundary Work 2023-08-17 13:05:37 -04:00
Ed Minnix
2aba425464 TrustBoundary test ql file 2023-08-17 13:05:36 -04:00
Ed Minnix
ab9f0240d3 Add taint steps for HTML encoding methods 2023-08-17 13:05:36 -04:00
Ed Minnix
b9f2da7875 Comments and import fixes 2023-08-17 13:05:36 -04:00
Ed Minnix
3e7444cd66 Style fixes 2023-08-17 13:05:36 -04:00
Ed Minnix
15370506b8 Add missing security severity 2023-08-17 13:05:36 -04:00
Ed Minnix
a8b7e70d01 Convert trust boundary models to MaD 2023-08-17 13:05:36 -04:00
Ed Minnix
76438f13b6 Trust Boundary Query 2023-08-17 13:05:36 -04:00
Edward Minnix III
41a527cf72 Merge pull request #13934 from egregius313/egregius313/add-dashes-to-sha-algorithms
Java: Add dashes to SHA algorithm names in `Encryption.qll`
2023-08-17 13:03:15 -04:00
Michael B. Gale
109b96f038 Add comment explaining TaintStep test 2023-08-17 17:50:41 +01:00
Michael B. Gale
e65269be69 Add DefaultTaintSanitizer for clear 2023-08-17 17:49:46 +01:00
Geoffrey White
59e2b0482c Merge branch 'main' into closuremodels 2023-08-17 17:16:44 +01:00
Paolo Tranquilli
3de7b75853 Swift: remove uneeded include 2023-08-17 17:36:36 +02:00
Paolo Tranquilli
970b3d06be Swift: upgrade clang-formatting to 15.0.7 2023-08-17 17:24:42 +02:00
Paolo Tranquilli
7c764f3b50 Swift: use C++20 constraints and concepts to simplify code
This simplifies several instances of metaprogramming by leveraging
[constraints and concepts from C++20][1]. This:
* gets rid of `std::enable_if` by usage of `requires`, making it more
  readable and yield better compiler messages.
* uses `requires` instead of `static_assert` to enforce `TrapLabel`
  typing
* simplifies all compile-time tests for validity of a given expression
* uses some standard library concepts where possible
* generalizes and simplifies `SwiftLocationExtractor`

Notice that in order to use the `std::derived_from` concept, `virtual`
inheritance had to be added to the label tags, because diamond
inheritance is a problem otherwise. That's because
`std::derived_from<T, U>` requires that `T*` be convertible to `U*`,
which is false if there are multiple non-virtual inheritance paths from
`U` to `T`. As tags never get actually instantiated, there is no runtime
performance penalty in using `virtual` inheritance.

[1]: https://en.cppreference.com/w/cpp/language/constraints
2023-08-17 17:24:42 +02:00
Rasmus Wriedt Larsen
cf54d3f4ca Python: Move paramiko tests to own folder 2023-08-17 15:45:28 +02:00
Rasmus Wriedt Larsen
4c693b4fc3 Python: Port py/xslt-injection to new data-flow 2023-08-17 15:45:07 +02:00
Rasmus Wriedt Larsen
ef139f2ee9 Python: Delete XsltSinks.ql test 2023-08-17 15:45:07 +02:00
Rasmus Wriedt Larsen
779fe6498c Python: Rename to XsltInjection.ql 2023-08-17 15:45:07 +02:00
Rasmus Wriedt Larsen
0336c76871 Python: Rename template injection tests 2023-08-17 15:45:04 +02:00
Rasmus Wriedt Larsen
91edde72c4 Python: Port py/template-injection to new data-flow
I kept all the modeling in _one_ file, since that makes it easy to work
with such an external contribution... and I would certainly propose this
file setup for the future 👍
2023-08-17 15:44:26 +02:00
Paolo Tranquilli
700f383bab Merge pull request #13988 from github/redsun82/swift-version-macro
Swift: fix version check macro to be lexicographic
2023-08-17 15:34:04 +02:00
Anders Schack-Mulligen
e27aad9d6c Merge pull request #13987 from aschackmull/java/rangeanalysis-joinorder-fix
Java: Join-order fix in RangeAnalysis.
2023-08-17 14:47:26 +02:00
Mathias Vorreiter Pedersen
af7fe89c5a Merge pull request #13989 from MathiasVP/add-invalid-ptr-false-positive-3
C++: Add `cpp/invalid-pointer-deref` false positive
2023-08-17 12:50:55 +01:00
Mathias Vorreiter Pedersen
5f5a87e2c7 C++: Add false positive. 2023-08-17 12:13:16 +01:00
Paolo Tranquilli
75cc1d8f75 Swift: fix version check macro to be lexicographic 2023-08-17 12:19:28 +02:00
Anders Schack-Mulligen
f8a0b6cd22 Java: Add nomagic 2023-08-17 11:20:02 +02:00
Anders Starcke Henriksen
1b31c4dd4c Update filter to point to right pack. 2023-08-17 11:07:27 +02:00
Anders Schack-Mulligen
0afda68ba1 Java: Join-order fix in RangeAnalysis. 2023-08-17 11:07:24 +02:00
Rasmus Wriedt Larsen
4277be5819 Python: Add change-note 2023-08-17 10:46:36 +02:00
Tom Hvitved
7cc01ea8b5 Merge pull request #13595 from hvitved/csharp/use-shared-cfg-pack
C#: Adopt shared CFG construction library from shared `controlflow` pack
2023-08-17 10:37:09 +02:00
Rasmus Wriedt Larsen
24f9f13790 Python: Fix tests 2023-08-17 10:15:36 +02:00
Anders Starcke Henriksen
56871c77f5 Merge branch 'main' into starcke/automodel-pack 2023-08-17 10:04:44 +02:00
Tony Torralba
67c557115b Merge pull request #13915 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-08-17 10:03:04 +02:00
Tom Hvitved
fe0f766994 Merge pull request #13966 from hvitved/csharp/mad-repr-fix
C#: Fix `getMadRepresentationSpecific`
2023-08-17 09:40:41 +02:00
Tom Hvitved
da8005dbd3 Code review suggestions 2023-08-17 09:26:58 +02:00
github-actions[bot]
b0da1ef892 Add changed framework coverage reports 2023-08-17 00:14:13 +00:00
Jeroen Ketema
33e8310625 Merge branch 'main' into shared-taint-tracking 2023-08-17 00:14:25 +02:00
Ian Lynagh
1fb4e13e0a Merge pull request #13960 from igfoo/igfoo/parent
Kotlin: Handle Kotlin 2 parents better
2023-08-16 16:27:15 +01:00
Mathias Vorreiter Pedersen
e56cd0b498 Merge pull request #13984 from MathiasVP/fix-expected-for-swift
Swift: Fix expected files after a semantic merge conflict
2023-08-16 15:06:27 +01:00
Maiky
5f502ec6bb rename change-note 2023-08-16 15:32:53 +02:00
yoff
7f2f6f14e7 Merge pull request #13729 from yoff/python/model-aws-lambdas
Python/JavaScript: Shared module for serverless functions
2023-08-16 15:14:08 +02:00
Rasmus Wriedt Larsen
0443057608 Merge branch 'main' into amammad-python-WebAppsConstatntSecretKeys 2023-08-16 15:06:08 +02:00
Mathias Vorreiter Pedersen
b2c7c57815 Swift: Fix expected files after a semantic merge conflict. 2023-08-16 13:52:06 +01:00
Mathias Vorreiter Pedersen
66d13dc0d5 Merge pull request #13981 from MathiasVP/fix-orig-delta-for-subtraction
C++: Fix original delta calculation for subtraction in new range analysis
2023-08-16 13:28:21 +01:00
Tom Hvitved
570654d1f0 Data flow: Earlier call-context based dispatch filtering 2023-08-16 14:24:45 +02:00
Mathias Vorreiter Pedersen
20df63f26d C++: Respond to review comments. 2023-08-16 12:50:41 +01:00
Jeroen Ketema
591565a0db Merge pull request #13971 from jketema/float
C++: Update test after float128 related extractor changes
2023-08-16 13:11:35 +02:00
Mathias Vorreiter Pedersen
5e14b5cca7 C++: 'origDelta' should always be 'odLeft' when deriving subtraction ranges. 2023-08-16 12:10:31 +01:00
yoff
b2988e5516 Update python/ql/lib/change-notes/2023-08-07-serverless-sources.md
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-08-16 12:56:39 +02:00
Mathias Vorreiter Pedersen
986aa74db7 Merge pull request #13972 from MathiasVP/range-analysis-for-sub-expr
C++: Support subtraction in the new range analysis
2023-08-16 11:51:11 +01:00
Michael B. Gale
1bd536dd9e Rename getLocation to hasLocation 2023-08-16 11:21:35 +01:00
Rasmus Wriedt Larsen
c55b0982f7 Merge pull request #13819 from yoff/python/relax-module-resolution
Python: Relax module resolution
2023-08-16 12:04:49 +02:00
Michael Nebel
365b10183f Merge pull request #13744 from tamasvajk/standalone/integration-test
C#: Add integration test for standalone extraction
2023-08-16 10:50:12 +02:00
Stephan Brandauer
44a9cf93e0 Merge branch 'main' into kaeluka/add-provenance-to-metadata 2023-08-16 09:31:03 +02:00
Stephan Brandauer
808dc3e8d3 Java: Automodel framework mode: track exact ai- provenance in alreadyAiModeled meta data property 2023-08-16 09:25:03 +02:00
Stephan Brandauer
20254c3d0a Merge pull request #13886 from github/kaeluka/java-automodel-variadic-args
Java: automodel application mode: use endpoint class like in framework mode
2023-08-16 08:49:01 +02:00
Ed Minnix
cafd08521e Add change note 2023-08-15 23:46:12 -04:00
Ed Minnix
7cfe78a52d Add dashes to SHA algorithm names in Encryption.qll 2023-08-15 23:42:17 -04:00
Jeroen Ketema
4ada83c0ba C++: Update test after float128 related extractor changes 2023-08-15 22:10:05 +02:00
Rasmus Lerchedahl Petersen
6614e037ae Python: format 2023-08-15 21:40:20 +02:00
Michael B. Gale
c981fd714e Exclude String from TaintSteps
For `os.dirEntry` and `os.unixDirent` which are only available
on unix and Windows respectively.
2023-08-15 20:32:41 +01:00
Michael B. Gale
ee58dbc6f7 Add new built-ins to builtinFunction predicate
- `clear` isn't pure because it modifies a data structure in place
- `clear` may not be used correctly, but this is determined statically
2023-08-15 20:16:42 +01:00
Chris Smowton
b8372c2f95 Merge pull request #13973 from github/smowton/fix/go-version-comparison
Go: Don't warn when Go version exactly matches go.mod
2023-08-15 18:21:04 +01:00
Mathias Vorreiter Pedersen
49a5a39395 C++: Accept test changes. 2023-08-15 16:49:58 +01:00
Chris Smowton
3bcfbcdf68 Don't warn when Go version exactly matches go.mod
We had only previously tested this with e.g. installed go 1.20.5 >= go.mod request `go 1.20`; now we have go 1.21.0 which shouldn't elicit a warning because 1.21.0 is equal to the go.mod request `go 1.21`.
2023-08-15 16:49:42 +01:00
Paolo Tranquilli
234763efa6 Merge pull request #13959 from github/redsun82/cmake-fix
C++: make cmake generation work with internal rule `cc_binary_add_features`
2023-08-15 17:16:51 +02:00
Robert Marsh
3d20897725 Merge pull request #13910 from rdmarsh2/rdmarsh2/swift/for-await-cfg
Swift: CFG test for for-try-await
2023-08-15 11:16:07 -04:00
Mathias Vorreiter Pedersen
e145b81f58 C++: Accept test changes. 2023-08-15 16:12:44 +01:00
Mathias Vorreiter Pedersen
109e45e112 C++: Add precise range analysis for subtraction. 2023-08-15 16:12:40 +01:00
Mathias Vorreiter Pedersen
3fb024164b C++: Add a FP caused by bad range analysis for subtraction. 2023-08-15 16:00:35 +01:00
Mathias Vorreiter Pedersen
90888e592f Merge pull request #13965 from MathiasVP/better-certain-writes-and-invalid-ptr-deref-prep
C++: Remove more dataflow FPs after frontend upgrade
2023-08-15 15:43:55 +01:00
yoff
7eb41140ab Update python/ql/lib/semmle/python/Module.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-08-15 15:47:00 +02:00
Rasmus Lerchedahl Petersen
e6943ce98e Python: use standard test format 2023-08-15 15:26:18 +02:00
Michael B. Gale
b95effe916 Allow patch-level updates in Go CI 2023-08-15 14:13:36 +01:00
yoff
99bc050366 Update shared/yaml/codeql/serverless/ServerLess.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-08-15 15:09:30 +02:00
Kasper Svendsen
bb317bc558 Merge pull request #13968 from kaspersv/shadow-dbscheme
QL language specs: declarations can shadow dbscheme types and preds
2023-08-15 14:20:04 +02:00
Kasper Svendsen
30a813ab08 QL language specs: declarations can shadow dbscheme types and preds 2023-08-15 13:58:19 +02:00
Ian Lynagh
3b9bd16097 Kotlin: Mark some functions as private 2023-08-15 12:38:47 +01:00
Tom Hvitved
26b76171ca C#: Fix getMadRepresentationSpecific 2023-08-15 13:23:21 +02:00
Ian Lynagh
a8b69e5b55 Kotlin: Fix build on old versions 2023-08-15 11:30:23 +01:00
Mathias Vorreiter Pedersen
569f3c9b78 C++: Don't do indirect (instruction -> operand) flow when there's a store to the address in between the instruction and the operand. 2023-08-15 11:08:01 +01:00
Mathias Vorreiter Pedersen
f662cceb0b C++: Use value numbering to better detect whether a write is certain. 2023-08-15 11:07:14 +01:00
Rasmus Lerchedahl Petersen
8f70c9f950 Python: add comment about namespace packages 2023-08-15 12:02:02 +02:00
Tom Hvitved
44b734e120 Merge pull request #13955 from hvitved/ruby/type-tracking-capture-insensitive
Ruby: Make type tracking flow-insensitive for captured variables
2023-08-15 11:42:41 +02:00
Paolo Tranquilli
8e229ac31b Merge branch 'main' into redsun82/cmake-fix 2023-08-15 11:38:37 +02:00
Erik Krogh Kristensen
6a3b9e10eb Merge pull request #13914 from erik-krogh/escape-unicode
ReDoS: escape unicode chars in the output for the ReDoS queries
2023-08-15 11:21:21 +02:00
Mathias Vorreiter Pedersen
fec9626fe7 Merge pull request #13836 from github/alexdenisov/unresolved-dot-exprs
Swift: 'ParsedSequence' lacks proper types and yields 'Unresolved' AST nodes
2023-08-15 09:14:39 +01:00
Michael Nebel
a95aad51bd Merge pull request #13546 from michaelnebel/java/withoutelement
Java: Support for With[out]Element for MaD.
2023-08-15 10:03:03 +02:00
Rasmus Wriedt Larsen
d12743d7c3 Merge pull request #13941 from yoff/python/test-nice-location
Python: fix nice locations for import aliases
2023-08-14 21:37:23 +02:00
Tom Hvitved
061575ff77 Merge pull request #13937 from hvitved/ruby/for-loop-desugar
Ruby: Improve desugaring of `for` loops
2023-08-14 20:12:12 +02:00
Ian Lynagh
eb27428514 Kotlin: Handle IrExternalPackageFragment when dealing with external decls 2023-08-14 17:37:48 +01:00
Arthur Baars
77db0cf547 Merge pull request #13334 from aibaars/print-cfg-2
Ruby: printCfg: only show graph for selected CfgScope
2023-08-14 18:24:20 +02:00
Ian Lynagh
72af8ac1e2 Kotlin: Switch to useDeclarationParentOf
This lets us handle Kotlin 2 declarations whose parent is an
IrExternalPackageFragment, indicating that they are in a (multi)file
class.
2023-08-14 17:02:49 +01:00
Ian Lynagh
4f336820de Kotlin: Start handling IrExternalPackageFragment parents 2023-08-14 17:02:48 +01:00
Paolo Tranquilli
ef804c018d C++: make cmake generation work with internal rule cc_binary_add_features 2023-08-14 17:32:03 +02:00
Ian Lynagh
77451de9a3 Kotlin: Fix isExternalDeclaration for Kotlin 2 2023-08-14 15:01:13 +01:00
amammad
eb5529eac5 sanitize resutls exist in test/demo/example/sample directories 2023-08-14 23:48:03 +10:00
Mathias Vorreiter Pedersen
9359bea7b5 Merge pull request #13725 from MathiasVP/fix-barriers-in-invalid-pointer-deref
C++: Fix barriers in invalid pointer deref
2023-08-14 14:29:12 +01:00
Geoffrey White
5e940cd46f Merge pull request #13829 from geoffw0/typegetname
Swift: Correct the behaviour of Type.getName
2023-08-14 14:21:26 +01:00
Tom Hvitved
e96cbeb00a Ruby: Adjust locations of synthesized nodes 2023-08-14 14:37:47 +02:00
Tom Hvitved
c084a9b27a Ruby: Make type tracking flow-insensitive for captured variables 2023-08-14 13:44:37 +02:00
Stephan Brandauer
bc55afcee7 Java: Automodel framework mode: use new interface 2023-08-14 13:17:55 +02:00
Harry Maclean
d45e9101ba Ruby: Add change note 2023-08-14 11:20:58 +01:00
Rasmus Wriedt Larsen
1c3cc1fa29 Python: Remove flow through stdlib
This means tests can pass on any machine now 👍
2023-08-14 11:55:22 +02:00
Rasmus Wriedt Larsen
794d04e4c0 Python: Model os.getenv[b] 2023-08-14 11:55:00 +02:00
Michael Nebel
0e9f8c4b97 Merge pull request #13876 from michaelnebel/csharp/aspnetdlls
C#: Include ASP.NET assemblies in the standalone extraction.
2023-08-14 11:53:47 +02:00
Stephan Brandauer
551b34e3be Java: Automodel application mode: include candidates that are useful for regression testing 2023-08-14 11:46:40 +02:00
Rasmus Wriedt Larsen
6e168ff7d8 Python: Only interested in StrConst 2023-08-14 11:46:21 +02:00
Geoffrey White
b6dc2acc71 Merge branch 'main' into typegetname 2023-08-14 10:46:14 +01:00
Mathias Vorreiter Pedersen
e2f671e327 C++: Add more comments. 2023-08-14 10:44:46 +01:00
Rasmus Wriedt Larsen
0fba38c6d8 Merge branch 'main' into amammad-python-WebAppsConstatntSecretKeys 2023-08-14 11:29:56 +02:00
Rasmus Wriedt Larsen
eeefdc5dcd Python: Fix formatting 2023-08-14 11:29:38 +02:00
Michael Nebel
6ecbb400d7 C#: Turn initialize into a readonly field. 2023-08-14 11:19:42 +02:00
Tamas Vajk
01af74aeda C#: Add space to CMD metacharacters 2023-08-14 11:19:17 +02:00
Tamas Vajk
3680681e8b C#: Add integration test for standalone extraction 2023-08-14 11:19:00 +02:00
Michael Nebel
d76bb49b6a C#: Make some FileContent unit tests. 2023-08-14 11:18:19 +02:00
Michael Nebel
a0bad3ce15 C#: Re-factor FileContent to make it unit-testable and make an initializer class. 2023-08-14 11:18:19 +02:00
Michael Nebel
a362ce083d C#: Some file content regexp tweaking. 2023-08-14 11:18:19 +02:00
Michael Nebel
c95d219c84 C#: Re-factor the processing of all files into a helper class and make sure to only do one pass of the files. 2023-08-14 11:18:19 +02:00
Michael Nebel
db685e5fc4 C#: Tidy up. 2023-08-14 11:18:19 +02:00
Michael Nebel
e24fa4705a C#: Introduce caching or detecting the newest runtimes and fetching all file names in the source dir. 2023-08-14 11:18:19 +02:00
Michael Nebel
ddb50b8120 C#: Improve regular expressions and fix lowercase issue. 2023-08-14 11:18:19 +02:00
Michael Nebel
ca7fa2e7c8 C#: Use ASP.NET dlls when needed and available. 2023-08-14 11:18:19 +02:00
Michael Nebel
b71c41018c C#: Re-factor the GetRuntime method. 2023-08-14 11:18:19 +02:00
Michael Nebel
5bc8804242 C#: Introduce method to decide whether we need to include ASP.NET dlls in standalone compilation. 2023-08-14 11:18:19 +02:00
Michael Nebel
88b51e6ad3 C#: Re-factor logic for fetching info from group and remove a redundant continue statement. 2023-08-14 11:18:18 +02:00
Michael Nebel
881d86321e C#: Introduce regex for framework reference and project sdk and make some minor re-writes. 2023-08-14 11:18:18 +02:00
Michael Nebel
f5d776571b Merge pull request #13952 from michaelnebel/csharp/runtimewhitespacefix
C#: .NET Runtime path detection (bugfix).
2023-08-14 11:17:27 +02:00
Mathias Vorreiter Pedersen
df9c756369 C++: Add more comments. 2023-08-14 10:09:27 +01:00
yoff
d2a0b9a66c Update python/ql/lib/change-notes/2023-08-10-fix-alias-locations.md
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-08-14 10:55:00 +02:00
Mathias Vorreiter Pedersen
c265113073 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-08-14 09:51:28 +01:00
Harry Maclean
ca5456a54a Ruby: Remove duplicate disjuncts 2023-08-14 09:45:57 +01:00
Michael Nebel
9e03a211a5 C#: Add unit test where path to dotnet frameworks contain whitespaces. 2023-08-14 10:40:00 +02:00
Michael Nebel
1942ea8396 C#: Paths can contain whitespace (this is indeed common on windows). 2023-08-14 10:40:00 +02:00
Michael Nebel
280a27d9ca C#: Log some more info during dotnet --list-runtimes execution. 2023-08-14 10:40:00 +02:00
Michael Nebel
78c732db97 C#: Re-factor of ProgressMonitor and introduce LogInfo. 2023-08-14 10:40:00 +02:00
Michael Nebel
ef9453e862 C#: Selected runtime location should be logged as information. 2023-08-14 10:40:00 +02:00
yoff
307f44339c Update python/ql/lib/change-notes/2023-08-08-relax-module-resolution.md
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-08-14 10:23:47 +02:00
Stephan Brandauer
1a95a34441 Java: automodel: use the call for call context, rather than the argument 2023-08-14 09:54:44 +02:00
Stephan Brandauer
4107758c8a Java: automodel extraction: add strings to query selection 2023-08-14 09:49:50 +02:00
Mathias Vorreiter Pedersen
2c6bbd8060 C++: Replace 'left' with 'small' and 'right' with 'large' for consistency. 2023-08-13 22:53:41 +01:00
Robert Marsh
7053c62c41 Swift: update and sync tests 2023-08-11 18:52:37 +00:00
Henry Mercer
75e6fd9c8e Merge pull request #13918 from github/post-release-prep/codeql-cli-2.14.2
Post-release preparation for codeql-cli-2.14.2
2023-08-11 16:28:16 +01:00
Mathias Vorreiter Pedersen
efe3c0d34a C++: Rename n' to m. 2023-08-11 15:24:08 +01:00
Harry Maclean
6011d26823 Ruby: Restrict parameter nodes 2023-08-11 15:14:32 +01:00
Tom Hvitved
e39fb093e9 Merge pull request #13945 from hvitved/ruby/destruct-param-test
Ruby: Add test for documenting missing flow through destructured parameters
2023-08-11 15:11:39 +02:00
Mathias Vorreiter Pedersen
f4e6deeee0 C++: Remove 'ValidForStateConfig'. 2023-08-11 13:57:59 +01:00
Henry Mercer
1213eba630 Merge branch 'main' into post-release-prep/codeql-cli-2.14.2 2023-08-11 13:54:55 +01:00
Ian Lynagh
5161cd1a3c Merge pull request #13944 from igfoo/igfoo/getFunctionLabel
Kotlin: Handle null parent IDs in getFunctionLabel correctly
2023-08-11 12:28:32 +01:00
Mathias Vorreiter Pedersen
2164069eda C++: Add another testcase. 2023-08-11 12:00:43 +01:00
Michael B. Gale
513da82510 Model data flow for min and max 2023-08-11 11:51:07 +01:00
Mathias Vorreiter Pedersen
88d3fcb34b C++: Fix comment. 2023-08-11 11:50:50 +01:00
Mathias Vorreiter Pedersen
3d5b1986c9 C++: Fix a bug where 'boundedImpl' could give back multiple deltas. 2023-08-11 11:46:28 +01:00
Mathias Vorreiter Pedersen
c0a54e90c9 C++: Fix an inequality that should be strict, but wasn't. 2023-08-11 11:43:55 +01:00
Michael B. Gale
d189a15737 Exclude poly1305.mac.Write from TaintSteps
Not available on arm64
2023-08-11 11:33:52 +01:00
Tom Hvitved
c95b58673a Merge pull request #13939 from hvitved/ruby/captured-access-fix2
Ruby: Fix another bug in `isCapturedAccess`
2023-08-11 12:28:39 +02:00
Michael B. Gale
9f51f6f7ac Merge pull request #13948 from github/mbg/go/fix-compare-identical-values-arm64
Make `CompareIdenticalValues` test work on arm64
2023-08-11 11:22:49 +01:00
Michael B. Gale
a623733dfa Add location info to TaintSteps query 2023-08-11 11:10:39 +01:00
Michael B. Gale
ee0bfff9f4 Update expected test output for TaintStep 2023-08-11 10:57:11 +01:00
Michael B. Gale
bb56536bfa Update expected test output for LocalTaintStep 2023-08-11 10:57:10 +01:00
Michael B. Gale
14731e8fa3 Bump supported Go version to 1.21 2023-08-11 10:57:10 +01:00
Michael B. Gale
238049a870 Add Go 1.21 builtins 2023-08-11 10:57:10 +01:00
Michael B. Gale
4df4a0f51f Update expected test output for TypeParamType 2023-08-11 10:55:00 +01:00
Michael B. Gale
69589766ec Use Go 1.21 in CI 2023-08-11 10:55:00 +01:00
Michael B. Gale
48c35ce5e9 Use Go 1.21 for extractor 2023-08-11 10:55:00 +01:00
Michael B. Gale
13d4bd9c0a Make CompareIdenticalValues test work on arm64 2023-08-11 10:51:52 +01:00
Owen Mansel-Chan
c10d03e74e Merge pull request #13820 from owen-mc/go/refactor-data-flow-configurations
Go: Make flow configurations use new data flow API
2023-08-11 10:49:51 +01:00
Owen Mansel-Chan
35a300f894 Apply suggestions from code review
Co-authored-by: Michael B. Gale <mbg@github.com>
2023-08-11 10:06:14 +01:00
Owen Mansel-Chan
b7dfa2347c Put QLDoc on data flow and taint tracking modules
We preserve all old QLDocs, but move them from the
config to the Flow module. This makes more sense than
the Config module, which is often private, and is generally
not directly accessed.
2023-08-11 10:06:12 +01:00
Rasmus Wriedt Larsen
ca93f4d223 Python: Accept .expected changes 2023-08-11 10:36:05 +02:00
Stephan Brandauer
a9906f6f7b Java: fix - add extra $@
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-08-11 09:15:09 +02:00
Rasmus Lerchedahl Petersen
3457f23db5 Python: Add change note 2023-08-10 20:53:43 +02:00
Rasmus Lerchedahl Petersen
e5cd3e8f64 Python: nice locations for import aliases
These were computed wrongly before.
2023-08-10 20:27:06 +02:00
Tom Hvitved
b28f60ccd2 Ruby: Add test for documenting missing flow through destructured parameters 2023-08-10 20:22:11 +02:00
Robert Marsh
36bdadfc36 Merge pull request #13933 from geoffw0/madtuples
Swift: Models-as-data support for tuple content
2023-08-10 14:17:45 -04:00
Ian Lynagh
58da62e244 Kotlin: Handle null parent IDs in getFunctionLabel correctly 2023-08-10 18:49:10 +01:00
Erik Krogh Kristensen
3e2c6d69f9 Merge pull request #13940 from erik-krogh/rate-default
JS: change the defaults in the qhelp for missing-rate-limit to something more reasonable
2023-08-10 19:25:33 +02:00
Geoffrey White
94a5aa450c Swift: Edit the weak sensitive data hashing examples and qhelp to encourage use of HMAC and key derivation algorithms where appropriate. 2023-08-10 18:21:25 +01:00
Owen Mansel-Chan
08e1e8a120 Improve inaccurate deprecation comments 2023-08-10 15:50:08 +01:00
Owen Mansel-Chan
94c15f712a Remove unnecessary fieldFlowBranchLimit 2023-08-10 15:50:06 +01:00
Owen Mansel-Chan
0928fa6e1f Give MyFlowstate a less generic name 2023-08-10 15:50:05 +01:00
Owen Mansel-Chan
36b1a0dc54 Update for recent changes to DsnInjection 2023-08-10 15:50:03 +01:00
Owen Mansel-Chan
2578ef4786 Remove output from running query like a test 2023-08-10 15:50:02 +01:00
Owen Mansel-Chan
089ea010d7 Improve QLDoc for Config::FlowState in StringBreak 2023-08-10 15:50:01 +01:00
Owen Mansel-Chan
e33d303b48 Do not make unnecessary changes 2023-08-10 15:49:59 +01:00
Owen Mansel-Chan
e6c8a0b653 Use more descriptive names for merged path graphs 2023-08-10 15:49:58 +01:00
Owen Mansel-Chan
6b4bf12316 Revert edit to deprecated class 2023-08-10 15:49:57 +01:00
Owen Mansel-Chan
039925164d Keep newline at the end of identical-files.json
VS Code's JSON formatter removed it automatically. It turns out
that the easiest way to keep it is to use the
`files.insertFinalNewline` setting, which the JSON formatter obeys.
2023-08-10 15:49:55 +01:00
Owen Mansel-Chan
046e517c3f Remove unnecessary import 2023-08-10 15:49:54 +01:00
Owen Mansel-Chan
81d4149a17 Note deprecation in QLDoc for LogInjection 2023-08-10 15:49:52 +01:00
Owen Mansel-Chan
b6b7e1589c Make taint tracking tests use new API 2023-08-10 15:49:51 +01:00
Owen Mansel-Chan
c11da5bf67 Make taint tracking tests use InlineFlowTest 2023-08-10 15:49:50 +01:00
Owen Mansel-Chan
663fb2cc06 Make taint tracking tests use config from InlineFlowTest 2023-08-10 15:49:48 +01:00
Owen Mansel-Chan
8db3e4a9b4 Make IncorrectIntegerConversion use new API 2023-08-10 15:49:47 +01:00
Owen Mansel-Chan
6c0c8d6963 Make BadRedirectCheck use new API 2023-08-10 15:49:45 +01:00
Owen Mansel-Chan
442dfc1833 Make InsecureTLS use new API 2023-08-10 15:49:44 +01:00
Owen Mansel-Chan
b00e44725c Make CorsMisconfiguration use new API 2023-08-10 15:49:43 +01:00
Owen Mansel-Chan
9b19cde8ab Make SensitiveConditionBypass use new API 2023-08-10 15:49:42 +01:00
Owen Mansel-Chan
2d3d21d074 Make StackTraceExposure use new API 2023-08-10 15:49:40 +01:00
Owen Mansel-Chan
d9844bd4d6 Make WrongUsageOfUnsafe use new API 2023-08-10 15:49:39 +01:00
Owen Mansel-Chan
00ea023fdb Make ConditionalBypass use new API 2023-08-10 15:49:37 +01:00
Owen Mansel-Chan
1b4fef9c21 Make HTMLTemplateEscapingPassthrough use new API
Removed edges and nodes are mostly duplicates. They were only there
originally due to multiple configurations being in scope.
`DataFlow::PathNode` has union semantics for configurations. Nodes are
only generated if they are reachable from a source, but this includes
sources from other configurations.

No alerts are lost.
2023-08-10 15:49:36 +01:00
Owen Mansel-Chan
ea1f39683d Make DivideByZero use new API
The extra nodes in .expected files are due to the changes from
https://github.com/github/codeql/pull/13717, which are not applied to
configuration classes extending DataFlow::Configuration or
TaintTracking::Configuration.
2023-08-10 15:49:35 +01:00
Owen Mansel-Chan
045936b1fd Make PamAuthBypass use new API 2023-08-10 15:49:33 +01:00
Owen Mansel-Chan
cfc4a6a6b7 Make Timing use new API 2023-08-10 15:49:32 +01:00
Owen Mansel-Chan
39762da5e0 Make DsnInjection use new API 2023-08-10 15:49:31 +01:00
Owen Mansel-Chan
a53da376d1 Make LDAPInjection use new API 2023-08-10 15:49:29 +01:00
Owen Mansel-Chan
f60ca76eb2 Make EmailInjection use new API 2023-08-10 15:49:28 +01:00
Owen Mansel-Chan
1962aa3de4 Make SSRF use new API 2023-08-10 15:49:27 +01:00
Owen Mansel-Chan
71735c86c2 Make WeakCryptoAlgorithm use new API 2023-08-10 15:49:25 +01:00
Owen Mansel-Chan
46185e3a02 Make HardcodedKeys use new API 2023-08-10 15:49:24 +01:00
Owen Mansel-Chan
b5ac0c94c6 Make ZipSlip use new API 2023-08-10 15:49:23 +01:00
Owen Mansel-Chan
7341b6156d Make XPathInjection use new API 2023-08-10 15:49:21 +01:00
Owen Mansel-Chan
a6177b3c92 Make UnsafeUnzipSymlink use new API 2023-08-10 15:49:20 +01:00
Owen Mansel-Chan
7db1daba6e Make TaintedPath use new API 2023-08-10 15:49:19 +01:00
Owen Mansel-Chan
6c91f77776 Make StringBreak use new API 2023-08-10 15:49:17 +01:00
Owen Mansel-Chan
30ae34352b Make StoredXss use new API 2023-08-10 15:49:16 +01:00
Owen Mansel-Chan
4334a51cf3 Make StoredCommand use new API 2023-08-10 15:49:15 +01:00
Owen Mansel-Chan
ac1670c0af Make SqlInjection use new API
The extra nodes in .expected files are due to the changes from
https://github.com/github/codeql/pull/13717, which are not applied to
configuration classes extending DataFlow::Configuration or
TaintTracking::Configuration.
2023-08-10 15:49:13 +01:00
Owen Mansel-Chan
646e158813 Make tests use config from InlineFlowTest
For InterProceduralDataFlow, it's hard to get it to use InlineFlowTest
because you need to show both the source and the sink, and there are
problems with quoting when the source is already surrounded by quotes.
2023-08-10 15:49:12 +01:00
Owen Mansel-Chan
81854279bd Make tests use InlineFlowTest 2023-08-10 15:49:11 +01:00
Owen Mansel-Chan
d385113e11 Make InsufficientKeySize use new API 2023-08-10 15:49:09 +01:00
Owen Mansel-Chan
16ef11a3c3 Make ConstantOauth2State use new API
Removed edges were only there originally due to multiple configurations
being in scope. `DataFlow::PathNode` has union semantics for
configurations. Nodes are only generated if they are reachable from a
source, but this includes sources from other configurations.

No alerts are lost.
2023-08-10 15:49:08 +01:00
Owen Mansel-Chan
fbd0c4edd0 Make HostKeyCallbackAssignment use new API 2023-08-10 15:49:07 +01:00
Owen Mansel-Chan
a1a31bfd62 Make SuspiciousCharacterInRegexp use new API 2023-08-10 15:49:05 +01:00
Owen Mansel-Chan
8f644af769 Make MissingRegexpAnchor use new API 2023-08-10 15:49:04 +01:00
Owen Mansel-Chan
442f6875f5 Make IncompleteHostNameRegexp use new API 2023-08-10 15:49:03 +01:00
Owen Mansel-Chan
0e1383ddd7 Make UnhandledFileCloseWritableHandle use new API 2023-08-10 15:49:01 +01:00
Owen Mansel-Chan
00cc78dfe6 Make CookieWithoutHttpOnly use new API
The extra nodes in .expected files are due to the changes from
https://github.com/github/codeql/pull/13717, which are not applied to
configuration classes extending DataFlow::Configuration or
TaintTracking::Configuration.
2023-08-10 15:49:00 +01:00
Owen Mansel-Chan
a7382e06c2 Make ClearTextLogging use new API
The extra nodes in .expected files are due to the changes from
https://github.com/github/codeql/pull/13717, which are not applied to
configuration classes extending DataFlow::Configuration or
TaintTracking::Configuration.
2023-08-10 15:48:59 +01:00
Owen Mansel-Chan
653563fcbc Make StringsNewReplacer use new API
We don't have to keep a deprecated copy as this is private. This allows
us to delete a copy of the DataFlow library!
2023-08-10 15:48:57 +01:00
Owen Mansel-Chan
1f6cdc7eda Make OpenURLRedirect use new API
The extra nodes in .expected files are due to the changes from
https://github.com/github/codeql/pull/13717, which are not applied to
configuration classes extending DataFlow::Configuration or
TaintTracking::Configuration.

Removed nodes and edges were only there originally due to multiple
configurations being in scope. `DataFlow::PathNode` has union semantics
for configurations. Nodes are only generated if they are reachable from
a source, but this includes sources from other configurations.
2023-08-10 15:48:55 +01:00
Owen Mansel-Chan
d2a5d19439 Make SafeUrlFlow use new API 2023-08-10 15:48:54 +01:00
Owen Mansel-Chan
97c32970a0 Make RequestForgery use new API
The extra nodes in .expected files are due to the changes from
https://github.com/github/codeql/pull/13717, which are not applied to
configuration classes extending DataFlow::Configuration or
TaintTracking::Configuration.
2023-08-10 15:48:53 +01:00
Owen Mansel-Chan
1c2536321c Make ReflectedXss use new API 2023-08-10 15:48:51 +01:00
Owen Mansel-Chan
3d9f8d50bc Make InsecureRandomness use new API 2023-08-10 15:48:50 +01:00
Michael B. Gale
87c089e0a8 Make CommandInjection.qll use new API
The new `edges` and `nodes` sections in the .expected files are because
the PathGraph module was not imported in the tests before, and thus
these query predicates were not in scope.
2023-08-10 15:48:48 +01:00
Michael B. Gale
957757c271 Make UntrustedDataToUnknownExternalAPI use new API 2023-08-10 15:48:47 +01:00
Michael B. Gale
d6919dd57b Make UntrustedDataToExternalAPI use new API 2023-08-10 15:48:46 +01:00
Michael B. Gale
82a1b15d11 Make AllocationSizeOverflow use new API
The extra nodes in .expected files are due to the changes from
https://github.com/github/codeql/pull/13717, which are not applied to
configuration classes extending DataFlow::Configuration or
TaintTracking::Configuration.
2023-08-10 15:48:44 +01:00
Tom Hvitved
5a6ce293cc Merge pull request #13942 from hvitved/dataflow/variable-capture-consistency-fix 2023-08-10 16:20:28 +02:00
Tom Hvitved
9b38028e25 Data flow: Fix localWriteStep consistency query 2023-08-10 15:31:04 +02:00
Mathias Vorreiter Pedersen
9aae174942 C++: Move conjunct below comment. 2023-08-10 13:58:07 +01:00
Michael Nebel
f6aca58dbb Merge pull request #13885 from michaelnebel/csharp/linqforeach
C#: LINQ recommendation queries.
2023-08-10 14:55:11 +02:00
Rasmus Lerchedahl Petersen
eac44e89d9 Python: test nice locations
there are errors both on lines 2 and 3 due to
locations being computed wrongly.
2023-08-10 14:21:16 +02:00
Mathias Vorreiter Pedersen
6d949cbd39 C++: Rename 'getAFlowStateForNode' to 'getASizeAddend'. 2023-08-10 13:19:28 +01:00
Mathias Vorreiter Pedersen
a2b8eb924e C++: Remove the '+ 1' in 'getAFlowStateForNode'. 2023-08-10 13:17:47 +01:00
Mathias Vorreiter Pedersen
f9fc79b16f Merge pull request #13930 from geoffw0/uitextinput
Swift: Flow sources for UITextInput
2023-08-10 13:05:47 +01:00
Tom Hvitved
f19232f800 Ruby: Fix another bug in isCapturedAccess 2023-08-10 14:02:58 +02:00
erik-krogh
5ffce86768 change the defaults in the qhelp for missing-rate-limit to something more reasonable 2023-08-10 13:40:17 +02:00
Harry Maclean
b365ff095a Ruby: Fix SynthSplatParameterElementNode
Make this class into a proper subclass of `ParameterNodeImpl`, to
prevent some consistency test failures.
2023-08-10 12:35:12 +01:00
Tom Hvitved
77fca277fe Ruby: Improve desugaring of for loops 2023-08-10 13:22:01 +02:00
Ian Lynagh
f377d25c23 Merge pull request #13919 from igfoo/igfoo/useFunction
Kotlin: useFunction might return null
2023-08-10 12:17:20 +01:00
Tom Hvitved
4e954c29a2 Merge pull request #13936 from hvitved/ruby/captured-access-fix
Ruby: Fix bug in `isCapturedAccess`
2023-08-10 13:15:48 +02:00
Tom Hvitved
b99b6b85ba Merge pull request #13927 from hvitved/csharp/fix-bad-join
C#: Fix bad join order
2023-08-10 13:04:16 +02:00
Harry Maclean
5fff9fa8da More precise flow into splat parameters
We now precisely track flow from positional arguments to splat
parameters, provided that splat arguments are not used and there are no
positional parameters after the splat parameter. For example, in this
case:

    def f(x, y, *z); end

    f(a, b, c, d)

we get flow from `c` to `z[0]` and `d` to `z[1]`.

We get false flow if there are positional parameters after the splat
parameter. For example in this case:

    def g(x, y, *z, w); end

    g(a, b, c, d)

we get flow from `d` to `z[0]` instead of `w`.

We also track flow in this case

    def f(a, *b)
      sink b[0]
    end

    f(1, *[taint, 2])
2023-08-10 12:02:47 +01:00
Harry Maclean
a58aa17c7a Merge pull request #13878 from hmac/splat-flow
Ruby: Track flow from splat arguments to positional parameters
2023-08-10 12:01:38 +01:00
Mathias Vorreiter Pedersen
1455e8bd4c C++: Convert all '<'s to '<='s. 2023-08-10 11:55:57 +01:00
Mathias Vorreiter Pedersen
dcc1429ed8 C++: Get rid of '+ 1' in comments. 2023-08-10 11:38:40 +01:00
Mathias Vorreiter Pedersen
b750016bc1 C++: Fix more comments. 2023-08-10 11:31:30 +01:00
Rasmus Wriedt Larsen
46af77c1af Python: Include all assignments in data flow paths
Like Ruby did in https://github.com/github/codeql/pull/12566
2023-08-10 11:45:29 +02:00
Rasmus Wriedt Larsen
9bd5694c3f Python: Add tests of path-graph for dataflow/taint-tracking
Although this is actually using taint-tracking (so we can use the +=
statement), I would personally forget to check under the
dataflow/tainttracking folder to look for such a test, so I'm opting to
keep it under the dataflow/ folder.
2023-08-10 11:44:17 +02:00
Jeroen Ketema
2e338cc7b4 Merge pull request #13929 from jketema/buffer
C++: Only consider the maximum buffer size for badly bounded write
2023-08-10 10:40:37 +02:00
Tom Hvitved
e40f0a7350 Ruby: Fix bug in isCapturedAccess 2023-08-10 09:37:04 +02:00
Rasmus Lerchedahl Petersen
dbc60140e0 Python: move tests to data extensions
For these tests, we cannot use the same mechanism, as we want the
data extensions to be available for both tests.

Instead, we create a ql-pack for the test directory and point to
the data entensions from there. This makes the extensions
available for all tests in the directory.
2023-08-10 09:17:34 +02:00
Tom Hvitved
e7acf8c3a8 Ruby: Add test 2023-08-10 08:53:00 +02:00
Maiky
97f8d1fca9 add getValue() method 2023-08-10 00:39:35 +02:00
Maiky
e60fa6f1a7 Remove unnecesary } 2023-08-10 00:25:47 +02:00
Maiky
c5c2df4593 fix Singleton set literal 2023-08-10 00:13:02 +02:00
Rasmus Lerchedahl Petersen
168a1e01a4 Python: move test to data extensions
For this test, we can simply use the convention,
that a file called `[ql-file-stem].ext.yml` will be used
as data extensions exactly for the test represented by `ql-file`.
2023-08-09 21:22:17 +02:00
github-actions[bot]
432c21d4fb Post-release preparation for codeql-cli-2.14.2 2023-08-09 18:45:18 +00:00
Mathias Vorreiter Pedersen
ce9b018789 C++: Move bounds checkout out of 'operandGuardChecks' for clarity. 2023-08-09 18:37:17 +01:00
Geoffrey White
c20a17e7b7 Swift: Update the consistency test .expecteted as well. 2023-08-09 15:47:28 +01:00
Rasmus Wriedt Larsen
51a05286fa Merge pull request #13731 from pwntester/py/aiohttp_improvements
Python: Aiohttp improvements
2023-08-09 16:37:20 +02:00
Geoffrey White
23f0dd5542 Swift: Support MAD tuple content flow. 2023-08-09 15:08:11 +01:00
Harry Maclean
b03f6efa60 Ruby: Refactor 2023-08-09 15:01:40 +01:00
Harry Maclean
142393b599 Ruby: Handle unknown content in splat flow 2023-08-09 15:01:40 +01:00
Harry Maclean
4239268efd Ruby: Prevent some false flow into splat params
In cases where there are positional parameters after a splat parameter,
don't attempt to match the splat parameter to a splat argument. We need
more sophisticated modelling to handle these cases, which is future
work.
2023-08-09 15:01:40 +01:00
Harry Maclean
6f3e2cdde3 Ruby: Add change note 2023-08-09 15:01:40 +01:00
Harry Maclean
c0baa5116f Ruby: add test for example splat arg/param matches 2023-08-09 15:01:40 +01:00
Harry Maclean
72356d1515 Ruby: track flow from *args to positional params
This models flow in the following case:

    def foo(x, y)
      sink x # 1
      sink y # 2
    end

    args = [source 1, source 2]
    foo(*args)

We do this by introducing a SynthSplatParameterNode which accepts
content from the splat argument, if one is given at the callsite.
From this node we add read steps to each positional parameter.
2023-08-09 15:01:40 +01:00
Jeroen Ketema
e04d30a676 C++: Update expected test changes due to the line in test2.cpp having shifted 2023-08-09 15:50:07 +02:00
Jeroen Ketema
6100425274 C++: Add change note 2023-08-09 15:47:19 +02:00
Geoffrey White
b4b2338144 Swift: Test for MAD tuple content flow. 2023-08-09 14:41:32 +01:00
Jeroen Ketema
6d7a75d1b9 Merge pull request #13931 from MathiasVP/revert-constant-bounds-and-prep
C++: Revert constant bounds for new range analysis
2023-08-09 15:39:53 +02:00
Mathias Vorreiter Pedersen
8a490775d8 Merge branch 'main' into fix-barriers-in-invalid-pointer-deref 2023-08-09 14:32:58 +01:00
Ian Lynagh
0eb6d1c76e Kotlin: useFunction might return null 2023-08-09 13:45:15 +01:00
Rasmus Lerchedahl Petersen
885e25ff2d Python: use file-name-convention of *.model.yml 2023-08-09 14:25:33 +02:00
Mathias Vorreiter Pedersen
acd16afddd Revert "Merge pull request #13880 from MathiasVP/type-bounds-preparation"
This reverts commit 3e9d9e72dc, reversing
changes made to 877ee7047d.
2023-08-09 13:03:06 +01:00
Mathias Vorreiter Pedersen
cb1076c335 Revert "Merge pull request #13783 from MathiasVP/type-bounds-for-new-range-analysis"
This reverts commit e9750af89f, reversing
changes made to 37a546253e.
2023-08-09 13:02:54 +01:00
erik-krogh
fe542565c3 fix performance 2023-08-09 13:48:07 +02:00
Michael B. Gale
01ff690d51 Merge pull request #13923 from github/mbg/go/bump-go-libraries 2023-08-09 11:36:35 +01:00
Mathias Vorreiter Pedersen
da66136ded Merge pull request #13911 from MathiasVP/fix-taint-for-frontend-upgrade
C++: Fix taint-flow in preparation for frontend upgrade
2023-08-09 11:30:07 +01:00
Jeroen Ketema
d0e7354a1b C++: Only consider the maximum buffer size for badly bounded write 2023-08-09 12:30:00 +02:00
Jeroen Ketema
9572b9d308 C++: Add test where buffer initialized with literal is reassigned an allocation 2023-08-09 12:26:10 +02:00
Rasmus Wriedt Larsen
c0dec21546 Merge pull request #13925 from RasmusWL/fixup-script
Misc: Fixup `accept-expected-changes-from-ci.py`
2023-08-09 11:45:34 +02:00
Tom Hvitved
7dac819730 C#: Fix bad join order
Before
```
Evaluated recursive predicate Stmt#3baf294a::TryStmt::getATriedElement#ff@8254eapb in 6096ms on iteration 4 (delta size: 592145).
Evaluated relational algebra for predicate Stmt#3baf294a::TryStmt::getATriedElement#ff@8254eapb on iteration 4 running pipeline standard with tuple counts:
          204507  ~0%    {2} r1 = SCAN Stmt#3baf294a::TryStmt::getATriedElement#ff#prev_delta OUTPUT In.1, In.0
          204507  ~0%    {3} r2 = JOIN r1 WITH _@callable#f_ControlFlowElement#9501aa28::ControlFlowElement::getEnclosingCallable#0#dispred#ff_10#j__#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1
        17844283  ~0%    {3} r3 = JOIN r2 WITH ControlFlowElement#9501aa28::ControlFlowElement::getEnclosingCallable#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Lhs.2
          592145  ~0%    {2} r4 = JOIN r3 WITH Element#baf0c59e::Element::getAChild#0#dispred#ff ON FIRST 2 OUTPUT Lhs.2, Lhs.1
          592145  ~0%    {2} r5 = r4 AND NOT Stmt#3baf294a::TryStmt::getATriedElement#ff#prev(Lhs.0, Lhs.1)
                         return r5
```

After
```
Evaluated recursive predicate Stmt#3baf294a::TryStmt::getATriedElement#ff@4adecd47 in 310ms on iteration 4 (delta size: 592145).
Evaluated relational algebra for predicate Stmt#3baf294a::TryStmt::getATriedElement#ff@4adecd47 on iteration 4 running pipeline standard with tuple counts:
        204507  ~0%    {2} r1 = SCAN Stmt#3baf294a::TryStmt::getATriedElement#ff#prev_delta OUTPUT In.1, In.0
        204507  ~0%    {2} r2 = r1 AND NOT _statements_10#join_rhs#antijoin_rhs#13(Lhs.0)
        592145  ~2%    {3} r3 = JOIN r2 WITH Element#baf0c59e::Element::getAChild#0#dispred#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Rhs.1
        592145  ~0%    {3} r4 = JOIN r3 WITH ControlFlowElement#9501aa28::ControlFlowElement::getEnclosingCallable#0#dispred#ff ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1
        592145  ~0%    {2} r5 = JOIN r4 WITH ControlFlowElement#9501aa28::ControlFlowElement::getEnclosingCallable#0#dispred#ff ON FIRST 2 OUTPUT Lhs.2, Lhs.0
        592145  ~0%    {2} r6 = r5 AND NOT Stmt#3baf294a::TryStmt::getATriedElement#ff#prev(Lhs.0, Lhs.1)
                       return r6
```
2023-08-09 11:28:06 +02:00
AlexDenisov
6e8f600cb9 Merge pull request #13924 from github/alexdenisov/cherry-pick-reverted-pr
Revert "Swift: Route compiler diagnostics through our log."
2023-08-09 11:02:19 +02:00
Rasmus Wriedt Larsen
69aa099ed1 Misc: Fixup accept-expected-changes-from-ci.py
I guess there has been a rename of the URL from `/jobs/` to `/job/`, since the script has been working previously.
2023-08-09 10:44:31 +02:00
Geoffrey White
e828d8dace Swift: Add UIKit to supported-frameworks.rst as well. 2023-08-09 09:25:43 +01:00
Geoffrey White
131b2b3e0c Swift: Change note. 2023-08-09 09:25:43 +01:00
Geoffrey White
09346c76e7 Swift: Add models. 2023-08-09 09:25:43 +01:00
AlexDenisov
fa729faa0a Revert "Swift: Route compiler diagnostics through our log." 2023-08-09 10:02:59 +02:00
Mathias Vorreiter Pedersen
499b6f35e5 C++: Also key SSA defs and uses by the base address. 2023-08-09 08:44:16 +01:00
Mathias Vorreiter Pedersen
e2feed78a0 C++: Generate SSA variables for all calls instead of just for calls to
allocators.
2023-08-09 08:44:10 +01:00
Stephan Brandauer
e927470961 Merge branch 'main' into kaeluka/java-automodel-variadic-args 2023-08-09 09:02:32 +02:00
Michael Nebel
560b876c01 Merge pull request #13891 from felickz/csharp-hardcoded-cred-identity-fp
cs/hardcoded-credentials - Removes false positive matches on benign Microsoft.AspNetCore.Identity properties
2023-08-09 08:32:36 +02:00
Chad Bentz
fa23a45f9d Merge branch 'main' into csharp-hardcoded-cred-identity-fp 2023-08-08 17:48:27 -04:00
Geoffrey White
cb6aed18f3 Swift: Add tests. 2023-08-08 22:29:53 +01:00
Michael B. Gale
9da749ad77 Bump Go extractor dependencies 2023-08-08 22:23:47 +01:00
erik-krogh
0bce42410a support arbitrary codepoints in NfaUtils.qll 2023-08-08 22:14:51 +02:00
erik-krogh
859e1bfabc add constraint that i should be between 0 and 65535 2023-08-08 21:11:59 +02:00
Mathias Vorreiter Pedersen
389294bded Merge pull request #13920 from MathiasVP/fix-out-nodes
C++: Remove unnecessary predicates
2023-08-08 20:11:36 +01:00
erik-krogh
0391e063ca move to4digitHex to Numbers.qll 2023-08-08 21:10:58 +02:00
Geoffrey White
a1234d4235 Merge pull request #13905 from geoffw0/forceunwrap
Swift: Flow through ForceValueExpr on LHS of assignment
2023-08-08 18:36:50 +01:00
Mathias Vorreiter Pedersen
2a1d5b7481 Merge branch 'main' into fix-out-nodes 2023-08-08 16:32:03 +01:00
Geoffrey White
2b0fcab182 Swift: Update test annotations following merge. 2023-08-08 16:06:52 +01:00
Geoffrey White
e9f0b535ea Merge branch 'main' into forceunwrap 2023-08-08 16:03:31 +01:00
Anders Schack-Mulligen
0ca3f3308b Merge pull request #13478 from aschackmull/java/varcapture
Java: Add proper support for variable capture flow.
2023-08-08 16:22:56 +02:00
Anders Starcke Henriksen
3918e57ffe Take filter pack into account. 2023-08-08 15:10:12 +02:00
Anders Starcke Henriksen
8d34ab6d18 Merge branch 'main' into starcke/automodel-pack 2023-08-08 15:02:33 +02:00
Anders Starcke Henriksen
7da6da1c93 Merge pull request #13852 from github/starcke/automodel-package-filter
Add option to filter automodel queries
2023-08-08 14:59:00 +02:00
Alex Denisov
cebaca328e Swift: 'ParsedSequence' lacks proper types and yields 'Unresolved' AST nodes 2023-08-08 14:41:15 +02:00
Anders Schack-Mulligen
1cd32722be Java: More review fixes. 2023-08-08 14:32:48 +02:00
Mathias Vorreiter Pedersen
f4f5d43bcb C++: indirectReturnOutNodeOperand0 and indirectReturnOutNodeInstruction0
were broken and for some reason only handled the case where calls mapped
to raw indirect nodes :wat:. It turns out these predicates weren't
actually needed anyway.
2023-08-08 13:23:10 +01:00
Alexandre Boulgakov
28863f39b0 Merge pull request #13917 from github/revert-13869-sashabu/swift-logging-compiler
Revert "Swift: Route compiler diagnostics through our log."
2023-08-08 12:45:58 +01:00
Anders Schack-Mulligen
9d59f50340 Java: Review fixes. 2023-08-08 13:37:40 +02:00
Rasmus Lerchedahl Petersen
e47e77c438 Python: add change note 2023-08-08 12:17:23 +02:00
Rasmus Lerchedahl Petersen
f33aff42ad Python: missing result was fixed 2023-08-08 12:14:57 +02:00
Geoffrey White
c95432457d Swift: Correct a test case (but preserve the original as well since it's interesting). 2023-08-08 10:41:21 +01:00
Geoffrey White
6ccf47ece9 Swift: Accept test changes resulting from merge. 2023-08-08 10:28:29 +01:00
AlexDenisov
75dad4764f Revert "Swift: Route compiler diagnostics through our log." 2023-08-08 11:25:13 +02:00
Rasmus Lerchedahl Petersen
f865fa3050 Python: simplify using getSubscript 2023-08-08 11:16:35 +02:00
Michael Nebel
0ed724eb13 Java: Make a flow summary for Set.clear using WithoutElement and introduce appropriate tests. 2023-08-08 11:10:08 +02:00
Rasmus Wriedt Larsen
4f47461f60 Python: Add requested test 2023-08-08 10:44:48 +02:00
Geoffrey White
063ab1c13f Merge branch 'main' into closuremodels 2023-08-08 09:40:27 +01:00
Michael Nebel
f67d5e1dc6 C#: Add tests for the LINQ missed-where and missed-cast queries. 2023-08-08 10:32:16 +02:00
Michael Nebel
1a511c2d52 C#: Update the queries that provide LINQ recommendation. 2023-08-08 10:31:33 +02:00
Anders Schack-Mulligen
ab334f6c1b Java: Always apply heuristic query regardless of existing models. 2023-08-08 10:01:43 +02:00
Anders Schack-Mulligen
cd22bb3505 Java: Add another test case. 2023-08-08 10:00:55 +02:00
erik-krogh
03fbd387df way better hex conversion 2023-08-08 09:08:39 +02:00
erik-krogh
45c39e6072 limit field flow when tracking regex strings in Java 2023-08-08 09:01:23 +02:00
erik-krogh
92db7b047c escape unicode chars in the output for the ReDoS queries 2023-08-08 00:15:54 +02:00
Henry Mercer
0673b19ce1 Merge pull request #13912 from github/release-prep/2.14.2
Release preparation for version 2.14.2
2023-08-07 21:24:56 +01:00
Chad Bentz
d4b5a4d4f4 Merge branch 'main' into csharp-hardcoded-cred-identity-fp 2023-08-07 15:09:01 -04:00
Chad Bentz
7b33574b85 pull dependencies from Microsoft.AspNetCore.App 2023-08-07 18:45:16 +00:00
Geoffrey White
022a06659c Merge pull request #13838 from rdmarsh2/rdmarsh2/swift/set-content
Swift: add SetContent for data flow
2023-08-07 19:15:30 +01:00
github-actions[bot]
79c90fa36a Release preparation for version 2.14.2 2023-08-07 18:08:52 +00:00
Ian Lynagh
3e86c4c39e Kotlin: Allow extractNewExpr to return null 2023-08-07 18:59:51 +01:00
Robert Marsh
65fbcc570c Swift: CFG test for for-try-await 2023-08-07 17:44:57 +00:00
Robert Marsh
eeaa361b12 Merge pull request #13907 from MathiasVP/cleanup-ssa-internals
C++: Small cleanup of `SsaInternals`
2023-08-07 13:16:59 -04:00
Robert Marsh
07650af357 Swift: accept test for CollectionContent rename 2023-08-07 15:04:21 +00:00
Mathias Vorreiter Pedersen
60f2e8a676 C++: Fix QLDoc. 2023-08-07 15:55:43 +01:00
Robert Marsh
146c50049c Finish CollectionContent rename
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-08-07 10:26:40 -04:00
Mathias Vorreiter Pedersen
f2f4e1f882 C++: Add more QLDoc. 2023-08-07 15:22:46 +01:00
Mathias Vorreiter Pedersen
e9750af89f Merge pull request #13783 from MathiasVP/type-bounds-for-new-range-analysis
C++: Constant type-bounds in the new range analysis
2023-08-07 15:20:45 +01:00
Mathias Vorreiter Pedersen
291f1a189d C++: Unify the two branches. 2023-08-07 14:23:35 +01:00
Jeroen Ketema
8b6a7985db Refactor the traint-tracking library to follow the dataflow library refactoring 2023-08-07 15:23:15 +02:00
Jeroen Ketema
5d2984b7a5 Merge branch 'main' into shared-taint-tracking 2023-08-07 15:22:29 +02:00
Michael Nebel
37a546253e Merge pull request #13688 from michaelnebel/csharp/aspnetcore
C#: Turn RuntimeVersion into a record type.
2023-08-07 15:20:21 +02:00
Jami
5862cd2378 Merge pull request #13889 from jcogs33/jcogs33/fix-some-models
Java: remove duplicate models
2023-08-07 08:46:18 -04:00
Mathias Vorreiter Pedersen
467231e469 Merge pull request #13887 from jketema/float128x
C++: Remove support for `_Float128x` which is not actually supported by gcc
2023-08-07 13:42:24 +01:00
Jeroen Ketema
073d170253 C++: Fix typo in change note 2023-08-07 14:30:35 +02:00
Rasmus Lerchedahl Petersen
957c0d6387 Python: move change note 2023-08-07 14:28:53 +02:00
Jeroen Ketema
e795e1c387 C++: Add change note 2023-08-07 14:24:04 +02:00
Mathias Vorreiter Pedersen
6e6e118d4b C++: Make the branches more identical. 2023-08-07 13:22:46 +01:00
Geoffrey White
dc98dec5b6 Swift: Change note. 2023-08-07 13:16:00 +01:00
Stephan Brandauer
3433437034 Java: automodel application mode: only extract the first argument corresponding to a varargs array 2023-08-07 14:15:17 +02:00
Geoffrey White
ab3f3d03c5 Swift: Model taint into optionals via ForceValueExpr. 2023-08-07 13:11:29 +01:00
Michael Nebel
6bb9e6d122 C#: Address review comments. 2023-08-07 13:40:37 +02:00
Edward Minnix III
58d8a2d77f Merge pull request #13899 from egregius313/egregius313/random-nextbytes-typo-fix
Java: Fix typo in `StdlibRandomSource::getOutput`
2023-08-07 07:36:44 -04:00
Tom Hvitved
2126ab0dde Merge pull request #13901 from hvitved/dataflow/refactor
Data flow: Refactor shared library
2023-08-07 13:22:53 +02:00
Ian Lynagh
0d97c1c54a Merge pull request #13837 from igfoo/igfoo/nullFunLabel
Kotlin: Pass on a parentId and remove some redundant braces
2023-08-07 12:19:22 +01:00
Michael Nebel
e62ec888c0 Merge pull request #13506 from michaelnebel/java/threatmodels
Java: Threat Models
2023-08-07 12:50:01 +02:00
Stephan Brandauer
e1a5eba61b Java: automodel application mode: refactor varargs endpoint class to rely on normal argument node for nicer extracted examples 2023-08-07 12:18:52 +02:00
Stephan Brandauer
650ff8db87 Java: automodel comments 2023-08-07 12:18:51 +02:00
Stephan Brandauer
0781cb78e8 Java: automodel application mode: add isVarargsArray metadata value 2023-08-07 12:18:51 +02:00
Stephan Brandauer
5abf7769a7 Java: automodel application mode: use endpoint class like in framework mode 2023-08-07 12:18:51 +02:00
Tony Torralba
fb0102b763 Java: New models for JAX-RS 2023-08-07 11:52:23 +02:00
Rasmus Lerchedahl Petersen
2f9172046b Python: change-note 2023-08-07 11:50:13 +02:00
Rasmus Lerchedahl Petersen
ef1a5cb0fa shared: change-note 2023-08-07 11:50:03 +02:00
Tom Hvitved
34864e1077 Swift: Adjust to data flow refactor 2023-08-07 11:35:23 +02:00
Tom Hvitved
6c989b9c6b Python: Adjust to data flow refactor 2023-08-07 11:35:23 +02:00
Tom Hvitved
693970f243 Java: Adjust to data flow refactor 2023-08-07 11:35:23 +02:00
Tom Hvitved
56e19411d0 Go: Adjust to data flow refactor 2023-08-07 11:35:22 +02:00
Tom Hvitved
05cf796c54 C#: Adjust to data flow refactor 2023-08-07 11:35:21 +02:00
Tom Hvitved
7ef3adcafd C++: Adjust to data flow refactor 2023-08-07 11:35:21 +02:00
Tom Hvitved
db88b7da88 Ruby: Adjust to data flow refactor 2023-08-07 11:35:21 +02:00
Tom Hvitved
b926a7ebba Data flow: Update QL doc 2023-08-07 11:35:21 +02:00
Tom Hvitved
4d14311653 Data flow: Rename DataFlowParameter to InputSig 2023-08-07 11:35:21 +02:00
Tom Hvitved
6208175aa9 Data flow: Move DataFlowParameter into DataFlow.qll 2023-08-07 11:35:21 +02:00
Tom Hvitved
0d33c32d8e Data flow: Move DataFlowImpl(Common).qll into an internal folder 2023-08-07 11:35:21 +02:00
Rasmus Lerchedahl Petersen
4dbaed9ec2 Python: add qldoc 2023-08-07 11:31:22 +02:00
Rasmus Lerchedahl Petersen
b8717b3046 Python: remove incorrect use of "stem" 2023-08-07 11:25:31 +02:00
Anders Starcke Henriksen
0d78eeb871 Address comments. 2023-08-07 10:47:59 +02:00
Mathias Vorreiter Pedersen
e14e0cdbb7 Merge pull request #13888 from github/revert-13757-sources
Revert "Swift: Pragmatic fix for CustomUrlSchemes.qll."
2023-08-07 09:31:10 +01:00
Tony Torralba
43b9199734 Java: Improved JaxWsEndpoint::getARemoteMethod 2023-08-07 10:21:58 +02:00
Erik Krogh Kristensen
2300285204 Merge pull request #13898 from github/dependabot/cargo/ql/regex-1.9.3
Bump regex from 1.9.1 to 1.9.3 in /ql
2023-08-07 08:41:43 +02:00
Ed Minnix
23e2eb11dd Change note 2023-08-07 00:23:58 -04:00
Ed Minnix
fe4eef0bcb Fix typo, replace getBytes with nextBytes 2023-08-07 00:16:47 -04:00
dependabot[bot]
6ed4aaf94b Bump regex from 1.9.1 to 1.9.3 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.9.1 to 1.9.3.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.9.1...1.9.3)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-07 03:30:06 +00:00
Mathias Vorreiter Pedersen
33e991b037 C++: Fix QLDoc. 2023-08-06 20:50:19 +01:00
Mathias Vorreiter Pedersen
af07efe14f C++: Accept test changes. 2023-08-05 21:59:08 +02:00
Mathias Vorreiter Pedersen
f0a1742ad6 C++: Fix barriers in 'AllocationToInvalidPointer.qll'. 2023-08-05 21:58:24 +02:00
Mathias Vorreiter Pedersen
7c9d41d3b9 C++: Make 'SizeBarrier' private as promised. 2023-08-05 21:57:57 +02:00
Mathias Vorreiter Pedersen
835b5e349b C++: Accept test changes. 2023-08-05 21:56:51 +02:00
Mathias Vorreiter Pedersen
0f285ccce0 C++: Fix QLDoc. 2023-08-05 21:55:00 +02:00
Mathias Vorreiter Pedersen
c0828a488f C++: Fix barriers in 'InvalidPointerToDereference.qll'. 2023-08-05 21:55:00 +02:00
Chad Bentz
e2e9c810bf Add lib change-notes 2023-08-04 22:11:36 +00:00
Chad Bentz
5a106fd5d6 Removes false positive creds from NetCore Identity 2023-08-04 21:46:35 +00:00
Jeroen Ketema
c4a65e58bb Add change note 2023-08-04 22:53:33 +02:00
Jeroen Ketema
747cd1745a Update all languages to use the shared taint-tracking library 2023-08-04 22:53:25 +02:00
Jeroen Ketema
20b792545d Add missing QLDoc 2023-08-04 22:52:05 +02:00
Jeroen Ketema
7ba2f7a22a Address review comments 2023-08-04 22:52:05 +02:00
Jeroen Ketema
bdd64ce86d Introduce shared taint tracking library 2023-08-04 22:51:55 +02:00
Robert Marsh
3ebbb80a9e Swift: Change note for CollectionContent 2023-08-04 20:19:35 +00:00
Robert Marsh
10bbf441dc Swift: QLDoc for Set.qll 2023-08-04 20:17:56 +00:00
Robert Marsh
ccc3094267 Swift: autoformat 2023-08-04 20:17:08 +00:00
Geoffrey White
c7fb8de5f9 Swift: Test ForceValueExpr content reads. 2023-08-04 21:15:15 +01:00
Jeroen Ketema
daf6ecd12f C++: Update dbscheme stats file 2023-08-04 22:07:00 +02:00
Robert Marsh
6f38769a9b Swift: rename SetContent to CollectionContent 2023-08-04 18:46:43 +00:00
Robert Marsh
024c5cfe2f Swift: add MaD print support for EnumElement 2023-08-04 18:44:42 +00:00
Robert Marsh
0142309cab Swift: add summary read steps in dataflow 2023-08-04 18:44:42 +00:00
Robert Marsh
b301092e34 Swift: model updates for Set 2023-08-04 18:44:42 +00:00
Robert Marsh
de0ec3e3f7 Swift: WIP SetContent for dataflow 2023-08-04 18:44:42 +00:00
Jami Cogswell
19622aec49 Java: remove duplicate 'Files.newOutputStream' ai model 2023-08-04 14:06:57 -04:00
Jami Cogswell
e64d581f7a Java: remove duplicate 'Files.newInputStream' ai model 2023-08-04 14:05:05 -04:00
Jami Cogswell
d2a24dee7f Java: remove duplicate 'Files.delete' ai model 2023-08-04 14:02:59 -04:00
Jami Cogswell
516831aa41 Java: remove duplicate 'Files.move' ai model 2023-08-04 14:01:27 -04:00
Jami Cogswell
c510d33fbf Java: remove duplicate 'Files.deleteIfExists' ai model 2023-08-04 13:52:18 -04:00
Alexandre Boulgakov
761db70d8d Revert "Swift: Pragmatic fix for CustomUrlSchemes.qll." 2023-08-04 18:03:00 +01:00
Mathias Vorreiter Pedersen
abe3a816ce Merge pull request #13851 from MathiasVP/sink-without-states
DataFlow: Support stateless `isSink` in `StateConfigSig`s
2023-08-04 18:01:42 +02:00
Jeroen Ketema
7b3bdee5ea C++: Update dbscheme and add upgrade and downgrade scripts 2023-08-04 17:59:03 +02:00
Jeroen Ketema
ea9f49efa1 C++: Remove support for _Float128x which is not actually supported by gcc 2023-08-04 17:23:11 +02:00
Alexandre Boulgakov
97c688849d Merge pull request #13869 from github/sashabu/swift-logging-compiler
Swift: Route compiler diagnostics through our log.
2023-08-04 16:13:12 +01:00
Mathias Vorreiter Pedersen
2d832db883 C++: Accept test changes. 2023-08-04 16:12:00 +02:00
Mathias Vorreiter Pedersen
9807c0b0a6 C++: Filter type-based reasons out of MCTV queries. 2023-08-04 16:11:35 +02:00
Mathias Vorreiter Pedersen
b14db86ef9 C++: Let 'hasConstantBound' determine a reason. 2023-08-04 16:09:07 +02:00
Mathias Vorreiter Pedersen
050a563580 C++: Infer a constant upper bound whenever we convert to a 'larger' upper bound (and similarly for lower bounds). 2023-08-04 16:03:09 +02:00
Tony Torralba
33eaeb9cf8 Merge pull request #13484 from aegilops/java/experimental/command-injection
Java: Experimental version of Java Command Injection query
2023-08-04 15:48:15 +02:00
Michael Nebel
51c8331c8f Merge pull request #13522 from michaelnebel/csharp/usestubs4
C#: Use stubs for query tests.
2023-08-04 15:40:08 +02:00
Mathias Vorreiter Pedersen
3e9d9e72dc Merge pull request #13880 from MathiasVP/type-bounds-preparation
C++: Add a type-based `SemReason`.
2023-08-04 14:52:16 +02:00
Mathias Vorreiter Pedersen
98e670f25c Update cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/internal/semantic/analysis/RangeAnalysisStage.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-08-04 14:34:03 +02:00
Mathias Vorreiter Pedersen
121d754be4 Update cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/internal/semantic/analysis/RangeAnalysisImpl.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-08-04 14:33:58 +02:00
Michael Nebel
9c4d77a925 Java: Address review comments. 2023-08-04 13:47:30 +02:00
Michael Nebel
d3eb9c1325 Java: Add release note and address review comments. 2023-08-04 13:36:43 +02:00
Paul Hodgkinson
5db569da89 Merge branch 'main' into java/experimental/command-injection 2023-08-04 12:11:29 +01:00
Mathias Vorreiter Pedersen
e066e87890 Update shared/dataflow/codeql/dataflow/DataFlowImpl.qll
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2023-08-04 11:32:41 +02:00
Jeroen Ketema
877ee7047d Merge pull request #13884 from jketema/global-var-declspec
C++: Add test for `__declspec` attribute on a global variable
2023-08-04 11:26:10 +02:00
Mathias Vorreiter Pedersen
86dbb507fd C++: Add more comments to explain the meaning of 'combineWith'. 2023-08-04 11:20:17 +02:00
Mathias Vorreiter Pedersen
eb19052a7d Apply suggestions from code review
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2023-08-04 11:10:12 +02:00
Mathias Vorreiter Pedersen
981f67531c DataFlow: Introduce 'revSinkNode'. 2023-08-04 11:09:08 +02:00
Mathias Vorreiter Pedersen
75c333273c C++: Bind 'impl'. Oops. 2023-08-04 10:58:54 +02:00
Mathias Vorreiter Pedersen
d398c8c5a8 C++: Share some code by introducing a parameterized module to construct reasons. 2023-08-04 10:52:18 +02:00
Geoffrey White
af8d4e5ab2 Swift: Change note. 2023-08-04 09:42:53 +01:00
Jeroen Ketema
d80eff330b C++: Add test for __declspec attribute on a global variable 2023-08-04 10:35:32 +02:00
Anders Starcke Henriksen
3ef82c1091 Address comments. 2023-08-04 10:22:17 +02:00
Geoffrey White
d24db3fcd3 Swift: Use .ArrayElement in the models, where appropriate. 2023-08-04 09:18:37 +01:00
Geoffrey White
b41d47b910 Swift: Array.withUnsafeBytes doesn't reliably match ContiguousBytes, so define models there as well. 2023-08-04 09:18:36 +01:00
Geoffrey White
c48d47484a Swift: Fix mistake in the string taint test. 2023-08-04 09:18:36 +01:00
Geoffrey White
664dc01c48 Swift: Add closure function models. 2023-08-04 09:18:36 +01:00
Geoffrey White
49d1556c29 Swift: Model update(repeating:), to support the tests. 2023-08-04 09:18:36 +01:00
Geoffrey White
315cb32f6c Swift: Remove special case from UnsafeJsEval query. 2023-08-04 09:18:35 +01:00
Geoffrey White
feadd7127b Swift: Add tests with some different container types. 2023-08-04 09:18:35 +01:00
Geoffrey White
63c71f0b77 Swift: Add tests of with* closure methods. 2023-08-04 09:18:34 +01:00
Tony Torralba
586c8803c5 Move the sources back the .ql files
Otherwise they would both apply at the same time, making both versions of the query identical.
2023-08-04 10:02:56 +02:00
Tony Torralba
e9bad321b6 Apply suggestions from code review 2023-08-04 09:21:45 +02:00
Maiky
0cd1c1e2e5 Make private
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-08-03 17:08:50 +02:00
Maiky
0dec4876f1 Replace cast to DataFlow::CallNode
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-08-03 17:08:35 +02:00
Maiky
6f1b406b3a typo
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-08-03 17:08:10 +02:00
Maiky
0237f37842 typo
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-08-03 17:07:58 +02:00
Maiky
c54561e775 Merge branch 'main' into maikypedia/ldap-improper-auth 2023-08-03 16:49:30 +02:00
Maiky
fd649c1702 Fix getHost() (ldap.host = ip is not covered) 2023-08-03 16:37:48 +02:00
Maiky
f7a662814d simplify usesSsl() 2023-08-03 16:20:20 +02:00
Maiky
2d87489dfa change useSsl() to usesSsl() 2023-08-03 16:18:44 +02:00
Anders Starcke Henriksen
e7ca2330cb Update workspace. 2023-08-03 15:55:42 +02:00
Mathias Vorreiter Pedersen
7270b5079b C++: Add a type-based 'SemReason'. 2023-08-03 15:26:10 +02:00
Paul Hodgkinson
fba37aa7c9 Merge branch 'main' into java/experimental/command-injection 2023-08-03 14:12:38 +01:00
Geoffrey White
deb97a6ccc Swift: Improve regex performance with possessive matching (i.e. don't backtrack). 2023-08-03 13:57:49 +01:00
aegilops
fc7f8409be Fix up for code review 2023-08-03 13:50:40 +01:00
aegilops
3658710578 Fixed formatting, committed expected test results 2023-08-03 13:50:40 +01:00
Tom Hvitved
b69188fee9 C#: Adopt shared CFG construction library from shared controlflow pack 2023-08-03 14:12:24 +02:00
Tom Hvitved
e011480114 Merge pull request #13509 from hvitved/cfg-pack
Convert shared CFG construction library to a parameterized module
2023-08-03 14:11:56 +02:00
Anders Starcke Henriksen
e2abd3ff13 Create separate automodel pack. 2023-08-03 13:55:15 +02:00
Mathias Vorreiter Pedersen
9ed8dec87f Merge pull request #13877 from jketema/constant-doc
C++: Improve the QL doc of `isConstant`
2023-08-03 13:41:44 +02:00
Mathias Vorreiter Pedersen
50f5c4d5f6 DataFlow: Don't support stateless sink nodes in partial flow exploration. 2023-08-03 13:30:05 +02:00
Paolo Tranquilli
67cd25184a Merge pull request #12433 from github/alexdenisov+redsun82/tuple-mangling
Swift: properly identify types and declarations in trap files via mangling
2023-08-03 13:27:07 +02:00
Jeroen Ketema
48048d6f38 Merge pull request #13874 from jketema/use-after-free
C++: Improve use-after-free example code
2023-08-03 13:21:12 +02:00
Owen Mansel-Chan
00c704201c Merge pull request #13871 from github/rc/3.10
Merge `rc/3.10` into `main`
2023-08-03 11:24:07 +01:00
Jeroen Ketema
7ff6f09626 C++: Improve the QL doc of isConstant 2023-08-03 12:16:12 +02:00
Jeroen Ketema
0c0720a962 C++: Improve use-after-free example code
* Remove the mismatch between `new` and `free` and use `delete` instead
* Make the function `void`, so people copying the code will not forget
  to add a `return`.
* Balance out the `...` for omitted code.
2023-08-03 11:06:15 +02:00
Tom Hvitved
2ac646770e Merge ControlFlowTreeBase and AstNode 2023-08-03 10:59:26 +02:00
Jeroen Ketema
1ad533a4f8 Merge pull request #13873 from jketema/ir-range-test
C++: Add semantic range analysis test as IR test
2023-08-03 10:58:24 +02:00
Chris Smowton
8702efda1e Merge pull request #13835 from github/smowton/fix/logrus-with-context
Don't treat logrus' WithContext method as a logging function
2023-08-03 09:57:30 +01:00
Tom Hvitved
525ed65b0b Rename getNode to getAstNode 2023-08-03 10:56:50 +02:00
Jeroen Ketema
f7923d93f1 C++: Add semantic range analysis test as IR test
The range analysis test currently fails with the frontend update, because the
generated IR is incorrect after the update.
2023-08-03 10:13:23 +02:00
Anders Schack-Mulligen
0ae81eace3 Java: update fixed test 2023-08-03 10:07:00 +02:00
Asger F
5950865b55 Merge pull request #13755 from github/max-schaefer/js-server-crash-help
JavaScript: Improve qhelp for js/server-crash.
2023-08-03 10:04:08 +02:00
Anders Schack-Mulligen
72171972c3 Apply suggestions from code review
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-08-03 10:04:06 +02:00
Anders Schack-Mulligen
84316c41a3 Java: Add more qldoc. 2023-08-03 10:04:06 +02:00
Anders Schack-Mulligen
90052a3ca2 Java: Add proper types for capture nodes. 2023-08-03 10:04:06 +02:00
Anders Schack-Mulligen
e2a0849a0e Java: Add more qldoc. 2023-08-03 10:04:06 +02:00
Anders Schack-Mulligen
37455ec29e Java: Replace ratpack test fix with general heuristic summary. 2023-08-03 10:04:06 +02:00
Anders Schack-Mulligen
c5990311ca Java: Redesign and reimplement variable capture flow. 2023-08-03 10:04:06 +02:00
Anders Schack-Mulligen
70bef64e2a Java: Fix ratpack flow. 2023-08-03 10:04:05 +02:00
Anders Schack-Mulligen
f4a05c183b Shared: Add some qldoc. 2023-08-03 10:04:05 +02:00
Anders Schack-Mulligen
15daa51ee5 Shared: Address review comments and QL4QL alerts. 2023-08-03 10:04:05 +02:00
Anders Schack-Mulligen
a23e77ca58 Java: Disregard heap parameter in any-argument and any-parameter specs. 2023-08-03 10:04:05 +02:00
Anders Schack-Mulligen
9a4de208ef Java: Fix qltests. 2023-08-03 10:04:05 +02:00
Anders Schack-Mulligen
d1a616a70a Java: Add proper support for variable capture flow. 2023-08-03 10:04:02 +02:00
Asger F
c38cbe859d Merge pull request #13737 from asgerf/dynamic/fuzzy-models
Dynamic: add Fuzzy token
2023-08-03 09:58:24 +02:00
Anders Starcke Henriksen
131ae1aae9 Fix name in predicate. 2023-08-03 09:53:40 +02:00
Anders Starcke Henriksen
1c425a5602 Change from package to endpoint. 2023-08-03 09:50:23 +02:00
Anders Starcke Henriksen
9b8d7df370 Add option to filter automodel queries by package. 2023-08-03 09:50:23 +02:00
Tom Hvitved
2f3e52646c Add class wrappers around newtype in Cfg.qll 2023-08-03 09:39:30 +02:00
Tom Hvitved
5d69e14cc1 Rename ControlFlowElement to AstNode 2023-08-03 09:39:30 +02:00
Tom Hvitved
1988397f93 Make shared CFG construction library a parameterized module 2023-08-03 09:39:30 +02:00
Tom Hvitved
5049aafdd8 Copy existing ControlFlowGraphImplShared into new shared controlflow pack 2023-08-03 09:32:37 +02:00
Kevin Stubbings
8960453662 Add sanitizer to remove http.Error sink 2023-08-02 16:56:14 -07:00
Mathias Vorreiter Pedersen
89aa86a1d6 Merge pull request #13741 from rdmarsh2/rdmarsh2/swift/array-content-flow
Swift: add DataFlow::Content for arrays
2023-08-02 17:37:40 +02:00
Paolo Tranquilli
56869553e8 Swift: route compiler diagnostics through our log
(cherry picked from commit b8c55612e5)
2023-08-02 15:41:54 +01:00
Owen Mansel-Chan
ff5409fec7 Merge pull request #13785 from owen-mc/go/change-golangSpecificParamArgFilter
Go: Avoid using getTarget() as it may not exist
2023-08-02 15:40:40 +01:00
Alexandre Boulgakov
0dafe2d757 Swift: Mangle ArchetypeTypes with different superclasses in different extensions. 2023-08-02 15:18:52 +01:00
Mathias Vorreiter Pedersen
a5f521cfa4 DataFlow: Add change note. 2023-08-02 14:56:57 +02:00
Mathias Vorreiter Pedersen
3007fdab5e Sync identical files. 2023-08-02 14:33:33 +02:00
Mathias Vorreiter Pedersen
096eeeb549 C++: Handle 'isSink' without states in the backwards-compatibility code and in taint-tracking 2023-08-02 14:33:04 +02:00
Mathias Vorreiter Pedersen
b953c4a1cf DataFlow: Allow stateless sinks. 2023-08-02 14:31:18 +02:00
Anders Schack-Mulligen
7bc8bf616f Merge pull request #13863 from aschackmull/dataflow/pack4
Dataflow: Move the shared library to a properly shared qlpack.
2023-08-02 14:19:49 +02:00
Mathias Vorreiter Pedersen
7bea18773c Merge pull request #13857 from github/alexdenisov/unresolved-dot-exprs-patterns
Swift: SubExpr may yield unresolved nodes in certain cases while MatchedExpr is always resolved
2023-08-02 09:35:06 +02:00
Anders Schack-Mulligen
1ad51e754e Dataflow: Rename change note to proper format. 2023-08-02 08:50:51 +02:00
Sarita Iyer
0bd87f9f86 Merge pull request #13840 from github/si-10115-docs-update
Update supported frameworks
2023-08-01 13:05:32 -04:00
Max Schaefer
5124310f14 Update javascript/ql/src/Security/CWE-730/ServerCrash.qhelp
Co-authored-by: Asger F <asgerf@github.com>
2023-08-01 17:03:05 +01:00
Geoffrey White
5f7e5b946d Swift: Codegen. 2023-08-01 16:38:27 +01:00
Geoffrey White
e30ac42e3e Merge branch 'main' into typegetname 2023-08-01 16:36:31 +01:00
Geoffrey White
c8f5ada594 Swift: Fix errors in queries. 2023-08-01 15:50:15 +01:00
Stephan Brandauer
cb55b10edc Merge pull request #13788 from github/kaeluka/automodel-telemetry-testing
Java: Tests for Automodel Extraction Queries
2023-08-01 15:30:26 +02:00
Alex Denisov
9d643ae1ed Swift: record CFG incosistency 2023-08-01 15:06:04 +02:00
Geoffrey White
116006d280 Swift: Fix for type names containing '...'. 2023-08-01 13:57:46 +01:00
Anders Schack-Mulligen
405a3a73d1 Java: Remove irrelevant import. 2023-08-01 14:31:30 +02:00
Geoffrey White
40219aad88 Swift: More robust Type.getName(). 2023-08-01 13:24:10 +01:00
Anders Schack-Mulligen
15da4ee009 Merge pull request #13856 from aschackmull/java/maybebrokencrypto-barrier
Java: Make the barrier in java/potentially-weak-cryptographic-algorithm less restrictive
2023-08-01 14:20:44 +02:00
Alex Denisov
6667d9e45c Swift: SubExpr may yield unresolved nodes in certain cases while MatchedExpr is always resolved 2023-08-01 14:15:33 +02:00
Geoffrey White
655f238017 Swift: Accept test changes. 2023-08-01 13:14:14 +01:00
Anders Schack-Mulligen
199d1431d7 Dataflow: Add change note. 2023-08-01 14:02:34 +02:00
Anders Schack-Mulligen
5946d5e806 Dataflow: Remove sync. 2023-08-01 14:02:34 +02:00
Anders Schack-Mulligen
0544205594 Swift: Adjust to use the qlpack data-flow api. 2023-08-01 14:02:33 +02:00
Anders Schack-Mulligen
73d4b126cf Ruby: Adjust to use the qlpack data-flow api. 2023-08-01 14:02:33 +02:00
Anders Schack-Mulligen
b27a3a81bc Python: Adjust to use the qlpack data-flow api. 2023-08-01 14:02:33 +02:00
Anders Schack-Mulligen
21eb78ea5e Go: Adjust to use the qlpack data-flow api. 2023-08-01 14:02:33 +02:00
Anders Schack-Mulligen
fcb482b870 C/C++: Adjust to use the qlpack data-flow api. 2023-08-01 14:02:33 +02:00
Anders Schack-Mulligen
5c9a839ac7 C#: Adjust to use the qlpack data-flow api. 2023-08-01 13:47:09 +02:00
Anders Schack-Mulligen
c34c667e6b Java: Adjust to use the qlpack data-flow api. 2023-08-01 13:47:09 +02:00
Anders Schack-Mulligen
50e7892498 Dataflow: Autoformat/indent. 2023-08-01 13:47:08 +02:00
Anders Schack-Mulligen
d7ea60e137 Java: Move data flow lib. 2023-08-01 13:47:08 +02:00
Owen Mansel-Chan
dbc6868bc1 Update go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll
Co-authored-by: Chris Smowton <smowton@github.com>
2023-08-01 12:23:49 +01:00
Asger F
9326fbd1dd Merge pull request #13841 from jeongsoolee09/log-injection-mad
JS: Add support for log injection in MaD
2023-08-01 13:09:56 +02:00
Michael Nebel
4568cccd71 Java: Add some unit tests for sourceModelKindConfig. 2023-08-01 12:56:13 +02:00
Michael Nebel
a9bc23fa3e Java: Add threat model configuration related extensible predicates and some initial tuples. 2023-08-01 12:56:13 +02:00
Michael Nebel
7ba8a663bf C#: Base the CSI query test cases on stubs. 2023-08-01 12:55:35 +02:00
Michael Nebel
c3c5fc0981 C#: Base the Configuration query test cases on stubs. 2023-08-01 12:55:35 +02:00
Michael Nebel
324eac7718 C#: Base the Concurrency query test cases on stubs. 2023-08-01 12:55:35 +02:00
Michael Nebel
cf8dc64842 C#: Base the Bad Practices query test cases on stubs. 2023-08-01 12:55:35 +02:00
Michael Nebel
49c8daefca C#: Base the Architecture query test cases on stubs. 2023-08-01 12:55:35 +02:00
Michael Nebel
ab4e643bf8 C#: Turn RuntimeVersion into a record type. 2023-08-01 12:54:55 +02:00
Michael Nebel
ffd1456d67 Java: Update MaD external documentation related to With and Without Element. 2023-08-01 12:03:44 +02:00
Michael Nebel
a8ccc8d980 Java: Update MaD internal documentation. 2023-08-01 12:03:44 +02:00
Michael Nebel
fc66b6ef9c Java: Update test comments to reflect the MaD syntax. 2023-08-01 12:03:44 +02:00
Michael Nebel
99ac98bffc Java: Re-factor a model to use WithElement (this model is already tested in collections/B.java). 2023-08-01 12:03:44 +02:00
Michael Nebel
e97a4a1aea Java: Update telemetry test expected output. 2023-08-01 12:03:44 +02:00
Michael Nebel
0604a85bb1 Java: Add WithoutElement model for List.clear and add appropriate test. 2023-08-01 12:03:44 +02:00
Michael Nebel
21ec83a197 Java: Add MaD support for With[out]Element. 2023-08-01 12:03:44 +02:00
Geoffrey White
b500d8baa1 Swift: QLDoc TupleType. 2023-08-01 11:01:05 +01:00
Alex Ford
2b741448f4 Merge pull request #13309 from maikypedia/maikypedia/ldap-injection
Ruby: Add LDAP Injection query
2023-08-01 10:44:46 +01:00
Cornelius Riemenschneider
41487987b5 Merge pull request #13858 from github/criemen-update-bazel
Update bazel to 6.3.1
2023-08-01 10:44:36 +02:00
Mathias Vorreiter Pedersen
d111fa7e94 Merge pull request #13862 from jketema/ir-test
C++: Add IR test that shows dataflow regression after frontend update
2023-08-01 10:06:49 +02:00
Tony Torralba
b5d08ade59 Formatting 2023-08-01 09:35:25 +02:00
Anders Schack-Mulligen
e73e312e10 Java: Add change note. 2023-08-01 09:28:56 +02:00
Stephan Brandauer
621c05dc4b Java: format 2023-08-01 09:19:03 +02:00
Stephan Brandauer
bc3e78f034 Java: add automodel framework mode test case for newly supported interface-method parameter extraction 2023-08-01 09:18:58 +02:00
Stephan Brandauer
058236877e Java: Drive-by: fix oversight in #13823
In PR #13823, we had rewritten the endpoints that are being considered for framework mode. We used to use `DataFlow::ParameterNode` as endpoints.
However, `ParameterNode`s do not exist for the implicit `this` parameter; they also do not exist for bodiless interface-methods.

In PR #13823, we forgot to model that `this` only exists for non-static methods and to only consider parameters that we have source code for.
2023-08-01 09:18:58 +02:00
Stephan Brandauer
5ad984f22f Java: update text expectations after merging #13823 2023-08-01 09:18:58 +02:00
Stephan Brandauer
da87d82d08 Java: fix a comment 2023-08-01 09:18:58 +02:00
Stephan Brandauer
be629b27ed Java: Automodel package private test case 2023-08-01 09:18:57 +02:00
Stephan Brandauer
f5c4155d63 Java: Automodel tests: update after merging #13818 2023-08-01 09:18:57 +02:00
Stephan Brandauer
44b8ec642e Java: merge framework mode tests into one 2023-08-01 09:18:57 +02:00
Stephan Brandauer
8cc367c45e Java: merge application mode tests into one 2023-08-01 09:18:57 +02:00
Stephan Brandauer
37b6b46dbf Java: update extraction query tests after merging PR #13747 2023-08-01 09:18:57 +02:00
Stephan Brandauer
50603102d1 Java: tests for automodel application mode, test that local calls are not candidates 2023-08-01 09:18:57 +02:00
Stephan Brandauer
457604e37e Java: tests for automodel framework mode negative example extraction 2023-08-01 09:18:57 +02:00
Stephan Brandauer
938a7a788f Java: tests for automodel application mode negative example extraction 2023-08-01 09:18:57 +02:00
Stephan Brandauer
abed936556 Java: tests for automodel framework mode positive example extraction 2023-08-01 09:18:57 +02:00
Stephan Brandauer
1bc222ec40 Java: tests for automodel application mode positive example extraction 2023-08-01 09:18:57 +02:00
Stephan Brandauer
2e89a11949 Java: tests for automodel application mode candidate extraction 2023-08-01 09:18:56 +02:00
Stephan Brandauer
18fe587e75 Java: tests for automodel framework mode candidate extraction 2023-08-01 09:18:56 +02:00
Tony Torralba
2b3cab355d Merge pull request #13859 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-08-01 09:18:20 +02:00
Jeroen Ketema
ef8d95f87d C++: Add IR test that shows dataflow regression after frontend update 2023-08-01 09:01:39 +02:00
Owen Mansel-Chan
5a5e921ee7 Merge pull request #13846 from owen-mc/go/better-baselines
Go: Add language-specific baseline configuration
2023-08-01 07:14:43 +01:00
Owen Mansel-Chan
a8c64443e8 Merge pull request #13645 from porcupineyhairs/goTiming
Go : Improvements to Timing Attacks query
2023-08-01 07:10:42 +01:00
github-actions[bot]
b547ae7c2f Add changed framework coverage reports 2023-08-01 00:18:36 +00:00
Jeongsoo Lee
1d5eb4a960 Update javascript/ql/lib/change-notes/2023-07-28-mad-log-injection.md
Co-authored-by: Asger F <asgerf@github.com>
2023-07-31 15:38:35 -07:00
Cornelius Riemenschneider
caf2180bad Update .bazelversion 2023-08-01 00:15:53 +02:00
Paul Hodgkinson
3bc7cf6ac7 Merge branch 'main' into java/experimental/command-injection 2023-07-31 19:14:55 +01:00
Jeongsoo Lee
9ab2a28de0 Merge branch 'main' into log-injection-mad 2023-07-31 09:55:35 -07:00
Felicity Chapman
df1e8e263b Merge pull request #13854 from github/11185-add-note
CodeQL library update to use modular API interface - Add note and include in articles
2023-07-31 17:22:17 +01:00
Owen Mansel-Chan
d98079d72c Apply suggestions from code review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-07-31 16:49:11 +01:00
Owen Mansel-Chan
216911dad9 Merge branch 'main' into goTiming 2023-07-31 16:15:10 +01:00
Owen Mansel-Chan
3d495bdd43 Add new files to CODEQL_TOOLS in Makefile 2023-07-31 16:12:52 +01:00
Owen Mansel-Chan
47a536c85d Always output valid JSON containing paths-ignore 2023-07-31 16:09:47 +01:00
Alex Ford
af854749d7 Ruby: update Ldapinjection test output 2023-07-31 16:08:15 +01:00
Alex Ford
f437a6f729 Merge branch 'main' into maikypedia/ldap-injection 2023-07-31 16:00:41 +01:00
Alex Ford
558238a9be Ruby: update TaintStep test output 2023-07-31 16:00:27 +01:00
Felicity Chapman
46f80dc5ca Put back a missing colon to fix the link 2023-07-31 15:56:24 +01:00
Alex Ford
f272b0786a Ruby: fix qldoc typo 2023-07-31 14:58:05 +01:00
Alex Ford
7f82aba7d4 qlformat 2023-07-31 14:57:14 +01:00
Alex Ford
2240e4bffb Ruby: fix changenote date format 2023-07-31 14:56:53 +01:00
Felicity Chapman
9a334d3300 Add shortened link to changelog 2023-07-31 14:13:52 +01:00
Anders Schack-Mulligen
e87b8ba3d7 Java: Make the barrier in java/potentially-weak-cryptographic-algorithm less restrictive. 2023-07-31 14:28:53 +02:00
Asger F
a148c7cc87 JS: Mention log-injection sink kind in docs 2023-07-31 14:04:16 +02:00
Geoffrey White
1c64fb16f1 Merge pull request #13756 from geoffw0/sources2
Swift: CustomUrlSchemes test enhancements and minor model improvement
2023-07-31 12:53:03 +01:00
Asger F
da3eb28767 Apply suggestions from code review
Co-authored-by: Jorge <46056498+jorgectf@users.noreply.github.com>
2023-07-31 13:51:59 +02:00
Felicity Chapman
a0c0da78e9 Merge branch 'main' into 11185-add-note 2023-07-31 11:54:00 +01:00
Geoffrey White
c4b782407b Merge pull request #13853 from geoffw0/commandinject
Swift: Autoformat experimental query.
2023-07-31 11:30:20 +01:00
Felicity Chapman
4d05b742d6 Merge branch 'main' into 11185-add-note 2023-07-31 10:58:03 +01:00
Felicity Chapman
32da3c3730 Add main note and include in articles 2023-07-31 10:50:47 +01:00
Geoffrey White
f921076fca Swift: Autoformat. 2023-07-31 10:25:25 +01:00
Tony Torralba
5488abc512 Merge pull request #13850 from atorralba/atorralba/java/unimportant-generated-models
Java: Remove superfluous generated models
2023-07-31 11:25:03 +02:00
Tony Torralba
2cbb7ed296 Java: Add XXE sinks for MDHT 2023-07-31 11:13:17 +02:00
Tony Torralba
41f1315da9 Merge pull request #13772 from atorralba/atorralba/java/inputstream-wrapper-read-step
Java: Add taint steps for InputStream wrappers
2023-07-31 11:12:43 +02:00
Geoffrey White
e534afe634 Merge pull request #13726 from maikypedia/maikypedia/swift-command-injection
Swift: Add Command Injection query (CWE-078)
2023-07-31 10:06:22 +01:00
Geoffrey White
12f2539d1d Swift: Use flowTo. 2023-07-31 10:03:25 +01:00
Geoffrey White
20b0969a97 Swift: Restore original Type.toString() behaviour. 2023-07-31 09:51:55 +01:00
Mathias Vorreiter Pedersen
2562f8a297 Merge pull request #13844 from jketema/forgotten-paren
C++: Add forgotten parentheses in ternary IR test
2023-07-31 10:03:06 +02:00
Tony Torralba
3bd4d34a47 Java: Remove superfluous generated models 2023-07-31 09:48:03 +02:00
Porcupiney Hairs
74e5c15eaa Go : Improvements to Timing Attacks query 2023-07-31 06:30:47 +05:30
Owen Mansel-Chan
b5518047fa Go: Add language-specific baseline configuration 2023-07-30 21:52:33 +01:00
Mathias Vorreiter Pedersen
4656130dab Merge pull request #13843 from MathiasVP/revert-13792 2023-07-30 01:18:00 +02:00
Jeroen Ketema
0bc75ea9b7 C++: Add forgotten parentheses in ternary IR test
Without the parentheses, the expressions are parsed as `a ? x : (y = val)`.
2023-07-29 18:44:28 +02:00
Owen Mansel-Chan
93e5b2260e Merge pull request #13834 from owen-mc/go/fix-compiler-error-messages-for-1.20.6
Backport: Compiler error messages changed in Go 1.20.6
2023-07-29 13:45:19 +01:00
Mathias Vorreiter Pedersen
fd1949092c C++: Accept test changes. 2023-07-29 11:29:06 +02:00
Mathias Vorreiter Pedersen
ce9a14b692 Revert "Merge pull request #13792 from MathiasVP/swap-argument-order-in-invalid-ptr-deref"
This reverts commit 1fa6511482, reversing
changes made to 4676ca5a4a.
2023-07-29 11:26:41 +02:00
Jeongsoo Lee
4529d8b75a Add support for log injection in MaD 2023-07-28 22:37:56 +00:00
Sarita Iyer
f6b6a988ca Update supported-frameworks.rst 2023-07-28 17:21:55 -04:00
Robert Marsh
22ae430e65 Swift: accept more test changes from hiding InOutExpr 2023-07-28 20:43:25 +00:00
Robert Marsh
bb4fe2002f Merge branch 'main' into rdmarsh2/swift/array-content-flow 2023-07-28 20:41:23 +00:00
Alexandre Boulgakov
3e7a7fe54e Swift: Mangle ArchetypeTypes with different constraints in different extensions. 2023-07-28 21:39:52 +01:00
Ian Lynagh
01a512b677 Kotlin: Pass on a parentId 2023-07-28 17:46:05 +01:00
Owen Mansel-Chan
0895853a23 Delete unused testing predicate 2023-07-28 17:09:53 +01:00
Ian Lynagh
e8f4aee1cf Kotlin: Remove some redundant braces 2023-07-28 17:02:24 +01:00
Owen Mansel-Chan
00d5cb737c Different approach to avoiding getTarget() 2023-07-28 17:00:36 +01:00
Owen Mansel-Chan
d2b8d836e9 Avoid using getTarget() as it may not exist
Try to also deal with the case that we are calling a function
through a variable that it has been assigned to.
2023-07-28 17:00:34 +01:00
Stephan Brandauer
40eab180cc Merge pull request #13823 from github/kaeluka/support-argument-this-in-frameworkmode-metadata-extraction
Java: Support Argument[this] and parameters of bodiless interface methods in framework mode metadata extraction
2023-07-28 17:38:39 +02:00
Tony Torralba
08cba7dc5f Merge pull request #13713 from pwntester/java/struts2_source_taint_inheriting
[Java] Implement field taint inheritance for Struts2 unmarshalled objects
2023-07-28 16:46:27 +02:00
Robert Marsh
6039af0087 Swift: autoformat 2023-07-28 14:34:57 +00:00
Robert Marsh
7ed520ab54 Swift: update test expectations after hiding InOutExpr 2023-07-28 14:29:24 +00:00
Owen Mansel-Chan
a020189895 Merge pull request #13822 from owen-mc/dataflow/mergepathgraph3-signature-fix
Dataflow: MergePathGraph3 signature fix
2023-07-28 15:15:43 +01:00
Chris Smowton
f08879a2df Format; add change note 2023-07-28 14:16:30 +01:00
Chris Smowton
6fa2d2764d Don't treat logrus' WithContext method as a logging function
This isn't output by the default formatters (though a custom formatter could potentially output things stored in it)
2023-07-28 14:11:03 +01:00
Shati Patel
a98ae8941c Merge pull request #13832 from github/shati-patel/docs-indentation
Docs: Fix indentation in tutorial examples
2023-07-28 14:07:16 +01:00
Tony Torralba
2dff0ce5b4 Merge pull request #13712 from pwntester/java/new_struts2_models
[Java] New models for Struts2 framework
2023-07-28 14:31:25 +02:00
Stephan Brandauer
8bf960bd44 Java: fix QL-for-QL alert 2023-07-28 14:28:47 +02:00
Stephan Brandauer
021eedfdf1 Java: format 2023-07-28 14:26:34 +02:00
Owen Mansel-Chan
84dacbfbfd Compiler error messages changed in Go 1.20.6 2023-07-28 13:13:01 +01:00
Stephan Brandauer
82fd0e45aa Java: support Argument[this] in NotAModelApiParameter 2023-07-28 14:04:53 +02:00
Stephan Brandauer
a9d2f43538 Java: use a newtype for framework mode candidates 2023-07-28 13:51:25 +02:00
Stephan Brandauer
8ed773b240 Java: Framework mode extraction now uses a custom class for endpoints, so we can support both Argument[this] and interface-method parameters 2023-07-28 12:56:39 +02:00
Stephan Brandauer
09c64e8fee Java: Support Argument[this] in framework mode metadata extraction 2023-07-28 12:55:26 +02:00
shati-patel
1694915535 Docs: Fix indentation in tutorial examples 2023-07-28 11:45:39 +01:00
Ian Lynagh
499bd970d3 Merge pull request #13412 from igfoo/igfoo/json_escape
Kotlin: Tweak our JSON escaping
2023-07-28 11:13:51 +01:00
Alvaro Muñoz
c3a2ae2943 Account for public fields/setters 2023-07-28 12:12:07 +02:00
Alvaro Muñoz
c089368557 Merge branch 'java/struts2_source_taint_inheriting' of https://github.com/pwntester/codeql into java/struts2_source_taint_inheriting 2023-07-28 12:05:38 +02:00
Maiky
90ac5b905b 2023-07-28 00:21:02 +02:00
Maiky
2a49219127 Move query to experimental 2023-07-28 00:15:33 +02:00
Geoffrey White
beacade499 Swift: Autoformat. 2023-07-27 22:48:23 +01:00
Geoffrey White
15244e0ee1 Swift: Expand NominalType.getFullName to Type.getFullName (so it is a suitble substitute for the old Type.getName behaviour). 2023-07-27 22:41:46 +01:00
Maiky
2d88ac1846 Suggested Changes 2023-07-27 23:40:52 +02:00
Geoffrey White
e2740fef73 Swift: Add explanatory comment. 2023-07-27 22:12:49 +01:00
Maiky
f5e17d7d39 Add additional Filter Methods 2023-07-27 23:04:55 +02:00
Geoffrey White
2ba983bf4a Swift: Change note. 2023-07-27 22:04:07 +01:00
Maiky
d9800c7bb6 Update CommandInjection.ql 2023-07-27 22:45:50 +02:00
Maiky
d0a912fb02 Update swift/ql/src/queries/Security/CWE-078/CommandInjection.ql
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-07-27 22:45:05 +02:00
Geoffrey White
57a55eda75 Swift: QL solution (arguably clearer, seems more performant). 2023-07-27 20:51:49 +01:00
Geoffrey White
82057513c5 Swift: Implement Type.getName() as different from Type.getFullName() (regex solution). 2023-07-27 20:50:21 +01:00
Robert Marsh
c36ce785d8 Merge branch 'main' into rdmarsh2/swift/array-content-flow 2023-07-27 19:18:03 +00:00
Geoffrey White
aa6d7c088b Swift: Add some more diverse test cases. 2023-07-27 19:35:13 +01:00
Geoffrey White
9588e68115 Swift: Add detail and spacing to the NoominalType tests. 2023-07-27 19:17:51 +01:00
Geoffrey White
3eb1bac9df Swift: Update consistency test failure (line numbers). 2023-07-27 16:11:59 +01:00
Geoffrey White
44d785fabf Swift: Make QL-for-QL happy. 2023-07-27 15:37:13 +01:00
Tony Torralba
c239a4399c Changed Struts2ActionSupportClassFieldReadSource to be a FieldValueNode instead of a field read 2023-07-27 10:39:06 +02:00
Alvaro Muñoz
97a4230d5d add change note 2023-07-27 10:39:06 +02:00
Alvaro Muñoz
f3fc56294e implement field taint inheritance for Struts2 unmarshalled objects 2023-07-27 10:39:06 +02:00
Charis Kyriakou
8438fb2310 Merge pull request #13821 from github/charisk/remove-last-updated
Remove last updated information and sorting from MRVA views
2023-07-27 08:31:00 +01:00
Tony Torralba
9d6bc76dc0 Merge pull request #13817 from atorralba/atorralba/java/non-static-fieldvaluenode-step
Java: Allow flow out of FieldValueNodes for non-static fields
2023-07-27 09:14:04 +02:00
Owen Mansel-Chan
9b2b58a823 Sync files 2023-07-26 21:48:10 +01:00
Owen Mansel-Chan
e0cc337c71 Fix DataFlow::MergePathGraph3
Need to get the signatures correct.
2023-07-26 21:48:08 +01:00
Owen Mansel-Chan
f40bcd0cdd Merge pull request #13824 from owen-mc/go/fix-compiler-error-messages-for-1.20.6
Go: Compiler error messages changed in Go 1.20.6
2023-07-26 21:46:54 +01:00
Robert Marsh
bf5ba37348 Swift: Hide InOutExpr 2023-07-26 18:42:27 +00:00
Robert Marsh
e54341a170 Swift: undo commented out line 2023-07-26 17:12:06 +00:00
Chris Smowton
c69a9ea032 Merge pull request #13793 from github/post-release-prep/codeql-cli-2.14.1
Post-release preparation for codeql-cli-2.14.1
2023-07-26 17:22:05 +01:00
Owen Mansel-Chan
778de6b5d2 Compiler error messages changed in Go 1.20.6 2023-07-26 16:55:26 +01:00
amammad
bee8e6ff0d remove unused saniter 2023-07-27 01:41:31 +10:00
Charis Kyriakou
536fd349bd Remove last updated information and sorting from MRVA views 2023-07-26 15:32:16 +01:00
Tony Torralba
8685242c16 Add tests 2023-07-26 14:13:43 +02:00
Stephan Brandauer
24cdc962c2 Merge pull request #13818 from github/kaeluka/fix-erroneous-endpoints-that-are-sinks-and-summary-neutrals
Java: Automodel Fix, Prevent Some Erroneous Endpoints
2023-07-26 12:45:29 +02:00
Jeroen Ketema
a4a492627d Merge pull request #13775 from jketema/print-global
C++: Support printing of global and namespace variables in `PrintAST`
2023-07-26 11:29:39 +02:00
Jeroen Ketema
409471c3b2 C++: Rename getEnclosingDeclaration to getAnEnclosingDeclaration 2023-07-26 09:44:47 +02:00
Tony Torralba
602eb43109 Update partial flow test expectations 2023-07-26 09:32:13 +02:00
Robert Marsh
358737452e Swift: reverse flow steps through InOutExpr 2023-07-25 20:34:36 +00:00
amammad
591d81b5f9 remove saniter which was responsible for a defensive technique 2023-07-26 02:39:10 +10:00
Michael B. Gale
aa59741c38 Merge pull request #13794 from github/mbg/csharp/improve-tracer-command-detection
C#: Limit detection of sub-command names in tracer configuration
2023-07-25 17:01:22 +01:00
Ian Lynagh
532552a7ac Merge pull request #13751 from igfoo/igfoo/getCompilationInfo
Java: Improve the diagnostics consistency query
2023-07-25 16:54:17 +01:00
yoff
2067d393e1 Update shared/yaml/codeql/serverless/ServerLess.qll
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-07-25 17:27:45 +02:00
Rasmus Lerchedahl Petersen
b2688bba7d Python: Relax module resolution
Do not require modules to reside in a package
2023-07-25 17:24:04 +02:00
Michael B. Gale
f3c6564dc3 Comment out test that fails on Windows 2023-07-25 16:15:51 +01:00
Stephan Brandauer
08f5774d13 Java: Automodel extraction fix for application mode 2023-07-25 17:11:07 +02:00
Geoffrey White
fbbc2938c3 Merge pull request #13816 from geoffw0/contig2
Swift: Use enum content in withContiguousStorageIfAvailable model.
2023-07-25 15:57:52 +01:00
Stephan Brandauer
698b8d3c5c Java: Automodel extraction fix; previously, we treated endpoints that were marked as sinks, as well as summary-neutrals as 'erroneous' 2023-07-25 16:52:27 +02:00
Geoffrey White
ac3c4fd5ef Swift: Actually I think this is value flow. 2023-07-25 14:44:21 +01:00
Tony Torralba
b8b38e4bbe Java: Allow flow out of FieldValueNodes for non-static fields 2023-07-25 15:37:41 +02:00
Geoffrey White
5188095529 Swift: Use enum content in withContiguousStorageIfAvailable model. 2023-07-25 14:33:20 +01:00
Geoffrey White
aedd073dad Merge pull request #12416 from geoffw0/contig
Swift: Model Sequence.withContiguousStorageIfAvailable
2023-07-25 14:05:07 +01:00
Mathias Vorreiter Pedersen
0a7eecf28c Merge pull request #13795 from geoffw0/enumcontent
Swift: Support EnumContent in models-as-data
2023-07-25 14:43:44 +02:00
Tony Torralba
c9fc5a54c7 Remove generated sinks and sources 2023-07-25 14:42:32 +02:00
Jeroen Ketema
4fcb576099 Merge branch 'main' into print-global 2023-07-25 14:10:33 +02:00
Mathias Vorreiter Pedersen
1f39ec3188 Merge pull request #13815 from MathiasVP/add-missing-result-test
C++: Add `cpp/invalid-pointer-deref` false negative
2023-07-25 13:12:44 +02:00
Mathias Vorreiter Pedersen
cd4ec6c996 C++: Add FN testcase. 2023-07-25 12:13:46 +02:00
Mathias Vorreiter Pedersen
60c7c84018 Merge pull request #13774 from MathiasVP/add-more-invalid-deref-documentation
C++: Add more documentation to the `cpp/invalid-pointer-deref` query
2023-07-25 12:07:25 +02:00
Mathias Vorreiter Pedersen
9f2ee0d7c2 C++: Rename 'delta' to 'deltaDerefSourceAndPai'. 2023-07-25 11:25:24 +02:00
Mathias Vorreiter Pedersen
b1c6ee4396 Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 11:20:49 +02:00
Mathias Vorreiter Pedersen
13989dba91 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 11:20:03 +02:00
Mathias Vorreiter Pedersen
099e11fb0c Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 11:19:49 +02:00
Mathias Vorreiter Pedersen
997eb1caf2 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 11:19:14 +02:00
Mathias Vorreiter Pedersen
2caad67980 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 11:18:54 +02:00
Mathias Vorreiter Pedersen
99f6e685c7 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 11:18:46 +02:00
Mathias Vorreiter Pedersen
54afed6e1d C++: Rename 'delta' to 'deltaDerefSourceAndPai'. 2023-07-25 11:04:18 +02:00
Mathias Vorreiter Pedersen
46832d0b17 C++: Rename 'delta1' and 'delta2' in documentation. 2023-07-25 10:50:51 +02:00
Mathias Vorreiter Pedersen
e75f604172 C++: Replace more text with formulas. 2023-07-25 10:48:23 +02:00
Mathias Vorreiter Pedersen
7f7930b3bb Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:36:12 +02:00
Mathias Vorreiter Pedersen
af904f5cfe Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:33:57 +02:00
Mathias Vorreiter Pedersen
97809e7646 Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:33:38 +02:00
Mathias Vorreiter Pedersen
e1f519fab7 Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:33:17 +02:00
Mathias Vorreiter Pedersen
e1763db36c Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:31:37 +02:00
Mathias Vorreiter Pedersen
9f9cf9f765 Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:31:06 +02:00
Mathias Vorreiter Pedersen
70ac0a5462 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:30:56 +02:00
Mathias Vorreiter Pedersen
2cfa14b91f Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:30:44 +02:00
Mathias Vorreiter Pedersen
5cad8ec0a2 Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:30:38 +02:00
Mathias Vorreiter Pedersen
a176ba262b Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:30:21 +02:00
Mathias Vorreiter Pedersen
6ebd5ab3ed Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:25:41 +02:00
Mathias Vorreiter Pedersen
0d116a00fb Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:25:34 +02:00
Arthur Baars
3767ce5a99 Merge pull request #13763 from aibaars/swift-print-cfg
Swift: improve print-cfg query
2023-07-25 10:02:18 +02:00
Mathias Vorreiter Pedersen
1612ee3e9a C++: Simplify the description of the sink. 2023-07-25 09:19:14 +02:00
Mathias Vorreiter Pedersen
55cfadb1f4 C++: Simplify the description of the source. 2023-07-25 09:13:27 +02:00
Mathias Vorreiter Pedersen
359a9e5fe8 C++: 'Step 1' does not make a lot of sense now that the files have been split. 2023-07-25 09:07:01 +02:00
Geoffrey White
374c157afe Swift: Update the taint aspect of the flowsources test to use sinks like the regular taint test. 2023-07-24 19:17:51 +01:00
Michael B. Gale
e27399c9ef Use --force for dotnet new to fix test 2023-07-24 17:59:44 +01:00
Geoffrey White
27c12de178 Merge pull request #13549 from geoffw0/badfilter
Swift: Query for bad HTML filtering regexps
2023-07-24 17:25:08 +01:00
jorgectf
8f8c064632 Modify test 2023-07-24 17:50:22 +02:00
Stephan Brandauer
2582b084f6 Merge pull request #13747 from github/tausbn/exclude-qualifier-argument-for-existing-models
Java: Exclude qualifier argument for existing models
2023-07-24 16:26:33 +02:00
amammad
1e1d42fa35 fix a mistake :( 2023-07-25 00:11:23 +10:00
amammad
7aff0079f5 better safe Flask example 2023-07-25 00:08:51 +10:00
Rasmus Lerchedahl Petersen
21937e6a27 python: address review comments
- rename `normalise` to `normalizePath`
- factor out `lookupValueOrEmpty`
2023-07-24 16:04:01 +02:00
yoff
c0407ae0be Apply suggestions from code review
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-07-24 15:51:27 +02:00
Mathias Vorreiter Pedersen
acb1310e99 C++: Add more documentation. 2023-07-24 15:28:36 +02:00
Geoffrey White
26d4f9f0fd Swift: Rephrase sentence that needed three commas. 2023-07-24 14:15:48 +01:00
Geoffrey White
cd3b519081 Apply suggestions from code review
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2023-07-24 14:11:21 +01:00
Mathias Vorreiter Pedersen
db8b506106 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-24 14:58:06 +02:00
Mathias Vorreiter Pedersen
88b78284ec Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-24 14:57:59 +02:00
Stephan Brandauer
13027a1094 Java: review suggestions from @atorralba 2023-07-24 14:09:10 +02:00
Stephan Brandauer
2f2f507a5d Java: drive-by change: remove obsolete custom queries from application mode characteristics 2023-07-24 13:55:53 +02:00
amammad
0e8f83460c a little bit change on flask example 2023-07-24 21:41:54 +10:00
amammad
bbba906ff1 a little bit change on flask example 2023-07-24 21:41:44 +10:00
Jeroen Ketema
0a0e34716e Merge pull request #13811 from jketema/ternary-tests
C++: Add more IR tests for the ternary operator
2023-07-24 12:50:01 +02:00
Mathias Vorreiter Pedersen
4a276c37ac C++: Remove 'TODO' now that the implementation has been fixed. 2023-07-24 12:24:46 +02:00
Mathias Vorreiter Pedersen
4345369e9b C++: Replace 'Barrier2' with 'SizeBarrier' in QLDoc. 2023-07-24 12:22:26 +02:00
Mathias Vorreiter Pedersen
d02a1c2840 C++: Remove paragraph. 2023-07-24 12:20:38 +02:00
Mathias Vorreiter Pedersen
5edc5e7c7b C++: Reflow comments in QLDoc. 2023-07-24 12:15:57 +02:00
Mathias Vorreiter Pedersen
a272eb8447 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-24 12:14:47 +02:00
Mathias Vorreiter Pedersen
9108982b07 C++: Update example in QLDoc. 2023-07-24 12:13:31 +02:00
Mathias Vorreiter Pedersen
9cb09d6e9a Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-24 12:12:00 +02:00
Mathias Vorreiter Pedersen
aa6bf67482 Merge branch 'main' into add-more-invalid-deref-documentation 2023-07-24 12:09:19 +02:00
Mathias Vorreiter Pedersen
1fa6511482 Merge pull request #13792 from MathiasVP/swap-argument-order-in-invalid-ptr-deref
C++: Swap argument order in `cpp/invalid-pointer-deref`
2023-07-24 12:05:38 +02:00
Mathias Vorreiter Pedersen
f0ab3a3c84 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-24 12:04:02 +02:00
Mathias Vorreiter Pedersen
8ab2f89d53 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-24 12:03:52 +02:00
Mathias Vorreiter Pedersen
786c6e1c5e Merge branch 'main' into swap-argument-order-in-invalid-ptr-deref 2023-07-24 11:26:27 +02:00
Jeroen Ketema
645028e219 C++: Add more IR tests for the ternary operator 2023-07-24 11:22:27 +02:00
Mathias Vorreiter Pedersen
4676ca5a4a Merge pull request #13789 from MathiasVP/better-names-in-invalid-ptr-deref
C++: Improve names of identifiers in `cpp/invalid-pointer-deref`
2023-07-24 11:17:09 +02:00
Mathias Vorreiter Pedersen
c44507cc42 C++: 'sizeAddend' instead of 'extra'. 2023-07-24 10:57:25 +02:00
Geoffrey White
39b6d927d6 Swift: Make QL-for-QL happy (this line will be deleted at some point anyway). 2023-07-24 09:23:07 +01:00
Geoffrey White
066a6ef7c4 Swift: Change note. 2023-07-24 09:13:56 +01:00
Geoffrey White
b8f67d7e8a Swift: Test changes (not affecting results). 2023-07-24 09:03:01 +01:00
Geoffrey White
b62c86d89c Swift: Autoformat. 2023-07-24 08:45:49 +01:00
Geoffrey White
dc89e0d2b0 Swift: Change note. 2023-07-24 08:28:37 +01:00
amammad
6f8ec118df fix qlhelp and qldoc bugs 2023-07-24 17:15:43 +10:00
Tony Torralba
af8612ecd2 Merge pull request #13797 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-07-24 09:12:25 +02:00
amammad
c704158150 remove sources which are contained from environment variables, fix some bugs thanks to @yoff 2023-07-24 17:06:27 +10:00
Tony Torralba
6c0d47f122 Update java/ql/lib/semmle/code/java/frameworks/InputStream.qll
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2023-07-24 08:49:37 +02:00
Tony Torralba
4e7438ac5c Make sure that InputStreamWrapperCapturedLocalStep is indeed local 2023-07-24 08:49:37 +02:00
Tony Torralba
d3b3af8ae6 Re-adds jump step
Note that this causes FP flow in the call context test cases
2023-07-24 08:49:37 +02:00
Tony Torralba
36ff54b48b Convert jump step into local step
Note that this has FNs in the test cases where the source is used locally in the nested classes' methods
2023-07-24 08:49:37 +02:00
Tony Torralba
cc5a404149 Add more test cases 2023-07-24 08:49:36 +02:00
Tony Torralba
226103b246 Add local class test 2023-07-24 08:49:36 +02:00
Tony Torralba
f054f73836 Apply suggestions from code review
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2023-07-24 08:49:36 +02:00
Tony Torralba
1de68457ae Move steps to InputStream.qll 2023-07-24 08:49:36 +02:00
Tony Torralba
0156fcc381 Apply suggestions from code review
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2023-07-24 08:49:36 +02:00
Tony Torralba
3a6665b0ed Add change note 2023-07-24 08:49:36 +02:00
Tony Torralba
5330ce12cc Use new TypeInputStream 2023-07-24 08:49:34 +02:00
Tony Torralba
00e0e5a61a Java: Add taint step for InputStream wrappers 2023-07-24 08:48:04 +02:00
github-actions[bot]
419bbbc9ac Add changed framework coverage reports 2023-07-24 00:17:53 +00:00
Geoffrey White
94780aabec Swift: Effect on the taint/core test. 2023-07-21 22:34:59 +01:00
Geoffrey White
1259f8d596 Swift: Clearer syntax and a shortcut for Optional.some. 2023-07-21 22:34:59 +01:00
Geoffrey White
89e7b75ea1 Swift: Flow from optional content through "!". 2023-07-21 22:34:59 +01:00
Geoffrey White
d9187c62fe Swift: Parse MAD enum content. 2023-07-21 22:34:59 +01:00
Geoffrey White
1cfb9bbf34 Swift: Tests for enum content in MAD. 2023-07-21 22:34:58 +01:00
Michael B. Gale
a2f4628522 C#: Add integration test for tracing config fix 2023-07-21 20:14:46 +01:00
Michael B. Gale
ac389067fe C#: Limit detection of sub-command names 2023-07-21 19:05:22 +01:00
github-actions[bot]
f91b7a9342 Post-release preparation for codeql-cli-2.14.1 2023-07-21 16:16:25 +00:00
Mathias Vorreiter Pedersen
742f080a55 C++: This predicate is no longer used. 2023-07-21 16:54:46 +01:00
Mathias Vorreiter Pedersen
d350c0d5c8 C++: Accept test changes. 2023-07-21 16:54:46 +01:00
Mathias Vorreiter Pedersen
0859c4f926 C++: Fix swapped arguments in 'invalidPointerToDerefSource'. 2023-07-21 16:54:38 +01:00
Mathias Vorreiter Pedersen
69ea7d92cd Merge pull request #13790 from MathiasVP/add-invalid-ptr-false-positive
C++: Add false positive to `cpp/invalid-pointer-deref`
2023-07-21 16:42:53 +01:00
Mathias Vorreiter Pedersen
d905b1e006 C++: Add false positive. 2023-07-21 15:38:38 +01:00
Mathias Vorreiter Pedersen
83aef6fc16 C++: Write formulas instead of 'non-strictly upper bounded by'. 2023-07-21 14:56:40 +01:00
Mathias Vorreiter Pedersen
108cd7f078 C++: Use more descriptive names for identifiers in 'cpp/invalid-pointer-deref'. 2023-07-21 14:55:45 +01:00
Geoffrey White
d13170de98 Swift: Model return values. 2023-07-21 14:23:40 +01:00
Geoffrey White
52e84ba12b Swift: Add some more test cases, including handling return propagation. 2023-07-21 13:53:14 +01:00
Geoffrey White
7c0c820684 Swift: Accept fixed spurious result. 2023-07-21 11:26:11 +01:00
Geoffrey White
6110243306 Swift: Fix .expected and autoformat after merge. 2023-07-21 11:17:19 +01:00
Mathias Vorreiter Pedersen
5270cf6c41 C++: Update documentation based on PR feedback. 2023-07-21 11:09:01 +01:00
Geoffrey White
8a314dd2cf Merge branch 'main' into contig 2023-07-21 10:56:46 +01:00
Jeroen Ketema
4f57852ba0 Merge pull request #13787 from jketema/ssa-text-case
C++: Add IR SSA test case for the ternary operator
2023-07-21 11:26:26 +02:00
Mathias Vorreiter Pedersen
a7ee27ec22 C++: Fix 'begin'/'base' confusion. 2023-07-21 10:20:24 +01:00
Mathias Vorreiter Pedersen
6c3c4c302e Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-07-21 10:19:04 +01:00
Anders Schack-Mulligen
412cf558f2 Merge pull request #13743 from aschackmull/docs/dataflow-api
Docs: Update data flow documentation to the new API.
2023-07-21 11:07:52 +02:00
Mathias Vorreiter Pedersen
4075dacd52 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll 2023-07-21 09:55:23 +01:00
Stephan Brandauer
79da723878 Java: only assume that _manual_ MaD sinks have been fully modeled 2023-07-21 10:43:07 +02:00
Tony Torralba
3d515b18df Merge pull request #13769 from atorralba/atorralba/java/avoid-inputstream-low-confidence-dispatch
Java: Avoid low-confidence dispatch to InputStream methods
2023-07-21 10:42:34 +02:00
Mathias Vorreiter Pedersen
369cee9ed9 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-07-21 09:32:14 +01:00
Jeroen Ketema
4c9c5d8f0c C++: Add IR SSA test case for the ternary operator 2023-07-21 10:22:34 +02:00
Chris Smowton
b01ff3f689 Merge pull request #13786 from github/release-prep/2.14.1
Release preparation for version 2.14.1
2023-07-20 19:32:53 +01:00
github-actions[bot]
c936a920b0 Release preparation for version 2.14.1 2023-07-20 16:32:27 +00:00
Chris Smowton
b21580b71f Merge pull request #13784 from github/smowton/fix/go-change-note-format
Correct Golang change note format
2023-07-20 17:13:36 +01:00
Chris Smowton
8e63bd6c78 Correct Golang change note format 2023-07-20 16:40:18 +01:00
Geoffrey White
75c5d16406 Swift: Add a couple more test cases. 2023-07-20 16:13:57 +01:00
Geoffrey White
ec650b80fd Swift: Fix mistakes in ts in the tests and test comments. 2023-07-20 15:37:41 +01:00
Jeroen Ketema
7c429fb924 C++: Remove redundant case from shouldPrintDeclaration
A configuration should always exist, because it does not have a charpred
that could prevent this.
2023-07-20 16:11:17 +02:00
jorgectf
3ac94c33b2 Add change note 2023-07-20 15:47:18 +02:00
jorgectf
55648ac4de Add shlex.quote as sanitizer 2023-07-20 15:34:54 +02:00
Geoffrey White
61079e07c1 Swift: Effect of merging the regex parse mode improvements from main. 2023-07-20 14:18:48 +01:00
Chris Smowton
075633a817 Merge pull request #13780 from github/revert-13767-go/missing-flow-through-receiver
Revert "Go: Fix missing flow through receiver for function variable"
2023-07-20 14:07:26 +01:00
Geoffrey White
252d969efd Merge branch 'main' into badfilter 2023-07-20 14:03:57 +01:00
Owen Mansel-Chan
374f13e0dc Revert "Go: Fix missing flow through receiver for function variable" 2023-07-20 13:31:14 +01:00
Geoffrey White
6f5d58c479 Merge pull request #13770 from geoffw0/parsemode3
Swift: Track regular expression parse modes set in code
2023-07-20 13:18:41 +01:00
Geoffrey White
a0b784e7b1 Python: QLDoc. 2023-07-20 11:56:13 +01:00
Geoffrey White
aaf9907a27 Python: Change note. 2023-07-20 11:23:15 +01:00
Geoffrey White
bb16731b86 Python: Fix for multiple parse mode flags. 2023-07-20 11:16:14 +01:00
Geoffrey White
dbde99df91 Python: Add test cases. 2023-07-20 11:06:00 +01:00
Jeroen Ketema
e76dc4a1f9 C++: Support printing of global and namespace variables in PrintAST 2023-07-20 11:43:55 +02:00
Alexandre Boulgakov
eb0b485297 Merge pull request #13776 from github/sashabu/armclang
Docs: Add armclang as supported C++ compiler.
2023-07-20 09:53:20 +01:00
Robert Marsh
41ad1ed8b4 Swift: fix cartesian product in array readStep 2023-07-19 19:12:34 +00:00
Robert Marsh
ec9997781c Swift: add test for assignment to nested arrays 2023-07-19 19:12:03 +00:00
Geoffrey White
cb6276e5e2 Python: Test layout. 2023-07-19 18:44:15 +01:00
Alexandre Boulgakov
a51ad1f417 Docs: Add armclang as supported C++ compiler. 2023-07-19 18:28:51 +01:00
Geoffrey White
7fa91570b4 Merge pull request #13757 from geoffw0/sources
Swift: Pragmatic fix for CustomUrlSchemes.qll.
2023-07-19 17:46:47 +01:00
Geoffrey White
b91468607b Swift: Reluctantly QLDoc the toString. 2023-07-19 17:45:26 +01:00
Robert Marsh
883543fd77 Swift: force high precision for arraycontent 2023-07-19 16:31:32 +00:00
Geoffrey White
6fa0445e0f Swift: Fix QL-for-QL warning. 2023-07-19 17:31:19 +01:00
Owen Mansel-Chan
5b0d4ce7cb Merge pull request #13644 from porcupineyhairs/dsnImprove
Go : Improvements to DSN Injection query
2023-07-19 16:10:34 +01:00
Jeroen Ketema
2a63116fc2 C++: Rename shouldPrintFunction to shouldPrintDeclaration 2023-07-19 16:55:43 +02:00
Mathias Vorreiter Pedersen
922f4d5496 C++: Add more documentation to the 'cpp/invalid-pointer-deref' query. 2023-07-19 14:42:20 +01:00
Tony Torralba
238cb26624 Add change note 2023-07-19 15:37:33 +02:00
Owen Mansel-Chan
0a0e9bb25b Merge pull request #13767 from owen-mc/go/missing-flow-through-receiver
Go: Fix missing flow through receiver for function variable
2023-07-19 13:52:25 +01:00
Geoffrey White
5c47ea0f91 Swift: Missing QLDoc / typos / missing private. 2023-07-19 13:51:37 +01:00
Tony Torralba
29543f5726 Change InputStream.read from neutral to summary 2023-07-19 14:44:18 +02:00
Anders Schack-Mulligen
a9c76d4175 Merge pull request #13717 from aschackmull/dataflow/neverskipadditionalsteps
Dataflow: Add support for not skipping configuration-specific nodes in big-step
2023-07-19 14:06:54 +02:00
Owen Mansel-Chan
b9027a0806 Avoid using getTarget() as it may not exist 2023-07-19 12:48:34 +01:00
Owen Mansel-Chan
a1fdc6f438 Merge pull request #13599 from pwntester/ruby/gopg_improvements
Go: Improve go-pg support
2023-07-19 12:40:39 +01:00
Stephan Brandauer
5575fc65aa Merge pull request #13636 from github/tausbn/add-sink-alert-metrics-query
Java: Add metric queries for counting sinks coming from models
2023-07-19 13:12:32 +02:00
Mathias Vorreiter Pedersen
434815b9f7 Merge pull request #13764 from MathiasVP/fix-fp-in-missing-noinline
QL: Fix FP in `ql/missing-noinline`
2023-07-19 11:49:20 +01:00
Mathias Vorreiter Pedersen
475a892216 Merge pull request #13760 from MathiasVP/split-invalid-ptr-deref-into-more-files
C++: Split `cpp/invalid-pointer-deref` into more files
2023-07-19 11:36:35 +01:00
Mathias Vorreiter Pedersen
5fa70b0eb0 Update ql/ql/test/queries/performance/MissingNoInline/MissingNoInline.expected 2023-07-19 11:34:05 +01:00
Mathias Vorreiter Pedersen
b470dd7f00 Update ql/ql/src/queries/performance/MissingNoinline.ql
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-07-19 11:33:16 +01:00
Owen Mansel-Chan
9b3ff82279 Address review comments 2023-07-19 11:18:20 +01:00
Owen Mansel-Chan
a3ba74a6a6 Cast to MethodCallNode before calling getReceiver()
This is not required, because getReceiver is still defined on CallNode,
but is done for consistency.
2023-07-19 11:17:38 +01:00
Anders Schack-Mulligen
8d365b04c1 C/C++: Adjust expected output. 2023-07-19 11:41:54 +02:00
Anders Schack-Mulligen
e72a0b2f8c Dataflow: Add change notes. 2023-07-19 11:41:15 +02:00
Anders Schack-Mulligen
c01a494ea5 C/C++: Don't force-include XxeFlowStateTransformer steps in XXE.ql. 2023-07-19 11:41:15 +02:00
Anders Schack-Mulligen
ae24d68b5d C/C++/C#/Java/Python/Ruby/Swift: Adjust expected output. 2023-07-19 11:41:15 +02:00
Anders Schack-Mulligen
941aa7ae28 C/C++: Don't force-include default steps in DefaultTaintTrackingImpl. 2023-07-19 11:41:15 +02:00
Anders Schack-Mulligen
95d17045c9 Dataflow: Sync. 2023-07-19 11:41:15 +02:00
Anders Schack-Mulligen
fd83b6afdb Dataflow: Add support for not skipping configuration-specific nodes in big-step. 2023-07-19 11:41:15 +02:00
Geoffrey White
0660f98a33 Swift: Change note. 2023-07-19 10:37:34 +01:00
Geoffrey White
420008aed7 Swift: Minor corrections / clarifications. 2023-07-19 10:36:01 +01:00
Tony Torralba
2dbbcc2413 Java: Avoid low-confidence dispatch to InputStream methods
Also adds a neutral model for `InputStream.read`, which offers a high-confidence alternative for this method.
2023-07-19 11:30:53 +02:00
Mathias Vorreiter Pedersen
2f48cde2e5 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-19 10:28:05 +01:00
Mathias Vorreiter Pedersen
9a8fb0b93a Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-19 10:27:55 +01:00
Owen Mansel-Chan
de8794e9ba Make MethodCallNode char pred more accurate
When a function is assigned to a variable and called through that
variable then we previously didn't realise it was a function. With
this change we try use local flow to determine if the function being
called is a method.
2023-07-19 10:24:27 +01:00
James Fletcher
8a46ff344a Merge pull request #13768 from github/update-presentations
Remove mentions of LGTM from CodeQL training presentations
2023-07-19 09:54:02 +01:00
James Fletcher
a54b96cb8d Merge branch 'main' into update-presentations 2023-07-19 09:35:52 +01:00
james
70076fd3f0 remove lgtm from presentations 2023-07-19 09:33:13 +01:00
Geoffrey White
a58dbf26b5 Merge pull request #13759 from geoffw0/parsemode2
Swift: Refactor regex library
2023-07-19 08:36:28 +01:00
Geoffrey White
cf7311f3f1 Swift: Expand parse mode support to include NSRegularExpression options. 2023-07-19 08:34:30 +01:00
Geoffrey White
cd1e73bd65 Swift: Add some more test cases. 2023-07-19 08:34:29 +01:00
Geoffrey White
dc5f964ce0 Swift: Modify the test stubs to test flow models more robustly. 2023-07-19 08:34:29 +01:00
Geoffrey White
84f592b8a1 Swift: Add another test case. 2023-07-19 08:34:29 +01:00
Geoffrey White
f8b8c67813 Swift: Clean up and autoformat. 2023-07-19 08:34:27 +01:00
Geoffrey White
3c1f755580 Swift: Support other parse modes. 2023-07-19 08:33:48 +01:00
Geoffrey White
8273fa1a8c Swift: Track parse modes (prototype version). 2023-07-19 08:33:43 +01:00
Anders Schack-Mulligen
afc46576f0 Docs: Review fix. 2023-07-19 09:14:33 +02:00
Owen Mansel-Chan
9b0d7f3515 Merge pull request #13739 from owen-mc/go/extractor-use-origin
Use Origin() in Go extractor
2023-07-18 21:37:46 +01:00
Robert Marsh
093c6905dd Swift: only read ArrayContent from subscript keypaths 2023-07-18 19:42:54 +00:00
Jeroen Ketema
b72d89295a Merge pull request #13762 from jketema/fun-qual
C++: Handle `FunctionAccess`es with qualifiers
2023-07-18 21:17:30 +02:00
Mathias Vorreiter Pedersen
3e1b4d97fe C++: Add QLDoc. 2023-07-18 18:15:25 +01:00
Mathias Vorreiter Pedersen
576f021c25 C++: Fix Code Scanning errors. 2023-07-18 18:15:25 +01:00
Mathias Vorreiter Pedersen
4762e883fc C++: Add inline expectations tests for the invalid-pointer-to-dereference stage of the query. 2023-07-18 18:15:24 +01:00
Mathias Vorreiter Pedersen
a735d18a1b C++: Add inline expectations tests for the allocation-to-invalid-pointer stage of the query. 2023-07-18 18:15:24 +01:00
Mathias Vorreiter Pedersen
5099de5b3d C++: Split the query into 4 files. 2023-07-18 18:15:18 +01:00
Mathias Vorreiter Pedersen
5a15c19e4b QL: Accept test changes. 2023-07-18 18:04:46 +01:00
Mathias Vorreiter Pedersen
3b3f374223 QL: Fix FP in 'ql/missing-noinline'. 2023-07-18 17:55:44 +01:00
Geoffrey White
5dea539f3f Swift: Fix QL-for-QL suggestion. 2023-07-18 16:51:12 +01:00
Arthur Baars
99d8ae720f Swift: improve print-cfg query 2023-07-18 16:49:58 +02:00
Jeroen Ketema
aad094bdd0 C++: Handle FunctionAccesses with qualifiers
Also fix the IR generation for these and add more IR tests involving value
categories.
2023-07-18 16:35:39 +02:00
Robert Marsh
bcc45658b3 Swift: Change note for ArrayContent 2023-07-18 14:12:53 +00:00
Robert Marsh
1fac08ef6c Swift: add qldoc for ArrayContent and Array models 2023-07-18 14:08:33 +00:00
Robert Marsh
dfa5e18988 Swift: autoformat 2023-07-18 14:01:30 +00:00
Mathias Vorreiter Pedersen
a038b389c3 C++: More cleanup. 2023-07-18 14:03:04 +01:00
Mathias Vorreiter Pedersen
d41d2bc29e Merge pull request #13699 from MathiasVP/final-config-to-invalid-pointer-deref
C++: Handle call-contexts mismatches in `cpp/invalid-pointer-deref`
2023-07-18 13:08:21 +01:00
Geoffrey White
efea11fd0f Swift: getFullName. 2023-07-18 12:53:45 +01:00
Alex Ford
e803e98ee4 Merge pull request #13585 from alexrford/rb/rack-env-query-string
Ruby: add rack `env['QUERY_STRING']` as a remote flow input
2023-07-18 12:44:07 +01:00
yoff
a1aa16f901 Merge pull request #13745 from GeekMasher/py-mad-xss
Python - Add Models as Data support for Reflected XSS Query
2023-07-18 13:39:17 +02:00
Paul Hodgkinson
c7084b6d8e Merge branch 'main' into java/experimental/command-injection 2023-07-18 11:38:44 +01:00
Geoffrey White
1deacf40ca Merge pull request #13660 from geoffw0/regexinjection
Swift: Query for regular expression injection
2023-07-18 10:25:30 +01:00
Geoffrey White
96dece3c88 Swift: ReDoS query result changes. 2023-07-18 10:11:22 +01:00
Jeroen Ketema
5d8b203112 Merge pull request #13758 from jketema/val-cat-tests
C++: Add more IR tests
2023-07-18 11:02:27 +02:00
Geoffrey White
86c6960e2a Swift: Add RegexUseFlow and modify the role of StringLiteralUseFlow. 2023-07-18 09:49:47 +01:00
Geoffrey White
c76d85df1b Swift: Create a model for RegexCreation. 2023-07-18 09:49:47 +01:00
Geoffrey White
734a00d616 Swift: Rename so that different data flows will be clear. 2023-07-18 09:49:47 +01:00
Geoffrey White
f243e854ae Swift: Move regex dataflow code into a RegexTracking library (similar to the layout in Ruby and Python). 2023-07-18 09:49:36 +01:00
Anders Schack-Mulligen
e72366194b Merge pull request #13754 from aschackmull/java/remotesource-inbarrier
Java: Exclude source-to-source flow in 5 queries.
2023-07-18 10:33:44 +02:00
Geoffrey White
b5a8a8d431 Merge pull request #13715 from geoffw0/parsemode
Swift: Recognize regular expression parse mode flags
2023-07-18 09:09:56 +01:00
Jeroen Ketema
e2de94b233 C++: Add more IR tests
These show the value categories for more static member calls, and show that
a load occurs when a `volatile` variable is being used in an empty context.
2023-07-18 08:40:54 +02:00
Jeroen Ketema
a426010b06 Merge pull request #13621 from MathiasVP/deprecate-ast-dataflow
C++: Deprecate AST dataflow
2023-07-18 08:13:47 +02:00
Robert Marsh
81a25b23ba Swift: fix tests for array concatenation 2023-07-17 19:10:46 +00:00
Robert Marsh
d4b635d674 Swift: add ArrayContent summary support 2023-07-17 19:09:05 +00:00
Robert Marsh
169326ffe5 Swift: support array keypath reads in dataflow 2023-07-17 18:05:06 +00:00
Robert Marsh
0b35be284e Swift: additional dataflow tests for arrays 2023-07-17 18:03:20 +00:00
Owen Mansel-Chan
a7469ce4f1 Use Origin() 2023-07-17 16:11:25 +01:00
Geoffrey White
ddb499071c Swift: Pragmatic fix for CustomUrlSchemes.qll. 2023-07-17 16:10:37 +01:00
Mathias Vorreiter Pedersen
d63ead55dc C++: Remove barrier that's no longer needed. 2023-07-17 15:59:35 +01:00
Geoffrey White
05cb429635 Swift: Add CfgConsistency.expected. 2023-07-17 15:59:18 +01:00
Robert Marsh
ef9376d39c Swift: more ArrayContent tests 2023-07-17 14:58:40 +00:00
Mathew Payne
6ef55aa14f Update python/ql/lib/semmle/python/security/dataflow/ReflectedXSSCustomizations.qll
Co-authored-by: yoff <lerchedahl@gmail.com>
2023-07-17 15:44:38 +01:00
Geoffrey White
70a9fe3974 Swift: Change note. 2023-07-17 15:42:56 +01:00
Geoffrey White
eca2c21af5 Swift: Model referrerURL. 2023-07-17 15:42:51 +01:00
Geoffrey White
bc4724b1fb Swift: Test the customurlschemes fields that inherit taint. 2023-07-17 15:39:02 +01:00
Ian Lynagh
8a0286ec34 Java: Improve the diagnostics consistency query
Diagnostics can be easier to read if you see them in the order in which
they were generated. By selecting the compilation and indexes, they get
sorted by the testsuite driver.

d.getCompilationInfo(c, f, i) would be a bit more natural as
d = c.getDiagnostic(f, i), but currently we don't import Diagnostic into
the default ('import java') namespace, and I don't think it's worth
changing that for this.
2023-07-17 15:37:05 +01:00
Geoffrey White
869ad2eb65 Apply suggestions from code review
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
2023-07-17 15:17:24 +01:00
Max Schaefer
9432fec612 JavaScript: Improve qhelp for js/server-crash.
The examples now use `fs.access` instead of the deprecated `fs.exists`. I have also rewritten the async/await example, since as of Node.js v15 the default behaviour for uncaught exceptions has changed to terminating the process instead of logging a warning, making the previous advice incorrect.
2023-07-17 14:44:23 +01:00
Alex Ford
27ee72c265 Merge remote-tracking branch 'origin/main' into rb/rack-env-query-string 2023-07-17 14:11:25 +01:00
Alex Ford
06aefe01b8 Update ruby/ql/lib/codeql/ruby/frameworks/rack/internal/App.qll
Co-authored-by: Asger F <asgerf@github.com>
2023-07-17 14:08:44 +01:00
Alex Ford
ab1f341aa6 Merge pull request #13566 from alexrford/rb/rack-params
Ruby: add `Rack::Request` params and cookies as remote input sources
2023-07-17 14:07:20 +01:00
Mathias Vorreiter Pedersen
11f2681904 Merge pull request #13740 from MathiasVP/unique-entry-point
C++: Exclude invalid functions from new range analysis
2023-07-17 13:32:50 +01:00
yoff
d032bf5c0e Merge pull request #13685 from RasmusWL/captured-variables-default-param-value
Python: Model parameter with default value as `DefinitionNode`
2023-07-17 14:25:13 +02:00
Mathias Vorreiter Pedersen
be95d29589 Documentation: Update version number. 2023-07-17 11:08:40 +01:00
Mathew Payne
e3d75c488e Merge branch 'main' into py-mad-xss 2023-07-17 11:08:09 +01:00
Mathias Vorreiter Pedersen
8c21699040 C++: Accept test changes. 2023-07-17 10:51:42 +01:00
Mathias Vorreiter Pedersen
f9db6a9868 C++: Don't do range analysis on malformed IR. 2023-07-17 10:15:01 +01:00
Geoffrey White
69b98c769c Merge pull request #13354 from geoffw0/sharedsensitive2
Swift: Improve SensitiveExprs.qll Heuristics
2023-07-17 09:16:09 +01:00
Geoffrey White
4644b7184b Swift: # -> // 2023-07-17 09:12:01 +01:00
Alvaro Muñoz
eacecab689 remove PrepareContext 2023-07-17 09:16:32 +02:00
Anders Schack-Mulligen
6770d2a49b Java: Exclude source-to-source flow in 5 queries. 2023-07-17 09:06:49 +02:00
Owen Mansel-Chan
a2a2e93cfd Fix printing when one obj is nil 2023-07-15 07:06:16 +01:00
Owen Mansel-Chan
0b8353eb64 Merge pull request #13602 from pwntester/ruby/add_gqlgen_support
Go: Add support for the gqlgen library
2023-07-15 07:04:09 +01:00
Maiky
3f36d3244b Fix singleton set literal 2023-07-15 00:18:21 +02:00
Alvaro Muñoz
0ea0d54050 gofmt -w . 2023-07-14 22:15:40 +02:00
Maiky
378313332b Fix sink 2023-07-14 20:55:24 +02:00
Alex Ford
bdf1aa0807 Merge pull request #13746 from asgerf/rb/fix-rack-todo
Ruby: Use API graphs asCallable() instead of Proc.new workaround
2023-07-14 16:29:00 +01:00
Alex Ford
d89c10dd85 Merge pull request #13130 from maikypedia/maikypedia/xpath-injection
Ruby :  XPath Injection Query (CWE-643)
2023-07-14 14:10:09 +01:00
Owen Mansel-Chan
cff09d28b8 Test if Origin() works (for Var and Func) 2023-07-14 13:52:50 +01:00
Rasmus Wriedt Larsen
13fa08a90a Python: Move source modeling to shared file 2023-07-14 14:47:50 +02:00
Rasmus Wriedt Larsen
aa8ed91993 Python: Accept .expected changes
but it's kinda bad, since it has paths to stdlib in there :(
2023-07-14 14:47:27 +02:00
Taus
6b425f1395 Java: Revert definition of isNeutral
Reverts the change made in
daf2743143

With the change in the aforementioned commit, we were extracting candidates for endpoints that
had a neutral _summary_ model. These are bad candidates, as they have already been triaged.
2023-07-14 14:45:22 +02:00
Rasmus Wriedt Larsen
9e0f985e23 Python: Fix qlref 2023-07-14 14:33:17 +02:00
Rasmus Wriedt Larsen
8279cf7c9c Merge branch 'main' into amammad-python-WebAppsConstatntSecretKeys 2023-07-14 14:32:43 +02:00
Taus
6793bc6c6b Java: Exclude qualifier argument for existing models
Excludes candadites for `Argument[this]` where we already have a model that covers a
different argument of the containing call.
2023-07-14 14:26:21 +02:00
Taus
895e829eb1 Java: Add QLDoc for query predicates 2023-07-14 14:22:10 +02:00
Taus
c4487673e8 Java: Swap input and ext 2023-07-14 14:21:59 +02:00
Taus
9193de6898 Merge pull request #13730 from github/tausbn/limit-number-of-candidates-in-application-mode
Java: Limit the number of samples extracted in application mode
2023-07-14 14:09:59 +02:00
Asger F
2962727f0f Ruby: Use API graphs asCallable() instead of Proc.new workaround 2023-07-14 13:50:07 +02:00
Alex Ford
dbb55ff2b4 Ruby: fix xpathinjection deprecation warnings 2023-07-14 12:45:27 +01:00
Mathew Payne
cf65ab834d fix: formatting issue 2023-07-14 12:31:40 +01:00
Mathew Payne
4c1612f2dd feat: add change log notes 2023-07-14 12:28:51 +01:00
Mathew Payne
c292984338 feat: add MaD to XSS query 2023-07-14 12:25:54 +01:00
Alex Ford
a524735236 Merge branch 'main' into maikypedia/ldap-injection 2023-07-14 12:05:17 +01:00
Alex Ford
c0009379d1 qlformat 2023-07-14 12:04:03 +01:00
Asger F
31bed36231 Merge pull request #13612 from asgerf/rb/api-graph-explicit-proc-lambda
Ruby: Improve support for explicit proc-creation
2023-07-14 13:02:44 +02:00
Rasmus Wriedt Larsen
0db535bdd7 Python: Minor naming update 2023-07-14 12:54:54 +02:00
Geoffrey White
1c8297b91b Merge pull request #13548 from geoffw0/redos
Swift: Query for REDOS (Regular Expression Denial Of Service)
2023-07-14 10:44:52 +01:00
Anders Schack-Mulligen
80a799df01 Merge pull request #13735 from aschackmull/dataflow/forcehighprecision-fix
Dataflow: Fix forceHighPrecision for length-2 prefixes.
2023-07-14 11:42:35 +02:00
Asger F
2c3117a981 JS: Add documentation for Fuzzy component 2023-07-14 11:33:06 +02:00
Geoffrey White
1274393c72 Swift: Remove 'cached' annotations. 2023-07-14 10:11:09 +01:00
Anders Schack-Mulligen
aaea1ad2fa Docs: Switch to PascalCase. 2023-07-14 10:18:42 +02:00
Chris Smowton
3d8b4d850a Merge pull request #13742 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-07-14 09:00:17 +01:00
Anders Schack-Mulligen
2947f176ef Docs: Update data flow documentation to the new API. 2023-07-14 09:59:08 +02:00
github-actions[bot]
b675a1e2fe Add changed framework coverage reports 2023-07-14 00:19:14 +00:00
Alvaro Muñoz
11a915dcd7 Merge branch 'ruby/add_gqlgen_support' of https://github.com/pwntester/codeql into ruby/add_gqlgen_support 2023-07-13 22:16:41 +02:00
Alvaro Muñoz
55366f6743 retab 2023-07-13 22:16:34 +02:00
Robert Marsh
42cc6448cc Swift: add DataFlow::Content for arrays 2023-07-13 20:16:21 +00:00
Alvaro Muñoz
9f6c7efd91 Update go/ql/test/library-tests/semmle/go/frameworks/gqlgen/gqlgen.ql
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-13 22:11:37 +02:00
Alvaro Muñoz
4111ed6653 retab generated.go 2023-07-13 22:10:19 +02:00
Alvaro Muñoz
d681094824 Fixup expected file 2023-07-13 21:42:16 +02:00
Alvaro Muñoz
1dedc0ae55 Update go/ql/test/library-tests/semmle/go/frameworks/gqlgen/graph/schema.resolvers.go
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-13 21:39:47 +02:00
Alvaro Muñoz
94628edf98 Merge branch 'ruby/add_gqlgen_support' of https://github.com/pwntester/codeql into ruby/add_gqlgen_support 2023-07-13 21:36:49 +02:00
Alvaro Muñoz
730781720d remove unnecessary file 2023-07-13 21:35:11 +02:00
Alvaro Muñoz
7a54755c1b Apply suggestions from code review
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-13 21:32:56 +02:00
Alvaro Muñoz
1b6308e32f Apply suggestions from code review
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-13 21:32:46 +02:00
Geoffrey White
962c16d918 Apply suggestions from code review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2023-07-13 19:20:49 +01:00
Geoffrey White
2b9d25b317 Swift: Additional test cases. 2023-07-13 17:30:03 +01:00
Asger F
d57276ca35 Merge pull request #13719 from asgerf/js/barrier-inout
JS: Replace barrier edges with barrier nodes
2023-07-13 16:36:52 +02:00
Asger F
eb5c600a6b Python: fix some whitespace 2023-07-13 15:42:34 +02:00
Asger F
2b0a8097e6 Python: implement Fuzzy for Python 2023-07-13 15:42:34 +02:00
Asger F
f1c82b650f Ruby: Implement Fuzzy for Ruby 2023-07-13 15:42:34 +02:00
Asger F
919cb07c1e Sync ApiGraphModels.qll 2023-07-13 15:42:33 +02:00
Mathias Vorreiter Pedersen
c13f015b95 C++: No need to select the 'instruction' as the sink when the dataflow node has a better 'toString'. 2023-07-13 14:17:43 +01:00
Mathias Vorreiter Pedersen
5e06043120 C++: Completely get rid of merged path nodes. 2023-07-13 14:15:14 +01:00
Tony Torralba
cafc67e3be Merge pull request #13714 from pwntester/java/langs3_improvements
[Java] Add missing commons lang3 model for ToStringBuilder.reflectionToString
2023-07-13 14:45:33 +02:00
Max Schaefer
85991266da Merge pull request #13661 from github/max-schaefer/improve-command-injection-qhelp
JavaScript: Improve query help for js/command-line-injection
2023-07-13 13:34:10 +01:00
Asger F
f3fab587a9 JS: Add Fuzzy token in identifying access path 2023-07-13 14:01:06 +02:00
Anders Schack-Mulligen
a0e96594d8 Merge pull request #13736 from aschackmull/dataflow/remove-superfluous-module-members
C#/Java/Ruby: Remove superfluous module members.
2023-07-13 13:59:31 +02:00
Rasmus Wriedt Larsen
991d5cc54b Python: Fix test of HttpResponse.getBody() 2023-07-13 13:57:08 +02:00
Rasmus Wriedt Larsen
64a7206f3e Python: Improve aiohttp FileResponse/StreamResponse modeling
However, notice that the concepts tests use the HttpResponse location
for the `responseBody` tag, which seems a little odd in this situation,
where they are actually separate. Will fix in next commit.
2023-07-13 13:57:08 +02:00
Rasmus Wriedt Larsen
15269c9166 Python: Add StreamResponse test 2023-07-13 13:57:08 +02:00
Rasmus Wriedt Larsen
0f9ab8f53e Python: Fixup tests
But notice that keyword argument is not handled yet
2023-07-13 13:57:08 +02:00
Asger F
7c9e1ad6ec JS: Fix accidental recursion in Vue model
The API graph entry point depended on API::Node.

This was due to depending on the the TComponent newtype which has a branch that depends on API::Node
2023-07-13 13:41:21 +02:00
Alvaro Muñoz
a590c57174 add stubs 2023-07-13 13:31:15 +02:00
Alvaro Muñoz
362e8f7dd2 remove unrelated file 2023-07-13 13:29:06 +02:00
Max Schaefer
b8eb2ef8d8 Merge branch 'main' into max-schaefer/improve-command-injection-qhelp 2023-07-13 12:11:15 +01:00
Max Schaefer
ae237247f2 Apply suggestions from code review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2023-07-13 12:10:57 +01:00
Alvaro Muñoz
ee1ba71e5d add tests 2023-07-13 13:07:12 +02:00
Tamás Vajk
60af9b062c Merge pull request #13733 from tamasvajk/fix/test-path-combine
C#: Fix test expectations in `RuntimeVersion` tests to handle platfor…
2023-07-13 12:44:06 +02:00
Alvaro Muñoz
10cd649ba7 address code review feedback 2023-07-13 12:24:19 +02:00
Alvaro Muñoz
69efddbaef Apply suggestions from code review
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-07-13 12:23:00 +02:00
Alvaro Muñoz
aa2d61c7e3 replace deps with stubs 2023-07-13 12:18:12 +02:00
Asger F
18762db0fb Ruby: factor out isProcCreationCall 2023-07-13 11:53:16 +02:00
Asger F
8d2dba18c0 Ruby: change note 2023-07-13 11:53:16 +02:00
Asger F
f232669ea5 Ruby: support Proc.new alongside 'proc' and 'lambda' 2023-07-13 11:53:16 +02:00
Asger F
194fe85442 Ruby: Use asCallable() to generate epsilon edges 2023-07-13 11:53:16 +02:00
Asger F
452fbe7e8f Ruby: add test showing lack of lambda handling 2023-07-13 11:53:16 +02:00
Anders Schack-Mulligen
91de43f918 C#/Java/Ruby: Remove superfluous module members. 2023-07-13 11:38:35 +02:00
Stephan Brandauer
4391799b7e Merge pull request #13403 from github/java/update-mad-decls-after-triage-2023-06-08T08-51-47
Java: Update MaD Declarations after Triage
2023-07-13 11:15:41 +02:00
Anders Schack-Mulligen
837df2ad37 Dataflow: Sync. 2023-07-13 10:55:39 +02:00
Anders Schack-Mulligen
58cd16565f Dataflow: Fix forceHighPrecision for length-2 prefixes. 2023-07-13 10:55:39 +02:00
Anders Schack-Mulligen
d46b2a32ae Dataflow: Improve debug printing. 2023-07-13 10:55:39 +02:00
Jeroen Ketema
e6d7a83d41 Merge pull request #13732 from jketema/dataflow-default-none
C++/Swift: Remove `none()` dataflow configuration predicates
2023-07-13 10:42:39 +02:00
Tamas Vajk
35cc058474 C#: Fix test expectations in RuntimeVersion tests to handle platform dependent behaviour of Path.Combine 2023-07-13 09:50:26 +02:00
Tony Torralba
7204c30025 Update 2023-07-12-apache-commons-lang3-tostringbuilder.md 2023-07-13 09:38:33 +02:00
Owen Mansel-Chan
1767ca2682 Merge pull request #13728 from owen-mc/go/minor-cleanup-Twirp-models
Go: minor cleanup to Twirp models
2023-07-12 22:59:13 +01:00
Maiky
119a32fe0e fix naming error 2023-07-12 23:54:58 +02:00
Jeroen Ketema
52ab215560 C++/Swift: Remove none() dataflow configuration predicates
These now have default implementations that are also `none()`
2023-07-12 23:49:29 +02:00
Maiky
db0f38fe06 Update XpathInjectionQuery.qll 2023-07-12 23:46:47 +02:00
Edward Minnix III
541737d1a8 Merge pull request #13694 from egregius313/egregius313/add-default-isBarrier-2-isAdditionalFlowStep-4
DataFlow: Add default implementations of isBarrier/2 and isAddiitonalFlowStep/4
2023-07-12 17:10:17 -04:00
Alvaro Muñoz
4b85d54089 update tests and stubs 2023-07-12 22:21:49 +02:00
Alvaro Muñoz
300584c4bb Merge branch 'ruby/gopg_improvements' of https://github.com/pwntester/codeql into ruby/gopg_improvements 2023-07-12 22:09:27 +02:00
Alvaro Muñoz
53b27703cf replace deps with stubs 2023-07-12 22:09:16 +02:00
Geoffrey White
0bd522aa7b Merge branch 'main' into sharedsensitive2 2023-07-12 21:07:06 +01:00
Owen Mansel-Chan
8a573cca0f Merge pull request #13625 from GeekMasher/go-micro
[Go] GoMicro framework support
2023-07-12 20:57:01 +01:00
Ed Minnix
63299688d5 Add change notes for default implementations of isBarrier and isAdditionalFlowStep 2023-07-12 15:21:16 -04:00
Ed Minnix
3db2644008 Python: Add default implementation of StateConfigSig::isAdditionalFlowStep/4 2023-07-12 15:06:25 -04:00
Ed Minnix
43f870e395 Python: Add default implementation of StateConfigSig::isBarrier/2 2023-07-12 15:06:25 -04:00
Ed Minnix
e5ce78caab Go: Add default implementation of StateConfigSig::isAdditionalFlowStep/4 2023-07-12 15:06:25 -04:00
Ed Minnix
0549b5da87 Go: Add default implementation of StateConfigSig::isBarrier/2 2023-07-12 15:06:25 -04:00
Ed Minnix
18b606f930 Swift: Add default implementation of StateConfigSig::isAdditionalFlowStep/4 2023-07-12 15:06:25 -04:00
Ed Minnix
b76b9812fd Swift: Add default implementation of StateConfigSig::isBarrier/2 2023-07-12 15:06:25 -04:00
Ed Minnix
94638c9997 Ruby: Add default implementation of StateConfigSig::isAdditionalFlowStep/4 2023-07-12 15:06:25 -04:00
Ed Minnix
8a7081753d Ruby: Add default implementation of StateConfigSig::isBarrier/2 2023-07-12 15:06:25 -04:00
Ed Minnix
9618c0b0a1 C#: Add default implementation of StateConfigSig::isAdditionalFlowStep/4 2023-07-12 15:06:25 -04:00
Ed Minnix
a3c30992b1 C#: Add default implementation of StateConfigSig::isBarrier/2 2023-07-12 15:06:25 -04:00
Ed Minnix
2c0a456855 C++: Add default implementation of StateConfigSig::isAdditionalFlowStep/4 2023-07-12 15:06:24 -04:00
Ed Minnix
c73cd73001 C++: Add default implementation of StateConfigSig::isBarrier/2 2023-07-12 15:06:24 -04:00
Ed Minnix
1cd8922ab5 Java: Add default implementation of StateConfigSig::isAdditionalFlowStep/4 2023-07-12 15:06:24 -04:00
Ed Minnix
1835b40f7b Java: Add default impl to StateConfigSig::isBarrier/2 2023-07-12 15:06:24 -04:00
Geoffrey White
6d4c831ec5 Swift: Compute sensitive strings centrally (much more efficient evaluation). 2023-07-12 19:34:09 +01:00
Alvaro Muñoz
0180a482ce Apply suggestions from code review
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 18:27:45 +02:00
Mathew Payne
8d110ca2ac remove getName 2023-07-12 17:12:08 +01:00
Mathew Payne
18db525d18 Apply suggestions from code review
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 17:11:40 +01:00
Maiky
1559b7da3c Update Frameworks.qll 2023-07-12 17:45:45 +02:00
Chris Smowton
5567d4d1b8 Merge pull request #13724 from Malayke/patch-1
Update CONTRIBUTING.md
2023-07-12 16:36:10 +01:00
Alvaro Muñoz
7a717555aa fix qldocs 2023-07-12 17:27:17 +02:00
Alvaro Muñoz
733e625080 fix change note 2023-07-12 17:26:12 +02:00
Alvaro Muñoz
f2cc2af276 aiohttp improvements 2023-07-12 17:19:56 +02:00
yoff
76455d628e Update python/ql/lib/semmle/python/frameworks/ServerLess.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-07-12 16:50:13 +02:00
Chris Smowton
64257eedae Fix count 2023-07-12 15:48:36 +01:00
Maiky
c9fadd98f4 Support CommandInjectionAdditionalFlowStep and fix doc errors 2023-07-12 16:48:27 +02:00
Chris Smowton
464ac60db1 Amend and order 2023-07-12 15:48:18 +01:00
Rasmus Lerchedahl Petersen
02c41f3dcf JavaScript: Use shared library for serverless 2023-07-12 16:46:34 +02:00
Maiky
d7d9ffc449 Doc error
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-07-12 16:44:17 +02:00
Ian Lynagh
fe24cc1900 Merge pull request #13718 from igfoo/igfoo/file_classes
Kotlin: Improve file class support
2023-07-12 15:42:16 +01:00
Rasmus Lerchedahl Petersen
4d2ce6b2e0 python: create shared serverless module and use it
Modelled on the javascript serverless module, but
- The predicate that reports YAML files is now public
  so languages can implement their own file conventions.
- It also reports framework and runtime.
- The conveninece predicates with files still exist,
  but they only report the path.
- Handler mapping conventions are now documented.
- Use parameterised serverless module in Python,
  tests now pass.
2023-07-12 16:42:01 +02:00
Rasmus Lerchedahl Petersen
a892e83c8e python: add simple test for AWS lambda
made space for other serverless frameworks in the directory `serverless`
2023-07-12 16:42:00 +02:00
Mathew Payne
3a1e3f71cc Update go/ql/lib/change-notes/2023-06-29-modelling-go-micro.md
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 15:09:56 +01:00
Owen Mansel-Chan
5f76cafc64 Merge pull request #13672 from owen-mc/go/make-parameter-nodes-for-unused-parameters-2
Go: make `ParameterNode`s for unused parameters #2 (make a disjoint class for unused ones)
2023-07-12 15:04:46 +01:00
Taus
49194a2af7 Java: Limit the number of samples extracted in application mode
Uses the same trick as for the negative examples, this time with a limit of 7
candidates for each endpoint signature.

As this duplicates some of the logic used in another query, it may be worthwhile
to consider extracting this into a shared parameterized module.
2023-07-12 15:13:10 +02:00
Mathew Payne
f2caf196b7 Update go/ql/test/library-tests/semmle/go/frameworks/GoMicro/gomicro.expected
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 13:09:02 +01:00
Mathew Payne
25e7ddec31 Apply suggestions from code review
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 13:08:44 +01:00
Mathew Payne
e31cce56d1 Update go/ql/lib/semmle/go/frameworks/GoMicro.qll
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 13:00:21 +01:00
Mathew Payne
e951720573 Update go/ql/lib/semmle/go/frameworks/GoMicro.qll
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 12:59:45 +01:00
Mathew Payne
7f6067de42 Update go/ql/lib/semmle/go/frameworks/GoMicro.qll
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 12:59:01 +01:00
Mathew Payne
cefb914af6 Update go/ql/lib/semmle/go/frameworks/GoMicro.qll
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 12:58:23 +01:00
Mathew Payne
94e96cb7a8 Update go/ql/lib/semmle/go/frameworks/GoMicro.qll
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 12:57:32 +01:00
Ian Lynagh
af5cd7cf4f Merge pull request #13723 from igfoo/igfoo/kotlin-1.9.0
Kotlin: Run CI with 1.9.0
2023-07-12 12:24:04 +01:00
Mathias Vorreiter Pedersen
2c2f9b9e17 C++: Fix comment. 2023-07-12 11:59:29 +01:00
Mathias Vorreiter Pedersen
19872d5adf Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-12 11:58:07 +01:00
Mathias Vorreiter Pedersen
3d5414b84c Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-12 11:57:51 +01:00
Ian Lynagh
75c835c9d2 Add missing "a" to a qldoc comment
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com>
2023-07-12 11:24:42 +01:00
Malayke
827a2df631 Update CONTRIBUTING.md
add swift
2023-07-12 18:05:14 +08:00
Owen Mansel-Chan
78816f082e Make QLDoc comments more concise too 2023-07-12 11:01:54 +01:00
Owen Mansel-Chan
2ad12f18f1 Make QL more concise 2023-07-12 10:56:03 +01:00
Rasmus Wriedt Larsen
98ed5cf522 Python: Move not this instanceof ParameterDefinition logic 2023-07-12 11:31:27 +02:00
Alvaro Muñoz
ff1ae7d9c6 add change note 2023-07-12 11:05:25 +02:00
Alvaro Muñoz
0247278bad add change note 2023-07-12 11:03:24 +02:00
Alvaro Muñoz
07e25e36b3 Merge branch 'java/langs3_improvements' of https://github.com/pwntester/codeql into java/langs3_improvements 2023-07-12 11:00:04 +02:00
Alvaro Muñoz
46e326e106 add change note 2023-07-12 10:59:56 +02:00
Tony Torralba
c54e93f005 Merge pull request #13705 from atorralba/atorralba/java/android-unsafe-fetch-apply
Java: Add support for Kotlin's `apply` to java/android/unsafe-android-wevbiew-fetch
2023-07-12 09:45:54 +02:00
Asger F
c7abd4c2af JS: Remove the unused edge-sanitizer hook in UnvalidatedDynamicMethodCall 2023-07-12 09:26:37 +02:00
Alvaro Muñoz
51f7031416 Update java/ql/lib/ext/org.apache.commons.lang3.builder.model.yml
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-07-12 09:06:05 +02:00
Maiky
cea3477ac2 Qhelp and examples 2023-07-12 02:13:07 +02:00
Maiky
c255f8717d Change hasFlowPath to flowPath
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-07-11 19:20:54 +02:00
Maiky
c4f72dd2f2 Change make to global
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-07-11 19:20:34 +02:00
Ian Lynagh
b83f0275e3 Kotlin: Accept test changes for Kotlin 1.9.0 2023-07-11 17:37:24 +01:00
Ian Lynagh
470e033090 Kotlin: Restrict a test's results to those in the test directory 2023-07-11 17:37:23 +01:00
Malayke
bf1db35d87 Update CONTRIBUTING.md
add go
2023-07-11 23:32:58 +08:00
Ian Lynagh
6dedd9286c Kotlin: Record "file class" info from the compiler
We were making file classes when the parent was a file, but not when it
was a class marked as one.
2023-07-11 15:58:42 +01:00
Ian Lynagh
cfd29de677 Kotlin: Add Class.isFileClass() 2023-07-11 15:58:41 +01:00
Ian Lynagh
2162530729 Kotlin: Add an integration test for file classes 2023-07-11 15:58:41 +01:00
Owen Mansel-Chan
8e85f4d91c Merge pull request #13601 from pwntester/ruby/add_bun_support
Go: Add support for Bun library
2023-07-11 14:48:48 +01:00
Owen Mansel-Chan
84bfd10352 Merge pull request #13589 from owen-mc/go/tolerate-go-mod-not-in-project-root
Go: Deal better with a single go.mod file which is not in the project root
2023-07-11 14:32:10 +01:00
Asger F
c8af28c2ca Merge pull request #13700 from asgerf/js/path-join-spread
JS: Recognize 'fs/promises' alias and handle spread arguments in path.join()
2023-07-11 15:31:13 +02:00
Asger F
1a395c5b34 JS: Use sanitizerOut in PrototypePollutingAssignment 2023-07-11 15:24:10 +02:00
Asger F
03bdebe3b3 JS: Update a test.
The test had a bug on the line `src = src` so the new code is "more equivalent than usual"
2023-07-11 15:24:09 +02:00
Ian Lynagh
a603f21ce1 Kotlin: Use 1.9.0 for CI 2023-07-11 14:10:48 +01:00
Asger F
b09ed4b0e3 JS: Update UnsafeJQueryPlugin 2023-07-11 15:01:33 +02:00
Asger F
a1d8a05bcb JS: Update ResourceExhaustion 2023-07-11 14:56:53 +02:00
Asger F
58a557b18e JS: Update InsecureRandomness 2023-07-11 14:56:43 +02:00
Asger F
e863e2376d JS: Use sanitizerIn in ExtenralAPIUsedWithUntrustedData 2023-07-11 14:50:29 +02:00
Asger F
094302a27b JS: Replace sanitizing prefix edge with node 2023-07-11 14:48:13 +02:00
Ian Lynagh
c21797dd3c Kotlin: Add a test for file classes 2023-07-11 13:21:56 +01:00
Asger F
944a2ca825 JS: Replace ClearTextLogging::isSanitizerEdge with a node 2023-07-11 14:20:17 +02:00
Geoffrey White
cffdc0a8a7 Merge pull request #13698 from geoffw0/url2
Swift: Expand taint models for URL
2023-07-11 13:14:20 +01:00
Asger F
68584e549e JS: Replace isOptionallySanitizedEdge with a node 2023-07-11 12:57:33 +02:00
Asger F
3691b836cb JS: Add tests 2023-07-11 11:37:30 +02:00
Rasmus Wriedt Larsen
83ca47f32c Python: Add change-note 2023-07-11 11:33:06 +02:00
Rasmus Wriedt Larsen
a1225674ee Python: Add implementation note about why not targeting ESSA node 2023-07-11 11:32:26 +02:00
Jeroen Ketema
92ee31849c Merge pull request #13643 from jketema/inline-5
Rework the remaining inline expectation tests to use the parameterized module
2023-07-11 11:29:14 +02:00
Mathew Payne
3cc5ba1eed Remove un-needed code 2023-07-11 10:26:15 +01:00
Mathias Vorreiter Pedersen
63c5684fbb C++: Join with 'invalidPointerToDerefSource' in 'hasFlowPath' to prevent conflation of paths. 2023-07-11 10:24:01 +01:00
Asger F
0841677b14 JS: Add isSanitizerX variants in TaintTracking 2023-07-11 11:14:37 +02:00
Geoffrey White
fcc98f83c0 Swift: Autoformat. 2023-07-11 10:05:24 +01:00
Asger F
d53beb3784 JS: Embed check for in/out barriers in edge barrier check 2023-07-11 11:04:28 +02:00
Asger F
4964d811a5 JS: Add interface for isBarrier in/out 2023-07-11 11:04:28 +02:00
Geoffrey White
5ef097fd66 Swift: Update consistency check .expected to exactly match CI. 2023-07-11 09:54:39 +01:00
Alvaro Muñoz
e8563e5dfd fix row 2023-07-11 10:47:23 +02:00
Mathias Vorreiter Pedersen
a4c0063ab1 Merge pull request #13679 from MathiasVP/speedup-big-step
DataFlow: Speed up the big step relation
2023-07-11 09:44:17 +01:00
Geoffrey White
2d7166b903 Swift: Minor corrections. 2023-07-11 09:39:42 +01:00
Alvaro Muñoz
c2f1fbbf98 Add missing commons lang3 model for ToStringBuilder.reflectionToString 2023-07-11 10:34:17 +02:00
Jeroen Ketema
d217e1e87c Merge pull request #13647 from purs3lab/uninitialized-local
C++: exclude uninitialized uses inside pure expression statements
2023-07-11 10:31:33 +02:00
Jeroen Ketema
8cee4f37a4 Merge branch 'main' into inline-5 2023-07-11 10:30:11 +02:00
Alvaro Muñoz
2ce1192ee6 implement field taint inheritance for Struts2 unmarshalled objects 2023-07-11 10:28:14 +02:00
Geoffrey White
f45b89a3cc Swift: Add a few more variant test cases. 2023-07-11 09:26:37 +01:00
Alvaro Muñoz
047d486509 add new struts2 models 2023-07-11 10:23:26 +02:00
Tony Torralba
93ad204abd Merge pull request #13708 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-07-11 09:48:12 +02:00
github-actions[bot]
7b8cd77cec Add changed framework coverage reports 2023-07-11 00:19:16 +00:00
Jeroen Ketema
8cec884c59 Merge pull request #13701 from rdmarsh2/rdmarsh2/cpp/constant-array-overflow-tests-2
C++: more constant array off-by-one tests
2023-07-11 00:17:09 +02:00
Geoffrey White
07bbc0f537 Swift: Change note. 2023-07-10 19:28:11 +01:00
Geoffrey White
ef344c6a80 Swift: Match flag groups more strictly as other (? group types exist. 2023-07-10 19:22:53 +01:00
Geoffrey White
952a5d2aa2 Swift: Use accurate Swift regex mode flags. 2023-07-10 19:20:34 +01:00
Geoffrey White
6e80021c4e Swift: Support multiple parse mode flags. 2023-07-10 19:20:29 +01:00
Geoffrey White
f50345659e Swift: Fix parse failures due to mode flags. 2023-07-10 19:14:42 +01:00
Geoffrey White
a7a609d591 Swift: Add tests for parse modes. 2023-07-10 19:11:33 +01:00
Jeroen Ketema
3fe99dc4c7 Merge pull request #13704 from jketema/ir-test
C++: Add assignment operation IR test where the result is being used
2023-07-10 19:01:24 +02:00
Robert Marsh
5eea8e49b7 C++: more constant array off-by-one tests 2023-07-10 12:51:48 -04:00
Jeroen Ketema
de3251a634 C++: Add assignment operation IR test where the result is being used 2023-07-10 17:55:50 +02:00
Mathew Payne
20d4e53eaf Update go/ql/lib/change-notes/2023-06-29-modelling-go-micro.md
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-10 16:44:19 +01:00
Mathew Payne
ceade62f62 Update go/ql/lib/semmle/go/frameworks/GoMicro.qll
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-10 16:44:11 +01:00
Mathew Payne
9c1a0225eb Update go/ql/lib/semmle/go/frameworks/GoMicro.qll
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-10 16:43:54 +01:00
Tony Torralba
ce600367df Java: Add support for Kotlin's apply to java/android/unsafe-android-webview-fetch 2023-07-10 17:40:16 +02:00
Tony Torralba
16529cdd18 Add failing test 2023-07-10 17:40:15 +02:00
Tony Torralba
b70e21df4f Merge pull request #13702 from atorralba/atorralba/kotlin/apply
Kotlin: Support apply
2023-07-10 17:39:57 +02:00
Geoffrey White
7748a45c2f Swift: Initial implementation of regex mode flags. 2023-07-10 16:20:24 +01:00
Tony Torralba
0f18c0227b Kotlin: Support apply 2023-07-10 16:15:27 +02:00
Max Schaefer
63c45a0da3 Add another example of when and how to use shell-quote. 2023-07-10 14:02:17 +01:00
Mathias Vorreiter Pedersen
3fe58d97bd C++: Accept test changes. 2023-07-10 13:53:04 +01:00
Mathias Vorreiter Pedersen
ae8ecc9076 C++: Add a final configuration to preserve call contexts between configuration transitions. 2023-07-10 13:52:32 +01:00
Mathias Vorreiter Pedersen
055aea6e1a C++: Add FP caused by missing call context. 2023-07-10 13:52:30 +01:00
Geoffrey White
ce9c367e90 Swift: Add a .expected file for the consistency test failure. 2023-07-10 13:30:26 +01:00
Asger F
8234b8f175 JS: Change note 2023-07-10 13:19:44 +02:00
Asger F
d88f557dbe Merge pull request #13683 from asgerf/rb/api-graph-noobject
Ruby: exclude Object class from API graph
2023-07-10 12:51:15 +02:00
Asger F
27085b1fd0 JS: Fix whitespace 2023-07-10 12:07:13 +02:00
Asger F
fe90146a16 JS: Add test for path.join with spread argument 2023-07-10 12:07:07 +02:00
Asger F
06bc0f6957 JS: Add test for fs/promises 2023-07-10 12:05:03 +02:00
Erik Krogh Kristensen
e5cc5a1ede Merge pull request #13693 from github/dependabot/cargo/ql/regex-1.9.1
Bump regex from 1.9.0 to 1.9.1 in /ql
2023-07-10 10:08:52 +02:00
Alvaro Muñoz
b380853d1a remove already modeled stubs 2023-07-10 09:58:35 +02:00
AlexDenisov
408e7ad572 Merge pull request #13678 from github/alexdenisov/5.9-preparation
Swift: 5.9 preparation
2023-07-10 08:35:17 +02:00
dependabot[bot]
be71898a65 Bump regex from 1.9.0 to 1.9.1 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.9.0 to 1.9.1.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.9.0...1.9.1)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-10 03:42:24 +00:00
Maiky
e45a31744f Initial commit 2023-07-09 04:17:35 +02:00
Mathias Vorreiter Pedersen
44f23bfa59 Merge pull request #13690 from github/post-release-prep/codeql-cli-2.14.0
Post-release preparation for codeql-cli-2.14.0
2023-07-07 23:39:38 +01:00
Mingjie Shen
d8e0ffa52d Update cpp/ql/src/Likely Bugs/Memory Management/UninitializedLocal.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-07 12:25:42 -04:00
github-actions[bot]
13cf054a9d Post-release preparation for codeql-cli-2.14.0 2023-07-07 14:55:41 +00:00
Tamás Vajk
4028a50c4c Merge pull request #13689 from tamasvajk/fix-conflict
C#: Add missing parameter to interface
2023-07-07 16:42:38 +02:00
Rasmus Wriedt Larsen
44c67171f2 Python: Fix default parameter value flow
Somehow the previous fix didn't work :O
2023-07-07 16:17:07 +02:00
Tamas Vajk
65ed244f34 C#: Add missing parameter to interface 2023-07-07 16:10:41 +02:00
Tamás Vajk
9cef290bc3 Merge pull request #13687 from tamasvajk/standalone/nugetconfig
C#: Use `nuget.config` file for `dotnet restore` fallback logic
2023-07-07 15:53:07 +02:00
Jeroen Ketema
c2be2c2738 Add change note for InlineExpectationsTest class deprecation 2023-07-07 15:26:47 +02:00
Michael Nebel
314ca79881 Merge pull request #13667 from michaelnebel/csharp/standalonescan
C#: Use dotnet --list-runtimes to find runtime locations.
2023-07-07 15:15:33 +02:00
Rasmus Wriedt Larsen
a850a481d0 Merge pull request #13676 from RasmusWL/aiohttp-ssrf-sink
Python: Relax restriction of flow through `async with`
2023-07-07 14:55:57 +02:00
Tamas Vajk
23f3e44fa1 C#: Use nuget.config file for dotnet restore fallback logic 2023-07-07 14:47:07 +02:00
Rasmus Wriedt Larsen
43b025015d Python: Avoid overlap between AssignmentDefinition and ParameterDefinition 2023-07-07 14:26:28 +02:00
Asger F
b14cac6b28 Merge pull request #12689 from asgerf/rb/perf-diagnostics
Ruby: performance diagnostics query
2023-07-07 14:25:56 +02:00
Rasmus Wriedt Larsen
4e8a1144f2 Python: Remove explicit jumpStep for default parameter values
tests added in https://github.com/github/codeql/pull/5238
functionality added in https://github.com/github/codeql/pull/6640
2023-07-07 14:24:51 +02:00
Asger F
965ca169e5 JS: Recognise fs/promises 2023-07-07 14:14:49 +02:00
Asger F
d49359a95c JS: Add step through spread arg to path.join() 2023-07-07 14:10:50 +02:00
Michael Nebel
e4aaa43c43 C#: Also support alpha, beta, rc candidates. 2023-07-07 14:06:11 +02:00
Mathias Vorreiter Pedersen
1af60aa9d4 Merge pull request #13684 from github/release-prep/2.14.0
Release preparation for version 2.14.0
2023-07-07 12:30:09 +01:00
Michael Nebel
f065ba9aa1 C#: Add unit tests for runtime version fetching. 2023-07-07 13:21:02 +02:00
Michael Nebel
4270425f14 C#: Cater for preview versions. 2023-07-07 13:16:35 +02:00
Michael Nebel
bffdbbcf95 C#: Address review comments. 2023-07-07 13:16:34 +02:00
Mathias Vorreiter Pedersen
a826c8327a Merge pull request #13682 from jketema/ptr-comp
C++: Support pointer addition and subtraction in the IRGuards library
2023-07-07 11:32:43 +01:00
Rasmus Wriedt Larsen
4920557c36 Merge pull request #13670 from jorgectf/seclab/xxe-sanitizer
Python: Add `markupsafe` as XXE sanitizer
2023-07-07 12:30:26 +02:00
Rasmus Wriedt Larsen
70994b9c57 Python: Accept points-to .expected changes
They look pretty safe to me, but haven't given them a whole lot of
thought.
2023-07-07 12:14:19 +02:00
Rasmus Wriedt Larsen
c5e8e232e5 Python: Fix dataflow consistencies for default parameter values 2023-07-07 11:55:07 +02:00
Rasmus Wriedt Larsen
6f3cb67050 Python: Model parameter with default value as DefinitionNode 2023-07-07 11:54:50 +02:00
Rasmus Wriedt Larsen
64a86e8fd7 Python: Update inline expectations 2023-07-07 11:32:05 +02:00
Jeroen Ketema
2c2903d58d C++: Add change note 2023-07-07 11:27:46 +02:00
Jeroen Ketema
f60f80fea9 Update swift/ql/lib/change-notes/released/0.2.0.md 2023-07-07 11:06:07 +02:00
Rasmus Wriedt Larsen
cfd2d09a61 Python: Add test for DefinitionNode default parameter value 2023-07-07 11:00:16 +02:00
Mathias Vorreiter Pedersen
1064efa8b3 Update python/ql/lib/change-notes/released/0.10.0.md 2023-07-07 09:25:03 +01:00
Mathias Vorreiter Pedersen
cc6ac812af Update swift/ql/lib/CHANGELOG.md 2023-07-07 09:24:56 +01:00
Mathias Vorreiter Pedersen
82ff045315 Update python/ql/lib/CHANGELOG.md 2023-07-07 09:24:50 +01:00
github-actions[bot]
6484ee106e Release preparation for version 2.14.0 2023-07-07 08:22:14 +00:00
Asger F
d8604ff390 Ruby: exclude Object class from API graph 2023-07-07 09:49:21 +02:00
Asger F
86b5f0adc7 Revert "Merge pull request #13620 from github/revert-13496-rb/tracking-on-demand"
This reverts commit 133de56ac2, reversing
changes made to 28a8e48351.
2023-07-07 09:42:34 +02:00
Mingjie Shen
4b4c0cd563 C++: add testcases for UninitializedLocal.ql 2023-07-06 20:07:58 -04:00
Mingjie Shen
9218afedbe C++: exclude uninitialized uses that are cast to void
This eliminates FPs caused by casting a variable explicitly to
void type. Developers use this cast to suppress compiler warnings
on unused variables, e.g.
   (void) x;
2023-07-06 17:43:42 -04:00
Dave Bartolomeo
139585fe5c Merge pull request #13681 from github/dbartol/mergeback-3.10
Mergeback `rc/3.10` -> `main`
2023-07-06 12:13:17 -04:00
Jeroen Ketema
572aa1330d Merge pull request #13680 from jketema/product-default
C++: Add more default predicates to product flow
2023-07-06 18:12:38 +02:00
Rasmus Wriedt Larsen
bea07002d3 Python: Expand captured-variable test with default param 2023-07-06 17:21:29 +02:00
Jeroen Ketema
8d05d8a4dc C++: Add change note 2023-07-06 17:14:49 +02:00
Taus
f666260cd8 Java: Add meta query for metrics gathering
Exposes the same information as the existing queries through two query
predicates instead. This makes the downstream data gathering a bit more
convenient to implement.
2023-07-06 16:59:15 +02:00
Taus
36c6c7235c Java: Move instance counting logic into utility library 2023-07-06 16:59:15 +02:00
Jeroen Ketema
8bc8ef4dda C++: Support pointer addition and subtraction in the IRGuards library
It seems this was something supported by the AST Guards library
2023-07-06 16:54:44 +02:00
Dave Bartolomeo
9631e9f2f1 Bump minor version numbers post-GHES 2023-07-06 10:10:01 -04:00
Jeroen Ketema
fa2ee26379 C++: Add more default predicates to product flow 2023-07-06 16:06:36 +02:00
Dave Bartolomeo
2bb9adfbf1 Merge remote-tracking branch 'origin/main' into dbartol/mergeback-3.10 2023-07-06 10:00:46 -04:00
Erik Krogh Kristensen
b2a60bf3d1 Merge pull request #13642 from erik-krogh/san-script
JS/RB: Fix FP in incomplete-multi-character-sanitization
2023-07-06 15:38:39 +02:00
Geoffrey White
b010de3cb0 Swift: Change note. 2023-07-06 14:06:17 +01:00
Rasmus Wriedt Larsen
30cf213372 Python: Add change-note 2023-07-06 15:04:49 +02:00
Rasmus Wriedt Larsen
a0dfbfd96f Python: Fix grammar in qldoc
Co-authored-by: Taus <tausbn@github.com>
2023-07-06 15:04:21 +02:00
Mathias Vorreiter Pedersen
83d0dec0fb DataFlow: Sync identical files. 2023-07-06 14:00:00 +01:00
Mathias Vorreiter Pedersen
4cc2771bbf C++: Speed up the big step relation by specializing the 'isUnrachableInCall' predicate. 2023-07-06 13:59:52 +01:00
Geoffrey White
dbb0333f97 Swift: Add a test case confirming a model works outside of closures. 2023-07-06 13:59:49 +01:00
Asger F
59c72836d3 Ruby: fix typo 2023-07-06 14:57:24 +02:00
Asger F
db58d32f7a Ruby: Add a query ID 2023-07-06 14:57:24 +02:00
Asger F
d123e5ba63 Ruby: add performance diagnostic query 2023-07-06 14:57:24 +02:00
Geoffrey White
507cf116e2 Swift: Add a test case for return values from closures. 2023-07-06 13:27:13 +01:00
Geoffrey White
8875487109 Swift: Expand the URL taint models. 2023-07-06 13:27:13 +01:00
Alex Denisov
c517fc6c6f Swift: 5.9 preparation 2023-07-06 14:02:37 +02:00
Max Schaefer
1d3e3440f2 Add example of manual sanitisation. 2023-07-06 12:54:30 +01:00
Max Schaefer
240e0799b0 Fix spurious character in code example. 2023-07-06 12:54:03 +01:00
Max Schaefer
83a854c3ff Update javascript/ql/src/Security/CWE-078/IndirectCommandInjection.qhelp
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-07-06 12:47:06 +01:00
Michael Nebel
6a87755ff1 C#: Use dotnet --list-runtimes to find runtime locations. 2023-07-06 13:27:22 +02:00
Max Schaefer
6fb41adc61 Apply suggestions from code review
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-07-06 12:02:44 +01:00
Mathias Vorreiter Pedersen
bb521d7c75 Merge pull request #13665 from MathiasVP/fix-join-in-isUse
C++: Fix join in `isUse`
2023-07-06 11:09:38 +01:00
Rasmus Wriedt Larsen
1f93e5b58d Python: Relax restriction of flow through async with 2023-07-06 11:51:58 +02:00
Rasmus Wriedt Larsen
43af8d7ac5 Python: Fix test to use async with
It doesn't work if just using plain `with`
2023-07-06 11:34:05 +02:00
Rasmus Wriedt Larsen
79039dc7b8 Python: Wrap aiohttp client request in async def
And I added `await` before all the `resp` assignments
2023-07-06 11:29:14 +02:00
Tamás Vajk
14caaf119c Merge pull request #13658 from tamasvajk/cs/standalone/restore-impr
C#: Improve dotnet restore success rate in standalone extraction
2023-07-06 10:10:05 +02:00
Erik Krogh Kristensen
fab231c284 Merge pull request #13674 from github/dependabot/cargo/ql/regex-1.9.0
Bump regex from 1.8.4 to 1.9.0 in /ql
2023-07-06 08:55:27 +02:00
dependabot[bot]
562270709c Bump regex from 1.8.4 to 1.9.0 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.8.4 to 1.9.0.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.8.4...1.9.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-06 03:24:52 +00:00
Maiky
a3c58c66e9 Using DataFlow::ConfigSig instead of TaintTracking::Configuration 2023-07-06 03:14:49 +02:00
Maiky
25814f76b9 Apply suggested changes 2023-07-06 02:20:42 +02:00
Owen Mansel-Chan
972aacc5da Accept test changes due to new paramater nodes 2023-07-05 22:25:47 +01:00
Owen Mansel-Chan
af5558a397 Add ParameterNodes for unused parameters 2023-07-05 22:25:44 +01:00
Owen Mansel-Chan
12723f5a7d Add change note 2023-07-05 22:10:54 +01:00
jorgectf
c82ab2b2ab Add markupsafe as XXE sanitizer
Co-authored-by: Kevin Stubbings <Kwstubbs@users.noreply.github.com>
2023-07-05 20:23:20 +02:00
Mathias Vorreiter Pedersen
3bbe95452a Merge branch 'main' into fix-join-in-isUse 2023-07-05 17:51:47 +01:00
Geoffrey White
45d32c3933 Swift: I'm not convinced these SPURIOUS tags are true and useful. 2023-07-05 17:50:48 +01:00
Joe Farebrother
c10a66809d Merge pull request #13094 from joefarebrother/csharp-missing-access-control
C#: Add query for missing function level access control
2023-07-05 17:40:59 +01:00
AlexDenisov
dbffe54b28 Merge pull request #13657 from github/alexdenisov/update-supported-swift-version
Docs: update supported Swift versions
2023-07-05 18:14:13 +02:00
Philip Ginsbach
2ec5e72e9b Merge pull request #13633 from github/ginsbach/SpecifyExtendsFinal
document final extensions in the language specification
2023-07-05 16:43:06 +01:00
Geoffrey White
aeb5199cd9 Swift: Expand the URL taint flow test. 2023-07-05 16:36:35 +01:00
Alex Ford
08784d24b4 Ruby: rack - add tests for env['QUERY_STRING'] 2023-07-05 15:49:00 +01:00
Alex Ford
ec2c9f20f6 Ruby: rack - env['QUERY_STRING'] changenote 2023-07-05 15:46:56 +01:00
Joe Farebrother
a53bf4ddd7 Apply doc review suggestions 2023-07-05 15:37:48 +01:00
Mathias Vorreiter Pedersen
93f1a3bdb9 C++: Fix join in 'isUse'. 2023-07-05 15:24:40 +01:00
Alex Ford
2b0b2855e1 Ruby: rack - Rack::Response changenote 2023-07-05 15:15:34 +01:00
Mathias Vorreiter Pedersen
b651c02dd9 Merge pull request #13653 from rdmarsh2/rdmarsh2/cpp/constant-array-overflow-tests
C++: more constant-array-overflow tests
2023-07-05 15:06:11 +01:00
Jeroen Ketema
dc6fd8fd7f Merge pull request #13666 from jketema/ir-test
C++: Add IR tests that cause regressions after extractor frontend update
2023-07-05 15:00:13 +02:00
Mathias Vorreiter Pedersen
d24a05a1b9 Merge branch 'main' into rdmarsh2/cpp/constant-array-overflow-tests 2023-07-05 13:49:17 +01:00
Mathias Vorreiter Pedersen
f714de0040 Merge pull request #13610 from MathiasVP/promote-overrun-write-again
C++: Move `cpp/overrun-write` back to `medium` precision
2023-07-05 13:39:12 +01:00
Tamas Vajk
d0b8b683af Adjust error handling when dotnet --info is called 2023-07-05 14:26:00 +02:00
Jeroen Ketema
7bb77abac7 C++: Add IR tests that cause regressions after extractor frontend update 2023-07-05 14:01:11 +02:00
Alex Ford
df62cf8a5a qlformat 2023-07-05 12:19:57 +01:00
Alex Ford
082f26bcb1 Ruby: update TaintStep.ql output 2023-07-05 12:19:55 +01:00
Alex Ford
9a263e12ec Ruby: rack - add some qldoc 2023-07-05 12:18:52 +01:00
Alex Ford
bf25b07c17 Ruby: rack - request input tests 2023-07-05 12:18:52 +01:00
Alex Ford
175d524146 Ruby: rack - add Rack#Utils.parse_query summary 2023-07-05 12:18:52 +01:00
Alex Ford
cc6f6418f5 Ruby: rack - start modelling request inputs 2023-07-05 12:18:52 +01:00
Mathias Vorreiter Pedersen
60c0226dce Update cpp/ql/test/experimental/query-tests/Security/CWE/CWE-193/constant-size/test.cpp
Co-authored-by: Calum Grant <42069085+calumgrant@users.noreply.github.com>
2023-07-05 12:03:47 +01:00
Max Schaefer
f89992eb16 Address more review feedback. 2023-07-05 12:02:11 +01:00
Alex Ford
9b2cd768e1 Ruby: rack - add env['QUERY_STRING'] as an http request input 2023-07-05 11:59:18 +01:00
Alex Ford
b6912decc1 Merge pull request #13483 from alexrford/rb/rack-extend-app-and-resp
Ruby: rack - model more responses and app types
2023-07-05 11:58:01 +01:00
Tamás Vajk
9eae9464c9 Merge pull request #13659 from tamasvajk/standalone-minor-fixes
C#: Minor fixes in standalone extraction
2023-07-05 12:22:16 +02:00
Max Schaefer
921d8de8dc Apply suggestions from code review
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-07-05 11:19:30 +01:00
Mathias Vorreiter Pedersen
5ea929dbdb Merge pull request #13662 from geoffw0/swapmodel
Swift: Add dataflow model for 'swap'
2023-07-05 09:44:51 +01:00
Geoffrey White
c1c605ebac Swift: Change note. 2023-07-04 17:42:40 +01:00
Geoffrey White
df816268cb Swift: Model swap. 2023-07-04 17:37:49 +01:00
Max Schaefer
5fb6b5810f Clarify that splitting arguments on space is not safe. 2023-07-04 15:58:37 +01:00
Max Schaefer
74af0b1f05 Improve command-injection example and provide a fixed version. 2023-07-04 15:58:37 +01:00
Geoffrey White
155122509c Swift: Add a dataflow test for swap. 2023-07-04 15:21:41 +01:00
Geoffrey White
2870bc2ee0 Swift: Use US spelling. 2023-07-04 13:35:26 +01:00
Taus
97610d2cac Java: Add query for counting sink model instances
Also adds a more sensible ordering to the existing queries.
2023-07-04 14:24:52 +02:00
Geoffrey White
6f3dba5f98 Swift: Tweak qhelp and example. 2023-07-04 13:21:51 +01:00
Tamas Vajk
9b2fd8df9f Add todo comment 2023-07-04 14:03:04 +02:00
Tamas Vajk
ffc09c44c2 Minor fixes in standalone extraction 2023-07-04 13:54:23 +02:00
Tamas Vajk
ef0e102cd7 Retrieve package IDs from files and restore the not yet restored ones
Read all files in the repo and look for `PackageReference` XML elements
to extract the package IDs, then restore the packages that are not yet
restored. This change improves the percentage of found assemblies on the
Powershell repo from 95% to 97% compared to a traced extraction. Also,
it increases the number of assemblied only referenced in the standalone
extraction from 79 to 134.
2023-07-04 13:52:12 +02:00
Tamas Vajk
cd6419503f Execute dotnet restore on all projects in standalone
Previously, we only did this for the solution files in the repository, but
there might be projects that are not added to any solution. This change
improves the percentage of found assemblies on the Powershell repo from
81% to 95%.
2023-07-04 13:52:12 +02:00
Tamas Vajk
728f3bce2d Refactor dotnet restore command invocation 2023-07-04 13:52:12 +02:00
Tamas Vajk
d2b0c872f5 Code quality improvements 2023-07-04 13:52:12 +02:00
Alex Ford
5fafd9ecc1 Merge branch 'main' into rb/rack-extend-app-and-resp 2023-07-04 11:43:30 +01:00
Geoffrey White
7f9cb16ab1 Swift: Add a test with multiple evaluations. 2023-07-04 11:34:10 +01:00
Geoffrey White
cb4139f173 Swift: Add test cases with sanitized inputs. 2023-07-04 11:19:15 +01:00
Geoffrey White
72f500b501 Swift: Change note. 2023-07-04 10:21:39 +01:00
Tom Hvitved
5f6586600e Merge pull request #13630 from github/post-release-prep/codeql-cli-2.13.5
Post-release preparation for codeql-cli-2.13.5
2023-07-04 10:58:44 +02:00
Alex Denisov
3b2bbcc95c Docs: update supported Swift versions 2023-07-04 10:09:28 +02:00
Michael Nebel
3cde59e409 Merge pull request #13651 from michaelnebel/telemetrytop100
Java/C#: Reduce the amount of telemetry being produced.
2023-07-04 08:33:53 +02:00
Michael Nebel
238f390738 Merge pull request #13452 from michaelnebel/refactorstackprinting
Re-factor printing of summary component stacks.
2023-07-04 08:29:10 +02:00
Taus
b7e4bd290d Java: Use an IPA type instead of a string
While the string representation is useful for quickly modifying queries, it's
a bit clunky when the data needs to be further parsed. Instead, the two queries
now select all of the columns of the sinkmodel separately (which makes it easy
to pull them out of the relevant output later on).
2023-07-03 23:17:55 +02:00
Robert Marsh
1c2c48c74a C++: more constant-array-overflow tests 2023-07-03 16:59:02 -04:00
Geoffrey White
a050de7e15 Swift: Grammar. 2023-07-03 17:11:49 +01:00
Michael Nebel
243c592447 Address review comments. 2023-07-03 17:01:08 +02:00
Michael Nebel
23a119b8c2 Java/C#: Reduce the amount of telemetry being produced. 2023-07-03 16:54:07 +02:00
Chuan-kai Lin
6912f7ed3a Merge pull request #13638 from cklin/remove-pragma-assume-small-delta
Remove pragma[assume_small_delta]
2023-07-03 07:00:36 -07:00
Geoffrey White
6c10b934ea Swift: Add examples as tests. 2023-07-03 13:39:14 +01:00
Geoffrey White
373eb00975 Swift: Add qhelp and examples. 2023-07-03 13:39:13 +01:00
Michael Nebel
b942cd9085 C#: Address review comments. 2023-07-03 14:36:07 +02:00
Michael Nebel
e06bc8fd8d Ruby: Use serialize to for the string representation of ConstantValue. 2023-07-03 14:36:07 +02:00
Michael Nebel
bddd22f522 Sync files and make language specific adjustments. 2023-07-03 14:36:07 +02:00
Michael Nebel
62fc1b641c C#: Adjust the model generator to produce kinds for neutrals. 2023-07-03 14:36:06 +02:00
Michael Nebel
d62a5524f8 Python: Improve AccessPath printing. 2023-07-03 14:36:06 +02:00
Michael Nebel
0665f4f004 Ruby: Update TaintStep expected test output. 2023-07-03 14:36:06 +02:00
Michael Nebel
6aded7b461 Ruby: Improve AccessPath printing. 2023-07-03 14:36:06 +02:00
Michael Nebel
e73d6d5ee4 Go: Update expected test output to reflect the new printing of summary component stacks. 2023-07-03 14:36:06 +02:00
Michael Nebel
c18f4b1604 Sync files and make language specific rename. 2023-07-03 14:36:06 +02:00
Michael Nebel
4ee2d628fe C#: Re-factor printing of summary component stacks. 2023-07-03 14:36:06 +02:00
Geoffrey White
4cdc257a06 Swift: Add more sinks. 2023-07-03 12:34:28 +01:00
Ian Lynagh
d90ddf1b43 Merge pull request #13639 from igfoo/igfoo/revert
Revert "Kotlin: Remove a use of ObsoleteDescriptorBasedAPI"
2023-07-03 11:42:32 +01:00
Geoffrey White
315cae21ce Swift: Tests for regex injection query. 2023-07-03 11:35:55 +01:00
Asger F
4c9501eba5 Merge pull request #13529 from jorgectf/seclab/webix-modeling
JS: Add models for `webix`
2023-07-03 12:03:18 +02:00
Geoffrey White
b41fd52be5 Swift: First version swift/regex-injection query. 2023-07-03 10:37:54 +01:00
Jeroen Ketema
5d855594ba Python: Use correct class in inline expectation test
These were missed earlier, and still referred to the classes from the legacy
interface and not the parameterized module.
2023-07-03 10:23:26 +02:00
Jeroen Ketema
e26336af21 Deprecate the class-based inline expectation test interface 2023-07-03 10:22:56 +02:00
Jeroen Ketema
abe06e5b95 Python: Update remaining inline expectation tests to use the paramterized module 2023-07-03 10:22:35 +02:00
Philip Ginsbach
cff886177f Update docs/codeql/ql-language-reference/ql-language-specification.rst
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-03 08:59:57 +01:00
Porcupiney Hairs
dc0deb5e49 Go : Improvements to DSN Injection query 2023-07-02 17:38:01 +05:30
erik-krogh
8c871621f1 sync to ruby 2023-07-01 20:33:02 +02:00
erik-krogh
f9eee906cf fix FP by requiring that the regular expression mention on of the chars important in the prefix 2023-07-01 20:30:09 +02:00
erik-krogh
bd400be6ec add FP for incomplete-multi-char-sanitization 2023-07-01 20:28:31 +02:00
Taus
6f24d939f6 Java: Also select query id 2023-07-01 15:04:06 +02:00
Alvaro Muñoz
5788292eb7 use depstubber 2023-06-30 23:13:30 +02:00
Alvaro Muñoz
db33d7f2cf remove vendor/ 2023-06-30 22:38:29 +02:00
amammad
2ba83022c7 delete old qhelp file 2023-07-01 04:49:35 +10:00
Ian Lynagh
fcf003ceb5 Revert "Kotlin: Remove a use of ObsoleteDescriptorBasedAPI"
This reverts commit a50d804ad7.
2023-06-30 19:32:37 +01:00
Chuan-kai Lin
ce464a7d69 Remove pragma[assume_small_delta] 2023-06-30 11:09:29 -07:00
Mathias Vorreiter Pedersen
95ddc01ccb Merge pull request #13502 from rvermeulen/rvermeulen/compare-using-integer-precision
C++: Account for the signedness of the lesser operand in `cpp/comparison-with-wider-type`
2023-06-30 17:44:28 +01:00
Mathew Payne
67160f4663 fix: update stubs and fix import issues 2023-06-30 15:14:56 +01:00
Mathew Payne
2007e81089 fix: update stubs 2023-06-30 14:50:09 +01:00
Mathias Vorreiter Pedersen
32045f87f1 Merge pull request #13635 from MathiasVP/dont-barrier-on-valid-state-config
C++: Revert parts of #13623
2023-06-30 14:33:21 +01:00
Mathew Payne
0b696c962e feat: add stubs for Protobuf and go-micro.api 2023-06-30 14:23:42 +01:00
Taus
dca227389d Java: Add metric queries for counting sinks coming from models
Adds two queries for gathering metrics on the number of alerts (for a selection of queries)
that arise from models with the `ai-generated` provenance.
2023-06-30 15:07:13 +02:00
amammad
931f492df2 cleaning up mistakes 2023-06-30 23:03:29 +10:00
amammad
9fc28d5aba Merge branch 'github:main' into amammad-python-WebAppsConstatntSecretKeys 2023-06-30 22:54:22 +10:00
Philip Ginsbach
c977bd13dd Merge pull request #13631 from github/ginsabch/DocumentExtendsFinal
document final extensions in the language reference
2023-06-30 13:41:52 +01:00
amammad
6f34c3225b Merge branch 'github:main' into amammad-python-WebAppsConstatntSecretKeys 2023-06-30 22:36:45 +10:00
Mathew Payne
75a8ccac8d feat: update go:generate and expected files 2023-06-30 13:30:31 +01:00
Mathew Payne
1084e300b1 fix: update vendor and use depstubber 2023-06-30 13:29:48 +01:00
amammad
a988ccb7d5 Merge branch 'main' of https://github.com/amammad/codeql into amammad-python-WebAppsConstatntSecretKeys 2023-06-30 22:24:08 +10:00
Philip Ginsbach
621eca88e5 Update docs/codeql/ql-language-reference/types.rst
Co-authored-by: Kasper Svendsen <kaspersv@github.com>
2023-06-30 13:17:14 +01:00
amammad
816799c4ba upgrade query to detect redash CVE too 2023-06-30 22:14:50 +10:00
AlexDenisov
634c838b45 Merge pull request #13632 from github/alexdenisov/add-buildifier
Misc: add bazel buildifer pre-commit hook
2023-06-30 13:52:54 +02:00
Mathias Vorreiter Pedersen
518a3729ca C++: Accept test changes. 2023-06-30 12:51:55 +01:00
Mathew Payne
ce2ee8d38e Merge branch 'github:main' into go-micro 2023-06-30 12:50:13 +01:00
Philip Ginsbach
2a8b216b55 update section on class bodies for extends final 2023-06-30 12:49:07 +01:00
Mathew Payne
7331bcb022 feat: update tests to support client service 2023-06-30 12:47:47 +01:00
Mathew Payne
48966d65dd feat: client service support 2023-06-30 12:44:09 +01:00
Philip Ginsbach
fe93ddbaf1 rename OneTwoFinalExtension to distinguish from other example 2023-06-30 12:43:21 +01:00
Philip Ginsbach
0b4b2d0139 document final extensions in the language reference 2023-06-30 12:40:21 +01:00
Philip Ginsbach
9ccbe73750 document final extensions in the language specification 2023-06-30 12:38:45 +01:00
Mathew Payne
62bad6c02f feat: add log injection query to testing GoMicro 2023-06-30 12:26:16 +01:00
Alex Ford
9d36ab9204 Merge pull request #13606 from alexrford/rb/sqlite3-getSql
Ruby: fix sqlite3 `PreparedStatementExecution.getSql()` predicate
2023-06-30 12:18:46 +01:00
Mathew Payne
b3df568550 fix: Update docs and import 2023-06-30 12:08:58 +01:00
Alex Denisov
d744b218f6 Misc: add bazel buildifer pre-commit hook 2023-06-30 13:07:04 +02:00
Mathias Vorreiter Pedersen
42356a899a Merge pull request #13603 from MathiasVP/implement-is-unreachable-in-call-2 2023-06-30 12:00:15 +01:00
Tamás Vajk
4e4c5f858e Merge pull request #13619 from tamasvajk/remove-rename-standalone
C#: Remove the renaming of `Directory.Build.props` from standalone extraction
2023-06-30 12:24:05 +02:00
Mathew Payne
5178df0b4a feat: add missing docs 2023-06-30 11:13:35 +01:00
Mathias Vorreiter Pedersen
a4d03371e5 Update cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-06-30 11:10:15 +01:00
Owen Mansel-Chan
5864bdc1af Modify buildInfo inside function fixGoVendorIssues 2023-06-30 11:02:24 +01:00
Owen Mansel-Chan
6c89c60900 Put DepMode, ModMode and BaseDir into a struct 2023-06-30 11:00:16 +01:00
Alvaro Muñoz
fc527ae7e4 address code review feedback 2023-06-30 11:40:21 +02:00
Owen Mansel-Chan
47e6d3719f Fix absolute path removal on windows 2023-06-30 10:36:05 +01:00
Alvaro Muñoz
a975314679 Apply suggestions from code review
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-06-30 10:58:00 +02:00
github-actions[bot]
668aaa2dc8 Post-release preparation for codeql-cli-2.13.5 2023-06-30 08:51:48 +00:00
Asger F
133de56ac2 Merge pull request #13620 from github/revert-13496-rb/tracking-on-demand
Revert "Ruby: overhaul API graphs"
2023-06-30 10:41:34 +02:00
Mathias Vorreiter Pedersen
67e3ef7b09 C++: Revert the barrier added in #13623. 2023-06-30 09:39:37 +01:00
Tony Torralba
28a8e48351 Merge pull request #13627 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-30 08:51:02 +02:00
github-actions[bot]
cf83baeead Add changed framework coverage reports 2023-06-30 00:17:47 +00:00
Remco Vermeulen
a6469e4588 Add changenote 2023-06-29 12:38:05 -07:00
Robert Marsh
cf6bdc21d7 Merge pull request #13623 from MathiasVP/speed-up-overrun-write
C++: Speed up `cpp/overrun-write`
2023-06-29 15:35:01 -04:00
Mathew Payne
427a1585ea feat: update change notes and add to go.qll 2023-06-29 18:33:07 +01:00
Mathew Payne
1ba619f3f2 feat: vendor modules 2023-06-29 18:29:07 +01:00
Mathew Payne
08a68b5330 feat: add initial tests for GoMicro 2023-06-29 18:28:45 +01:00
Mathew Payne
14eda73f85 feat: GoMicro test code 2023-06-29 18:28:27 +01:00
Mathew Payne
236e81da45 feat: initial GoMicro modelling 2023-06-29 18:27:58 +01:00
Owen Mansel-Chan
8269bffbdb Use filepath.Join more 2023-06-29 16:56:41 +01:00
Owen Mansel-Chan
90b79011a0 Add integration test for single go.mod in root 2023-06-29 16:56:40 +01:00
Owen Mansel-Chan
a1838f48c1 Add test for go files outside of go modules 2023-06-29 16:56:38 +01:00
Owen Mansel-Chan
f1a9f3163c Remove absolute paths from test output 2023-06-29 16:56:36 +01:00
Owen Mansel-Chan
50343b3b56 Add extra integration test and rename some 2023-06-29 16:56:35 +01:00
Owen Mansel-Chan
bbbdc47dd5 Preserve behaviour for nested go.mods when one is in root 2023-06-29 16:56:32 +01:00
Owen Mansel-Chan
ae7adc999c Rename return variable 2023-06-29 16:56:29 +01:00
Owen Mansel-Chan
dce17aa49b Fix package clause in test file 2023-06-29 16:56:27 +01:00
Owen Mansel-Chan
964ca33445 Fix cases where we can't yet use go.mod 2023-06-29 16:56:24 +01:00
Owen Mansel-Chan
7c9e28d291 Update diagnostics.expected for existing integration tests 2023-06-29 16:56:23 +01:00
Owen Mansel-Chan
c766f68b93 Fix bug detecting if go.mod files are nested 2023-06-29 16:56:20 +01:00
Owen Mansel-Chan
1a80ba0821 Name return values of findGoModFiles 2023-06-29 16:56:17 +01:00
Owen Mansel-Chan
a0f470b01a Change bazel check to look in subdirs 2023-06-29 16:56:15 +01:00
Owen Mansel-Chan
193edda2c1 Add non-functional bazel tests
They don't build with bazel. They are only there to check that we emit
the right diagnostic.
2023-06-29 16:56:14 +01:00
Owen Mansel-Chan
a852173e22 Fix behaviour for single non-root go.mod
Also add telemetry so we can prioritise future work on the autobuilder.
2023-06-29 16:56:11 +01:00
Owen Mansel-Chan
e43fd72fc1 Fix log message about Glide 2023-06-29 16:56:09 +01:00
Owen Mansel-Chan
8726b3a00e Change how we deal with singular/plural 2023-06-29 16:56:07 +01:00
Owen Mansel-Chan
6eda207997 Add integration tests 2023-06-29 16:56:06 +01:00
Mathias Vorreiter Pedersen
97916407c2 C++: Accept test changes. 2023-06-29 16:51:08 +01:00
Mathias Vorreiter Pedersen
59d9c6e3f2 C++: Use the pruning stage in the product-flow configuration. 2023-06-29 16:50:57 +01:00
Mathias Vorreiter Pedersen
364a8e729d Documentation: Mention that the old library is now deprecated. 2023-06-29 15:50:55 +01:00
Mathias Vorreiter Pedersen
8d3e845474 C++: Add change note. 2023-06-29 15:32:48 +01:00
Mathias Vorreiter Pedersen
cd2f0ecbc8 C++: Deprecate AST dataflow. 2023-06-29 15:13:36 +01:00
Jorge
e210b0d0a7 Apply suggestions from code review
Co-authored-by: Asger F <asgerf@github.com>
2023-06-29 16:06:34 +02:00
Mathias Vorreiter Pedersen
90336705e1 C++: Accept test changes after merge. 2023-06-29 14:48:17 +01:00
Jeroen Ketema
f8b1dc9f59 Merge pull request #13617 from jketema/pointer-deref-barrier-fps
C++: Add more `cpp/invalid-pointer-deref` FP test cases
2023-06-29 15:48:15 +02:00
Mathias Vorreiter Pedersen
e4126ae6d4 Merge branch 'main' into implement-is-unreachable-in-call-2 2023-06-29 14:46:28 +01:00
Robert Marsh
e428502f4b Merge pull request #13598 from MathiasVP/add-constant-size-array-fp
C++: Add `cpp/constant-array-overflow` FPs
2023-06-29 09:44:04 -04:00
Asger F
5d1a437e9c Revert "Ruby: overhaul API graphs" 2023-06-29 15:39:19 +02:00
Kasper Svendsen
f9afea8c48 Merge pull request #13616 from kaspersv/kaspersv/enable-implicit-this
Enable implicit this warning CI checks
2023-06-29 15:09:09 +02:00
Tamas Vajk
2de356dbfe C#: Remove the renaming of Directory.Build.props from standalone extraction 2023-06-29 15:06:46 +02:00
Jeroen Ketema
2c8d4724d5 C++: Add more cpp/invalid-pointer-deref FP test cases 2023-06-29 14:45:09 +02:00
Kasper Svendsen
dd548945c7 Enable checks for implicit this warnings 2023-06-29 14:25:44 +02:00
Tom Hvitved
7bc549103a Merge pull request #13613 from github/release-prep/2.13.5
Release preparation for version 2.13.5
2023-06-29 14:19:22 +02:00
Tony Torralba
b2e8167407 Merge pull request #13587 from github/koesie10/update-java-external-api-name
Java: Fix external API name for nested types
2023-06-29 13:23:20 +02:00
Tony Torralba
1f4af5fda5 Merge pull request #13605 from jorgectf/jorgectf/javax-portlet-models
Java: Add models for `javax.portlet`
2023-06-29 13:22:46 +02:00
amammad
7a17b99c17 V2 2023-06-29 20:55:51 +10:00
Kasper Svendsen
94e0a986ce Merge pull request #13584 from kaspersv/kaspersv/misc-remaining-implicit-this
Misc: Enable implicit this warnings for remaining packs
2023-06-29 12:41:06 +02:00
Koen Vlaswinkel
6806b8750d Java: Use getSourceDeclaration to handle generic types 2023-06-29 11:49:16 +02:00
Alvaro Muñoz
a26bdda668 Add QLdocs for gqlgen.qll 2023-06-29 11:26:36 +02:00
github-actions[bot]
9d7987f822 Release preparation for version 2.13.5 2023-06-29 09:26:18 +00:00
Paul Hodgkinson
bfbb77a796 Merge branch 'main' into java/experimental/command-injection 2023-06-29 09:51:14 +01:00
aegilops
8dbb0a51c0 Rewrote tests to work 2023-06-29 09:47:03 +01:00
AlexDenisov
9057f3e7cf Merge pull request #13597 from github/alexdenisov/bump-swift-build
Swift: bump Swift build, NFC
2023-06-29 10:44:41 +02:00
Mathias Vorreiter Pedersen
285112f4cd C++: Move 'cpp/overrun-write' back to medium precision. 2023-06-29 08:18:47 +01:00
Tom Hvitved
9a26fc3178 Merge pull request #13573 from hvitved/ruby/inline-late-members
Ruby/Python: Use `inline_late` on member predicates
2023-06-29 09:07:14 +02:00
Mathias Vorreiter Pedersen
76956941ff Merge pull request #13604 from jketema/annotation
C++: Fix test annotation for `cpp/invalid-pointer-deref` test
2023-06-28 17:54:43 +01:00
aegilops
01798f63f8 Switched to new dataflow and added a test (but it doesn't produce results yet) 2023-06-28 17:14:39 +01:00
Alex Ford
ede6b262cd Ruby: fix sqlite3 PreparedStatementExecution.getSql() predicate 2023-06-28 17:09:43 +01:00
Jeroen Ketema
527b908bda C++: Fix test annotation for cpp/invalid-pointer-deref test 2023-06-28 17:54:12 +02:00
jorgectf
9d8ae5039a Add models for javax.portlet 2023-06-28 17:53:56 +02:00
Jeroen Ketema
43a8119091 Merge pull request #13591 from jketema/pointer-deref-barrier
C++: Add barrier to `InvalidPointerToDerefConfig` in `cpp/invalid-pointer-deref`
2023-06-28 17:46:41 +02:00
Ian Lynagh
641f186afc Merge pull request #13600 from igfoo/igfoo/fake_fun
Kotlin: Remove a use of ObsoleteDescriptorBasedAPI
2023-06-28 15:50:27 +01:00
Mathias Vorreiter Pedersen
34abab031b Merge pull request #13596 from MathiasVP/fix-join-in-argumentnode
C++: Fix join in `argumentOf`
2023-06-28 14:57:54 +01:00
Mathias Vorreiter Pedersen
655f1feac0 C++: Accept test changes. 2023-06-28 14:40:50 +01:00
Mathias Vorreiter Pedersen
9e82ce8a13 C++: Implement 'isUnreachableInCall'. 2023-06-28 14:37:35 +01:00
Mathias Vorreiter Pedersen
25be9d48bc C++: Add tests with FPs that need call contexts. 2023-06-28 14:37:04 +01:00
jorgectf
2ac334bf15 Adapt Webix modeling to support HTML use-cases 2023-06-28 15:26:30 +02:00
Alvaro Muñoz
0332c52e77 Update go/ql/lib/semmle/go/frameworks/SQL.qll 2023-06-28 15:20:02 +02:00
Alvaro Muñoz
0043acb8e8 Update go/ql/lib/semmle/go/frameworks/SQL.qll 2023-06-28 15:19:31 +02:00
Alvaro Muñoz
c5c6766960 Remove unnecessary imports 2023-06-28 15:17:48 +02:00
Alvaro Muñoz
5174c734fa Fix tests 2023-06-28 15:16:19 +02:00
Alvaro Muñoz
fe4ddab7e4 Add support for the gqlgen library 2023-06-28 15:05:25 +02:00
Alvaro Muñoz
d2412a0989 remove database 2023-06-28 15:02:10 +02:00
Asger F
f0517028b9 Merge pull request #13496 from asgerf/rb/tracking-on-demand
Ruby: overhaul API graphs
2023-06-28 15:01:37 +02:00
Alvaro Muñoz
03d0000739 Add support for Bun library 2023-06-28 14:59:38 +02:00
Alvaro Muñoz
f3d979be7a Improve go-pg support 2023-06-28 14:49:25 +02:00
Ian Lynagh
a50d804ad7 Kotlin: Remove a use of ObsoleteDescriptorBasedAPI
This isn't supported in Kotlin 2 mode, but removing this code doesn't
affect any tests.
2023-06-28 13:48:43 +01:00
Kasper Svendsen
7c59f5ac18 Merge pull request #13578 from kaspersv/kaspersv/java-remaining-implicit-this
Java: Enable implicit this warnings for remaining packs
2023-06-28 14:27:24 +02:00
Alexandre Boulgakov
30615308b4 Swift: Mangle AssociatedTypeDecl. 2023-06-28 13:09:09 +01:00
Jeroen Ketema
14609a9795 C++: Add barrier to InvalidPointerToDerefConfig in cpp/invalid-pointer-deref 2023-06-28 14:04:45 +02:00
Alexandre Boulgakov
b807d005ec Swift: Add missing #include. 2023-06-28 12:50:01 +01:00
Asger F
39789d4050 Ruby: use a valid change note category 2023-06-28 13:42:05 +02:00
Asger F
2f1223426a Ruby: add change note 2023-06-28 13:36:47 +02:00
Alexandre Boulgakov
4ed90d5234 Swift: Remove AbstractTypeParamDecl mangling.
AbstractTypeParamDecl itself was removed in 36b3f0ee12.
2023-06-28 12:34:01 +01:00
Alexandre Boulgakov
81372d0b63 Merge commit '36d86787e6fbbb158a148f93eb63f829134fd6b1' into alexdenisov+redsun82/tuple-mangling 2023-06-28 12:21:59 +01:00
Asger F
7af3d226c9 Ruby: simplify Twirp model 2023-06-28 13:20:59 +02:00
Asger F
129e6349f7 Ruby: expand Twirp test 2023-06-28 13:20:59 +02:00
Asger F
423da55fb9 Ruby: use asCallable() in Twirp model 2023-06-28 13:20:59 +02:00
Asger F
dd868437ce Ruby: add asCallable() 2023-06-28 13:20:59 +02:00
Asger F
6feda75dd6 Ruby: preserve comment in SQLite3 2023-06-28 13:20:58 +02:00
Asger F
f171c21002 Ruby: remove forwarder for getADescendentModule 2023-06-28 13:20:58 +02:00
Asger F
67032b5d73 Ruby: add test for self.class call 2023-06-28 13:20:58 +02:00
Asger F
174ab25867 Ruby: address some review comments 2023-06-28 13:20:58 +02:00
Mathias Vorreiter Pedersen
ae098822c3 C++: Add 'cpp/constant-array-overflow' FP. 2023-06-28 11:22:53 +01:00
Alex Denisov
dbdd654465 Swift: bump Swift build, NFC 2023-06-28 12:11:17 +02:00
Koen Vlaswinkel
36d86787e6 Merge pull request #13588 from github/koesie10/update-csharp-external-api-name
C#: Fix external API name for nested types
2023-06-28 11:14:29 +02:00
Mathias Vorreiter Pedersen
78f2fe8d5e C++: Fix join in 'argumentOf'.
Before:
```
[2023-06-28 09:29:51] Evaluated non-recursive predicate DataFlowImplCommon#59e7a193::Cached::argumentNode#3#fff@8606bd35 in 1945ms (size: 1366058).
Evaluated relational algebra for predicate DataFlowImplCommon#59e7a193::Cached::argumentNode#3#fff@8606bd35 with tuple counts:
      764401   ~0%    {3} r1 = JOIN DataFlowPrivate#fbdd7bd7::DirectPosition#ff_10#join_rhs WITH Instruction#577b6a83::CallInstruction::getArgumentOperand#fff_102#join_rhs ON FIRST 1 OUTPUT Rhs.2, Lhs.1, Rhs.1
      764401   ~0%    {3} r2 = JOIN r1 WITH DataFlowPrivate#fbdd7bd7::PrimaryArgumentNode#fff_20#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.2, Lhs.1

          65   ~0%    {3} r3 = SCAN DataFlowPrivate#fbdd7bd7::IndirectionPosition#fff OUTPUT In.2, In.0, In.1
  180518864   ~0%    {3} r4 = JOIN r3 WITH project#DataFlowPrivate#fbdd7bd7::IndirectOperands::IndirectOperand::hasOperandAndIndirectionIndex#2#dispred#fff#3_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.2, Lhs.1
      601657   ~1%    {2} r5 = JOIN r4 WITH project#DataFlowUtil#47741e1f::SideEffectOperandNode#fff#2 ON FIRST 2 OUTPUT Lhs.0, Lhs.2
      601657   ~0%    {3} r6 = JOIN r5 WITH project#DataFlowUtil#47741e1f::SideEffectOperandNode#fff#3 ON FIRST 1 OUTPUT Lhs.0, Rhs.1, Lhs.1

    1366058   ~0%    {3} r7 = r2 UNION r6
                      return r7
```

After:
```
Tuple counts for DataFlowImplCommon#59e7a193::Cached::argumentNode#3#fff/3@d2b091vc after 1.1s:
  764381  ~2%     {3} r1 = JOIN DataFlowPrivate#fbdd7bd7::DirectPosition#ff_10#join_rhs WITH Instruction#577b6a83::CallInstruction::getArgumentOperand#fff_102#join_rhs ON FIRST 1 OUTPUT Rhs.2, Lhs.1 'pos', Rhs.1 'call'
  764381  ~0%     {3} r2 = JOIN r1 WITH DataFlowPrivate#fbdd7bd7::PrimaryArgumentNode#fff_20#join_rhs ON FIRST 1 OUTPUT Rhs.1 'n', Lhs.2 'call', Lhs.1 'pos'

  65      ~3%     {3} r3 = SCAN num#DataFlowPrivate#fbdd7bd7::TIndirectionPosition#fff OUTPUT In.0, In.2 'pos', In.1
  1798930 ~1%     {3} r4 = JOIN r3 WITH project#DataFlowUtil#47741e1f::SideEffectOperandNode#fff#2_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'n', Lhs.2, Lhs.1 'pos'
  601641  ~1%     {2} r5 = JOIN r4 WITH project#DataFlowPrivate#fbdd7bd7::IndirectOperands::IndirectOperand::hasOperandAndIndirectionIndex#2#dispred#fff#3 ON FIRST 2 OUTPUT Lhs.0 'n', Lhs.2 'pos'
  601641  ~0%     {3} r6 = JOIN r5 WITH project#DataFlowUtil#47741e1f::SideEffectOperandNode#fff#3 ON FIRST 1 OUTPUT Lhs.0 'n', Rhs.1 'call', Lhs.1 'pos'

  1366022 ~1%     {3} r7 = r2 UNION r6
                  return r7
```
2023-06-28 10:13:03 +01:00
Mathias Vorreiter Pedersen
2c99009c1a Merge pull request #13117 from rdmarsh2/rdmarsh2/cpp/cobo-handle-array-casts
C++: handle cast arrays properly in off-by-one query
2023-06-28 09:25:12 +01:00
Koen Vlaswinkel
51af03d2bc Java: Add tests for names of nested classes 2023-06-28 09:52:25 +02:00
Koen Vlaswinkel
e4d2c51ff8 C#: Add tests for names of nested classes 2023-06-28 09:40:31 +02:00
Tony Torralba
249f9f863d Merge pull request #13594 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-28 09:39:18 +02:00
AlexDenisov
9094f9aa9c Merge pull request #13567 from github/alexdenisov/extend-observer
Swift: extend frontend observer
2023-06-28 09:35:27 +02:00
AlexDenisov
113408e878 Merge pull request #13569 from github/redsun82/swift-fix-inclusion-of-sil
Swift: fix all upstream headers for C++20
2023-06-28 09:35:08 +02:00
Tom Hvitved
fa92e79bea Ruby/Python: Use inline_late on member predicates 2023-06-28 09:04:06 +02:00
Mathias Vorreiter Pedersen
368846621e Merge pull request #13592 from rdmarsh2/rdmarsh2/range-analysis-back-edge-2
C++: fix irreducible control flow logic
2023-06-28 07:49:49 +01:00
Paolo Tranquilli
6352399645 Swift: fix all upstream headers for C++20 2023-06-28 08:25:29 +02:00
github-actions[bot]
0749af79d7 Add changed framework coverage reports 2023-06-28 00:18:40 +00:00
Robert Marsh
e90153fc47 C++: fix irreducible control flow logic 2023-06-27 16:52:45 -04:00
Alex Denisov
ea5eda0f22 Swift: adjust test expectations 2023-06-27 17:21:56 +02:00
Alex Denisov
af41dabc14 Swift: extend the frontend observer 2023-06-27 16:57:44 +02:00
Kasper Svendsen
656b4fc1aa Merge pull request #13574 from kaspersv/kaspersv/cpp-remaining-implicit-this
CPP: Enable implicit this warnings for remaining packs
2023-06-27 16:56:28 +02:00
Rasmus Wriedt Larsen
91b8ef6540 Merge pull request #13580 from kaspersv/kaspersv/python-remaining-implicit-this
Python: Enable implicit this warnings for remaining packs
2023-06-27 16:42:03 +02:00
Ian Lynagh
4adecf0d15 Merge pull request #13586 from igfoo/igfoo/diag-limit
Kotlin: Remove an out-of-date comment
2023-06-27 15:41:47 +01:00
Ian Lynagh
b0d2ca5df4 Merge pull request #13568 from igfoo/igfoo/android_lint
Java: Tweak some android tests
2023-06-27 15:41:37 +01:00
Ian Lynagh
4415c364ac Merge pull request #13542 from igfoo/igfoo/modality_final
Kotlin: Remove an expected-no-getter exception
2023-06-27 15:41:27 +01:00
Koen Vlaswinkel
6812389fc8 C#: Fix external API name for nested types
This fixes the name of reported external APIs for nested types. The
`getDeclaringType().getUnboundDeclaration()`'s `toString()` method
reports the name of the type, but not the name of the declaring type.
This results in missing information in the
`UnsupportedExternalAPIs.ql` query.

For example, previously it would report:

```
GitHub.Nested#NestedClass.Test()
```

However, the `NestedClass` class does not exist in the namespace and is
only a nested type within `MyFirstClass`. The correct name should be:

```
GitHub.Nested#MyFirstClass+NestedClass.Test()
```

This name also matches the format of MaD.
2023-06-27 16:31:06 +02:00
Koen Vlaswinkel
fcb2f1082c Java: Fix external API name for nested types
This fixes the name of reported external APIs for nested types.
The `toString()` method of `getSourceDeclaration()` would report the
name of a type, but not the name of the enclosing type. This results
in missing information in the `UnsupportedExternalAPIs.ql` query.

For example, previously it would report:

```
org.zapodot.junit.db.Builder#build()
```

However, the `Builder` class does not exist in the package and is only
a nested type within `EmbeddedDatabaseRule`. The correct name should be:

```
org.zapodot.junit.db.EmbeddedDatabaseRule$Builder#build()
```

This name also matches the format of MaD.
2023-06-27 15:23:55 +02:00
Kasper Svendsen
085c85fe32 Merge pull request #13564 from kaspersv/kaspersv/ci-warn-on-implicit-this
Add workflow to check for warnOnImplicitThis
2023-06-27 15:15:23 +02:00
Jeroen Ketema
bf771a1537 Merge pull request #13563 from jketema/clears-content
C++: Implement `clearsContent` for IR dataflow
2023-06-27 15:13:47 +02:00
Kasper Svendsen
d1979197c7 CPP: Enable implicit this warnings for remaining packs 2023-06-27 14:44:24 +02:00
Ian Lynagh
d588f52262 Kotlin: Remove an out-of-date comment 2023-06-27 13:33:52 +01:00
Tony Torralba
a7c2a25cac Merge pull request #12879 from atorralba/atorralba/java/command-injection-mad-sinks
Java: Convert all command injection sinks to MaD format
2023-06-27 14:06:45 +02:00
Tony Torralba
6e20bd04e9 Merge pull request #13539 from atorralba/atorralba/java/url-to-string-model
Java: Add URL.toString summary
2023-06-27 14:05:47 +02:00
Mathias Vorreiter Pedersen
51176bdff3 C++: Add Geoffrey's testcases. 2023-06-27 12:59:22 +01:00
Kasper Svendsen
62e2bea757 Merge pull request #13577 from kaspersv/kaspersv/go-remaining-implicit-this
Go: Enable implicit this warnings for remaining packs
2023-06-27 13:51:05 +02:00
Kasper Svendsen
b4ef243733 Add workflow to check for warnOnImplicitThis 2023-06-27 13:48:04 +02:00
Jeroen Ketema
b1ae3a0a7b Merge remote-tracking branch 'upstream/main' into clears-content 2023-06-27 13:45:33 +02:00
Tom Hvitved
df61eaf59f Merge pull request #13565 from hvitved/csharp/gvn-blowup
C#: Avoid combinatorial explosions in GVN construction for types
2023-06-27 13:31:36 +02:00
Erik Krogh Kristensen
e9102bbdf2 Merge pull request #13579 from kaspersv/kaspersv/javascript-remaining-implicit-this
Javascript: Enable implicit this warnings for remaining packs
2023-06-27 13:09:55 +02:00
Mathias Vorreiter Pedersen
f2cbbab419 Merge branch 'main' into rdmarsh2/cpp/cobo-handle-array-casts 2023-06-27 12:03:42 +01:00
Kasper Svendsen
9202708719 Misc: Enable implicit this warnings for remaining packs 2023-06-27 13:03:11 +02:00
Mathias Vorreiter Pedersen
8cf66d22f0 Merge pull request #13583 from kaspersv/kaspersv/swift-remaining-implicit-this
Swift: Enable implicit this warnings for remaining packs
2023-06-27 11:57:57 +01:00
Mathias Vorreiter Pedersen
985650cb04 Merge pull request #13559 from MathiasVP/add-barrier-to-invalid-deref-query
C++: Add barriers to `cpp/invalid-pointer-deref`
2023-06-27 11:56:58 +01:00
Kasper Svendsen
29f5c78a60 Merge pull request #13581 from kaspersv/kaspersv/ql-remaining-implicit-this
QL: Enable implicit this warnings for remaining packs
2023-06-27 12:35:19 +02:00
Kasper Svendsen
c77c455546 Merge pull request #13582 from kaspersv/kaspersv/ruby-remaining-implicit-this
Ruby: Enable implicit this warnings for remaining packs
2023-06-27 12:33:16 +02:00
Kasper Svendsen
1aea7d0c79 Merge pull request #13575 from kaspersv/kaspersv/csharp-remaining-implicit-this
C#: Enable implicit this warnings for remaining packs
2023-06-27 12:11:23 +02:00
Kasper Svendsen
8ce09438a0 Swift: Enable implicit this warnings for remaining packs 2023-06-27 12:09:27 +02:00
Kasper Svendsen
41c071ff74 Ruby: Enable implicit this warnings for remaining packs 2023-06-27 12:07:05 +02:00
Kasper Svendsen
c9cf0744c0 QL: Enable implicit this warnings for remaining packs 2023-06-27 12:04:29 +02:00
Kasper Svendsen
f41276cb7f Python: Enable implicit this warnings for remaining packs 2023-06-27 12:00:13 +02:00
Jeroen Ketema
2628552ef4 C++: Fix join-order problem in clearsContent 2023-06-27 11:59:26 +02:00
Kasper Svendsen
ab5e241310 Javascript: Enable implicit this warnings for remaining packs 2023-06-27 11:56:29 +02:00
Kasper Svendsen
7fcdefbe70 Java: Enable implicit this warnings for remaining packs 2023-06-27 11:54:20 +02:00
Kasper Svendsen
ab797065ab Go: Enable implicit this warnings for remaining packs 2023-06-27 11:49:37 +02:00
Kasper Svendsen
6869f03cca C#: Enable implicit this warnings for remaining packs 2023-06-27 11:27:16 +02:00
Tony Torralba
3c3b53001f Merge pull request #13550 from jorgectf/jorgectf/lang2-models
Java: Add models for `org.apache.commons.lang`
2023-06-27 11:20:59 +02:00
Kasper Svendsen
0f3128d18c Merge pull request #13572 from kaspersv/kaspersv/deprecated-imports-docs
Document deprecated imports
2023-06-27 10:49:35 +02:00
Mathias Vorreiter Pedersen
06bc460868 Merge pull request #13528 from rdmarsh2/rdmarsh2/cpp/range-analysis-back-edge
C++: fix range analysis back edge detection for irreducible CFGs
2023-06-27 09:14:44 +01:00
Tom Hvitved
160771e673 C#: Avoid combinatorial explosions in GVN construction for types 2023-06-27 10:08:53 +02:00
Kasper Svendsen
d42f6a08be Document deprecated imports 2023-06-27 10:08:36 +02:00
Tony Torralba
a17c812118 Merge pull request #13358 from jorgectf/jorgectf/deserialization-lookahead
Java: Model `SerialKiller`
2023-06-27 09:20:50 +02:00
Tom Hvitved
56a5a576a8 Merge pull request #13536 from hvitved/ql/dead-code-fps
QL: Improve dead-code query
2023-06-27 09:01:59 +02:00
Robert Marsh
dcb349434c C++: fix comment formatting 2023-06-26 15:52:32 -04:00
Robert Marsh
aff4066020 C++: improve irreducible back edge detection 2023-06-26 15:39:09 -04:00
Robert Marsh
757f40c0cb Merge pull request #13116 from rdmarsh2/rdmarsh2/cpp/cobo-array-vars
C++: include stack-allocated arrays in off-by-one query
2023-06-26 15:26:45 -04:00
Mathias Vorreiter Pedersen
ef383a135d C++: Prune the set of interesting pointer-arithmetic instructions by another flow. 2023-06-26 19:09:43 +01:00
Jeroen Ketema
54632cd474 C++: Replace not exists by forex in clearsContent 2023-06-26 20:05:35 +02:00
Joe Farebrother
c419e8d24a Fix test 2023-06-26 18:05:11 +01:00
Joe Farebrother
1d64d1297c Update tests to use stubs 2023-06-26 16:51:07 +01:00
Joe Farebrother
938a996322 Add test case for Authorize attribute 2023-06-26 15:57:57 +01:00
Ian Lynagh
8a43fc81ee Java: Tweak some android tests
They were all failing for me like:

[autobuild] /home/ian/code/dev/target/codeql-java-integration-tests/ql/java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/project/src/main/AndroidManifest.xml:5: Error: Main must extend android.app.Activity [Instantiatable]
[autobuild]         <activity android:name="Main" android:exported="true">
[autobuild]                                 ~~~~
[autobuild]    Explanation for issues of type "Instantiatable":
[autobuild]    Activities, services, broadcast receivers etc. registered in the manifest
[autobuild]    file (or for custom views, in a layout file) must be "instantiatable" by
[autobuild]    the system, which means that the class must be public, it must have an
[autobuild]    empty public constructor, and if it's an inner class, it must be a static
[autobuild]    inner class.

I'm not sure why it works on CI but not locally, but either way this
works around the issue.
2023-06-26 15:52:52 +01:00
Alex Ford
9cf165ac55 Ruby: rack - update a deprecation notice 2023-06-26 15:37:34 +01:00
Alex Ford
8fdc48753c Ruby: rack - replace RackApplication with just the rack RequestHandler 2023-06-26 15:36:37 +01:00
Asger F
f6e244995a Update ruby/ql/lib/codeql/ruby/ApiGraphs.qll
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-06-26 15:32:11 +02:00
Asger F
b61e823cab Ruby: clarify qldoc for getADescendentModule 2023-06-26 15:31:18 +02:00
Asger F
ef9d910a07 Update ruby/ql/lib/codeql/ruby/ApiGraphs.qll
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-06-26 15:28:30 +02:00
Rasmus Wriedt Larsen
9c5aff395a Merge pull request #12581 from yoff/python/enable-summaries-from-models
python: enable summaries from model
2023-06-26 14:39:27 +02:00
jorgectf
1e663b8889 Update HeuristicSourceCodeInjection.expected 2023-06-26 13:32:20 +02:00
jorgectf
bb67a9000e Fix WebixTemplateSink 2023-06-26 13:32:00 +02:00
Jorge
5bd044211e Apply suggestions from code review
Co-authored-by: Asger F <asgerf@github.com>
2023-06-26 13:27:23 +02:00
Jeroen Ketema
527b537fee Apply suggestions from code review
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-06-26 12:57:43 +02:00
Ian Lynagh
65dee80b36 Merge pull request #13547 from igfoo/igfoo/dead-code
Kotlin: Build: Remove some dead code
2023-06-26 11:50:50 +01:00
Mathias Vorreiter Pedersen
d68b0605cd C++: Use 'arrayTypeCand' in 'isSourceImpl' instead of checking for array size explicitly. 2023-06-26 11:37:35 +01:00
Mathias Vorreiter Pedersen
3b4f2b22d6 C++: Fix Code Scanning errors. 2023-06-26 11:36:56 +01:00
Mathias Vorreiter Pedersen
b87bf46c30 C++: Fix joins. 2023-06-26 11:28:32 +01:00
Jeroen Ketema
c7e5dc2e9e C++: Fix QLDoc issues 2023-06-26 12:18:05 +02:00
Jeroen Ketema
458522a656 C++: Implement clearsContent for IR dataflow 2023-06-26 12:11:03 +02:00
Rasmus Wriedt Larsen
257f9912dd Python: Remove one more unnecessary taint test 2023-06-26 12:00:55 +02:00
Rasmus Wriedt Larsen
6cb03190fa Python: Updates from inline test being parameterized 2023-06-26 11:43:51 +02:00
Rasmus Wriedt Larsen
0121263e03 Merge branch 'main' into python/enable-summaries-from-models 2023-06-26 11:34:12 +02:00
Tony Torralba
55280e523a Update java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll 2023-06-26 11:14:31 +02:00
Tom Hvitved
3c72ac2f9b Merge pull request #13544 from hvitved/csharp/to-string-consistency
C#: Add `toString` functionality consistency queries
2023-06-26 10:50:23 +02:00
Tom Hvitved
e6ca5dff87 Merge pull request #13543 from hvitved/ruby/to-string-constincy-queries
Ruby: Add `toString` functionality consistency queries
2023-06-26 09:38:53 +02:00
Tom Hvitved
c6eff8dbe9 Merge pull request #13545 from hvitved/ruby/reduce-string-pool
Ruby: Reduce string pool pressure by late-inlining `locationRelativePathToString`
2023-06-26 08:57:06 +02:00
amammad
e3e0307db7 V1 2023-06-25 20:36:28 +10:00
Mathias Vorreiter Pedersen
e32f7d84a5 C++: Speed up analysis on 'Samate' by avoiding the 'Variable' column in the dataflow stages of the query. 2023-06-25 00:35:43 +01:00
Mathias Vorreiter Pedersen
e0f5c584b9 C++: Fix Code Scanning error. 2023-06-24 19:38:22 +01:00
Mathias Vorreiter Pedersen
c1077fe75d C++: Accept test changes. 2023-06-24 19:12:03 +01:00
Mathias Vorreiter Pedersen
9d5b8cff2e C++: Add a barrier to the 'cpp/invalid-pointer-deref' query. 2023-06-24 19:12:03 +01:00
Mathias Vorreiter Pedersen
fba753ce61 C++: Add more test cases to 'cpp/invalid-pointer-deref'. 2023-06-24 18:59:25 +01:00
Jorge
08b9a5e2b2 Add missing ; 2023-06-23 23:10:06 +02:00
Robert Marsh
69ee615119 Merge pull request #13515 from MathiasVP/dataflow-fix-for-self-iterators
C++: Dataflow fix for the self-iterators issue
2023-06-23 13:50:23 -04:00
jorgectf
2dc4f23dbb Add models for org.apache.commons.lang 2023-06-23 19:34:21 +02:00
Jorge
7d0b880bf7 Merge branch 'main' into jorgectf/deserialization-lookahead 2023-06-23 18:24:39 +02:00
jorgectf
b6e4ba6f9d Add SerialKiller model 2023-06-23 18:19:43 +02:00
Geoffrey White
922fc3aba7 Swift: Correct qhelp link to example. 2023-06-23 17:10:31 +01:00
Jorge
3c980db93a Format webix.js 2023-06-23 18:08:01 +02:00
Jorge
8ff525933e Merge branch 'main' into seclab/webix-modeling 2023-06-23 18:06:26 +02:00
Joe Farebrother
b2d54842a6 Apply review suggestion
Co-authored-by: Michael Nebel <michaelnebel@github.com>
2023-06-23 17:00:52 +01:00
Geoffrey White
c11ce4ce68 Swift: Add change note. 2023-06-23 16:59:26 +01:00
Geoffrey White
958ae24a61 Swift: Update the qhelp and example. 2023-06-23 16:59:25 +01:00
Geoffrey White
e74eccdd97 Swift: Get the query 'working' (though lots of issues with results right now). 2023-06-23 16:59:25 +01:00
Geoffrey White
38ecfd8233 Swift: Copy the query, qhelp, example from Ruby. 2023-06-23 16:59:25 +01:00
Geoffrey White
df58902674 Swift: Duplicate some of the Regex cases with different constructions. 2023-06-23 16:59:25 +01:00
Geoffrey White
ddd3e88256 Swift: Change note. 2023-06-23 16:49:01 +01:00
Geoffrey White
bf1254fdb7 Swift: Add query tests. 2023-06-23 16:49:01 +01:00
Geoffrey White
d5f4939719 Swift: Add tests for bad tag filter query. 2023-06-23 16:21:10 +01:00
Alex Ford
6008c7bee4 Ruby: rack - change note for response and app recognition improvements 2023-06-23 16:16:15 +01:00
Alex Ford
b67b80ca2a Ruby: rack - rename App as RackApplication 2023-06-23 16:12:23 +01:00
Geoffrey White
1f581525ff Swift: Revise the qhelp. 2023-06-23 16:04:32 +01:00
Geoffrey White
54a8f9e697 Swift: Copy qhelp from Ruby. 2023-06-23 16:04:31 +01:00
Geoffrey White
4a469469c4 Swift: Trivial fixes for the query. 2023-06-23 16:04:31 +01:00
Geoffrey White
a957ce4cdd Swift: Copy query from Ruby. 2023-06-23 16:04:31 +01:00
Geoffrey White
ca71d48e4a Merge pull request #13470 from geoffw0/swiftregex
Swift: Regular expressions library.
2023-06-23 15:51:43 +01:00
Geoffrey White
5cffa59476 Swift: Make the RegexEval interface cleaner. 2023-06-23 14:33:30 +01:00
Geoffrey White
987ca61ef5 Swift: Fix typo in a comment. 2023-06-23 14:14:53 +01:00
Geoffrey White
8f69b2afa8 Swift: Add some test cases aimed at regex parsing correctness. 2023-06-23 14:11:34 +01:00
Ian Lynagh
5da377b46a Kotlin: Build: Remove some dead code 2023-06-23 13:51:35 +01:00
Alex Ford
de6547341f qlformat 2023-06-23 13:36:39 +01:00
Alex Ford
29844e61e4 Ruby: rack - test for response tracking 2023-06-23 13:16:04 +01:00
Alex Ford
4b3d99529a Ruby: rack - rename getResponse as getAResponse 2023-06-23 13:13:07 +01:00
Alex Ford
4f9f41acd5 Ruby: rack - fix qldoc 2023-06-23 13:11:00 +01:00
Tom Hvitved
f28aefad8b Ruby: Reduce string pool preasure by late-inlining locationRelativePathToString
```
[2023-06-23 13:48:23] Evaluated non-recursive predicate Sinatra#e09174a3::Sinatra::locationRelativePathToString#1#ff@683a25ce in 34682ms (size: 8048121).
Evaluated relational algebra for predicate Sinatra#e09174a3::Sinatra::locationRelativePathToString#1#ff@683a25ce with tuple counts:
        8048122  ~0%    {6} r1 = SCAN locations_default OUTPUT In.1, In.0, toString(In.5), toString(In.2), toString(In.3), toString(In.4)
        8048121  ~0%    {2} r2 = JOIN r1 WITH FileSystem#df18ed9a::Make#FileSystem#e91ad87f::Input#::Container::getRelativePath#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1, (Rhs.1 ++ "@" ++ Lhs.3 ++ ":" ++ Lhs.4 ++ ":" ++ Lhs.5 ++ ":" ++ Lhs.2)
                        return r2
```
2023-06-23 14:01:16 +02:00
Tom Hvitved
0cb27e7511 C#: Add toString functionality consistency queries 2023-06-23 13:28:11 +02:00
Asger F
0039cb141e Merge branch 'main' into rb/tracking-on-demand 2023-06-23 12:55:54 +02:00
Mathias Vorreiter Pedersen
600c60af8b Merge branch 'main' into rdmarsh2/cpp/cobo-array-vars 2023-06-23 10:54:46 +01:00
yoff
26856a82a6 Apply suggestions from code review
Co-authored-by: Asger F <asgerf@github.com>
2023-06-23 10:15:20 +02:00
Tom Hvitved
79ee5112fc Ruby: Add toString functionality consistency queries 2023-06-23 09:42:03 +02:00
Rasmus Lerchedahl Petersen
86dfc7b66e python: format 2023-06-23 08:18:06 +02:00
Kevin Stubbings
3605269e13 Add webix copy function 2023-06-22 22:16:28 -07:00
Mathias Vorreiter Pedersen
b615e98cc1 Merge pull request #13425 from MathiasVP/fix-more-conflation-in-dataflow 2023-06-22 22:53:34 +01:00
Mathias Vorreiter Pedersen
79fb6a6079 C++: Accept test changes. 2023-06-22 19:34:05 +01:00
Mathias Vorreiter Pedersen
0839c1aad1 C++: Allow self-flow through indirect parameters. 2023-06-22 19:33:18 +01:00
Mathias Vorreiter Pedersen
da54751d85 C++: Add testcase that demonstrate the need for self-flow out of indirect parameters. 2023-06-22 19:33:13 +01:00
Ian Lynagh
0d05f50aaa Kotlin: Remove an expected-no-getter exception
We're not sure why it was necessary.
2023-06-22 18:12:13 +01:00
Geoffrey White
a8aa33510d Shared: QLDoc NfaUtils::Make::State::hasLocationInfo. 2023-06-22 17:19:43 +01:00
Mathias Vorreiter Pedersen
d3bc99a9ee Merge pull request #13533 from MathiasVP/hide-summarized-nodes-from-path-graph
Swift: Hide summarized nodes from path graphs
2023-06-22 16:44:19 +01:00
Tony Torralba
d07e2862f9 Java: Add URL.toString summary
This adds coverage for CVE-2023-35149.
2023-06-22 17:39:30 +02:00
Jami
3fed2798c8 Merge pull request #13093 from GeekMasher/csharp-ext
[CSharp] Additional data extensions for sink models
2023-06-22 10:22:32 -04:00
Geoffrey White
fe71207475 Merge pull request #13537 from geoffw0/regexqldoc
Ruby: Fix some QLDoc errors in ParseRegExp.qll
2023-06-22 14:55:39 +01:00
Geoffrey White
c17de99c86 Swift: Correct QLDoc error. 2023-06-22 13:59:16 +01:00
Geoffrey White
d06f4b9567 Ruby: Correct QLDoc for qualifiedPart. 2023-06-22 13:56:42 +01:00
Geoffrey White
1c1637a886 Ruby: Correct QLDoc for charRange. 2023-06-22 13:56:06 +01:00
Alex Ford
f8140bcad3 Ruby: rack - improve performance of trackRackResponse 2023-06-22 13:45:44 +01:00
Alex Ford
b8f537a437 Ruby: update rack tests 2023-06-22 13:45:44 +01:00
Alex Ford
e8079727ee Ruby: rack - extend rack tests 2023-06-22 13:45:44 +01:00
Alex Ford
4d59181571 Ruby: rack - Rack::Response#finish constructs a valid rack response 2023-06-22 13:45:44 +01:00
Alex Ford
521e65c5bd Ruby: rack - extend rack applications to include instance methods, lambdas, and procs 2023-06-22 13:45:44 +01:00
Alex Ford
7a3b6f107b Ruby: add predicates to DataFlow::ModuleNode to get singleton methods 2023-06-22 13:45:44 +01:00
Alex Ford
24e83165ee Merge pull request #13289 from alexrford/rb/rack-redirect
Ruby: rack - model redirect responses
2023-06-22 13:45:02 +01:00
Mathew Payne
0fcc1cb588 Merge branch 'main' into csharp-ext 2023-06-22 13:30:08 +01:00
Ian Lynagh
7efbd8828b Merge pull request #13526 from igfoo/igfoo/diagwriter
Kotlin: Define DiagnosticTrapWriter, for type safety
2023-06-22 12:39:48 +01:00
Tom Hvitved
104dab4b66 QL: Improve dead-code query 2023-06-22 13:37:42 +02:00
Geoffrey White
e6695e3780 Merge branch 'main' into swiftregex 2023-06-22 12:21:58 +01:00
Geoffrey White
90499c0b17 Update swift/ql/lib/codeql/swift/regex/internal/ParseRegex.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-06-22 12:09:22 +01:00
AlexDenisov
9ab7a83e3f Merge pull request #13532 from github/alexdenisov/bump-cmake-c++
Swift: bump C++ version in CMake
2023-06-22 12:56:34 +02:00
Joe Farebrother
52841e9005 Apply review suggestions - minor fixes 2023-06-22 11:30:58 +01:00
Joe Farebrother
bdaeeeadee Add good/bad indicators to tests 2023-06-22 11:21:30 +01:00
Joe Farebrother
270bcc3740 fix qhelp and remove commented out code 2023-06-22 11:20:58 +01:00
Mathias Vorreiter Pedersen
fe97572f70 C++: Fix strncpy model. 2023-06-22 10:59:12 +01:00
Mathias Vorreiter Pedersen
273e5bc21f C++: Add testcase demonstrating that the model for 'strncpy' is broken. 2023-06-22 10:59:12 +01:00
Mathias Vorreiter Pedersen
ff3c76c1fa Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-06-22 10:59:12 +01:00
Mathias Vorreiter Pedersen
4f1b2c6194 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-06-22 10:59:12 +01:00
Mathias Vorreiter Pedersen
a8a04c8588 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-06-22 10:59:12 +01:00
Mathias Vorreiter Pedersen
6528985a27 C++: Add QLDoc to 'hasAddressOperandAndIndirectionIndex'. 2023-06-22 10:59:12 +01:00
Mathias Vorreiter Pedersen
c7cff373de C++: Add another testcase with conflation. 2023-06-22 10:59:12 +01:00
Mathias Vorreiter Pedersen
3365ff0d95 C++: Ensure that 'PrintIR' for dataflow still compiles. 2023-06-22 10:59:12 +01:00
Mathias Vorreiter Pedersen
6543da9990 C++: Accept test changes. 2023-06-22 10:59:11 +01:00
Mathias Vorreiter Pedersen
3b0a286d8e C++: Adjust the rest of the library to the new API. 2023-06-22 10:59:11 +01:00
Mathias Vorreiter Pedersen
6034eb07af C++: Change the API for indirect operands and indirection instructions to not allow pointer conflation. 2023-06-22 10:59:11 +01:00
Mathias Vorreiter Pedersen
9e9c811eb3 C++: Fix conflation bug in 'getIRRepresentationOfIndirectInstruction'. 2023-06-22 10:59:11 +01:00
Mathias Vorreiter Pedersen
5816f177c9 C++: Add failing test. 2023-06-22 10:59:11 +01:00
Rasmus Lerchedahl Petersen
2264b119a6 python: more consistent tests
- do not test taint flow whne dataflow is established
- test taint of both the collection and the expected element
2023-06-22 11:52:25 +02:00
Owen Mansel-Chan
b3a19ef7b2 Merge pull request #13461 from owen-mc/go/show-functionmodel-steps-to-path-summaries
Go: show FunctionModel steps in path summaries
2023-06-22 10:46:12 +01:00
yoff
0f8ebd1519 Update python/ql/test/experimental/dataflow/model-summaries/model_summaries.py
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-06-22 11:31:21 +02:00
Tom Hvitved
04f388f8c4 QL: Add more dead-code tests 2023-06-22 11:30:38 +02:00
Tom Hvitved
7c2f26e0c3 Merge pull request #13534 from hvitved/ql/fix-bad-join
QL: Fix bad join
2023-06-22 11:24:51 +02:00
Mathias Vorreiter Pedersen
d48f7f59c1 Swift: Add change note. 2023-06-22 09:54:00 +01:00
Tom Hvitved
6942925899 QL: Fix bad join
```
[2023-06-22 10:44:20] (92s) Tuple counts for Predicate#23818b54::Cached::resolveSelfClassCalls#2#ff/2@06fd3bf5 after 1m9s:
                      30500      ~567%     {3} r1 = JOIN Ast#8e1d5bcf::ClassPredicate::getName#0#dispred#ff WITH Ast#8e1d5bcf::PredicateOrBuiltin::getArity#0#dispred#ff ON FIRST 1 OUTPUT Lhs.0 'p', Lhs.1, Rhs.1
                      26500      ~573%     {4} r2 = JOIN r1 WITH Ast#8e1d5bcf::Class::getAClassPredicate#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.2, Lhs.0 'p', Lhs.1, Rhs.1
                      3059915597 ~605%     {4} r3 = JOIN r2 WITH Ast#8e1d5bcf::Call::getNumberOfArguments#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'mc', Lhs.2, Lhs.1 'p', Lhs.3
                      20999389   ~701%     {3} r4 = JOIN r3 WITH Ast#8e1d5bcf::MemberCall::getMemberName#0#dispred#ff ON FIRST 2 OUTPUT Lhs.0 'mc', Lhs.2 'p', Lhs.3
                      20995877   ~711%     {4} r5 = JOIN r4 WITH Ast#8e1d5bcf::MemberCall::getBase#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'p', Lhs.2, Lhs.0 'mc'
                      1240332    ~700%     {3} r6 = JOIN r5 WITH Ast#8e1d5bcf::ThisAccess#ff ON FIRST 1 OUTPUT Lhs.3 'mc', Lhs.1 'p', Lhs.2
                      1236711    ~716%     {4} r7 = JOIN r6 WITH Ast#8e1d5bcf::AstNode::getEnclosingPredicate#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.2, Lhs.1 'p', Lhs.0 'mc'
                      4476       ~347%     {2} r8 = JOIN r7 WITH Ast#8e1d5bcf::AstNode::getParent#0#dispred#ff ON FIRST 2 OUTPUT Lhs.3 'mc', Lhs.2 'p'
                                           return r8
```
2023-06-22 10:53:10 +02:00
Mathias Vorreiter Pedersen
c50a0419e2 Swift: Accept test changes. 2023-06-22 09:46:10 +01:00
Mathias Vorreiter Pedersen
36f980f4bf Swift: Hide summarized nodes from paths. 2023-06-22 09:46:02 +01:00
Jeroen Ketema
277dbdf410 Merge pull request #13498 from jketema/inline-4
Rework more inline expectation tests to use the parameterized module
2023-06-22 10:01:07 +02:00
Geoffrey White
f52f4504c3 Swift: License/licence. 2023-06-22 08:49:58 +01:00
Alex Denisov
ade4d68793 Swift: bump C++ version in CMake 2023-06-22 09:26:29 +02:00
jorgectf
7e7e2aaac7 Remove non-existing import 2023-06-22 01:15:08 +02:00
jorgectf
868129c7e7 Add change note 2023-06-22 01:14:06 +02:00
jorgectf
6947e99c15 Add models for webix
Co-authored-by: Kevin Stubbings <Kwstubbs@users.noreply.github.com>
2023-06-22 01:07:33 +02:00
Robert Marsh
ba7cb8f4ae C++: fix range analysis back edge detection for irreducible CFGs 2023-06-21 17:54:52 -04:00
Geoffrey White
d3af8c5123 Swift: The perf. issue is fixed by above commit "Do regex locations more like Ruby does them." 2023-06-21 19:00:27 +01:00
Ian Lynagh
bfd0a19d85 Kotlin: Define DiagnosticTrapWriter, for type safety
In some cases, we were writing diagnostics to TRAP files where they
shouldn't be written. Such TRAP files don't define #compilation, so TRAP
import gave errors.

Now we use DiagnosticTrapWriter to get the type system to check that we
are writing diagnostics to the right place.
2023-06-21 18:38:27 +01:00
Geoffrey White
925477ed66 Swift: Remove another bit of code that doesn't currently make sense in Swift. 2023-06-21 18:29:10 +01:00
Geoffrey White
5449bdc993 Swift: Do regex locations more like Ruby does them. 2023-06-21 18:25:48 +01:00
Geoffrey White
5a99007ab1 Swift: We don't need the location components logic inRegExpTerm, at least, not yet. 2023-06-21 18:11:53 +01:00
Geoffrey White
e127030b5c Swift: Test some edge cases for locations. 2023-06-21 18:11:53 +01:00
Geoffrey White
58c9bf4b12 Swift: Copy the 'parse' test from Ruby. 2023-06-21 18:05:17 +01:00
Geoffrey White
2b99344aa7 Swift: Add some cached annotations for sensitive exprs. 2023-06-21 17:52:00 +01:00
Henry Mercer
5afdaf8fe1 Merge pull request #13525 from github/rc/3.10
Merge `rc/3.10` back to `main`
2023-06-21 17:13:36 +01:00
Geoffrey White
bc16fb5b01 Swift: Small possible improvements. 2023-06-21 16:17:50 +01:00
Erik Krogh Kristensen
3b0220d556 Merge pull request #13501 from adrienpessu/main
JS: Add another example the Hardcoded credential help
2023-06-21 17:02:22 +02:00
Ian Lynagh
18a5c48c79 Merge pull request #13508 from igfoo/igfoo/rc_kot
Kotlin: Backport some Kotlin 1.9 fixes to the rc/3.10 branch
2023-06-21 15:26:41 +01:00
Kasper Svendsen
eca3df2a16 Merge pull request #13523 from kaspersv/kaspersv/ql-lang-spec-polish
Polish QL language spec "Call with results" section
2023-06-21 15:57:25 +02:00
Kasper Svendsen
6d3f9fc67e Polish QL language spec "Call with results" section 2023-06-21 14:29:16 +02:00
Tom Hvitved
039bbb6288 Merge pull request #13521 from hvitved/ql/final-extends
QL: Model `final extends`
2023-06-21 14:18:31 +02:00
Adrien Pessu
5541fe79a8 Merge branch 'main' into main 2023-06-21 12:55:48 +01:00
Adrien Pessu
e332a4348d Update javascript/ql/src/Security/CWE-798/HardcodedCredentials.qhelp
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-06-21 12:55:33 +01:00
Kasper Svendsen
a4ee152efb Merge pull request #13512 from kaspersv/rc/3.10
QL language ref: explain implicit this receivers
2023-06-21 12:02:02 +02:00
Michael Nebel
3a81d21c1c Merge pull request #13520 from michaelnebel/csharp/usestubs3
C#: Use stubs for query test cases.
2023-06-21 11:41:26 +02:00
Kasper Svendsen
8015c3cf28 QL language ref: explain implicit this receivers 2023-06-21 11:07:16 +02:00
Michael Nebel
27ee4241e8 C#: Remove unused test assemblies. 2023-06-21 10:45:08 +02:00
Tom Hvitved
e6e966bd22 QL: Model final extends 2023-06-21 10:40:12 +02:00
Tom Hvitved
0edd80001b QL: Add tests for AbstractClassImport.ql 2023-06-21 10:40:12 +02:00
Michael Nebel
34e50de76d C#: Only use the dll's that are strictly needed in the API Abuse/NoDisposeCallOnLocalIDisposable test case. 2023-06-21 10:39:52 +02:00
Adrien Pessu
4d1bbe36a9 Merge branch 'main' into main 2023-06-21 09:11:57 +01:00
Adrien Pessu
7dfb404fd7 clean examples 2023-06-21 08:11:39 +00:00
Adrien Pessu
e85987bfc5 remove useless phrase 2023-06-21 07:59:24 +00:00
Erik Krogh Kristensen
12b3913a4b Merge pull request #13511 from tspascoal/patch-1
JS: Single quote was preventing the shell from expanding the BODY variable in Expression injection in Actions example
2023-06-21 09:57:20 +02:00
Michael Nebel
82bf27c7b2 C#: Base the remaining API Abuse query test cases on stubs. 2023-06-21 09:52:35 +02:00
Michael Nebel
52323d3990 C#: Base API Abuse/IncorrectCompareToSignature test case on stubs and update expected test output. 2023-06-21 09:40:37 +02:00
Michael Nebel
0e263fb744 C#: Base API Abuse/DisposeNotCalledOnException test case on stubs. Since the stubs requires C# 11 the language version has been removed from the options (also it doesn't affect the output). 2023-06-21 09:40:37 +02:00
Michael Nebel
4546d8f0bf C#: Base API Abuse/UncheckedReturnValue test case on stubs, clean up test and update expected output. 2023-06-21 09:40:37 +02:00
Michael Nebel
ada49dbb2c C#: Specific language version not needed in options file for API Abuse/NoDisposeCallOnLocalIDisposable. 2023-06-21 09:40:19 +02:00
Michael Nebel
d1184f0b3c C#: Base the AlertSupression test on stubs. 2023-06-21 07:59:56 +02:00
Jami
622cd05b77 Merge branch 'main' into java/update-mad-decls-after-triage-2023-06-08T08-51-47 2023-06-20 21:58:15 -04:00
Remco Vermeulen
c0884432e8 Format query 2023-06-20 10:38:08 -07:00
Tom Hvitved
59147ad674 QL: Add more tests for MissingOverride.ql 2023-06-20 19:30:30 +02:00
Adrien Pessu
9cb12cdcbe Merge branch 'main' of https://github.com/adrienpessu/codeql 2023-06-20 17:28:28 +00:00
Adrien Pessu
2a2f6de78c fixed text not in a tag 2023-06-20 17:27:37 +00:00
Adrien Pessu
77077da20c Merge branch 'main' into main 2023-06-20 18:24:44 +01:00
Adrien Pessu
36cb60c746 Add fixed proposition for NodeJS 2023-06-20 17:22:56 +00:00
Joe Farebrother
8fdec4f116 Add documentation 2023-06-20 17:18:04 +01:00
Jami
5259a6ecfc Merge pull request #13324 from jcogs33/jcogs33/shared-sink-kind-validation
Shared: share MaD kind validation across languages
2023-06-20 11:56:12 -04:00
Mathias Vorreiter Pedersen
865c050226 Merge pull request #13517 from hvitved/ql/field-only-used-in-charpred-fix
QL: Exclude overridden fields from `FieldOnlyUsedInCharPred.ql`
2023-06-20 16:28:23 +01:00
Mathew Payne
62b3d5ea19 Merge branch 'main' into csharp-ext 2023-06-20 16:17:35 +01:00
Geoffrey White
c501fa5289 Swift: Add more test cases exploring the timeout. 2023-06-20 15:27:54 +01:00
Rasmus Lerchedahl Petersen
cb2de69f5a python: consolidate tests
also change `Foo` -> `foo`
2023-06-20 16:13:38 +02:00
Tony Torralba
19de7cd54b Merge pull request #13507 from atorralba/atorralba/ql/android-ids-check
QL: Add query to find Android queries with improper ids
2023-06-20 16:08:09 +02:00
Alex Ford
8ef8a0d2f6 qlformat 2023-06-20 14:59:13 +01:00
Alex Ford
7aec22c1e4 Ruby: rack - remove MIME modelling 2023-06-20 14:57:23 +01:00
Tony Torralba
3c60f52a1b Update ql/ql/src/queries/style/AndroidIdPrefix.ql
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-06-20 15:41:30 +02:00
Owen Mansel-Chan
0baf78f8fa Add change note 2023-06-20 14:33:29 +01:00
Tony Torralba
c230c9f793 Consider only Java files in importsAndroidModule 2023-06-20 15:30:46 +02:00
Erik Krogh Kristensen
2341c82450 Merge pull request #13342 from erik-krogh/once-again-deps
Py: delete more old deprecations
2023-06-20 15:29:17 +02:00
Owen Mansel-Chan
cdc1c2c1aa Merge pull request #13454 from owen-mc/go/add-mad-content-for-pointer-content
Go: Add models-as-data content for pointer content
2023-06-20 14:26:07 +01:00
Tom Hvitved
d296256920 QL: Exclude overridden fields from FieldOnlyUsedInCharPred.ql 2023-06-20 15:24:09 +02:00
Tom Hvitved
12c810c63d QL: Add tests for FieldOnlyUsedInCharPred.ql 2023-06-20 15:23:08 +02:00
Tony Torralba
768478103c Add another exception 2023-06-20 15:16:37 +02:00
Tony Torralba
818c312a56 Add exception for java/improper-intent-verification
As suggested by @igfoo.
2023-06-20 14:50:41 +02:00
Tony Torralba
41534803e5 Refactor to use QueryDoc
Kudos to @erik-krogh for the suggestion.
2023-06-20 14:41:57 +02:00
Rasmus Wriedt Larsen
47d0a6d2e3 Python: Restore rest of experimental files 2023-06-20 14:30:43 +02:00
Owen Mansel-Chan
c0fea85380 Accept test changes 2023-06-20 13:25:49 +01:00
Owen Mansel-Chan
cc320c5e9c Never skip functionmodel inputs and outputs in path summaries 2023-06-20 13:25:47 +01:00
Owen Mansel-Chan
d7c97f8759 Merge pull request #13455 from owen-mc/dataflow/add-flowCheckNodeSpecific
Dataflow: add language-specific hook for breaking up big step relation
2023-06-20 13:24:26 +01:00
Mathias Vorreiter Pedersen
2b0282ca12 C++: Accept test changes. 2023-06-20 13:05:25 +01:00
Mathias Vorreiter Pedersen
952dbd69e9 C++: Default to one indirection in the case of self iterators. 2023-06-20 12:59:27 +01:00
Robert Marsh
971456c725 C++: add a test for self-valued iterators 2023-06-20 12:59:27 +01:00
Philip Ginsbach
2187e56376 Merge pull request #13513 from github/ginsbach/EvaluationOfInstantiations
mention how instantiation-nested predicates are treated in stratification and evaluation
2023-06-20 12:46:18 +01:00
Arthur Baars
1f6fae88ab Merge pull request #13510 from github/post-release-prep/codeql-cli-2.13.4
Post-release preparation for codeql-cli-2.13.4
2023-06-20 13:30:40 +02:00
Philip Ginsbach
e4e91c7ab0 mention how instantiation-nested predicates are treated in stratification and evaluation 2023-06-20 12:29:52 +01:00
Philip Ginsbach
f09c44f8a2 Merge pull request #13443 from github/ginsbach/SpecifyInstantiations
add QL specification section on module instantiations
2023-06-20 12:02:52 +01:00
Tiago Pascoal
150854603b Single quote was preventing the shell from expanding the BODY variable
While this prevents the attack highlighted in the query help it also prevents it from working.

Double quotes will allow the expansion of the variable while still preventing the attack
2023-06-20 11:38:27 +01:00
Tony Torralba
7837959bdf QL: Add query to find Android queries with improper ids 2023-06-20 12:37:24 +02:00
github-actions[bot]
18b678e69e Post-release preparation for codeql-cli-2.13.4 2023-06-20 10:20:05 +00:00
Owen Mansel-Chan
04ff89e1fe Update access path documentation 2023-06-20 11:05:05 +01:00
Owen Mansel-Chan
732b14ee38 Update pretty printing predicates 2023-06-20 11:04:03 +01:00
Ian Lynagh
293f90333d Kotlin: Avoid another cause of ConcurrentModificationException with 1.9 2023-06-20 10:59:24 +01:00
Ian Lynagh
0076d8aac1 Java: Add up/downgrade scripts 2023-06-20 10:59:13 +01:00
Ian Lynagh
81142f51fb Kotlin: Handle IrSyntheticBodyKind.ENUM_ENTRIES
Generated by Kotlin 1.9 for some of our tests.
2023-06-20 10:59:04 +01:00
Rasmus Lerchedahl Petersen
5ceac5a771 python: add changenote 2023-06-20 11:53:31 +02:00
Owen Mansel-Chan
a01169eec2 add "Dereference" content for PointerContent 2023-06-20 10:49:37 +01:00
yoff
579c56c744 Merge pull request #13178 from yoff/python-ruby/track-through-summaries-pm
ruby/python: Shared module for typetracking through flow summaries
2023-06-20 11:19:45 +02:00
Owen Mansel-Chan
d28c4203db Merge pull request #13453 from owen-mc/go/test-mad-pointer-content
Go: Add failing tests for MaD with pointer content
2023-06-20 09:55:06 +01:00
Rasmus Lerchedahl Petersen
e111a19524 python: split tests into taint and value
and add summaries
2023-06-20 10:46:27 +02:00
Erik Krogh Kristensen
7387653bd7 Merge pull request #13504 from github/rc/3.10
Merge rc/3.10 into main
2023-06-20 10:42:44 +02:00
Jeroen Ketema
dba4460526 Python: Update more inline expectation tests to use the paramterized module 2023-06-20 10:16:15 +02:00
Jeroen Ketema
c53e529bac Ruby: Update remaining inline expectation tests to use the paramterized module 2023-06-20 10:16:01 +02:00
Jeroen Ketema
d6d21e3928 Go: Update remaining inline expectation tests to use the paramterized module 2023-06-20 10:15:46 +02:00
Jeroen Ketema
890a67d2ee Introduce modules to merge 3, 4, and 5 inline expectation tests 2023-06-20 10:13:21 +02:00
Philip Ginsbach
0c4eb68921 introduce concept of fully instantiated entity 2023-06-20 09:07:38 +01:00
Philip Ginsbach
6848cba685 use more consistent terminology 2023-06-20 09:06:16 +01:00
Tony Torralba
54db4cc107 Merge pull request #13503 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-20 09:51:07 +02:00
github-actions[bot]
6da5ec8196 Add changed framework coverage reports 2023-06-20 00:15:43 +00:00
Remco Vermeulen
32d7faa3b8 Account for the signedness of the lesser operand 2023-06-19 16:57:36 -07:00
Jeroen Ketema
b500bbba76 Merge pull request #13460 from erik-krogh/rest-of-cpp
CPP: delete the deprecated Container::getURL predicates
2023-06-20 01:32:25 +02:00
erik-krogh
2104507cec add change-note 2023-06-19 23:11:38 +02:00
erik-krogh
5fdfd98a1d delete the deprecated Conatiner::getURL predicates 2023-06-19 23:11:38 +02:00
Henry Mercer
790d42b42c Merge pull request #13500 from github/henrymercer/release-prep-swift
Release preparation for Swift
2023-06-19 18:14:10 +01:00
Adrien Pessu
eb28266bcb improv example the help file 2023-06-19 17:00:52 +00:00
Geoffrey White
9f58d961f2 Swift: Remove TODO about a n unknown failure as it's now diagnosed and planned. 2023-06-19 17:49:27 +01:00
Henry Mercer
ead79c98d8 Run pack release for Swift packs 2023-06-19 17:35:58 +01:00
Henry Mercer
f90586bc90 Bump Swift pack versions 2023-06-19 17:35:26 +01:00
aegilops
23bf8470ce Removed .md and made class change 2023-06-19 17:29:17 +01:00
Geoffrey White
76e51eeaa2 Swift: Add change note. 2023-06-19 17:14:14 +01:00
Geoffrey White
2ba231549f Merge branch 'main' into sharedsensitive2 2023-06-19 16:44:27 +01:00
Jeroen Ketema
9c774ac97f Merge pull request #13426 from jketema/inline-3
Update inline flow tests to use parameterized module
2023-06-19 17:39:29 +02:00
Geoffrey White
b50801ba6a Swift: Attempt to improve performance. 2023-06-19 16:17:39 +01:00
Alexandre Boulgakov
61a3f86f0f Merge pull request #13447 from github/sashabu/windows2
Swift: Bare-bones extractor pack for Windows.
2023-06-19 15:39:54 +01:00
AlexDenisov
21ad3e851a Merge pull request #13497 from github/redsun82/swift-remove-result-of
Swift: remove `std::result_of` from swift headers
2023-06-19 16:31:26 +02:00
Jean Helie
423336310c Merge pull request #13480 from github/jhelie/clean-up-mad-kinds-use
Java: clean up mad kinds use
2023-06-19 16:21:20 +02:00
Paolo Tranquilli
592e7f0b56 Swift: add TODO for later swift updates 2023-06-19 15:52:16 +02:00
Paolo Tranquilli
3ff7148147 Swift: remove std::result_of from swift headers
`std::result_of` was removed in C++20, though the actual removal from
the STL library implementations seems to depend on the version. For
example using xcode 14.2 one gets away with a deprecation warning, but
xcode 14.3 will fail.

As Swift 5.8.1 is still compiled with C++14, we cannot replace
`std::result_of` with `std::invoke_result` in the prebuilding patches
just yet, but we can do that for the extractor itself, patching the
prebuilt package.
2023-06-19 15:29:45 +02:00
Tony Torralba
c62689022e Merge pull request #13256 from atorralba/atorralba/java/stapler-models
Java: Model the Stapler framework
2023-06-19 15:27:19 +02:00
Tony Torralba
00fe8adc09 Fix name clash 2023-06-19 15:04:33 +02:00
Tony Torralba
5cb451b040 Merge pull request #13475 from atorralba/atorralba/many/zipslip-docs-update
C#/Go/Java/JS/Python/Ruby: Update the description and qhelp of the Zipslip query
2023-06-19 14:33:44 +02:00
Mathew Payne
8347a410b7 Merge branch 'main' into csharp-ext 2023-06-19 13:25:07 +01:00
Ian Lynagh
64e591a823 Merge pull request #13482 from igfoo/igfoo/conc
Kotlin: Avoid another cause of ConcurrentModificationException with 1.9
2023-06-19 12:57:25 +01:00
Ian Lynagh
ec73f28d09 Merge pull request #13479 from igfoo/igfoo/ENUM_ENTRIES
Kotlin: Handle IrSyntheticBodyKind.ENUM_ENTRIES
2023-06-19 12:57:10 +01:00
Mathew Payne
a6a86acd9a Fix formatting for ExternalFlow 2023-06-19 12:44:01 +01:00
Mathew Payne
4597210519 Update csharp/ql/lib/semmle/code/csharp/dataflow/ExternalFlow.qll
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-06-19 12:03:46 +01:00
Mathew Payne
861ac177b8 Update csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-06-19 12:03:38 +01:00
aegilops
8c9ccab9c9 Autoformat 2023-06-19 11:53:53 +01:00
Paul Hodgkinson
72d9d4736e Merge branch 'main' into java/experimental/command-injection 2023-06-19 11:51:45 +01:00
aegilops
2112d73a6a Autoformat 2023-06-19 11:50:54 +01:00
aegilops
1a108fb1c9 Changed to for constant string 2023-06-19 11:46:08 +01:00
aegilops
7c235e3786 Fixed linting issues. Will not fix instanceof, that is necessary 2023-06-19 11:41:23 +01:00
Asger F
8539db07c4 Ruby: Update ActiveDispatch due to change in toString 2023-06-19 12:16:07 +02:00
Asger F
f392af220b Ruby: benign changes to SQLi tests (fixed FNs) 2023-06-19 12:15:57 +02:00
Asger F
ce0073b30c Ruby: update StoredXSS test results
These results were previously flagged for the wrong reason.

Calls to a user-define method were seen as ORM calls. The real source is inside the user-defined method, but we miss that due to lack of 'self' handling in ORM tracking.
2023-06-19 12:15:57 +02:00
Asger F
e3a04499f6 Ruby: minor overhaul of ActiveResource model 2023-06-19 12:15:57 +02:00
Asger F
8bc4193ce0 Ruby: minor overhaul of ActiveRecord model
Old version had scalability issues when adding taking more interprocedural flow and inheritance into account.
2023-06-19 12:15:44 +02:00
Asger F
bb3b973b32 Ruby: use new features in ActionController 2023-06-19 12:06:35 +02:00
Asger F
fbfa31937f Ruby: use new features in ActionMailer 2023-06-19 12:05:57 +02:00
Asger F
1ae41484da Ruby: Use new features in ActionMailbox model 2023-06-19 12:05:15 +02:00
Asger F
f8ae5301a4 Ruby: update Twirp
This used right-to-left evaluation for API graphs, which is not supported anymore
2023-06-19 12:04:53 +02:00
Asger F
b305c13b65 Ruby: update SQLite3 model 2023-06-19 12:04:12 +02:00
Asger F
2ef010f1c0 Ruby: update GraphQL model 2023-06-19 12:04:00 +02:00
Asger F
61cda97163 Ruby: rename some call sites 2023-06-19 12:03:25 +02:00
Asger F
5b05e72d27 Ruby: switch to local dataflow when dealing with Kernel/IO 2023-06-19 12:02:39 +02:00
Asger F
0110610c6a Ruby: overhaul API graphs 2023-06-19 12:01:42 +02:00
Rasmus Lerchedahl Petersen
eb3c33dfe2 python: remove erronous getACall()
`base` is already the `CallNode` we want.
2023-06-19 11:41:06 +02:00
Ian Lynagh
ca5bc6f224 Java: Add up/downgrade scripts 2023-06-19 10:36:29 +01:00
Ian Lynagh
1f538cced3 Kotlin: Handle IrSyntheticBodyKind.ENUM_ENTRIES
Generated by Kotlin 1.9 for some of our tests.
2023-06-19 10:36:29 +01:00
Arthur Baars
ea97c3ea83 Merge pull request #13423 from aibaars/update-grammar-3
Ruby: update grammar
2023-06-19 10:54:12 +02:00
Jeroen Ketema
bc42308bd3 Java: fix formatting 2023-06-19 10:31:49 +02:00
Jeroen Ketema
b420455e2b C#: Update InlineFlowTests to use the merged path graph 2023-06-19 10:28:54 +02:00
Jeroen Ketema
6a84e6cbfd Add the merged PathGraph to all copies of the InlineFlowTest library 2023-06-19 10:28:10 +02:00
Tony Torralba
8f6d2ed2f9 Adjust ZipSlip query description according to review suggestions. 2023-06-19 10:27:41 +02:00
Erik Krogh Kristensen
c289f66692 Merge pull request #13469 from erik-krogh/redos-3.10
ReDoS: stop spuriously matching everything when encountering an unsupported charclass
2023-06-19 10:21:00 +02:00
Tony Torralba
3c4d938cf1 Apply code review suggestions.
Co-authored-by: Asger F <asgerf@github.com>
2023-06-19 10:20:19 +02:00
Tony Torralba
433fc680ec Apply suggestions from code review
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2023-06-19 10:17:40 +02:00
Tom Hvitved
2253761eb0 Merge pull request #13494 from maikypedia/maikypedia/typo
Ruby : Naming error
2023-06-19 09:50:45 +02:00
Michael Nebel
1338261f04 Merge pull request #13472 from michaelnebel/csharp/usestubs2
C#: Use stubs in the Security feature related tests.
2023-06-19 09:34:19 +02:00
Maiky
849e732c48 typos 2023-06-19 01:16:27 +02:00
Rasmus Lerchedahl Petersen
229641070f python: rename summaries 2023-06-18 22:01:47 +02:00
Rasmus Lerchedahl Petersen
6554e804dd python: add test for model summaries
(but no summaries yet)
2023-06-18 21:52:49 +02:00
Rasmus Lerchedahl Petersen
3cf9e3e692 Py/js/ruby: sync files 2023-06-18 21:52:49 +02:00
Rasmus Lerchedahl Petersen
18f4b75f8b python: enable summaries from model
This requires a change to the shared interface:
Making `getNodeFromPath` public.

This because Python is doing its own thing and identifying call-backs.
2023-06-18 21:52:49 +02:00
Mathias Vorreiter Pedersen
cc09715ba7 Merge pull request #13466 from jketema/pointer-deref-fp 2023-06-18 00:51:59 +01:00
Aditya Sharad
08ac56579c Merge pull request #13485 from github/jketema/codeql-cli-2.13.4-disable-overrun
Exclude `cpp/overrun-write` from `cpp-security-extended.qls`
2023-06-16 11:05:09 -07:00
Jeroen Ketema
0bb67e45b3 C++: lower the precision of cpp/overrun-write to exclude it from our query suites 2023-06-16 19:07:56 +02:00
Jeroen Ketema
000add206c Revert "Exclude cpp/overrun-write from cpp-security-extended.qls"
This reverts commit 3aaa649076.
2023-06-16 19:05:04 +02:00
aegilops
8c73fbeabe Formatted 2023-06-16 17:33:21 +01:00
aegilops
55eeb00309 Added experimental tag 2023-06-16 17:27:01 +01:00
Alexandre Boulgakov
abc6d62b6f Swift: Use platform-specific Bazel config. 2023-06-16 17:24:04 +01:00
Alexandre Boulgakov
679df1e61b Swift: Add "autobuilder" on Windows that simply shows an error. 2023-06-16 17:23:50 +01:00
Alexandre Boulgakov
2bb3101316 Swift: Rename incompatible OS diagnostic to clarify that it's for the autobuilder. 2023-06-16 17:22:43 +01:00
Alexandre Boulgakov
bc48968def Swift: Build incompatible OS diagnostic on all platforms. 2023-06-16 17:22:43 +01:00
aegilops
b6c35dd88c Added experimental version of Java Command Injection query, to be more sensitive to unusual code constructs 2023-06-16 17:12:53 +01:00
Ian Lynagh
04a7ff7f76 Merge pull request #13477 from igfoo/igfoo/diags_classes
Kotlin: Remove diags.ql from classes test
2023-06-16 17:07:38 +01:00
Ian Lynagh
096e9a4ba4 Kotlin: Avoid another cause of ConcurrentModificationException with 1.9 2023-06-16 17:06:54 +01:00
Philip Ginsbach
1ed3baea17 mention instantiation in the section on module resolution 2023-06-16 17:02:17 +01:00
Philip Ginsbach
45426b9289 mention parameters and instantiation-nested types 2023-06-16 17:02:17 +01:00
Philip Ginsbach
aedd9f5f6b add QL specification section on module instantiations 2023-06-16 17:02:15 +01:00
Jeroen Ketema
9ff5754473 C++: Add cpp/invalid-pointer-def FP test case 2023-06-16 16:48:24 +02:00
Jeroen Ketema
0e68767efc C++: Add more cpp/invalid-pointer-deref FPs 2023-06-16 15:28:05 +02:00
Rasmus Wriedt Larsen
fb6955edf9 Python: Add tests of methods in summaries 2023-06-16 14:43:45 +02:00
Rasmus Wriedt Larsen
afafaac0d7 Python: Fix typo 2023-06-16 14:41:36 +02:00
Jean Helie
baf6b74945 use new sink mad kinds and simplify isKnownKind predicate 2023-06-16 13:58:23 +02:00
Jean Helie
daf2743143 only use neutral models of kind "sink" 2023-06-16 13:58:23 +02:00
Ian Lynagh
a8acf16088 Kotlin: Remove diags.ql from classes test
The diags consistency test already handles this for us.
2023-06-16 12:57:19 +01:00
AlexDenisov
b572974536 Merge pull request #13476 from github/alexdenisov/rc3.10_mergeback
rc3.10 mergeback: getting Swift changes back to main
2023-06-16 11:59:23 +02:00
Alex Denisov
0479ef5b9c Merge remote-tracking branch 'origin/rc/3.10' into alexdenisov/rc3.10_mergeback 2023-06-16 10:13:23 +02:00
Michael Nebel
f4f195c837 C#: Base tests for CWE-807 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
52c4a47a61 C#: Base tests for CWE-798 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
6058cfc037 C#: Base tests for CWE-730 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
5483756f17 C#: Base tests for CWE-643 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
2857145bba C#: Base tests for CWE-614 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
58d469b932 C#: Make path relative to testdir explicit in CWE-601 testcase. 2023-06-16 10:08:40 +02:00
Michael Nebel
d414ce046f C#: Base tests for CWE-548 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
7766aaeb1e C#: Base tests for CWE-539 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
5e4d31c10d C#: Base tests for CWE-502 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
faaf26157b C#: Base tests for CWE-451 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
33e798418e C#: Base tests for CWE-384 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
6ec4338cca C#: Base tests for CWE-359 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
b35af64a9d C#: Base tests for CWE-352 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
ae5c149150 C#: Base tests for CWE-338 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
4500170bb4 C#: Base tests for CWE-312 on stubs. 2023-06-16 10:08:39 +02:00
Michael Nebel
02dbc600a4 C#: Base tests for CWE-248 on stubs. 2023-06-16 10:08:39 +02:00
Michael Nebel
680762572a C#: Base tests for CWE-209 on stubs. 2023-06-16 10:08:39 +02:00
Michael Nebel
596a8ecf97 C#: Base tests for CWE-201 on stubs. 2023-06-16 10:08:39 +02:00
Michael Nebel
e0b661c555 C#: Base tests for CWE-134 on stubs. 2023-06-16 10:08:39 +02:00
Michael Nebel
d1b704fb45 C#: Base tests for CWE-119 on stubs. 2023-06-16 10:08:39 +02:00
Michael Nebel
b726fe8735 C#: Base tests for CWE-114 on stubs. 2023-06-16 10:08:39 +02:00
Michael Nebel
6028f4b76f C#: Base tests for CWE-112 on stubs. 2023-06-16 10:08:39 +02:00
AlexDenisov
22124409fe Merge pull request #13458 from github/alexdenisov/swift-5.8-against-3.10
Swift: upgrade extractor to support Swift 5.8.1
2023-06-16 10:07:02 +02:00
Tony Torralba
c97868f774 Add change notes 2023-06-16 09:01:02 +02:00
Tony Torralba
3e96fe60c5 Go/Java/JS/Python/Ruby: Update the description and qhelp of the ZipSlip query
All filesystem operations, not just writes, with paths built from untrusted archive entry names are dangerous
2023-06-16 08:52:44 +02:00
Geoffrey White
df38a12b84 Swift: Complete the escape sequences fix. 2023-06-15 21:18:15 +01:00
Geoffrey White
39302c62bd Swift: Add support for isDigit and similar. 2023-06-15 21:18:15 +01:00
Geoffrey White
355793f6ca Swift: Add support for \u{hhhhhh} escaped characters in regular expressions. 2023-06-15 21:18:15 +01:00
Geoffrey White
49dfe5d22b Swift: Add support for \Uhhhhhhhh escaped characters in regular expressions. 2023-06-15 21:18:14 +01:00
Geoffrey White
05939bd90a Swift: Add a test case for \Uhhhhhhhh character escapes. 2023-06-15 20:51:21 +01:00
Jeroen Ketema
3aaa649076 Exclude cpp/overrun-write from cpp-security-extended.qls 2023-06-15 16:50:42 +02:00
Tony Torralba
1b39faaded QLDoc correction 2023-06-15 16:20:39 +02:00
Michael Nebel
981468f64e C#: Base tests for CWE-099 on stubs. 2023-06-15 16:05:46 +02:00
Michael Nebel
95fddaebef C#: Base tests for CWE-094 on stubs. 2023-06-15 16:05:46 +02:00
Michael Nebel
7d58a9c3d3 C#: Base tests for CWE-091 on stubs. 2023-06-15 16:05:46 +02:00
Michael Nebel
f4b5cbf7eb C#: Base tests for CWE-090 on stubs. 2023-06-15 16:05:45 +02:00
Michael Nebel
8e36a880f2 C#: Adjust paths relative to the test directory for CWE-089 test dependencies. 2023-06-15 16:05:45 +02:00
Michael Nebel
b674a8eab7 C#: Split the StoredXss test from XSS Asp test. Make the former based on stubs. 2023-06-15 16:05:45 +02:00
Michael Nebel
0d10f5ca2a C#: Base tests for CWE-078 on stubs. 2023-06-15 16:05:45 +02:00
Michael Nebel
47621ca602 C#: Base tests for CWE-022 on stubs. 2023-06-15 16:05:45 +02:00
Geoffrey White
9b9b4a1fd7 Swift: Fix QL-for-QL warnings. 2023-06-15 14:31:49 +01:00
Michael Nebel
d0844bbe6e C#: Base tests for CWE-020 on stubs. 2023-06-15 15:22:43 +02:00
Michael Nebel
3e8102a0c8 C#: Base tests for CWE-016 on stubs. 2023-06-15 15:22:43 +02:00
Michael Nebel
7dd88ddff6 C#: Base tests for CWE-011 on stubs. 2023-06-15 15:22:42 +02:00
Tony Torralba
7cbc13db40 Update java/ql/lib/change-notes/2023-06-08-new-models.md 2023-06-15 15:14:12 +02:00
Geoffrey White
9e9ef42054 Swift: Add another test case. 2023-06-15 13:25:02 +01:00
erik-krogh
087e6d1c15 fix QL-for-QL warning 2023-06-15 14:14:34 +02:00
erik-krogh
21b55ce0cf stop spuriously matching everything when encountering an unsupported charclass 2023-06-15 14:14:34 +02:00
Geoffrey White
4a06394d51 Swift: Autoformat + fix test indentation. 2023-06-15 13:09:46 +01:00
Geoffrey White
91b2de2b61 Swift: Lots of small fixes / cleanup. 2023-06-15 13:04:26 +01:00
Michael Nebel
47638123d0 Merge pull request #13150 from michaelnebel/csharp/removejumpstep
C#: Remove jump step
2023-06-15 12:53:37 +02:00
Tony Torralba
dcd180f3f6 Remove model 2023-06-15 12:00:46 +02:00
Tony Torralba
af240ff533 Apply suggestions from code review 2023-06-15 11:58:53 +02:00
Ian Lynagh
b7e9915151 Merge pull request #13463 from igfoo/igfoo/AccessControlException
Kotlin: Remove use of AccessControlException
2023-06-15 10:53:28 +01:00
Jeroen Ketema
d82c3ce11a Ruby: Rewrite InlineFlowTest as a parameterized module 2023-06-15 10:52:23 +02:00
Jeroen Ketema
742eb8dd12 Java: Rewrite InlineFlowTest as a parameterized module 2023-06-15 10:52:10 +02:00
Jeroen Ketema
853bf2ae4e C#: Rewrite InlineFlowTest as a parameterized module 2023-06-15 10:51:59 +02:00
Jeroen Ketema
eb62df6ece Go: Rewrite InlineFlowTest as a parameterized module 2023-06-15 10:51:29 +02:00
Tony Torralba
ad2b020b06 Merge pull request #13465 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-15 10:04:20 +02:00
Jeroen Ketema
8fb3d838c9 C++: Add FP test case for cpp/invalid-pointer-deref 2023-06-15 10:03:31 +02:00
Michael Nebel
04736b6e10 C#: Add lost QL Doc. 2023-06-15 10:00:09 +02:00
github-actions[bot]
e6160b8e49 Add changed framework coverage reports 2023-06-15 00:18:04 +00:00
Maiky
f6887c86b3 Rename Libxml.qll to LibXml.qll 2023-06-15 00:19:23 +02:00
Maiky
e5fe5403b7 Apply requested changes 2023-06-14 22:55:14 +02:00
Rasmus Lerchedahl Petersen
b7bf750174 python: use updated names in test 2023-06-14 22:23:21 +02:00
Rasmus Lerchedahl Petersen
4fded84a49 python: implement missing predicates 2023-06-14 21:30:58 +02:00
Rasmus Lerchedahl Petersen
0267b32904 fix eol 2023-06-14 21:17:12 +02:00
Rasmus Lerchedahl Petersen
2491fda58e python: update comment 2023-06-14 21:16:39 +02:00
Rasmus Lerchedahl Petersen
6521a51d93 python: unique strings in tests 2023-06-14 21:14:50 +02:00
Rasmus Lerchedahl Petersen
0e713e6fc1 ruby/python: more consistent naming of parameters 2023-06-14 21:02:42 +02:00
yoff
af72509ce6 Update python/ql/lib/semmle/python/dataflow/new/internal/TypeTrackerSpecific.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-06-14 20:57:14 +02:00
yoff
2ae5dae474 Apply suggestions from code review
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-06-14 20:55:45 +02:00
Geoffrey White
8e8a9c8018 Swift: Annotate tests based on real ereal execution findings. Add some
relevant variants, remove some duplicates, add the testing script also.
2023-06-14 19:23:06 +01:00
Geoffrey White
f93bf6ad22 Swift: Escape the test cases in a better way (so escape characters don't obscure what's going on). 2023-06-14 18:51:57 +01:00
Asger F
318a60b208 Merge pull request #13456 from asgerf/js/vuex-perf
JS: Restrict length of state path in vuex model
2023-06-14 19:50:06 +02:00
Geoffrey White
63ab4788e0 Swift: Flag parse failures in the test. 2023-06-14 18:23:06 +01:00
Geoffrey White
44eb7bf642 Swift: Import more test cases from other languages (this highlights some issues). 2023-06-14 18:23:05 +01:00
Geoffrey White
c5405688f4 Swift: Add real world test cases. 2023-06-14 18:23:05 +01:00
Geoffrey White
2ccbdbdf87 Swift: Identify strings that are used in regular expressions properly. 2023-06-14 18:23:05 +01:00
Geoffrey White
712c3cc698 Swift: Add the cases from the (Ruby) qhelp to the library tests. 2023-06-14 18:23:05 +01:00
Geoffrey White
7e9d73b6b2 Swift: Add regex sources to the library. 2023-06-14 18:23:05 +01:00
Geoffrey White
1e290b48bb Swift: Add REDOS analysis to the library test. 2023-06-14 18:23:04 +01:00
Geoffrey White
d4c3e9eb16 Swift: Include the shared regex pack in Swift. 2023-06-14 18:23:04 +01:00
Geoffrey White
5f85b7419f Swift: Trivial changes to get it compiling. 2023-06-14 18:23:04 +01:00
Geoffrey White
8ec377997d Swift: Copy some library files from Ruby (as advised). 2023-06-14 18:23:04 +01:00
Geoffrey White
9601134ec0 Swift: Create library test cases for REDOS vulnerable regexs. 2023-06-14 18:23:04 +01:00
Geoffrey White
f7860a3ce5 Swift: Add regular expressions to SummaryStats.ql. 2023-06-14 18:23:03 +01:00
Geoffrey White
053bf9a668 Swift: Test the library. 2023-06-14 18:23:03 +01:00
Ian Lynagh
0419b6e505 Kotlin: Remove use of AccessControlException
We were getting warnings about it being deprecated, and it was all dead
code anyway.
2023-06-14 17:45:58 +01:00
Nora Dimitrijević
4d2e304799 Merge pull request #13240 from d10c/swift/brace-stmt-variables
Swift: reorganize `VarDecl` instances within `BraceStmt`
2023-06-14 18:23:25 +02:00
yoff
f5f822ca2d Merge pull request #13395 from yoff/python/container-summaries-3 2023-06-14 17:13:49 +02:00
Joe Farebrother
12bb418375 Add change note 2023-06-14 16:12:34 +01:00
Joe Farebrother
9b31b61143 Broaden the scope of checks for authorization attributes 2023-06-14 16:07:41 +01:00
Joe Farebrother
7eea191005 Add tests for MVC cases 2023-06-14 16:07:41 +01:00
Joe Farebrother
1500089b86 Add test cases for webforms auth via web.config files 2023-06-14 16:07:41 +01:00
Joe Farebrother
1b6e7f9140 Add unit tests for webform case with auth in code 2023-06-14 16:07:41 +01:00
Joe Farebrother
57b3b2b2e3 Add qldoc + exclude empty methods 2023-06-14 16:07:40 +01:00
Joe Farebrother
582c4a7fbc Support virtual route mappings for webforms actions 2023-06-14 16:07:40 +01:00
Joe Farebrother
63b3e16a54 Support Authorize attribute 2023-06-14 16:07:40 +01:00
Joe Farebrother
29b5f14283 Add support for auth via xml using the physical path 2023-06-14 16:07:40 +01:00
Joe Farebrother
e93f3186fe Add missing function level access control query 2023-06-14 16:07:40 +01:00
Alexandre Boulgakov
354ebc2cb9 Merge pull request #13459 from github/sashabu/no-path-hash
Swift: Don't use `std::hash<fs::path>`.
2023-06-14 16:05:07 +01:00
Alexandre Boulgakov
afb7070fd3 Swift: Don't use std::hash<fs::path>. 2023-06-14 15:50:45 +01:00
Owen Mansel-Chan
74b39b42a1 Accept test changes 2023-06-14 15:47:25 +01:00
Owen Mansel-Chan
3ff6d033d3 Rename to neverSkipInPathGraph 2023-06-14 15:29:54 +01:00
Alex Denisov
c080cba88d Swift: add database migration scripts 2023-06-14 16:17:44 +02:00
Alex Denisov
526f6cd5b5 Swift: skip print_unextracted 2023-06-14 16:17:44 +02:00
Alex Denisov
2daa001109 Swift: setup Swift 5.8 unconditionally 2023-06-14 16:17:44 +02:00
Paolo Tranquilli
17111c96e4 Swift: accept test expectation changes 2023-06-14 16:17:44 +02:00
Alex Denisov
93b9115217 Swift: package resource dir from precomiled toolchain 2023-06-14 16:17:44 +02:00
Paolo Tranquilli
c945d65b2d Swift: add clang ignored flag 2023-06-14 16:17:44 +02:00
Paolo Tranquilli
b9c4adee31 Swift: print only toBeTested errors in Errors.ql test 2023-06-14 16:17:44 +02:00
Paolo Tranquilli
75684eebe9 Swift: add 5.8 update QL test 2023-06-14 16:17:44 +02:00
Paolo Tranquilli
396b57696c Swift: minimal 5.8 compatibility 2023-06-14 16:17:44 +02:00
Tony Torralba
37a62d3021 Merge pull request #13227 from atorralba/atorralba/java/jenkins-generated-models
Java: Add autogenerated models for frameworks related to Jenkins
2023-06-14 15:59:28 +02:00
Asger F
22b98c8959 JS: Restrict length of state path in vuex model 2023-06-14 15:48:58 +02:00
Owen Mansel-Chan
e34bcef2bd Ruby: Move path summary visibility code into flowCheckNodeSpecific 2023-06-14 14:46:41 +01:00
Owen Mansel-Chan
ee185ae204 Python: Move hack from CastNode into flowCheckNodeSpecific 2023-06-14 14:46:39 +01:00
Owen Mansel-Chan
5f72ce0935 Add stub implementations of flowCheckNodeSpecific 2023-06-14 14:46:35 +01:00
Owen Mansel-Chan
e0f7437d40 Sync dataflow library 2023-06-14 14:29:56 +01:00
Owen Mansel-Chan
dd57d9fd55 Add flowCheckNodeSpecific
This allows individual languages to specify `FlowCheckNode`s, which
break up the big step relation and make sure that those nodes appear in
path summaries.
2023-06-14 14:27:58 +01:00
Owen Mansel-Chan
d071b463a3 Add failing tests for MaD with pointer content 2023-06-14 14:14:37 +01:00
Nora Dimitrijević
0db321c724 Merge branch 'main' into swift/brace-stmt-variables 2023-06-14 14:57:46 +02:00
Nora Dimitrijević
77f52e4e01 Swift: better join order fix for NamedPattern.getVarDecl
This brings it down to 85ms when run from a query, not just from quick-eval:

```

[2023-06-14 14:47:06] Evaluated non-recursive predicate NamedPattern#1696c0d8::NamedPattern::getVarDecl#0#dispred#ff@04392e6o in 85ms (size: 91309).
Evaluated relational algebra for predicate NamedPattern#1696c0d8::NamedPattern::getVarDecl#0#dispred#ff@04392e6o with tuple counts:
        1310544   ~9%    {2} r1 = SCAN var_decls OUTPUT In.0, In.1
        1209062   ~0%    {2} r2 = STREAM DEDUP r1
        1209062   ~0%    {2} r3 = JOIN r2 WITH Synth#5f134a93::Synth::convertVarDeclToRaw#1#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
          91309   ~0%    {3} r4 = JOIN r3 WITH VarDecl#914e0d1e::Generated::VarDecl::getImmediateParentPattern#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0

          69599   ~0%    {3} r5 = JOIN r4 WITH #Pattern#19b8cf65::Pattern::getImmediateEnclosingPattern#0#dispredPlus#bf_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2

         160908   ~1%    {3} r6 = r4 UNION r5
          94246   ~0%    {4} r7 = JOIN r6 WITH Synth#5f134a93::Synth::convertNamedPatternToRaw#1#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.0
          91309   ~1%    {2} r8 = JOIN r7 WITH named_patterns ON FIRST 2 OUTPUT Lhs.3, Lhs.2
                         return r8
```
2023-06-14 14:52:10 +02:00
Rasmus Lerchedahl Petersen
9a1e895fdc Python: missed removing these
`set.add` and `list.append` do not return a value
2023-06-14 14:51:21 +02:00
Tony Torralba
7c4cdbf0d6 Remove badly generated models 2023-06-14 14:20:16 +02:00
Jami
35591113c2 Merge branch 'main' into jcogs33/shared-sink-kind-validation 2023-06-14 08:06:34 -04:00
Michael Nebel
f26c514426 C#: Remove the JumpReturnKind and the related summary component stack. 2023-06-14 14:00:19 +02:00
Michael Nebel
afec9b05e9 Merge pull request #13147 from michaelnebel/csharp/entityframeworkrefactor
C#: Use synthetic global in the EntityFramework code instead of jump steps.
2023-06-14 13:47:56 +02:00
Rasmus Lerchedahl Petersen
3b558a0044 python: remove spurious return flow 2023-06-14 13:35:37 +02:00
yoff
38cca08a86 Apply suggestions from code review
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-06-14 13:27:33 +02:00
Asger F
f737054216 Merge pull request #13380 from asgerf/js/fix-sink-kind
JS: Fix invalid source kind in test
2023-06-14 12:56:58 +02:00
Tony Torralba
5e3d9d8136 Java: Model the Stapler framework 2023-06-14 12:34:52 +02:00
Tony Torralba
182513a981 Merge pull request #13235 from atorralba/atorralba/java/hudson-models
Java: Add Hudson models
2023-06-14 12:33:18 +02:00
Ian Lynagh
36e8441ed7 Merge pull request #13427 from igfoo/igfoo/references
Kotlin: Avoid using deprecated APIs
2023-06-14 11:15:35 +01:00
Jean Helie
209f3e26d4 Merge pull request #13239 from github/tausbn/automodel-application-mode
Java: Add QL support for automodel application mode
2023-06-14 11:42:26 +02:00
Michael Nebel
2200a2ae79 C#: Address review comments. 2023-06-14 11:25:31 +02:00
Asger F
5aea6fc16c JS: Remove dataExtensions clause from test qlpack 2023-06-14 10:42:31 +02:00
Asger F
21831516f4 JS: use test-local data extensions 2023-06-14 10:38:33 +02:00
Tony Torralba
8bafc22add Replace open-url sink kinds with request-forgery 2023-06-14 09:59:59 +02:00
Tony Torralba
73d2ab7d66 Add change note 2023-06-14 09:58:30 +02:00
Tony Torralba
686c35e210 Add autogenerated models 2023-06-14 09:58:30 +02:00
Anders Schack-Mulligen
1a4fca334f Merge pull request #13273 from aschackmull/dataflow/summarynode-refactor
Dataflow: Refactor FlowSummaryImpl to synthesize nodes independently from DataFlow::Node.
2023-06-14 09:38:36 +02:00
erik-krogh
8663a8ba1c add change-note 2023-06-14 08:31:57 +02:00
erik-krogh
df61c4dd62 reintroduce the experiemental queries that use deprecated features 2023-06-14 08:31:57 +02:00
erik-krogh
bfe7e62f35 update some expected outputs - some tests no longer have an edges relation - and XsltSinks lost a result 2023-06-14 08:31:57 +02:00
erik-krogh
1f8f111ef6 reintroduce DataFlowType - otherwise nothing in the old DataFlow library would compile 2023-06-14 08:31:57 +02:00
erik-krogh
6e001ec062 deprecate SqlInjectionSink - it's not used anywhere 2023-06-14 08:31:57 +02:00
erik-krogh
e463819bc2 get ParamSource.ql to compile by deleting import that got deleted - I have no if this is a good change 2023-06-14 08:31:57 +02:00
erik-krogh
3a436d1f84 do a quick-and-dirty conversion of py/hardcoded-credentials to the new dataflow library 2023-06-14 08:31:56 +02:00
erik-krogh
ae8bf5ed3c delete old deprecations 2023-06-14 08:31:51 +02:00
Rasmus Lerchedahl Petersen
f1de753400 python: add changenote 2023-06-13 21:59:51 +02:00
Rasmus Lerchedahl Petersen
4b4b9bf9da python: add missing summaries
For append/add:
The new results in the experimental tar slip query
show that we do not recognize the sanitisers.
2023-06-13 20:22:21 +02:00
Rasmus Lerchedahl Petersen
b72c93ff4f python: remove remaining explicit taint steps 2023-06-13 20:22:20 +02:00
yoff
1d65284011 Merge pull request #13209 from yoff/python/container-summaries-2
python: Container summaries, part 2
2023-06-13 18:17:09 +02:00
Rasmus Lerchedahl Petersen
775f3eaf56 python: make copy a dataflow step 2023-06-13 17:07:41 +02:00
Alexandre Boulgakov
7280f07611 Merge pull request #13336 from github/sashabu/c++20-todos
Swift: Fix some C++20 todos.
2023-06-13 15:25:29 +01:00
Alexandre Boulgakov
f5d6f50851 Merge pull request #13335 from github/sashabu/c++20
Build: Bump build mode to C++20.
2023-06-13 15:03:01 +01:00
yoff
4056358863 Merge pull request #13438 from RasmusWL/flask-render-string
Python: Add modeling of `flask.render_template_string`
2023-06-13 14:56:43 +02:00
Michael Nebel
9690ff6177 C#: Address review comments. 2023-06-13 14:19:17 +02:00
Alex Ford
75ccbe58ee Ruby: rack - use Mimetype rather than MimeType in predicate names for consistency with concepts 2023-06-13 12:44:29 +01:00
Alex Ford
977ceb89fd Ruby: rack - remove PotentialResponseNode#getAStatusCode 2023-06-13 12:42:46 +01:00
Alex Ford
af1ca7fec7 Update ruby/ql/lib/codeql/ruby/frameworks/rack/internal/App.qll
Co-authored-by: Asger F <asgerf@github.com>
2023-06-13 12:37:31 +01:00
Rasmus Wriedt Larsen
2b7fc94aef Python: Fix validTest.py expectation 2023-06-13 12:11:28 +02:00
Erik Krogh Kristensen
4dc596f0fb Merge pull request #13381 from erik-krogh/mongooseFindByIdAndUpdate
JS: remove the second argument of findByIdAndUpdate as a NoSQL sink
2023-06-13 11:59:58 +02:00
Rasmus Lerchedahl Petersen
33ad15e989 ruby: use aliases 2023-06-13 11:49:30 +02:00
Rasmus Lerchedahl Petersen
e11f6b5107 ruby/python: adjust shared file
- move `isNonLocal` to the top
- missing backtics
2023-06-13 11:49:30 +02:00
Rasmus Lerchedahl Petersen
b5961c7f6b ruby: move to internal folder 2023-06-13 11:49:30 +02:00
Rasmus Lerchedahl Petersen
203f8226cb ruby/python: make SummaryTypeTracker private 2023-06-13 11:32:06 +02:00
Anders Schack-Mulligen
2d616d494e C#/Ruby: Add fields as per review comments. 2023-06-13 11:26:30 +02:00
yoff
8cae151883 Update python/ql/test/experimental/dataflow/typetracking-summaries/TestSummaries.qll
Co-authored-by: Asger F <asgerf@github.com>
2023-06-13 11:22:54 +02:00
Rasmus Lerchedahl Petersen
b709ed47e1 python: add test 2023-06-13 11:20:15 +02:00
Jeroen Ketema
6413fcc0f9 Merge pull request #13439 from jketema/go-dead
Go: Remove commented out code from test
2023-06-13 10:33:51 +02:00
Michael Nebel
577bbd531d C#: Base tests on stubs, move extractor options to options file and updated expected test output. 2023-06-13 10:17:42 +02:00
Jeroen Ketema
d035491c6f Go: Remove commented out code from test 2023-06-13 10:13:42 +02:00
Jeroen Ketema
c3ba206b6a Merge pull request #13346 from jketema/inline-2
Update inline expectation tests to use parameterized module
2023-06-13 10:10:55 +02:00
yoff
2a5173c331 Update python/ql/lib/semmle/python/frameworks/Stdlib.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-06-13 10:04:46 +02:00
Asger F
0d45074caa Merge pull request #13422 from asgerf/rb/map_filter
Ruby: fix bug in filter_map summary
2023-06-13 09:43:47 +02:00
Tamás Vajk
aed6a75cd4 Merge pull request #13420 from tamasvajk/feature/standalone-mscorlib
C#: Make sure System.Private.CoreLib is added only once as a reference in standalone extraction
2023-06-13 09:29:16 +02:00
Tony Torralba
ffe67689ec Merge branch 'main' into atorralba/java/command-injection-mad-sinks 2023-06-13 09:27:33 +02:00
Tony Torralba
29d4b6fadc Re-add public classes that shouldn't be removed yet 2023-06-13 09:24:27 +02:00
Tony Torralba
2fd2c434f2 Apply suggestions from code review
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-06-13 09:24:15 +02:00
Rasmus Wriedt Larsen
6526364045 Python: Add modeling of flask.render_template_string 2023-06-12 21:18:31 +02:00
Sarita Iyer
1073a2838c Merge pull request #13424 from github/si-10647-docs-update
Multi-variant repository analysis docs update
2023-06-12 11:51:42 -04:00
Paolo Tranquilli
c612a7a16b Revert "Swift: deduplicate accessors and params correctly"
This reverts commit bab4eeeb55.
2023-06-12 17:14:20 +02:00
Paolo Tranquilli
1d32f6efc3 Merge branch 'main' into alexdenisov+redsun82/tuple-mangling 2023-06-12 16:49:45 +02:00
Paolo Tranquilli
bab4eeeb55 Swift: deduplicate accessors and params correctly 2023-06-12 16:48:03 +02:00
erik-krogh
3fd9f26b52 use consistent indentation in mongoose.js 2023-06-12 16:40:42 +02:00
erik-krogh
cd6f738f72 add mongoose.Types.ObjectId.isValid as a sanitizer-guard for NoSQL injection 2023-06-12 16:38:11 +02:00
Anders Schack-Mulligen
bc7cb1ec47 C#: Fix some qltests. 2023-06-12 16:19:04 +02:00
Sarita Iyer
2e2a03dec2 Merge branch 'si-10647-docs-update' of https://github.com/github/codeql into si-10647-docs-update 2023-06-12 10:00:08 -04:00
Sarita Iyer
8c59ec2ec7 revise maximum info 2023-06-12 09:59:58 -04:00
Sarita Iyer
082c9a26d8 Update docs/codeql/codeql-for-visual-studio-code/running-codeql-queries-at-scale-with-mrva.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-06-12 09:22:42 -04:00
Anders Schack-Mulligen
949d4491f9 C#: Remove summaries for void-returning Reverse methods. 2023-06-12 13:18:28 +02:00
Anders Schack-Mulligen
eec012d308 Java: Fix test 2023-06-12 13:18:13 +02:00
Anders Schack-Mulligen
88fe0f089e C#: Fix expected output. 2023-06-12 13:17:55 +02:00
Anders Schack-Mulligen
f8ff575ff0 C#: Fix bugs in misc models. 2023-06-12 11:37:57 +02:00
Erik Krogh Kristensen
798f3880c9 Merge pull request #13402 from erik-krogh/deps-some-py
Py: delete some old deprecations
2023-06-12 11:29:44 +02:00
Calum Grant
0163fb8d9f Merge pull request #13391 from github/RasmusWL/experimental-query-id
Python: Avoid duplicated query-id
2023-06-12 10:10:51 +01:00
Tamas Vajk
cdf1c2639d C#: Only include CoreLib.dll when UseMscorlib option is set 2023-06-12 11:03:26 +02:00
Arthur Baars
fad73d71e5 Merge pull request #13307 from hmac/amammad-ruby-YAMLunsafeLoad
Ruby: Add YAML unsafe deserialization sinks
2023-06-12 10:43:37 +02:00
Felicity Chapman
68b6d6207e Update docs/codeql/codeql-for-visual-studio-code/running-codeql-queries-at-scale-with-mrva.rst 2023-06-12 09:35:20 +01:00
Asger F
452af312ff Ruby: change note 2023-06-12 10:07:26 +02:00
Tony Torralba
6b9c00e9cc Merge pull request #13429 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-12 08:47:40 +02:00
github-actions[bot]
a628384d83 Add changed framework coverage reports 2023-06-12 00:18:38 +00:00
Sarita Iyer
c30f259f9d provide more info 2023-06-09 16:28:34 -04:00
Sarita Iyer
52acf5e8be updates based on feedback 2023-06-09 16:08:30 -04:00
Jami Cogswell
9abe3e3da4 Shared: use a module as input to 'KindValidation' 2023-06-09 14:35:37 -04:00
Sarita Iyer
d81ba80406 Update docs/codeql/codeql-for-visual-studio-code/running-codeql-queries-at-scale-with-mrva.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-06-09 14:27:26 -04:00
Ian Lynagh
d3941ae935 Kotlin: Avoid using deprecated APIs 2023-06-09 18:14:09 +01:00
Sarita Iyer
427f2a488c fix 2023-06-09 11:31:27 -04:00
Sarita Iyer
a602e9e9b4 fix format 2023-06-09 11:31:14 -04:00
Sarita Iyer
112a4adaf2 update image 2023-06-09 11:25:38 -04:00
Sarita Iyer
c741fb49be updates 2023-06-09 10:42:02 -04:00
Sarita Iyer
96bce2a4fc mrva docs update 2023-06-09 10:30:33 -04:00
Arthur Baars
dbcb1c2224 Ruby: update grammar 2023-06-09 16:23:28 +02:00
Anders Schack-Mulligen
5062442982 Go/Python/Ruby/Swift: Add stub. 2023-06-09 15:39:28 +02:00
Anders Schack-Mulligen
2ecce575a9 C#: Fix types of summary parameter nodes. 2023-06-09 15:39:28 +02:00
Anders Schack-Mulligen
98f51d7f29 Dataflow: Sync. 2023-06-09 15:39:28 +02:00
Anders Schack-Mulligen
97b2bdaa9f Java: Fix types of summary parameter nodes. 2023-06-09 15:39:28 +02:00
Anders Schack-Mulligen
b2d3f29ef3 Swift: Fix tests. 2023-06-09 15:39:28 +02:00
Anders Schack-Mulligen
5eb278095c Go: Fix tests. 2023-06-09 15:39:28 +02:00
Anders Schack-Mulligen
0c62901a67 Ruby: Fix tests. 2023-06-09 15:39:18 +02:00
Anders Schack-Mulligen
6020e4d0e3 C#/Go/Python/Ruby/Swift: Fix some more references. 2023-06-09 15:30:38 +02:00
Anders Schack-Mulligen
1c3b8e2b96 Swift: Adjust to FlowSummaryImpl changes. 2023-06-09 15:30:38 +02:00
Anders Schack-Mulligen
4e531af71b Ruby: Adjust to FlowSummaryImpl changes. 2023-06-09 15:30:35 +02:00
Rasmus Lerchedahl Petersen
7e87a7c1f7 python: rewrite argumentPositionMatch
to not use the call graph.
2023-06-09 15:29:13 +02:00
Anders Schack-Mulligen
1e3b960c1b Python: Adjust to FlowSummaryImpl changes. 2023-06-09 15:27:17 +02:00
Anders Schack-Mulligen
e6e4cef35e Go: Adjust to FlowSummaryImpl changes. 2023-06-09 15:27:17 +02:00
Anders Schack-Mulligen
5e6031724a C#: Adjust to FlowSummaryImpl changes. 2023-06-09 15:27:17 +02:00
Anders Schack-Mulligen
2cc5bde925 Dataflow: Sync. 2023-06-09 15:27:17 +02:00
Anders Schack-Mulligen
254d60c826 Dataflow: Refactor FlowSummaryImpl to synthesize nodes independently from DataFlow::Node. 2023-06-09 15:27:17 +02:00
Anders Schack-Mulligen
59636c43ca Dataflow: Rename two private predicates. 2023-06-09 15:27:17 +02:00
erik-krogh
42d67d0137 add change-note 2023-06-09 15:24:12 +02:00
erik-krogh
6dfeb2536b delete old deprecations 2023-06-09 15:12:23 +02:00
Stephan Brandauer
b38bc52019 Java: fix bug in ExcludedFromModeling Characteristic 2023-06-09 14:57:56 +02:00
Asger F
d47477bd3b Ruby: update line numbers in expectation file 2023-06-09 14:52:21 +02:00
Paolo Tranquilli
c42e65cbaf Merge branch 'main' into alexdenisov+redsun82/tuple-mangling 2023-06-09 14:37:20 +02:00
Asger F
a50d91ea48 Ruby: fix bug in filter_map summary 2023-06-09 14:31:10 +02:00
Jami
f222cce2e5 Merge pull request #13418 from jcogs33/jcogs33/fix-typo-in-parameterized-module-docs
Docs: fix typo in spelling of keyword
2023-06-09 08:17:07 -04:00
Rasmus Lerchedahl Petersen
b294f48dbe Merge branch 'main' of https://github.com/github/codeql into python-ruby/track-through-summaries-pm 2023-06-09 14:16:34 +02:00
Stephan Brandauer
1ae2fee309 Java: Update java/ql/lib/ext/okhttp3.model.yml
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-06-09 13:48:16 +02:00
Stephan Brandauer
44785b72ce Java: Update java/ql/lib/ext/okhttp3.model.yml
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-06-09 13:46:09 +02:00
Anders Schack-Mulligen
1b7bbf6320 Merge pull request #13083 from aschackmull/dataflow/typestrengthen
Dataflow: Strengthen tracked types.
2023-06-09 13:23:30 +02:00
Mathias Vorreiter Pedersen
74ed9f535c Merge pull request #13406 from MathiasVP/fix-++-problem
C++: Fix the `++` problem
2023-06-09 11:20:00 +01:00
Michael Nebel
5510d050c1 C#: Synthetic names only needs to rely on the output stack. 2023-06-09 11:40:04 +02:00
Tamas Vajk
bf3677df16 C#: Make sure System.Private.CoreLib is added only once as a reference in standalone extraction 2023-06-09 11:29:44 +02:00
Arthur Baars
a5410bd52d Merge pull request #13419 from asgerf/rb/restrict-orm-tracking
Ruby: restrict ORM tracking to calls
2023-06-09 11:01:05 +02:00
Jeroen Ketema
4485560f43 Ruby: Rewrite inline expectation tests to use parameterized module 2023-06-09 10:43:05 +02:00
Jeroen Ketema
9633f00ed1 QL-for-QL: Rewrite inline expectation tests to use parameterized module 2023-06-09 10:42:46 +02:00
Jeroen Ketema
8f599faf85 Python: Rewrite inline expectation tests to use parameterized module 2023-06-09 10:42:29 +02:00
Jeroen Ketema
49993b023e Java: Rewrite inline expectation tests to use parameterized module 2023-06-09 10:42:17 +02:00
Jeroen Ketema
97c4f497bc Go: Rewrite inline expectation tests to use parameterized module 2023-06-09 10:41:21 +02:00
Tony Torralba
0cef5651e2 Merge pull request #13417 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-09 09:27:03 +02:00
Michael Nebel
7620c051d3 C#: Remove the savechanges origin name from the synthetic name (this is not needed). 2023-06-09 09:15:45 +02:00
Asger F
bdbbde347e Merge pull request #13407 from asgerf/rb/restrict-orm-tracking
Ruby: restrict ORM tracking to calls
2023-06-09 09:13:01 +02:00
Anders Schack-Mulligen
44b09507ab Merge pull request #13408 from aschackmull/java/loginjection-perf
Java: Add more negation context to reduce string ops and improve perf.
2023-06-09 08:44:27 +02:00
Anders Schack-Mulligen
68f1e40370 Java/C#: Add change notes. 2023-06-09 08:37:36 +02:00
Anders Schack-Mulligen
85d6b44d92 Java: Fix test output. 2023-06-09 08:37:36 +02:00
Anders Schack-Mulligen
d230509905 Dataflow: Address review comments. 2023-06-09 08:37:36 +02:00
Anders Schack-Mulligen
95afd551ff Java: Fix qltest 2023-06-09 08:37:36 +02:00
Anders Schack-Mulligen
4399138c82 Dataflow: Fix QL4QL alert. 2023-06-09 08:37:36 +02:00
Anders Schack-Mulligen
53f2b8aab0 Dataflow: Sync. 2023-06-09 08:37:36 +02:00
Anders Schack-Mulligen
8a584b78ac Dataflow: Enable type strengthening in partial flow. 2023-06-09 08:37:36 +02:00
Anders Schack-Mulligen
441ccef6c4 Dataflow: Bugfix, use arg type rather than strengthened param type. 2023-06-09 08:37:36 +02:00
Anders Schack-Mulligen
a0a9d30286 Java: Fix qltests. 2023-06-09 08:37:35 +02:00
Anders Schack-Mulligen
21dea62e99 C#: Fix qltests. 2023-06-09 08:37:35 +02:00
Anders Schack-Mulligen
4633abe19e Java: Autoformat 2023-06-09 08:37:35 +02:00
Anders Schack-Mulligen
fd832416d8 Dataflow: Add empty type strengthening predicate for languages without type pruning. 2023-06-09 08:37:35 +02:00
Anders Schack-Mulligen
96c1b5b0a9 C#: Enable type strengthening. 2023-06-09 08:37:35 +02:00
Anders Schack-Mulligen
e8cea79f1d Dataflow: Sync. 2023-06-09 08:37:35 +02:00
Anders Schack-Mulligen
ad461a87b4 Dataflow: Strengthen tracked types. 2023-06-09 08:37:35 +02:00
Anders Schack-Mulligen
1d87f0793b Dataflow: Minor refactor. 2023-06-09 08:37:35 +02:00
Arthur Baars
bd583ca28f Merge pull request #13416 from github/release-prep/2.13.4
Release preparation for version 2.13.4
2023-06-09 08:33:27 +02:00
Jami
7aede5034d Docs: fix typo 2023-06-08 22:52:34 -04:00
Jami Cogswell
bcba1f3a4d Shared: update pack files 2023-06-08 21:51:24 -04:00
github-actions[bot]
81b08b4399 Add changed framework coverage reports 2023-06-09 00:18:12 +00:00
Jami Cogswell
3bfb5f9ac4 Shared: update comment and remove 'remote-flow' as a source kind 2023-06-08 20:15:13 -04:00
Jami Cogswell
da58b2afc8 Shared: move shared file to 'shared' folder and add parameterized module for 'getInvalidModelKind' 2023-06-08 20:05:27 -04:00
Jeroen Ketema
bff11c3d23 Apply suggestions from code review 2023-06-08 22:33:50 +02:00
github-actions[bot]
e4be303a23 Release preparation for version 2.13.4 2023-06-08 19:57:37 +00:00
Arthur Baars
e8b12ce416 Merge pull request #13414 from github/mbg/csharp/fix/dotnet_test_mstest
C#: Pass architecture to `dotnet test` in `dotnet_test_mstest`
2023-06-08 20:11:59 +02:00
Michael Nebel
2a1c0e8ba6 C#: Re-factor. 2023-06-08 19:02:07 +02:00
Arthur Baars
f945e30bb4 Merge pull request #13410 from github/revert-13399-update-ruby-grammar
Revert "Ruby: update tree-sitter-ruby"
2023-06-08 18:24:36 +02:00
Michael B. Gale
a961fffda8 Pass architecture to dotnet test 2023-06-08 16:51:57 +01:00
Tony Torralba
abb775c616 Merge pull request #13409 from atorralba/atorralba/java/fix-gson-models
Java: Fix more problems in the Gson models
2023-06-08 17:36:40 +02:00
Tony Torralba
3c579b6c7d Merge pull request #13411 from github/atorralba/workflow/run-csv-coverage-on-yml-changes
Run "Check framework coverage changes" workflow when models-as-data files change
2023-06-08 17:18:51 +02:00
Ian Lynagh
22fe055e53 Kotlin: Tweak our JSON escaping
We were escaping '/', but I don't think there is any need to do so. It
just happens to have a nice escape in the spec. Escaping it might
filenames annoying to work with.

I've also added escaping for the other control characters that we're
meant to escape.
2023-06-08 15:20:30 +01:00
Tony Torralba
8401793755 Run "Check framework coverage changes" workflow when models-as-data files change 2023-06-08 15:57:38 +02:00
Alexandre Boulgakov
9ec09000e5 Swift: Remove no longer needed code. 2023-06-08 14:52:58 +01:00
Asger F
74a9d9fa37 Revert "Ruby: update tree-sitter-ruby" 2023-06-08 15:29:36 +02:00
Geoffrey White
0a6edd345a Merge pull request #13405 from geoffw0/swiftloc
Swift: Improve SummaryStats.ql
2023-06-08 14:02:03 +01:00
Anders Schack-Mulligen
65a68f5092 Merge pull request #13404 from aschackmull/java/functionalinterface-perf
Java: Improve join-order for FunctionalInterface.
2023-06-08 15:00:22 +02:00
Tony Torralba
0e242cba7e Update java/ql/lib/ext/retrofit2.model.yml 2023-06-08 14:59:10 +02:00
Tony Torralba
4608481d7b Java: Fix more problems in the Gson models
Found during type strengthening work by @aschackmull
2023-06-08 14:53:09 +02:00
Alexandre Boulgakov
5450585c1c Swift: Remove SwiftDiagnostic constructor (C++20 todo). 2023-06-08 13:11:14 +01:00
Alexandre Boulgakov
838130ca3a Swift: Fix some C++20 todos. 2023-06-08 13:11:14 +01:00
Alexandre Boulgakov
5952a729df Build: Bump build mode to C++20. 2023-06-08 13:10:43 +01:00
Tom Hvitved
a896be7eb8 Merge pull request #13387 from michaelnebel/csharp/dotnettest
C#: Dotnet test tracer improvements.
2023-06-08 14:05:29 +02:00
Anders Schack-Mulligen
5a2ac1b5ca Java: Add more negation context to reduce string ops and improve perf. 2023-06-08 14:04:57 +02:00
Asger F
d6741f655d Ruby: restrict ORM tracking to calls 2023-06-08 14:01:51 +02:00
Mathias Vorreiter Pedersen
a357eeedac C++: Accept test changes. 2023-06-08 12:50:16 +01:00
Mathias Vorreiter Pedersen
afb1129f27 C++: Ensure that postfix crement operations are handled properly in dataflow SSA. 2023-06-08 12:50:05 +01:00
Mathias Vorreiter Pedersen
57ae1e9ff7 C++: Add a testcase that started to fail in #13326. 2023-06-08 12:49:08 +01:00
Alex Ford
b4620042a5 Ruby: fix use of deprecated predicate 2023-06-08 12:09:22 +01:00
Alex Ford
397a809426 Merge remote-tracking branch 'origin/main' into rb/rack-redirect 2023-06-08 12:07:57 +01:00
Geoffrey White
5727d49cce Swift: Take out common code for lines of code. 2023-06-08 12:03:03 +01:00
Geoffrey White
a3ef5c6918 Swift: QLDoc Diagnostics.qll. 2023-06-08 12:03:02 +01:00
Anders Schack-Mulligen
dabb4dd643 Java: Improve join-order for FunctionalInterface. 2023-06-08 13:02:54 +02:00
Alex Ford
21b4f885a6 ruby: fix qldoc 2023-06-08 12:01:42 +01:00
Alex Ford
c531b94594 Ruby: add a change note for rack redirect support 2023-06-08 11:59:10 +01:00
Geoffrey White
e0f16f46d2 Swift: Add compile errors / warnings to SummaryStats.ql. 2023-06-08 11:48:57 +01:00
Geoffrey White
dc7a286948 Swift: Add lines of code to SummaryStats.ql. 2023-06-08 11:29:04 +01:00
Alex Ford
22b9ab43c6 Merge pull request #13259 from alexrford/rb/actiondispatch-refactor
Ruby: Refactor and slightly expand `ActionDispatch` modelling
2023-06-08 11:08:36 +01:00
Erik Krogh Kristensen
d9e3569fe5 Merge pull request #13350 from erik-krogh/once-again-deps-not-py
C++: delete old deprecations
2023-06-08 12:08:09 +02:00
Nora Dimitrijević
e93022d649 Merge branch 'main' into swift/brace-stmt-variables 2023-06-08 12:04:25 +02:00
Nora Dimitrijević
a5e0669981 Swift: fix bad join order in NamedPattern.getVarDecl()
Ideally the EDB itself should contain a direct
reference from NamedPattern to VarDecl, not just a name,
but oh well, this join order works fine.

BEFORE:

```
[2023-06-08 11:40:01] Evaluated non-recursive predicate quick_eval#ff@60fe07kr in 6533ms (size: 91309).
Evaluated relational algebra for predicate quick_eval#ff@60fe07kr with tuple counts:
          1209062   ~3%    {2} r1 = SCAN VarDecl#914e0d1e::Generated::VarDecl::getName#0#dispred#ff OUTPUT In.1, In.0
        234687793   ~0%    {2} r2 = JOIN r1 WITH NamedPattern#c3d26570::Generated::NamedPattern::getName#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.1
         19112791   ~0%    {3} r3 = JOIN r2 WITH VarDecl#914e0d1e::Generated::VarDecl::getImmediateParentPattern#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1

         19112791   ~0%    {3} r4 = JOIN r3 WITH Element#e67432df::Generated::Element::resolve#bf ON FIRST 1 OUTPUT Rhs.1, Lhs.2, Lhs.1
            24647   ~0%    {2} r5 = JOIN r4 WITH Element#d22cfd66::Element::getFullyUnresolved#bf ON FIRST 2 OUTPUT Lhs.1, Lhs.2

         19112791   ~0%    {3} r6 = JOIN r3 WITH Element#e67432df::Generated::Element::resolve#bf ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2
         19112791   ~3%    {3} r7 = JOIN r6 WITH Element#d22cfd66::Element::getFullyUnresolved#bf ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1
            66662   ~4%    {2} r8 = JOIN r7 WITH #Pattern#19b8cf65::Pattern::getImmediateEnclosingPattern#0#dispredPlus#bf ON FIRST 2 OUTPUT Lhs.0, Lhs.2

            91309   ~2%    {2} r9 = r5 UNION r8
                           return r9
```

AFTER:

```
[2023-06-08 11:55:26] Evaluated non-recursive predicate quick_eval#ff@fe906afo in 26ms (size: 91309).
Evaluated relational algebra for predicate quick_eval#ff@fe906afo with tuple counts:
         92048   ~0%    {3} r1 = SCAN NamedPattern#c3d26570::Generated::NamedPattern::getName#0#dispred#ff OUTPUT In.0, In.1, In.0

         82893   ~0%    {2} r2 = SCAN #Pattern#19b8cf65::Pattern::getImmediateEnclosingPattern#0#dispredPlus#fb#flipped OUTPUT In.1, In.0
         66417   ~1%    {3} r3 = JOIN r2 WITH NamedPattern#c3d26570::Generated::NamedPattern::getName#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Lhs.0

        158465   ~0%    {3} r4 = r1 UNION r3
         94246   ~3%    {3} r5 = JOIN r4 WITH VarDecl#914e0d1e::Generated::VarDecl::getImmediateParentPattern#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2
         91309   ~2%    {2} r6 = JOIN r5 WITH VarDecl#914e0d1e::Generated::VarDecl::getName#0#dispred#ff ON FIRST 2 OUTPUT Lhs.2, Lhs.0
                        return r6
```
2023-06-08 12:03:58 +02:00
Stephan Brandauer
8f697ac1ee Java: fix broken MaD export format 2023-06-08 12:02:50 +02:00
Stephan Brandauer
c6f10519fa Merge branch 'main' into java/update-mad-decls-after-triage-2023-06-08T08-51-47 2023-06-08 12:00:07 +02:00
Mathew Payne
8052b35e62 Merge branch 'main' into csharp-ext 2023-06-08 10:58:02 +01:00
Mathew Payne
c493e276ec Update MaD sink kinds from main 2023-06-08 10:57:12 +01:00
Anders Schack-Mulligen
cc45db7c76 Merge pull request #13394 from atorralba/atorralba/java/fix-gson-jsonarray-models
Java: Fix Gson's JsonArray.add models
2023-06-08 11:05:40 +02:00
Stephan Brandauer
bda938c544 Update MaD Declarations after Triage 2023-06-08 10:51:48 +02:00
Asger F
76a8e9827e Merge pull request #13283 from asgerf/js/restrict-regex-search-function
JS: Be more conservative about flagging "search" call arguments as regex
2023-06-08 10:50:51 +02:00
erik-krogh
39438c6196 add change-note 2023-06-08 10:15:32 +02:00
yoff
d59263af0e Merge pull request #13398 from github/tausbn/python-update-syntax-error-expected-files
Python: Update expected output for syntax error queries
2023-06-08 10:10:42 +02:00
erik-krogh
2241350d32 wait with deprecating Container::getURL() 2023-06-08 10:10:21 +02:00
erik-krogh
a4ef8619c6 delete old deprecations 2023-06-08 10:10:21 +02:00
Tom Hvitved
cee70883f0 Merge pull request #12964 from hvitved/ruby/remove-synth-returns
Ruby: Remove canonical return nodes
2023-06-08 10:07:48 +02:00
Tony Torralba
fd8112f692 Merge pull request #13400 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-08 10:04:26 +02:00
Michael Nebel
2fece9d721 C#: Add MSTEST test project and check that the call to vstest doesn't get the UseSharedCompilation=false flag forwarded. 2023-06-08 10:01:00 +02:00
Anders Schack-Mulligen
f004fcf926 Merge pull request #13388 from hvitved/type-back-tracking-inline-late
Type tracking: Use `noopt`+`inline_late` in `TypeBackTracker::[small]step`
2023-06-08 09:55:18 +02:00
Michael Nebel
65e651506c C#: Address review comments. 2023-06-08 08:51:21 +02:00
github-actions[bot]
cbbd885e22 Add changed framework coverage reports 2023-06-08 00:17:14 +00:00
Arthur Baars
dcd254adf8 Merge pull request #13399 from aibaars/update-ruby-grammar
Ruby: update tree-sitter-ruby
2023-06-07 19:53:33 +02:00
Arthur Baars
0efa212c40 Ruby: update tree-sitter-ruby 2023-06-07 19:27:46 +02:00
Owen Mansel-Chan
55fe318f5a Merge pull request #13397 from owen-mc/go/document-build-environment-recommendations
Add Go version table for --identify-environment
2023-06-07 17:06:13 +01:00
Ian Lynagh
1b83aeb25d Merge pull request #13393 from igfoo/igfoo/remove_explorer
Kotlin: Remove kotlin-explorer
2023-06-07 16:32:00 +01:00
Ian Lynagh
c4e829f1d4 Merge pull request #13385 from igfoo/igfoo/kotlin_version_relax
Kotlin: Relax version requirements
2023-06-07 16:31:49 +01:00
Alex Ford
0a7ae58710 Ruby: revert to simpler Rack PotentialResponseNode def and use TypeBackTracker to track instances 2023-06-07 16:30:53 +01:00
Taus
19e1bab102 Python: Update expected output for syntax error queries 2023-06-07 15:26:52 +00:00
Alex Ford
a5d8db6317 Ruby: fix qldoc 2023-06-07 15:55:28 +01:00
Alex Ford
57508b2b3b ruby: Limit rack PotentialResponseNode to things that look like they occur in a rack application 2023-06-07 15:55:05 +01:00
Owen Mansel-Chan
69854638b6 Add Go version table for --identify-environment 2023-06-07 15:51:21 +01:00
Tony Torralba
c0135673fa Fix JsonArray.addAll model
Properly test JsonArray.add(String) and JsonArray.addAll(JsonArray) as well
2023-06-07 16:18:32 +02:00
Stephan Brandauer
2921df41da Java: fix import 2023-06-07 15:22:59 +02:00
Stephan Brandauer
ec3a7e39ad Java: qldoc style 2023-06-07 14:57:38 +02:00
Stephan Brandauer
715b1351f3 Java: share considerSubtypes predicate between Java modes 2023-06-07 14:55:00 +02:00
Michael Nebel
f9c890be35 C#: Address review comments. 2023-06-07 14:53:41 +02:00
Stephan Brandauer
7e77e2ea82 Java: comment why we're using erased types in MaD 2023-06-07 14:42:20 +02:00
Stephan Brandauer
a8799fe981 Java: share getCallable interface between automodel extraction modes 2023-06-07 14:38:52 +02:00
Tamás Vajk
ccb622348b Merge pull request #13382 from tamasvajk/feature/standalone-dll-unsafe
C#: Change standalone extraction to allow unsafe code
2023-06-07 14:37:11 +02:00
Tony Torralba
6d7234f8ed Merge pull request #13225 from atorralba/atorralba/java/path-injection-mad-sinks-2
Java: Migrate path injection sinks to models-as-data (simplified)
2023-06-07 14:27:36 +02:00
Tony Torralba
35b4c438ff Fix Gson's JsonArray.add models
When the type of the argument isn't JsonElement, the summary must be taint flow instead of value flow
2023-06-07 14:12:20 +02:00
yoff
911835c30e Merge pull request #13392 from yoff/java/test-type-tracking-through-flow-summaries
java: test type tracking through flow summaries
2023-06-07 14:10:23 +02:00
Stephan Brandauer
92ad02a752 Java: update getRelatedLocation qldoc 2023-06-07 14:09:07 +02:00
Rasmus Lerchedahl Petersen
6ddf1f7eaf ruby/python: remove predicates from interface 2023-06-07 14:07:08 +02:00
Stephan Brandauer
be6b1d8aaf Java: remove SkipFrameworkModeling characteristic in favour of later evaluation 2023-06-07 13:58:56 +02:00
yoff
7ab3cde3aa Apply suggestions from code review
Co-authored-by: Asger F <asgerf@github.com>
2023-06-07 13:54:31 +02:00
Stephan Brandauer
2e16b71215 Java: update qldoc of ClassQualifierCharacteristic 2023-06-07 13:52:57 +02:00
Stephan Brandauer
1bfbfec1bc Java: use problem.severity in automodel extraction queries 2023-06-07 13:44:52 +02:00
Ian Lynagh
d6ac5cdc94 Kotlin: Remove kotlin-explorer
This was an exploration tool that I don't think has been used for some
time.
2023-06-07 12:39:00 +01:00
Erik Krogh Kristensen
6ba7f9a238 Merge pull request #13352 from erik-krogh/once-again-deps-not-py-cpp
delete old deprecations
2023-06-07 13:00:57 +02:00
Michael Nebel
d4d571e435 C#: Better change note.
Co-authored-by: Michael B. Gale <mbg@github.com>
2023-06-07 12:44:36 +02:00
Michael Nebel
3eb3178ba5 C#: Add change note. 2023-06-07 12:43:31 +02:00
Michael Nebel
5c9b0b9b76 C#: Address review comments. 2023-06-07 12:43:31 +02:00
Tony Torralba
46b30453e3 Merge pull request #13386 from github/java/update-mad-decls-after-triage-2023-06-06T14-38-29
Java: Update MaD Declarations after Triage
2023-06-07 12:33:26 +02:00
Tamás Vajk
8fe025eb64 Merge pull request #13384 from tamasvajk/fix/standalone-explicit-interface-error
C#: Improve error message for missing explicit interface implementation
2023-06-07 12:19:08 +02:00
Rasmus Lerchedahl Petersen
aec1e4a713 java: address ql alert 2023-06-07 11:40:50 +02:00
Rasmus Lerchedahl Petersen
76e1c6f76f java: test type tracking through flow summaries 2023-06-07 11:18:53 +02:00
Nora Dimitrijević
cad6582701 Merge branch 'main' into swift/brace-stmt-variables 2023-06-07 10:51:58 +02:00
Tamas Vajk
0f75449abb Improve code quality 2023-06-07 10:40:58 +02:00
Paolo Tranquilli
0b09fdae43 Merge branch 'main' into alexdenisov+redsun82/tuple-mangling 2023-06-07 10:40:38 +02:00
Tony Torralba
416d3d587d Accept test changes
An uncovered test case is now correctly covered
2023-06-07 10:33:17 +02:00
Paolo Tranquilli
357542a160 Merge pull request #13258 from github/redsun82/swift-synth-properties
Codegen: allow `synth` properties of non-`synth` classes
2023-06-07 10:31:06 +02:00
Geoffrey White
aa8878ba86 Merge pull request #13356 from geoffw0/qualname
Swift: Add FieldDecl.getQualifiedName
2023-06-07 09:08:16 +01:00
Rasmus Wriedt Larsen
0c8b4251cf Python: Avoid duplicated query-id 2023-06-07 10:07:01 +02:00
Tony Torralba
b5bbe63144 Merge pull request #13389 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-07 09:48:44 +02:00
Tony Torralba
27763d6bbe Improve ZipSlip exclusion to take varargs into account 2023-06-07 09:25:56 +02:00
Paolo Tranquilli
700e3d5e53 Codegen: rename ipa to synth 2023-06-07 09:12:39 +02:00
Tony Torralba
8001ae9669 Update java/ql/lib/semmle/code/java/security/ZipSlipQuery.qll
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-06-07 09:08:24 +02:00
Tony Torralba
60725e9580 Update java/ql/lib/ext/org.springframework.core.io.model.yml 2023-06-07 09:07:22 +02:00
Tom Hvitved
48ac3e58ee Python: Use CallGraphConstruction in call graph construction 2023-06-07 09:02:03 +02:00
Tom Hvitved
88c5700c24 Ruby: Use CallGraphConstruction in call graph construction 2023-06-07 09:02:03 +02:00
Tom Hvitved
4bf124bffe Ruby/Python: Add CallGraphConstruction module for recursive type-tracking based call graph construction 2023-06-07 09:02:03 +02:00
Tony Torralba
2f12ae2e0d Update java/ql/lib/ext/okhttp3.model.yml 2023-06-07 08:57:12 +02:00
github-actions[bot]
a14e7fa694 Add changed framework coverage reports 2023-06-07 00:16:58 +00:00
Tom Hvitved
322b254cba Type tracking: Use noopt+inline_late in TypeBackTracker::[small]step 2023-06-06 20:46:14 +02:00
Nora Dimitrijević
189dee69bc Merge branch 'main' into swift/brace-stmt-variables 2023-06-06 17:40:25 +02:00
Nora Dimitrijević
03e94c7137 Swift: add library pack change note 2023-06-06 17:37:02 +02:00
Michael Nebel
4dae7ad35a C#: Only inject the shared compilation flag, if argument is not exe or dll. 2023-06-06 17:22:52 +02:00
Stephan Brandauer
b31131d33a Merge pull request #13344 from github/java/update-mad-decls-after-triage-2023-06-01T12-58-13
Java: Update MaD Declarations after Triage
2023-06-06 17:08:50 +02:00
Nora Dimitrijević
a831456e94 Swift: make BraceStmt's variable a synth property 2023-06-06 16:54:47 +02:00
Nora Dimitrijević
4a29087ce7 Swift: update Cfg test: VarDecls no longer in BraceStmt basic blocks
This is a consequence of VarDecls not being Elements of BraceStmts. =
2023-06-06 16:54:47 +02:00
Nora Dimitrijević
8ccbad601b Swift: PrintAst test changes 2023-06-06 16:54:47 +02:00
Nora Dimitrijević
026492836c Swift: codegen 2023-06-06 16:54:46 +02:00
Nora Dimitrijević
387cde5972 Swift: add BraceStmt.getVariable(_) child with logic in QL. 2023-06-06 16:54:46 +02:00
Michael Nebel
0f010afce1 C#: Add dotnet test that targets dll. 2023-06-06 16:53:26 +02:00
Stephan Brandauer
75cbcdd72e Update MaD Declarations after Triage 2023-06-06 16:38:31 +02:00
Tamás Vajk
e8f56f2981 Update csharp/extractor/Semmle.Extraction.CSharp/Entities/Method.cs
Co-authored-by: Michael B. Gale <mbg@github.com>
2023-06-06 16:20:48 +02:00
Nora Dimitrijević
2529312d1d Codegen: fix test.qlgen failure 2023-06-06 15:58:19 +02:00
Nora Dimitrijević
928da77d10 Merge branch 'main' into redsun82/swift-synth-properties 2023-06-06 15:34:02 +02:00
Ian Lynagh
ca63122ce4 Kotlin: Relax version requirements
If the latest version we know about is 1.9, and we are faced with 1.10,
then we try 1.9 rather than failing with an exception.
2023-06-06 14:09:55 +01:00
Tamas Vajk
a4dec591c7 C#: Improve error message for missing explicit interface implementation 2023-06-06 15:01:54 +02:00
Tamas Vajk
75bc8756f2 C#: Change standalone extraction to allow unsafe code 2023-06-06 14:43:09 +02:00
Tony Torralba
49c6ea27a0 Merge pull request #13379 from atorralba/atorralba/kotlin/use-with-flow
Kotlin: Add flow through kotlin.io.use and kotlin.with
2023-06-06 13:44:14 +02:00
Asger F
17f9239c33 JS: Fix invalid source kind in test 2023-06-06 13:40:06 +02:00
Taus
f4fd908f7f Java: Comment out sinks for which no query exists 2023-06-06 13:01:59 +02:00
Ian Lynagh
f690d150b0 Merge pull request #13373 from igfoo/igfoo/kotlin-loc
Java/Kotlin: Split lines of code by language
2023-06-06 11:49:18 +01:00
Arthur Baars
7324d1705e Merge branch 'main' into amammad-ruby-YAMLunsafeLoad 2023-06-06 12:09:06 +02:00
Taus
c4bfb21f0f Merge pull request #13371 from github/nickrolfe/python-location-tostring
Python: avoid selecting `getLocation()`
2023-06-06 12:05:51 +02:00
Erik Krogh Kristensen
0e6693bdea Merge pull request #12874 from erik-krogh/ts51
JS: Add support for TS 5.1
2023-06-06 11:51:51 +02:00
Rasmus Wriedt Larsen
a1f20f84d4 Merge pull request #13359 from jorgectf/jorgectf/unsafe-deserialization-name-convention
Python: Make `py/unsafe-deserialization` `@name` consistent with other languages
2023-06-06 11:28:41 +02:00
Tony Torralba
1d8ca88aca Add change note 2023-06-06 11:25:07 +02:00
Tony Torralba
72af634575 Kotlin: Add flow through use and with 2023-06-06 11:22:16 +02:00
Nick Rolfe
6c5c338e6b Merge pull request #13348 from github/nickrolfe/java-location-tostring
Java: avoid call to `Location.toString()`
2023-06-06 09:55:42 +01:00
Nick Rolfe
3d0ecbed39 Merge pull request #13361 from github/nickrolfe/csharp-location-tostring
C#: avoid calls to `Location::toString()`
2023-06-06 09:55:09 +01:00
Tony Torralba
1601846478 Add exclusion to the ZipSlip query to avoid FPs 2023-06-06 10:28:49 +02:00
Tony Torralba
0065e6e1d6 Apply suggestions from code review
Fix incorrect models-as-data rows
2023-06-06 10:04:22 +02:00
Tony Torralba
1ccec90c6f Apply suggestions from code review
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-06-06 09:10:18 +02:00
Erik Krogh Kristensen
b78cd48954 Merge pull request #13329 from erik-krogh/sqlhelp
JS: improve the sql-injection help page
2023-06-06 08:44:44 +02:00
Erik Krogh Kristensen
29bbf58a29 Merge pull request #13377 from github/dependabot/cargo/ql/regex-1.8.4
Bump regex from 1.8.3 to 1.8.4 in /ql
2023-06-06 07:57:04 +02:00
dependabot[bot]
d38bca1e8c Bump regex from 1.8.3 to 1.8.4 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.8.3 to 1.8.4.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.8.3...1.8.4)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-06 04:02:46 +00:00
Geoffrey White
e04f6bff27 Swift: Add a simple Regex library. 2023-06-05 23:55:01 +01:00
Geoffrey White
c994b4b9dd Swift: Create test cases for a regular expression library. 2023-06-05 23:55:01 +01:00
Jami Cogswell
5a23421d9a Shared: minor updates to comments 2023-06-05 13:46:56 -04:00
Jeroen Ketema
272ced6ea5 Merge pull request #13374 from jketema/ptr-deref-min
C++: Remove `cpp/invalid-pointer-deref` results duplicating ones with smaller `k`
2023-06-05 19:31:24 +02:00
Jami Cogswell
7a4b74dd6a C#: fix typo with outdated sink msg location 2023-06-05 13:21:39 -04:00
Jami Cogswell
6c46cd9c21 Java/C#/Go/Swift: move 'SharedModelValidation.qll' to internal folder 2023-06-05 13:11:08 -04:00
erik-krogh
3cb2ec4e87 fix nits from doc review 2023-06-05 19:06:07 +02:00
Jami Cogswell
9d5972acc2 Shared: update qldocs 2023-06-05 12:18:34 -04:00
Jami Cogswell
3f1dc8e5c7 Shared: add outdated Swift sink kinds 2023-06-05 12:18:34 -04:00
Jami Cogswell
62ac0dc471 Shared: add outdated sink kind msg to 'getInvalidModelKind' for all languages 2023-06-05 12:18:33 -04:00
Jami Cogswell
76f5dca861 Shared: move 'OutdatedSinkKind' to shared file and add outdated JS and C# sink kinds 2023-06-05 12:18:33 -04:00
Jami Cogswell
7b629f5d63 Shared: include 'qltest%' and 'test-%' 2023-06-05 12:18:33 -04:00
Jami Cogswell
76508d17c6 Go/Swift: validate source/sink kinds 2023-06-05 12:18:33 -04:00
Jami Cogswell
254e447923 JS/Python/Ruby: update getInvalidModelKind 2023-06-05 12:18:33 -04:00
Jami Cogswell
615f2a573b Java/C#/Go/Swift: remove commented-out code 2023-06-05 12:18:33 -04:00
Jami Cogswell
9f42ae3f29 Shared: remove cpp note 2023-06-05 12:18:33 -04:00
Jami Cogswell
7317c29eea Shared: update kind information 2023-06-05 12:18:33 -04:00
Jami Cogswell
79f61cc645 Java/C#/Go/Swift: use 'SharedModelValidation' file 2023-06-05 12:18:33 -04:00
Jami Cogswell
0ab1848b70 JS/Python/Ruby: use 'SharedModelValidation' file 2023-06-05 12:18:33 -04:00
Jami Cogswell
ddb5d92ef8 Shared: add source, summary, and neutral shared valid kinds 2023-06-05 12:18:33 -04:00
Jami Cogswell
869f820fcf Shared: add 'SharedModelValidation' file as experiment 2023-06-05 12:18:33 -04:00
Jami Cogswell
e24e3a6115 JS/Python/Ruby: add getInvalidModelKind as experiment 2023-06-05 12:18:33 -04:00
Taus
7ad860fc98 Java: Update MaD declarations after triage
Co-authored-by: Stephan Brandauer <kaeluka@github.com>
2023-06-05 18:00:40 +02:00
Ian Lynagh
e49b278d61 Java/Kotlin: Add a changenote for the lines-of-code changes. 2023-06-05 16:33:12 +01:00
Jeroen Ketema
93215ba7e1 Merge pull request #13355 from jketema/ptr-deref-forward
C++: Ensure that the sink instruction occurs last in `cpp/invalid-pointer-deref`
2023-06-05 15:56:50 +02:00
Jeroen Ketema
86df424fca C++: Fix query formatting 2023-06-05 15:10:54 +02:00
Jeroen Ketema
4a27028768 C++: Remove cpp/invalid-pointer-deref results duplicating ones with smaller k 2023-06-05 15:03:58 +02:00
Jeroen Ketema
90f0209095 C++: Add cpp/invalid-pointer-deref test case with almost duplicated results 2023-06-05 15:03:57 +02:00
Jeroen Ketema
7f7b048f50 C++: Update expected test results 2023-06-05 15:00:11 +02:00
Ian Lynagh
a4a7ad8f99 Java/Kotlin: Split lines of code by language
We were giving the sum of all lines for both languages, but labelling it
as "Total lines of Java code in the database", which was confusing.

Now we give separate sums for Kotlin and Java lines.
2023-06-05 13:57:47 +01:00
Paolo Tranquilli
dc26dc81a9 Merge pull request #13370 from github/redsun82/swift-fix-cmake
Swift: fix cmake generation
2023-06-05 14:52:40 +02:00
Nick Rolfe
02395867c8 Python: avoid selecting getLocation() in py/truncated-division 2023-06-05 13:42:46 +01:00
Mathias Vorreiter Pedersen
52fb00cac3 Merge pull request #12036 from nmouha/patch-1
CPP: Add query for CVE-2022-37454: Integer addition may overflow inside if statement
2023-06-05 12:13:27 +01:00
Jeroen Ketema
11182e4ee4 C++: Move location where getASuccessor is used to avoid join order problems 2023-06-05 12:36:25 +02:00
Nick Rolfe
c67a350e36 Python: avoid selecting getLocation() in py/unnecessary-delete 2023-06-05 11:16:13 +01:00
Paolo Tranquilli
be9d32a6c1 Bazel/CMake: make include not use cmake include
...but rather just pass along targets. This is required to fix CMake
generation in the internal repository.
2023-06-05 11:43:48 +02:00
Michael B. Gale
06d48dca67 Merge pull request #13211 from github/mbg/identify-environment-stubs
Shared: Add stubs for `identify-environment` scripts
2023-06-05 10:29:06 +01:00
Nick Rolfe
dadb5b34e6 C#: avoid call to Location::toString() in cs/expose-implementation 2023-06-05 10:19:27 +01:00
Paolo Tranquilli
400176f677 Swift: fix cmake generation
The bazel -> cmake generator is currently not capable of handling
separate included generated cmake files making use of common C/C++
dependencies.

To work around this limitation, a single generated cmake is now in
place. Long-term, we should either:
* make the cmake generator handle common dependencies gracefully, or
* make the cmake generation aspect travel up `pkg_` rules `srcs`
  attributes
so to avoid having to list the targets to be generated in the top-level
`BUILD` file.

Other things fixed:
* removed some warning spam about redefined `BAZEL_CURRENT_REPOSITORY`
* fixed the final link step, that was failing because `libswiftCore.so`
  was not being linked.
2023-06-05 11:12:11 +02:00
Michael B. Gale
5d89b0739b Swift: Remove .cmd script 2023-06-05 09:12:21 +01:00
Nick Rolfe
79b3a8c955 C#: avoid call to Location::toString() 2023-06-02 19:39:24 +01:00
Jami
64830809a6 Merge pull request #13228 from jcogs33/jcogs33/deprecated-sink-error-message
Java: add error message for outdated sink kinds in `getInvalidModelKind`
2023-06-02 13:44:18 -04:00
jorgectf
3e8c7f72b6 Add changenote 2023-06-02 18:20:55 +02:00
Alex Ford
c95cf5ad6f Merge pull request #13062 from maikypedia/maikypedia/sqli-sink
Ruby: Add MySQL as SQL Injection Sink
2023-06-02 17:06:35 +01:00
jorgectf
5608082f35 Update py/unsafe-deserialization name 2023-06-02 17:57:24 +02:00
Jeroen Ketema
8ac1d56a7f C++: Fix join order in cpp/invalid-pointer-deref 2023-06-02 16:37:35 +02:00
Erik Krogh Kristensen
219ec9d05d Merge pull request #13127 from erik-krogh/polReDoS
ReDoS: revert new superlinear algorithm.
2023-06-02 16:10:24 +02:00
Geoffrey White
4c8225724b Swift: Fix QL-for-QL warnings. 2023-06-02 12:21:17 +01:00
Geoffrey White
14d193383e Swift: Put the change note in the right place. 2023-06-02 12:03:22 +01:00
Geoffrey White
8e8696a8ed Swift: Autoformat. 2023-06-02 12:02:33 +01:00
Geoffrey White
c7c8807f40 Swift: Use FieldDecl.hasQualifiedName. 2023-06-02 11:56:16 +01:00
Jeroen Ketema
ac4933a9cc C++: Ensure that the sink instruction occurs last in cpp/invalid-pointer-deref
This avoids some counter-intuitive paths where we would seemingly jump back
to an earlier instruction, which might actually have been in bounds.
2023-06-02 12:36:34 +02:00
Jeroen Ketema
5f64354a70 Merge pull request #13353 from jketema/expecation
Fix typo in spelling of expectation
2023-06-02 12:29:49 +02:00
Mathias Vorreiter Pedersen
05e5ebe4f4 Merge pull request #13331 from aibaars/use-shortest-distances-to-count-indirections
C++: Use the shortestDistances HOP to count indirections (rebased copy of #13323)
2023-06-02 11:22:59 +01:00
Geoffrey White
5bf82aeddf Swift: Add FieldDecl.hasQualifiedName. 2023-06-02 11:13:57 +01:00
erik-krogh
ac9ede4ec0 add change-notes 2023-06-02 11:58:11 +02:00
erik-krogh
f61b781386 JS: delete effectively empty file 2023-06-02 11:58:09 +02:00
erik-krogh
5cbe6db37d C++: sync files from C# 2023-06-02 11:58:08 +02:00
erik-krogh
3584e85fe8 JS: fix tutorial 2023-06-02 11:58:08 +02:00
erik-krogh
3dfe2b30b1 C#: delete override where the parent predicate no longer existed 2023-06-02 11:58:08 +02:00
erik-krogh
c3e57382f7 Ruby: fix compilation 2023-06-02 11:58:08 +02:00
erik-krogh
9000243828 JS: fix compilation 2023-06-02 11:58:08 +02:00
erik-krogh
44b6366586 delete old deprecations 2023-06-02 11:58:08 +02:00
Geoffrey White
d7e4c5f044 Swift: Change note. 2023-06-02 10:42:52 +01:00
Geoffrey White
00cd347117 Swift: Add more heuristic expressions. 2023-06-02 10:42:52 +01:00
Geoffrey White
bc57e464e5 Swift: Add some more test cases. 2023-06-02 10:42:51 +01:00
Mathias Vorreiter Pedersen
0adff53afd Merge pull request #13190 from geoffw0/sharedsensitive
Swift: Adopt the shared sensitive data library
2023-06-02 10:36:22 +01:00
Tony Torralba
41bd1ae54e Merge pull request #13351 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-02 11:19:04 +02:00
Mathias Vorreiter Pedersen
cc8aac5435 C++: Use the 'shortestDistances' HOP to count indirections instead of manual recursion. This avoids cyclic problems when we have invalid types. 2023-06-02 11:17:08 +02:00
Tony Torralba
ad2f558002 Add Hudson models
Includes models-as-data rows, flow sources, and XSS sanitizers.

Tests for models-as-data rows not included.
2023-06-02 11:06:24 +02:00
Michael Nebel
3a3f9a2655 Merge pull request #13298 from michaelnebel/csharp/paramdefaultimplicitconversion
C#: Extract default parameter values.
2023-06-02 10:52:24 +02:00
Erik Krogh Kristensen
d7c3ac4830 Merge pull request #13349 from erik-krogh/stopRecLaterAccess
JS: stop recursive fromRhs related to getLaterBaseAccess
2023-06-02 10:39:14 +02:00
Jeroen Ketema
7b17b92aca Fix typo in spelling of expectation 2023-06-02 10:36:11 +02:00
Asger F
77d2799278 Update javascript/ql/lib/semmle/javascript/Regexp.qll
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-06-02 10:33:44 +02:00
Tony Torralba
527fe523a8 Add PathCreation.qll sinks to models-as-data
The old PathCreation sinks can't be removed because doing so would cause alert wobble in the path injection queries. See their getReportingNode predicates.
2023-06-02 09:14:35 +02:00
Tony Torralba
c3b1ef2cdf Merge branch 'main' into atorralba/java/command-injection-mad-sinks 2023-06-02 08:57:24 +02:00
github-actions[bot]
ef7e9a674c Add changed framework coverage reports 2023-06-02 00:16:55 +00:00
erik-krogh
1b44b59842 add stress test 2023-06-01 23:20:23 +02:00
erik-krogh
8eed1a95f6 stop recursive fromRhs related to getLaterBaseAccess 2023-06-01 23:16:52 +02:00
erik-krogh
97afa5733b add support for namespaced JSX attributes 2023-06-01 21:52:14 +02:00
erik-krogh
f4b68fb8c3 bump TypeScript to stable version 2023-06-01 21:51:43 +02:00
Jami
84a7b3ca52 Merge pull request #13157 from jcogs33/jcogs33/update-javascript-sink-kinds
JS: update MaD sink kinds
2023-06-01 15:04:19 -04:00
Jami
1a82e21fdb Merge pull request #13136 from jcogs33/jcogs33/revamp-java-source-kinds
Java: change `android-widget` MaD source kind to `remote`
2023-06-01 14:18:02 -04:00
Jami
3886ebffa9 Merge branch 'main' into jcogs33/update-javascript-sink-kinds 2023-06-01 14:09:10 -04:00
Jami Cogswell
b8cedfa817 Java: switch 'deprecated' to 'outdated' 2023-06-01 13:30:27 -04:00
Jami Cogswell
d10857fbdb Java: fix typo blank qldoc 2023-06-01 12:57:06 -04:00
Jami Cogswell
0355b78f13 Java: add deprecation deletion comment 2023-06-01 12:57:06 -04:00
Jami Cogswell
b3d218a503 Java: condense 'replacementKind' code 2023-06-01 12:57:06 -04:00
Jami Cogswell
06c83ee14d Java: add error message for deprecated sink kinds to 'getInvalidModelKind' 2023-06-01 12:57:05 -04:00
Robert Marsh
c9c93ca701 C++: test for strncmp false positives 2023-06-01 12:52:17 -04:00
Jami
617107de35 Merge pull request #12916 from jcogs33/jcogs33/revamp-java-sink-kinds
Java: revamp MaD sink kinds
2023-06-01 12:48:30 -04:00
Jami Cogswell
de15013715 Java: remove RemoteFlowSources module 2023-06-01 12:25:26 -04:00
Jami Cogswell
5700a6eea4 Java: remove DefaultAndroidWidgetSources class 2023-06-01 12:25:26 -04:00
Jami Cogswell
119b446dbc Java: add change note 2023-06-01 12:25:26 -04:00
Jami Cogswell
d035a29b4d Java: update source kind documentation 2023-06-01 12:25:26 -04:00
Jami Cogswell
6722892828 Java: switch 'android-widget' source kind to 'remote' 2023-06-01 12:25:25 -04:00
Nick Rolfe
7290e2bfd9 Java: avoid call to Location.toString() 2023-06-01 17:06:34 +01:00
Robert Marsh
df4d156a36 C++: remove unneeded exists variables 2023-06-01 11:28:12 -04:00
Alex Ford
6fa9e13a2e Ruby: update TaintStep output 2023-06-01 16:27:20 +01:00
Alex Ford
606d601923 qlformat 2023-06-01 16:26:05 +01:00
erik-krogh
9aeba4f31e changes based on review 2023-06-01 17:24:44 +02:00
Alex Ford
d09f6d318c Merge branch 'main' into maikypedia/sqli-sink 2023-06-01 15:02:44 +01:00
Alex Ford
40cf09996a Merge pull request #13066 from maikypedia/maikypedia/sqli-sink-2
Ruby: Add Sequel as SQL Injection Sink
2023-06-01 15:01:38 +01:00
Erik Krogh Kristensen
96a720cfa0 Merge pull request #13285 from erik-krogh/redoshelp
ReDoS: fix whitespace in the samples in ReDoS.qhelp
2023-06-01 15:53:58 +02:00
Rasmus Lerchedahl Petersen
6755bb32fb Python: do not add read steps for collections 2023-06-01 15:18:05 +02:00
Alex Ford
b62a02f0ad ruby: remove unused field 2023-06-01 14:01:40 +01:00
Alex Ford
23e22799a9 ruby: rack - modelling -> modeling 2023-06-01 14:01:40 +01:00
Alex Ford
24635df1a3 ruby: add some qldoc for rack 2023-06-01 14:01:40 +01:00
Alex Ford
40da7d45c2 ruby: make a predicate private 2023-06-01 14:01:40 +01:00
Alex Ford
4905a70e21 Ruby: update rack test output 2023-06-01 14:01:40 +01:00
Alex Ford
19664879c8 ruby: slightly expand a TODO 2023-06-01 14:01:40 +01:00
Alex Ford
a5a15f3804 Ruby: restructure rack model 2023-06-01 14:01:40 +01:00
Alex Ford
b2958f87b2 ruby: rack - add redirect responses 2023-06-01 14:01:40 +01:00
Alex Ford
c3ab867595 ruby: start restructuring rack 2023-06-01 14:01:40 +01:00
Alex Ford
f8d2cbbe79 ruby: rack responses implement are HTTP responses 2023-06-01 14:01:39 +01:00
Alex Ford
c87c266871 ruby: add Rack::ResponseNode#getAStatusCode 2023-06-01 14:01:39 +01:00
Alex Ford
e7e0cf5cb3 ruby: add Rack::ResponseNode class 2023-06-01 14:01:39 +01:00
Alex Ford
7d943c7621 Ruby: update test output 2023-06-01 13:50:32 +01:00
Jami Cogswell
58845eca7c Java: update recently added 'open-url' sinks to 'request-forgery' 2023-06-01 08:10:44 -04:00
Asger F
baef99995d JS: Change note 2023-06-01 14:10:11 +02:00
Alex Ford
4794066d3c Merge branch 'main' into maikypedia/sqli-sink-2 2023-06-01 13:04:54 +01:00
Ian Lynagh
c28af7672d Merge pull request #13286 from igfoo/igfoo/kotlin-1.9b
Kotlin: Support 1.9.0
2023-06-01 13:02:04 +01:00
Jami
10bab71c60 Merge pull request #12249 from jcogs33/jcogs33/add-heuristic-neutral-models
Java: add some neutral models discovered with heuristics
2023-06-01 07:51:55 -04:00
Geoffrey White
edfdddb24a Swift: Tweak and update the qldoc string. 2023-06-01 11:47:05 +01:00
Geoffrey White
d68f602124 Merge branch 'main' into sharedsensitive 2023-06-01 11:11:42 +01:00
Maiky
7579f182ad Add requested changes 2023-06-01 11:00:35 +02:00
Tony Torralba
c1bd04e802 Merge pull request #13332 from atorralba/atorralba/java/gson-serializability
Java: Fix GsonDeserializableField
2023-06-01 10:45:32 +02:00
Tony Torralba
aecaf82405 Merge pull request #13340 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-01 10:43:32 +02:00
Michael Nebel
9aeb2384f3 C#: Improve LINQ expression based on review comments. 2023-06-01 10:20:54 +02:00
Michael Nebel
d882fe1ea8 C#: Update expected test output. 2023-06-01 09:30:31 +02:00
Michael Nebel
d12dfabf9d C#: Use synthetic globals instead of jump returns in the EntityFramework implementation. 2023-06-01 09:30:31 +02:00
Michael Nebel
cd251f4b36 C#: Make example classes public to allow printing of summaries in test. 2023-06-01 09:30:31 +02:00
Michael Nebel
93d9783940 C#: Expose a synthetic global singleton stack. 2023-06-01 09:30:31 +02:00
Michael Nebel
06b02eb3ce Sync files. 2023-06-01 09:30:31 +02:00
Michael Nebel
3862f8e3c0 C#: Expose synthetic globals for use in C#, allow printing of summaries that uses synthetic globals. 2023-06-01 09:30:31 +02:00
github-actions[bot]
3ef08d5baf Add changed framework coverage reports 2023-06-01 00:20:17 +00:00
Maiky
13ce6a6d8e Update Frameworks.qll 2023-06-01 00:53:01 +02:00
Jami Cogswell
82f208ca7a Java: add isNeutralSink test case 2023-05-31 17:47:36 -04:00
Mathias Vorreiter Pedersen
4497aa5eb1 Merge pull request #13333 from geoffw0/macroname
C++: Make Macro.getName() more efficient.
2023-05-31 13:56:58 -07:00
Jami Cogswell
51f8f98118 Java: update recently added 'sql' sinks 2023-05-31 15:51:07 -04:00
Jami Cogswell
ca8ac0c93f Java: add comment about request-forgery sinks 2023-05-31 15:51:07 -04:00
Jami Cogswell
9853a66b32 Java: update change note 2023-05-31 15:51:07 -04:00
Jami Cogswell
3e5dc28c0a Java: update more recently added sinks: path-injection and request-forgery 2023-05-31 15:51:07 -04:00
Jami Cogswell
6bb6802fb8 Java: add change note draft 2023-05-31 15:51:07 -04:00
Jami Cogswell
e28ce959a3 Java: update CaptureSinkModels test case 2023-05-31 15:51:07 -04:00
Jami Cogswell
ad771984f1 Java: update recently added path-injection sinks 2023-05-31 15:51:07 -04:00
Jami Cogswell
36e467e74a Java: update cwe-sink.csv 2023-05-31 15:51:07 -04:00
Jami Cogswell
0a8c0f58b2 Java: add sink kinds documentation 2023-05-31 15:51:07 -04:00
Jami Cogswell
5dbb698481 Java: update open/jdbc-url sink kinds to request-forgery 2023-05-31 15:50:31 -04:00
Jami Cogswell
cb10f4976b Java: update create/read-file sink kinds to path-injection 2023-05-31 15:49:07 -04:00
Jami Cogswell
eb1a8e2189 Java: update write-file sink kind to file-system-store 2023-05-31 15:49:07 -04:00
Jami Cogswell
ac8d985a63 Java: update xss sink kind to html-injection and js-injection 2023-05-31 15:49:07 -04:00
Jami Cogswell
041caa7405 Java: update header-splitting sink kind to response-splitting 2023-05-31 15:49:07 -04:00
Jami Cogswell
51df84ed1c Java: update set-hostname-verifier sink kind to hostname-verification 2023-05-31 15:49:07 -04:00
Jami Cogswell
b23f384a50 Java: update intent-start sink kind to intent-redirection 2023-05-31 15:49:07 -04:00
Jami Cogswell
5aa3e57ff3 Java: update pending-intent-sent sink kind to pending-intents 2023-05-31 15:49:07 -04:00
Jami Cogswell
3ff4c7de8f Java: update ldap sink kind to ldap-injection 2023-05-31 15:49:07 -04:00
Jami Cogswell
6d2d25406c Java: update xslt sink kind to xslt-injection 2023-05-31 15:49:07 -04:00
Jami Cogswell
cea97b3f2a Java: update mvel sink kind to mvel-injection 2023-05-31 15:49:06 -04:00
Jami Cogswell
6cee0c4c75 Java: update jexl sink kind to jexl-injection 2023-05-31 15:49:06 -04:00
Jami Cogswell
6431d370c1 Java: update groovy sink kind to groovy-injection 2023-05-31 15:49:06 -04:00
Jami Cogswell
430010daa3 Java: update logging sink kind to log-injection 2023-05-31 15:49:06 -04:00
Jami Cogswell
8c4b394e1a Java: update ssti sink kind to template-injection 2023-05-31 15:49:06 -04:00
Jami Cogswell
fc58d10a4e Java: update xpath sink kind to xpath-injection 2023-05-31 15:49:06 -04:00
Jami Cogswell
55be2e5b67 Java: update url-redirect sink kind to url-redirection 2023-05-31 15:49:06 -04:00
Jami Cogswell
d24d8b1626 Java: update sql sink kind to sql-injection 2023-05-31 15:49:06 -04:00
Ian Lynagh
82578af349 Kotlin: Use @files for compiler arguments
Avoids problems with large line lengths.
2023-05-31 19:43:45 +01:00
Ian Lynagh
a13678c35c Kotlin: Update expected test output 2023-05-31 19:43:45 +01:00
Ian Lynagh
0090429d53 Kotlin: Support 1.9.0 2023-05-31 19:43:45 +01:00
Alexandre Boulgakov
67cd6b7fa6 Merge pull request #13337 from MathiasVP/revert-13207
Revert #13207
2023-05-31 19:41:01 +01:00
Mathias Vorreiter Pedersen
52eb7aee5e Revert "Merge pull request #13207 from MathiasVP/use-equiv-class-in-getInstruction"
This reverts commit 5bc844c4c6, reversing
changes made to b2fb2aa0d1.
2023-05-31 11:26:09 -07:00
Mathias Vorreiter Pedersen
3d9c282f48 Merge pull request #13320 from jketema/ptr-deref-dedup 2023-05-31 10:12:05 -07:00
erik-krogh
1e08105863 less duplicated headers in the sql-injection samples 2023-05-31 18:04:34 +02:00
erik-krogh
98820780af show how to use mysql.escape in the sql-injection qhelp 2023-05-31 18:04:34 +02:00
erik-krogh
7d801e05ee add an example of using dollar eq 2023-05-31 18:04:23 +02:00
Arthur Baars
e93b44670f Ruby: printCfg: only show graph for selected CfgScope 2023-05-31 16:08:01 +02:00
Arthur Baars
c211b704f3 Merge pull request #13272 from github/post-release-prep/codeql-cli-2.13.3
Post-release preparation for codeql-cli-2.13.3
2023-05-31 15:33:12 +02:00
Michael Nebel
83a8e3bdbc C#: Add some more testcases. 2023-05-31 14:47:45 +02:00
Michael Nebel
43d6bf04b5 C#: Make synthetic implicit casts when values are provided using the DefaultParameterValue attribute. 2023-05-31 14:45:19 +02:00
Stephan Brandauer
5de56db3af Java: QlDoc for isKnownKind 2023-05-31 14:13:14 +02:00
Stephan Brandauer
03051dde7f Java: spelling 2023-05-31 14:13:14 +02:00
Geoffrey White
caf250cc1b Swift: Update the QLdoc on Callable. 2023-05-31 13:01:20 +01:00
Geoffrey White
02cae30270 Merge branch 'main' into sharedsensitive 2023-05-31 12:57:33 +01:00
Geoffrey White
daad2e1bd3 Swift: Use regexp for function name. 2023-05-31 12:55:09 +01:00
Taus
ea5c36491b Java: Improve documentation of sampling strategy 2023-05-31 11:39:54 +00:00
Stephan Brandauer
5a9d09c49e Java: docs update
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2023-05-31 13:36:58 +02:00
Tony Torralba
282ee08ba9 Java: Fix GsonDeserializableField 2023-05-31 13:26:35 +02:00
Charis Kyriakou
24b99aef7a Merge pull request #13206 from github/charisk/mrva-remove-token-perms
Remove GITHUB_TOKEN permissions note since it's no longer required
2023-05-31 12:22:49 +01:00
Arthur Baars
5981ce4cb1 Swift: accept test output from failed CFG consistency queries 2023-05-31 12:15:21 +02:00
Jeroen Ketema
ace7b6b711 C++: Add cpp/invalid-pointer-deref FP test case 2023-05-31 11:54:53 +02:00
Geoffrey White
a9811fe2c3 Swift: Make Macro.getName() more efficient. 2023-05-31 10:53:02 +01:00
Stephan Brandauer
12ea5e0e90 Java: fix sanitizer bug 2023-05-31 11:53:02 +02:00
Stephan Brandauer
86559317d7 Java: update comments 2023-05-31 11:52:26 +02:00
Taus
b39a5a64af Merge pull request #13317 from github/java/update-mad-decls-after-triage-2023-05-30T14-11-29
Java: Update MaD Declarations after Triage
2023-05-31 11:40:49 +02:00
Tony Torralba
482bb94ad9 Merge pull request #13179 from pwntester/java_gson
[Java] Add basic support for Google's Gson library
2023-05-31 11:16:19 +02:00
Stephan Brandauer
96bae2d5ec Java: avoid downcasting to DollarAtString 2023-05-31 10:41:52 +02:00
Paolo Tranquilli
edb822279b Swift: update comments to the mangler 2023-05-31 10:12:31 +02:00
erik-krogh
e24b45b423 elaborate on both SQL and NoSQL injection in the js/sql-injection qhelp 2023-05-31 09:57:38 +02:00
Paolo Tranquilli
70ff401f21 Swift: replace internal swift mangler with our own
Our mangler is split in two version:
* `SwiftTrapMangler`, with the same behaviour as the previous
  `SwiftMangler`, constructing mangled names with trap label references
* `SwiftRecursiveMangler` that replaces trap label references with
  recursive calls to its own `mangle` functions, effectively rolling out
  the entire chain of references

The latter is used to create lazy trap file names. Hashing is used to
avoid excessively long filenames.
2023-05-31 09:52:20 +02:00
Paolo Tranquilli
ab3b87a3f2 Swift: add nested generic function to test 2023-05-31 09:52:20 +02:00
Tony Torralba
fe26aca238 Remove non-ASCII character 2023-05-31 09:25:37 +02:00
Tony Torralba
6f302a43ea Merge pull request #13297 from atorralba/atorralba/java/playmvc-models
Java: Add models for the Play Framework
2023-05-31 09:02:17 +02:00
Michael Nebel
2266e28583 Merge pull request #13262 from michaelnebel/flowsummary/refactorgetcomponentstack
C#: Re-factor getComponent.
2023-05-31 08:22:44 +02:00
erik-krogh
b343dcaadd put string/object in the alert-message for sql-injection 2023-05-31 08:06:04 +02:00
Erik Krogh Kristensen
b9ffa11915 Merge pull request #13328 from github/dependabot/cargo/ql/chrono-0.4.26
Bump chrono from 0.4.25 to 0.4.26 in /ql
2023-05-31 07:42:37 +02:00
dependabot[bot]
75f6355bd6 Bump chrono from 0.4.25 to 0.4.26 in /ql
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.25 to 0.4.26.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.25...v0.4.26)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 04:06:22 +00:00
Mathias Vorreiter Pedersen
a646749380 Merge pull request #13318 from MathiasVP/exclude-std-in-constant-size-array-off-by-one
C++: Exclude `StdNamespace` sources in `cpp/constant-size-array-off-by-one`
2023-05-30 14:31:18 -07:00
Mathias Vorreiter Pedersen
65eebf1f40 Merge branch 'main' into exclude-std-in-constant-size-array-off-by-one 2023-05-30 13:40:01 -07:00
Arthur Baars
490d22d123 Merge remote-tracking branch 'upstream/main' into post-release-prep/codeql-cli-2.13.3 2023-05-30 21:31:28 +02:00
Arthur Baars
60a5ef744f Merge pull request #13319 from aibaars/print-cfg
Ruby: add print-cfg query
2023-05-30 21:15:06 +02:00
Jeroen Ketema
dd30acf1e3 C++: Add nodes query predicate to cpp/invalid-pointer-deref 2023-05-30 18:43:01 +02:00
Jeroen Ketema
f5ed02a433 C++: Take into account the delta at the final sink in cpp/invalid-pointer-deref 2023-05-30 18:33:20 +02:00
Jeroen Ketema
de974cc18a C++: Add cpp/invalid-pointer-deref test case that shows some duplicate results 2023-05-30 18:18:13 +02:00
Jeroen Ketema
a8c76388c0 C++: Fix configuration names in comments in cpp/invalid-pointer-deref 2023-05-30 18:15:37 +02:00
Tony Torralba
70138448c3 Visibility 2023-05-30 17:54:59 +02:00
Tony Torralba
0151a728f8 Add change note 2023-05-30 17:53:03 +02:00
Tony Torralba
d3d67f0fb0 Add tests & stubs 2023-05-30 17:52:00 +02:00
Tony Torralba
977263a126 Use container flow for more precision 2023-05-30 17:51:41 +02:00
Tony Torralba
54e011188d Formatting 2023-05-30 17:50:50 +02:00
Andrew Eisenberg
6ba8f9eb36 Merge pull request #13314 from github/aeisenberg/adds-to-pack
Fix `addsTo.pack` references
2023-05-30 08:30:16 -07:00
Arthur Baars
d91fa2d038 Ruby: add print-cfg query 2023-05-30 17:30:04 +02:00
Mathias Vorreiter Pedersen
f00b29d3d2 C++: The small-string optimization commonly used inside 'std::string' is causing a lot of FPs. Let's exclude this for now to reduce the number of results for this query. 2023-05-30 07:33:07 -07:00
Robert Marsh
2afda5f3f1 Merge pull request #13305 from MathiasVP/fix-join-of-pointerArithOverflow0
C++: Fix join in `pointerArithOverflow0`
2023-05-30 10:24:35 -04:00
Taus
00e4c455b5 Update MaD Declarations after Triage 2023-05-30 16:11:30 +02:00
Asger F
d7f747e684 Merge pull request #13195 from asgerf/js/no-globals-in-example
JS: Avoid using global vars in documentation examples
2023-05-30 15:44:38 +02:00
Tamás Vajk
19f1d2b116 Merge pull request #13290 from tamasvajk/feature/source-generators
C#: Extract source files generated by source generators
2023-05-30 15:40:46 +02:00
Geoffrey White
560aa43953 Swift: Repair for AccountID / AccountKey. 2023-05-30 14:20:17 +01:00
Rasmus Lerchedahl Petersen
820b5f235e python: add change note 2023-05-30 13:36:10 +02:00
Rasmus Lerchedahl Petersen
2daa9577bb ruby/python: implement shared module
ruby:
- create new shared file `SummaryTypeTracker.qll`
- move much logic into the module
- instantiate the module
- remove old logic, now provided by module

python:
- clone shared file
- instantiate module
- use (some of the) steps provided by the module
2023-05-30 13:31:24 +02:00
Taus
73aa790cdd Java: Improve sampling strategy
Instead of the "random" sampling used before (which could -- in rare circumstances -- end up sampling fewer points than we want) we now sample an equally distributed set of points.
2023-05-30 11:22:26 +00:00
Rasmus Lerchedahl Petersen
47b2d48da2 python: add tests
- add `getACallSimple` to `SummarizedCallable`
  (by adding it to `LibraryCallable`)
2023-05-30 13:16:04 +02:00
Tamas Vajk
138bfad3d0 Add change note 2023-05-30 12:00:31 +02:00
Jeroen Ketema
16bc584bd1 Merge pull request #13294 from MathiasVP/better-test-for-range-analysis
C++: Change range-analysis test to not use `getAst`
2023-05-30 10:49:58 +02:00
Geoffrey White
d506172027 Swift: Change note. 2023-05-30 09:41:11 +01:00
Paolo Tranquilli
2183d380db Swift: implement review suggestions 2023-05-30 10:30:44 +02:00
Stephan Brandauer
d4b964c849 add support for sanitizers 2023-05-30 10:25:52 +02:00
Tony Torralba
db4e82e2f3 Merge pull request #13301 from atorralba/atorralba/java/stub-generator-perf-fix
Java: Fix performance issue in the stub generator
2023-05-30 10:21:16 +02:00
Geoffrey White
4a8320fafd Merge pull request #13287 from geoffw0/stringfp
Swift: Fix some string length conflation false positives
2023-05-30 08:57:48 +01:00
Michael Nebel
e764b46c88 Merge pull request #13306 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-05-30 09:23:09 +02:00
Erik Krogh Kristensen
073e31917a Merge pull request #13315 from github/dependabot/cargo/ql/chrono-0.4.25
Bump chrono from 0.4.24 to 0.4.25 in /ql
2023-05-30 07:53:01 +02:00
dependabot[bot]
39a07d42a1 Bump chrono from 0.4.24 to 0.4.25 in /ql
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.24 to 0.4.25.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.24...v0.4.25)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-30 04:03:50 +00:00
github-actions[bot]
53aecb1949 Add changed framework coverage reports 2023-05-30 00:17:04 +00:00
Andrew Eisenberg
2d81e30d81 Fix addsTo.pack references
This change is a prerequisite for a CLI change where there will be
strict testing of the `addsTo.pack` values. It must resolve to a pack
reference that is a transitive dependency of the current query's pack.
2023-05-29 13:45:41 -07:00
Maiky
345f43fbae fix concepts 2023-05-29 21:17:48 +02:00
Maiky
62353122c0 Add Improper LDAP Authentication query (CWE-287) 2023-05-29 21:16:13 +02:00
Maiky
03b7c5e5e8 naming error 2023-05-29 16:34:40 +02:00
Maiky
a8f887e3f9 naming error 2023-05-29 16:33:58 +02:00
Tony Torralba
6386ef3b96 Further perf improvements 2023-05-29 09:58:52 +02:00
Harry Maclean
e70e3e52dc Ruby: fix typo in qhelp 2023-05-29 04:05:42 +00:00
Harry Maclean
ca1024e285 Ruby: Reword unsafe deserialization qhelp 2023-05-29 03:46:30 +00:00
Maiky
2d8318dc02 remove unnecessary imports and edit .qhelp 2023-05-28 17:40:31 +02:00
Maiky
065b69460d remove space 2023-05-28 17:34:16 +02:00
Maiky
5e33f14ff1 Undo Concepts changes 2023-05-28 17:33:05 +02:00
Maiky
d45d046fa7 Add test file and .expected 2023-05-28 17:29:34 +02:00
Maiky
d8bc818d5a add Change note 2023-05-28 16:50:36 +02:00
Harry Maclean
e515981c81 Ruby: Remove unused examples 2023-05-27 12:01:00 +00:00
Harry Maclean
562065f29e Ruby: Add change note 2023-05-27 01:20:09 +00:00
Harry Maclean
b8c3cba4ff Ruby: Consolidate unsafe deserialization queries
Merge the experimental YAMLUnsafeDeserialization and
PlistUnsafeDeserialization queries into the generate
UnsafeDeserialization query in the default suite.

These queries look for some specific sinks that we now find in the
general query.

Also apply some small code and comment refactors.
2023-05-27 01:20:04 +00:00
amammad
d727d573d5 v4.2 write exact version of yaml.load default loader change 2023-05-27 01:15:29 +00:00
amammad
40e24b6b94 v4.1 fix file names in qhelp 2023-05-27 01:15:29 +00:00
amammad
335441ce04 v4: make variable names camelCase, some inhancement, remove some duplicates 2023-05-27 01:15:29 +00:00
amammad
e76ed9454a v3 add global taint steps for to_ruby of YAML/Psych 2023-05-27 01:15:24 +00:00
amammad
ad7e107ff5 add the new YAML/PLIST sinks into the existing rb/unsafe-deserialization query 2023-05-27 01:14:36 +00:00
amammad
b9296d3df8 v2.1 fix file names 2023-05-27 01:14:36 +00:00
amammad
4360a56b45 v2 add plist.parse_xml as a dangerous sink and enhancements on documents 2023-05-27 01:14:36 +00:00
amammad
0521ffe175 v1.4 correct dirs uppercase issue 2023-05-27 01:14:36 +00:00
amammad
0e343e5a12 v1.3 2023-05-27 01:14:36 +00:00
amammad
d96153a05e v1.2 change to PascalCase 2023-05-27 01:14:36 +00:00
amammad
e4b8a0e06d v1.1 2023-05-27 01:14:36 +00:00
amammad
486a5ac96f v1 2023-05-27 01:14:36 +00:00
Jami Cogswell
24fc4ba2d4 Java: add tests 2023-05-26 18:55:13 -04:00
Jami Cogswell
f255b6acb8 Java: fix typos 2023-05-26 18:55:13 -04:00
Jami Cogswell
7e6913af62 Java: update provenance to 'hq-manual' 2023-05-26 18:55:13 -04:00
Jami Cogswell
60b07083c3 Java: add 'sink' kind 2023-05-26 18:55:13 -04:00
Jami Cogswell
65dd7eb8e7 Java: add neutral models discovered with path-inj and ssrf heuristics 2023-05-26 18:55:13 -04:00
Mathias Vorreiter Pedersen
9828af45a1 C++: Change separator from ':' to '|'. 2023-05-26 15:23:48 -07:00
Mathias Vorreiter Pedersen
0f08642653 C++: Fix join in 'pointerArithOverflow0'. 2023-05-26 11:16:44 -07:00
Robert Marsh
d18fb646d1 C++: handle cast arrays properly in off-by-one query 2023-05-26 13:16:21 -04:00
Robert Marsh
5bc844c4c6 Merge pull request #13207 from MathiasVP/use-equiv-class-in-getInstruction
C++: Reduce memory pressure from `getInstruction`
2023-05-26 13:13:57 -04:00
Robert Marsh
6e230e10f8 C++: include stack-allocated arrays in off-by-one query 2023-05-26 13:04:51 -04:00
Robert Marsh
b2fb2aa0d1 Merge pull request #13045 from rdmarsh2/rdmarsh2/cpp/improve-constant-off-by-one
C++: stitch paths and ignore cast arrays in constant off-by-one query
2023-05-26 12:47:08 -04:00
Maiky
dfbf259e2d typo 2023-05-26 18:14:49 +02:00
Maiky
9ab6eabd15 add filterTaintStep, qhelp file and test files 2023-05-26 18:13:58 +02:00
Philip Ginsbach
ded98c5a5f Merge pull request #13304 from github/ginsbach/SmallSpecificationFixes
two small QL specification fixes
2023-05-26 16:18:36 +01:00
Taus
227c5fab40 Java: Get location ordering without toString 2023-05-26 14:52:08 +00:00
Paolo Tranquilli
ddf45b27ca Merge pull request #13300 from github/redsun82/swift-fix-autobuild-corner-case
Swift: exclude unknown type targets ending in `Tests` or `Test` from autobuilding
2023-05-26 16:49:01 +02:00
Philip Ginsbach
47a0d4b774 more explicit mentioning of QLL files 2023-05-26 15:03:34 +01:00
Philip Ginsbach
ba51ded516 bindingset is not really a pragma 2023-05-26 15:03:34 +01:00
Paolo Tranquilli
15047368e8 Swift: add a warning to unmangled types 2023-05-26 15:12:21 +02:00
Paolo Tranquilli
3f7c4dec25 Swift: add a header comment to SwiftMangler 2023-05-26 15:05:40 +02:00
Asger F
3831dc7785 Merge pull request #13288 from asgerf/rb/super-and-flow-through
Ruby: two bug fixes
2023-05-26 15:04:52 +02:00
Paolo Tranquilli
d81dc274f6 Swift: make a TODO more assertive as there is a draft PR already 2023-05-26 14:45:29 +02:00
Asger F
cfaa27ab5d Ruby: change note 2023-05-26 14:44:00 +02:00
Paolo Tranquilli
05ed66ad8f Swift: remove debugging print 2023-05-26 14:42:02 +02:00
Paolo Tranquilli
c5cee0d419 Swift: exclude targets ending in Tests or Test from autobuilding 2023-05-26 14:19:07 +02:00
Stephan Brandauer
efe539eb32 Java: better sampling of negative examples 2023-05-26 14:15:32 +02:00
Asger F
c637b6f59a JS: Update test for RegExpAlwaysMatches 2023-05-26 14:10:26 +02:00
Asger F
9df9ca2916 JS: Update test and expectations for MissingRegExpAnchor 2023-05-26 14:07:34 +02:00
Asger F
40daa9c906 JS: Update RegExpInjection test and expectations 2023-05-26 14:05:36 +02:00
Rasmus Lerchedahl Petersen
9cb83fcdc9 python: add summaries for
copy, pop, get, getitem, setdefault

Also add read steps to taint tracking.

Reading from a tainted collection can be done in two situations:
1. There is an acces path
    In this case a read step (possibly from a flow summary)
    gives rise to a taint step.
2. There is no access path
    In this case an explicit taint step (possibly via a flow
    summary) should exist.
2023-05-26 14:04:15 +02:00
Jami
6867e94ed5 Merge pull request #13158 from jcogs33/jcogs33/update-csharp-sink-kinds
C#: update MaD sink kinds
2023-05-26 08:03:21 -04:00
yoff
af1f4c30fb Merge pull request #13299 from asgerf/rb/meta-query-summarised-callable-sites
Ruby/Python: add meta-queries for calls to summarised callables
2023-05-26 13:27:56 +02:00
Rasmus Lerchedahl Petersen
144df9a39e python: remove explicit dataflow steps 2023-05-26 13:24:22 +02:00
Rasmus Lerchedahl Petersen
8d4f9447b1 python: remove explicit steps
copy, pop, get, popitem
2023-05-26 13:22:54 +02:00
Stephan Brandauer
a89378d86d Java: add extra known frameworks and sample negative samples to manage sarif file sizes 2023-05-26 13:20:04 +02:00
Arthur Baars
e0466900ad Merge pull request #12992 from Sim4n6/ruby-UBV
[Ruby] Add Unicode Bypass Validation query, test and help file
2023-05-26 13:00:21 +02:00
Tony Torralba
4dfc9b13cd Java: Fix performance issue in the stub generator 2023-05-26 12:44:53 +02:00
Tony Torralba
8e16a0d144 Add tests and stubs for the summaries 2023-05-26 12:43:58 +02:00
Alex Ford
baabd2d1fa Merge pull request #12832 from maikypedia/maikypedia/pg-sqli
Ruby: Add SQL Injection Sinks
2023-05-26 11:36:17 +01:00
Michael Nebel
915042a881 Minor cleanup and sync files. 2023-05-26 12:25:00 +02:00
Michael Nebel
783d560e7d Swift: Re-factor getComponent. 2023-05-26 12:25:00 +02:00
Michael Nebel
58fcbc136c Ruby: Re-factor getComponent. 2023-05-26 12:25:00 +02:00
Michael Nebel
811eee1f0d Python: Re-factor getComponent. 2023-05-26 12:24:59 +02:00
Michael Nebel
b794627335 Go: Re-factor getComponent. 2023-05-26 12:24:59 +02:00
Michael Nebel
b7a8660375 Java: Re-factor getComponent. 2023-05-26 12:24:59 +02:00
Michael Nebel
066554cee6 C#: Re-factor getComponent. 2023-05-26 12:24:59 +02:00
Paolo Tranquilli
a6e21dac8f Merge pull request #13284 from github/redsun82/swift-remove-property-wrapper-inconsistencies
Swift: remove some AST and CFG inconsistencies
2023-05-26 12:22:56 +02:00
Asger F
2629ec1b1d JS: Be more conservative about flagging "search" call arguments as regex 2023-05-26 11:55:53 +02:00
Asger F
75fd20b3b8 Python: add meta-query for calls to summarized callables 2023-05-26 11:40:58 +02:00
Jeroen Ketema
63657396c5 Merge pull request #13267 from MathiasVP/promote-overrun-write
C++: Promote `cpp/overrun-write` out of experimental
2023-05-26 11:34:26 +02:00
Asger F
1c7f6dc32e Ruby: add meta-query for calls to summarized callables 2023-05-26 11:34:23 +02:00
Michael B. Gale
631ba6584d Go: Update identify-environment JSON format
The spec changed after this was implemented and merged
2023-05-26 10:13:40 +01:00
Michael B. Gale
af803c8886 Go: include new scripts in Makefile 2023-05-26 10:13:40 +01:00
Michael B. Gale
e48fc66782 Swift: Add identify-environment script 2023-05-26 10:13:39 +01:00
Tony Torralba
903fdb0cb8 Java: Add models for the Play Framework 2023-05-26 10:23:43 +02:00
Tamas Vajk
918cfd6f44 Add integration test 2023-05-26 09:50:06 +02:00
Geoffrey White
736f2871f9 Swift: Tweak private info regexps to restore 'account_no' results. 2023-05-26 08:43:32 +01:00
Tamas Vajk
74a585222c C#: Extract source files generated by source generators 2023-05-26 09:13:41 +02:00
Paolo Tranquilli
5a2433244e Swift: remove now passing PrintAstConsistency check 2023-05-26 08:58:49 +02:00
Paolo Tranquilli
b0882a9e5f Merge branch 'main' into alexdenisov+redsun82/tuple-mangling 2023-05-26 08:40:16 +02:00
Paolo Tranquilli
192c0d5e83 Swift: simplify change note
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-05-26 08:20:58 +02:00
Esben Sparre Andreasen
081c069b3c Merge pull request #13295 from github/dependabot/cargo/ql/regex-1.8.3
Bump regex from 1.8.2 to 1.8.3 in /ql
2023-05-26 08:13:41 +02:00
dependabot[bot]
4ab389bf1a Bump regex from 1.8.2 to 1.8.3 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.8.2...1.8.3)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-26 04:02:31 +00:00
Mathias Vorreiter Pedersen
0d1d20c75b C++: Change range-analysis test to not use 'getAst'. This was creating confusing test expectation annotations. 2023-05-25 15:50:29 -07:00
Mathias Vorreiter Pedersen
960e6521a4 Revert "C++: Whitespace commit to make qhelp show up in diff."
This reverts commit ec192d621c.
2023-05-25 15:21:09 -07:00
Mathias Vorreiter Pedersen
c6275bfa28 Merge pull request #13293 from MathiasVP/fix-performance-of-dtt
C++: Fix result duplication on `DefaultTaintTracking`
2023-05-25 15:20:02 -07:00
Mathias Vorreiter Pedersen
e7f82a3571 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-05-25 13:56:01 -07:00
Geoffrey White
0e443da710 Swift: Remove id() categorization due to accuracy, and repair the old bank.?account case. 2023-05-25 21:51:27 +01:00
Maiky
026d94c457 Add LDAP Injection query (incomplete) 2023-05-25 22:51:25 +02:00
Mathias Vorreiter Pedersen
384ca0c31f C++: Respond to review comments. 2023-05-25 13:50:35 -07:00
Mathias Vorreiter Pedersen
c3fdc83af6 C++: Also add an out barrier on all sinks. 2023-05-25 12:23:50 -07:00
Mathias Vorreiter Pedersen
7361ad977a Merge pull request #13291 from geoffw0/correction
Swift: Promote some Data models to DataProtocol
2023-05-25 11:28:42 -07:00
Mathias Vorreiter Pedersen
a7252e625e C++: Fix result duplication on 'cpp/unbounded-write' on 'kirxkirx/vast'. 2023-05-25 11:12:01 -07:00
Alex Ford
609319da20 ruby: update TaintStep.ql test output 2023-05-25 17:53:01 +01:00
Geoffrey White
3f3a5d39e5 Swift: Fix the SQL injection test. 2023-05-25 17:13:51 +01:00
Geoffrey White
85a1ab0264 Swift: Undo autocorrect. 2023-05-25 16:10:31 +01:00
Stephan Brandauer
5ca2221097 remove some of the biggest frameworks from application mode consideration 2023-05-25 17:06:02 +02:00
Geoffrey White
98e5f0fc4f Swift: Add change note. 2023-05-25 16:04:18 +01:00
Geoffrey White
51321a218b Swift: Correct models in Data.qll. 2023-05-25 15:55:45 +01:00
Geoffrey White
5dfb07ce37 Swift: Test DataProtocol. 2023-05-25 15:51:21 +01:00
Stephan Brandauer
db77c6b9a3 Java: mark functional expressions as likely not sinks 2023-05-25 16:39:27 +02:00
Stephan Brandauer
76d731a61d improve CannotBeTaintedCharacteristic 2023-05-25 16:28:07 +02:00
Paolo Tranquilli
cc271d682e Codegen: ignore synth properties in cppgen 2023-05-25 16:05:25 +02:00
Paolo Tranquilli
b09386a2c8 Codegen: ignore synth properties in Raw.qll 2023-05-25 16:05:12 +02:00
Paolo Tranquilli
00fb796f3b Codegen: ignore synth properties in dbschemegen 2023-05-25 16:05:12 +02:00
Paolo Tranquilli
d2c9847a79 Codegen: parse synth property modifier 2023-05-25 16:05:12 +02:00
Paolo Tranquilli
165ac3eeaa Codegen: define and propagate synth property flag 2023-05-25 16:05:12 +02:00
Paolo Tranquilli
242d263e8a Codegen: move ipa info from ql.Class to ql.Property 2023-05-25 16:05:11 +02:00
Asger F
9e8cef5e1b Ruby: fix type-tracking flow-through for new->initialize calls 2023-05-25 15:03:38 +02:00
Asger F
93678e5d36 Ruby: fix name of super calls in singleton methods 2023-05-25 15:03:34 +02:00
Geoffrey White
791ba81403 Swift: Add change note. 2023-05-25 13:27:23 +01:00
Stephan Brandauer
9a041243ff Java: fine-tune characteristics 2023-05-25 14:16:32 +02:00
Stephan Brandauer
f224a40dec Java: use containing call as call context, not argument 2023-05-25 14:16:23 +02:00
Stephan Brandauer
33fdb0fc52 Java: remove superfluous characteristic 2023-05-25 14:16:23 +02:00
Taus
2000f22533 Java: Port over characteristics from codex branch 2023-05-25 14:16:23 +02:00
Taus
11ab7e2e71 Java: Share argument indexing logic
Adds a utility predicate for turning integer indices into the desired string representation.
2023-05-25 14:16:23 +02:00
Taus
04b8bf35d4 Java: Avoid overlapping import
Importing `AutomodelEndpointTypes` inside `AutomodelSharedUtil` non-privately made it overlap with the imports in the candidate extraction queries.
2023-05-25 14:16:23 +02:00
Stephan Brandauer
db61a2d099 Java: share isKnownKind between modes 2023-05-25 14:16:16 +02:00
Stephan Brandauer
d93ad9b398 Java: remove unneeded abstract metadata extractor classes and fix some names 2023-05-25 14:16:11 +02:00
Stephan Brandauer
6e21f14c09 Java: update extraction query metadata 2023-05-25 14:16:03 +02:00
Stephan Brandauer
7c3bc26c41 Java: make input an actual string, not an integer 2023-05-25 14:15:59 +02:00
Stephan Brandauer
185ad101b3 Java: add application-mode and framework-mode tags to extraction queries 2023-05-25 14:15:50 +02:00
Taus
9b30f9a476 Java: Add negative characteristic for static calls 2023-05-25 14:15:49 +02:00
Taus
6fc16574b3 Java: Add QL support for automodel application mode 2023-05-25 14:15:49 +02:00
Paolo Tranquilli
5e66885a8e Swift: add change note 2023-05-25 14:00:04 +02:00
erik-krogh
9f5bf8fb22 also fix the first code-block 2023-05-25 13:56:29 +02:00
erik-krogh
765076bcba fix whitespace in the samples in ReDoS.qhelp 2023-05-25 13:28:39 +02:00
Paolo Tranquilli
51f1a5dcc8 Swift: remove getOpaqueExpr from OpenExistentialExpr's children 2023-05-25 13:05:21 +02:00
Paolo Tranquilli
7b76aa34bd Swift: fix CFG inconsistency on TapExpr 2023-05-25 13:05:21 +02:00
Paolo Tranquilli
b26b0a6e43 Swift: remove property wrapper CFG inconsistencies 2023-05-25 13:05:21 +02:00
Sim4n6
52dd247a81 Removed redundant cast 2023-05-25 11:55:13 +01:00
Paolo Tranquilli
7878bc3cc1 Swift: remove property wrapper AST inconsistencies 2023-05-25 12:15:22 +02:00
Paolo Tranquilli
5de8934525 Merge pull request #13277 from github/redsun82/swift-consistency-accept
Swift: add consistency check and accept results for the moment
2023-05-25 11:56:54 +02:00
Tony Torralba
a276cc3094 Convert all command injection sinks to MaD format 2023-05-25 11:41:32 +02:00
Paolo Tranquilli
f5070bb082 Merge pull request #13282 from github/redsun82/swift-change-note-check
Swift: turn change note check on
2023-05-25 11:23:10 +02:00
Paolo Tranquilli
d1be942f04 Swift: turn change note check on 2023-05-25 11:04:21 +02:00
Paolo Tranquilli
ac31209233 Swift: add change notes to consistency queries 2023-05-25 10:56:25 +02:00
Sim4n6
09c97ce0da Added one more example to the qhelp 2023-05-25 09:41:22 +01:00
Sim4n6
7d68f6afc9 added ActiveSupport::Multibyte::Chars normalize() sink 2023-05-25 09:21:55 +01:00
Paolo Tranquilli
8d656a996b Swift: add QLdoc to AST consistency checks 2023-05-25 09:56:39 +02:00
Tony Torralba
ca83b7c0f2 Merge pull request #13280 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-05-25 09:33:09 +02:00
Sim4n6
d772bb213a Added three more Unicode Normalization sinks 2023-05-25 03:10:00 +01:00
github-actions[bot]
5be4f6e58b Add changed framework coverage reports 2023-05-25 00:16:11 +00:00
Mathias Vorreiter Pedersen
ec192d621c C++: Whitespace commit to make qhelp show up in diff. 2023-05-24 16:13:42 -07:00
Mathias Vorreiter Pedersen
ebc1d5feff Merge branch 'main' into rdmarsh2/cpp/improve-constant-off-by-one 2023-05-24 16:07:08 -07:00
Mathias Vorreiter Pedersen
298013a57e C++: Add in-barrier on sources to reduce duplication. 2023-05-24 16:02:27 -07:00
Mathias Vorreiter Pedersen
64d7b4923d C++: Prune flow states based on 'PointerArithmeticToDerefConfig'. 2023-05-24 16:02:17 -07:00
Mathias Vorreiter Pedersen
f9a464605b Merge pull request #13226 from rdmarsh2/rdmarsh2/cpp/cobo-neq-refinement
C++: fix equality refinement in new range analysis
2023-05-24 15:19:02 -07:00
Mathias Vorreiter Pedersen
90824d01b4 C++: Add change note. 2023-05-24 14:39:05 -07:00
Robert Marsh
7404bd9c4b Merge branch 'main' into rdmarsh2/cpp/cobo-neq-refinement 2023-05-24 14:13:38 -04:00
Paolo Tranquilli
63fb0581c2 Swift: accept inconsistencies for now 2023-05-24 20:09:46 +02:00
Paolo Tranquilli
67a9141e8c Swift: make AST printer consistency query more helpful 2023-05-24 18:10:08 +02:00
Paolo Tranquilli
b9fe056d81 Swift: add qlpack.yml to consistency-queries 2023-05-24 18:10:08 +02:00
Paolo Tranquilli
85fdcd9912 Swift: move consistency queries 2023-05-24 18:10:08 +02:00
Paolo Tranquilli
e513af1bcf Swift: add CFG and PrintAst consistency queries, enabling them in CI 2023-05-24 18:10:08 +02:00
Mathias Vorreiter Pedersen
fca5fb6177 Merge pull request #13269 from jketema/inline-module
C++/Swift: Rewrite inline expectation tests to use the parameterized module
2023-05-24 08:10:42 -07:00
Mathias Vorreiter Pedersen
4496fd58ae Merge pull request #13271 from jketema/invalid-pointer-deref-fp-2
C++: Add `cpp/invalid-pointer-deref` FP test case
2023-05-24 08:05:58 -07:00
Maiky
40450a2792 typo 2023-05-24 17:02:48 +02:00
Kasper Svendsen
92b408fbc1 Merge pull request #13274 from kaspersv/kaspersv/late-inline-member-preds-doc
Docs: Late inlining now supported for member predicates
2023-05-24 16:19:42 +02:00
Kasper Svendsen
770e76a04d Docs: Late inlining now supported for member predicates 2023-05-24 14:02:58 +02:00
Jeroen Ketema
9a467f9d4e C++: Add cpp/invalid-pointer-deref FP test case 2023-05-24 13:52:19 +02:00
github-actions[bot]
d2e192020b Post-release preparation for codeql-cli-2.13.3 2023-05-24 11:26:12 +00:00
Jeroen Ketema
af378df712 C++: Add cpp/invalid-pointer-deref FP test case 2023-05-24 12:29:55 +02:00
Jeroen Ketema
3a3d9bc505 Swift: Rewrite inline expectation tests to use the parameterized module 2023-05-24 11:38:22 +02:00
Paolo Tranquilli
ff78ac98d2 Merge pull request #13249 from github/redsun82/swift-hidden-ast
Swift: make only certain elements hideable in the AST
2023-05-24 11:22:10 +02:00
Paolo Tranquilli
2fb6cdc19b Merge branch 'main' into alexdenisov+redsun82/tuple-mangling 2023-05-24 11:16:59 +02:00
Tom Hvitved
1788c54bd8 Python: Avoid calling TypeTracker::step in call graph construction 2023-05-24 11:11:54 +02:00
Tom Hvitved
13ada1e6ad Ruby: Remove canonical return nodes 2023-05-24 11:11:50 +02:00
Tom Hvitved
deee314370 Python/Ruby: Optimize join-order in TypeTracker::[small]step 2023-05-24 11:11:07 +02:00
Tom Hvitved
05f3934042 Merge pull request #13251 from hvitved/ruby/call-graph-self-param
Ruby: Include both `self` parameters and SSA definitions in call graph construction
2023-05-24 11:10:34 +02:00
Jeroen Ketema
2276890cec C++: Rewrite inline expectation tests to use the parameterized module 2023-05-24 11:10:05 +02:00
Asger F
818753e922 Merge pull request #13265 from asgerf/rb/delete-name-clash
Ruby: fix some name clashes between summarized callables
2023-05-24 11:08:56 +02:00
Erik Krogh Kristensen
796e71f8be Merge pull request #13176 from MaxSchlueter/fixquery12
Fix "Introducing the JavaScript libraries" query12.qll and add test case
2023-05-24 10:56:53 +02:00
Tony Torralba
7d0b02e267 Merge pull request #13248 from atorralba/atorralba/java/nio-files-copy-models-fix
Java: Tweak java.nio.file.Files.copy models
2023-05-24 10:55:15 +02:00
Jeroen Ketema
5dc3789df2 Merge pull request #13266 from MathiasVP/modernize-print-ir-local-flow
C++: Modernize `PrintIR` for local dataflow
2023-05-24 10:54:10 +02:00
Michael Nebel
95916450d8 Merge pull request #13085 from michaelnebel/csharp/dbsetsummaries
C#: Entity framework. Convert DbSet summaries to MaD models.
2023-05-24 10:45:40 +02:00
Tom Hvitved
b486a4d52c Merge pull request #13255 from hvitved/ruby/ssa-param-capture-input
Ruby: Include underlying SSA parameter definition in `localFlowSsaParamCaptureInput`
2023-05-24 10:40:54 +02:00
Asger F
8bd6f6c450 Ruby: change note 2023-05-24 10:22:22 +02:00
Asger F
6d1a4451fb Ruby: update a test expectation 2023-05-24 10:15:51 +02:00
Jeroen Ketema
eea972b205 Merge pull request #13261 from jketema/inline-legacy-classes
Add forgotten classes related to the legacy `InlineExpectationsTest`class
2023-05-24 10:13:19 +02:00
Asger F
5b7f69cf0a QL4QL: Fix a warning about repeating alert location 2023-05-24 09:55:09 +02:00
Maiky
27c1e47ece Update ruby/ql/lib/change-notes/2023-05-06-pg.md
Co-authored-by: Jorge <46056498+jorgectf@users.noreply.github.com>
2023-05-24 01:44:51 +02:00
Mathias Vorreiter Pedersen
e1223d0b21 C++: Add security severity. 2023-05-23 15:01:33 -07:00
Mathias Vorreiter Pedersen
0dfc9b996d C++: Promote 'cpp/overrun-write' out of experimental. 2023-05-23 14:57:42 -07:00
Robert Marsh
bad72c42c5 Merge pull request #13244 from MathiasVP/promote-product-flow
C++: Promote the product-dataflow library out of experimental
2023-05-23 16:23:59 -04:00
Robert Marsh
86ab9608cd C++: add test comments 2023-05-23 16:15:43 -04:00
Mathias Vorreiter Pedersen
8daa8d78ff Merge pull request #13246 from MathiasVP/fix-pointer-pointee-conflation-2
C++: Fix more pointer/pointee conflation
2023-05-23 12:03:29 -07:00
Maiky
8dca585207 Expected 2023-05-23 20:04:34 +02:00
Maiky
ad5355a04a Pg Library, change note and Frameworks.qll 2023-05-23 19:49:03 +02:00
Arthur Baars
e33f3a6668 Merge pull request #13154 from aibaars/sync-dbscheme-py
JS/Ruby/QL/Python: sync dbscheme fragments
2023-05-23 19:14:29 +02:00
Mathias Vorreiter Pedersen
4b92a2a3d0 C++: Fix Code Scanning error. 2023-05-23 10:13:19 -07:00
Mathias Vorreiter Pedersen
43459c16fd C++: Modernize the PrintIRStoreSteps (and rename it to PrintIRFieldFlowSteps) after the use-use flow changes. 2023-05-23 10:02:54 -07:00
Mathias Vorreiter Pedersen
8ee7694e7d C++: Modernize the PrintIRLocalFlow after the use-use flow changes. 2023-05-23 10:02:30 -07:00
Mathias Vorreiter Pedersen
0519ceeeaa C++/C#: Sync identical files. 2023-05-23 10:00:26 -07:00
Mathias Vorreiter Pedersen
ccc9e09dbd C++: Add mechanism to hide specific instructions and operands from PrintIR. 2023-05-23 10:00:09 -07:00
Mathias Vorreiter Pedersen
81dbfecbfc C++: Promote the product-dataflow library out of experimental. 2023-05-23 09:48:50 -07:00
Mathias Vorreiter Pedersen
6fca8dfd39 Merge pull request #13260 from jketema/test-config-sig
C++: Rewrite flow test common to use inline expectation test module
2023-05-23 09:38:43 -07:00
Sim4n6
90c174de4e Updated the .expected file accordingly 2023-05-23 17:36:50 +01:00
Philip Ginsbach
71a6e62c75 Merge pull request #13264 from github/ginsbach/MoveSignaturesSection
move section on signatures in the QL specification
2023-05-23 17:22:01 +01:00
Philip Ginsbach
1179f20d88 Merge pull request #13263 from github/ginsbach/DocumentAnnotationsForParameterised
update QL specification on annotations for parameterised modules
2023-05-23 17:20:26 +01:00
Asger F
e4e52e77f7 QL4QL: Add query to warn about name clashes between summarized callables 2023-05-23 18:01:31 +02:00
Jeroen Ketema
1be9463297 Add forgotten classes related to the legacy InlineExpectationsTest class 2023-05-23 17:39:01 +02:00
Asger F
0592c8ba99 Ruby: avoid name clash for "assoc" summary 2023-05-23 17:34:19 +02:00
Philip Ginsbach
3e7389e1f8 move section on signatures in the QL specification 2023-05-23 16:29:35 +01:00
Philip Ginsbach
f884473447 be more explicit about annotation caveats 2023-05-23 16:23:17 +01:00
Philip Ginsbach
10a02d6387 Signatures column for pragmas table 2023-05-23 16:23:17 +01:00
Philip Ginsbach
846dffb5ff Signatures column for simple annotations table 2023-05-23 16:23:16 +01:00
Philip Ginsbach
6f4b02ef14 add documentation for extensible annotation 2023-05-23 16:08:38 +01:00
Philip Ginsbach
89d246ba34 add documentation for additional annotation 2023-05-23 16:06:57 +01:00
Edward Minnix III
52340802bb Merge pull request #13097 from egregius313/egregius313/java/webgoat/ssrf-regex-fix
Java: Add constraint to `HostnameSanitizingPrefix` to prevent false negatives in SSRF queries
2023-05-23 10:50:43 -04:00
Asger F
50a7b21928 Ruby: fix a name clash for summaries called "delete" 2023-05-23 16:49:17 +02:00
Jeroen Ketema
aeb6293757 C++: Rewrite flow test common to use inline expectation test module
This also rewrites all uses of flow test common to use `DataFlow::ConfigSig`.

Note that the removed deprecated aliases are 14 months old by now and, hence,
can be safely removed.
2023-05-23 16:34:41 +02:00
Alex Ford
9ccfec0571 Ruby: move actiondispatch components to an internal subdirectory 2023-05-23 15:26:52 +01:00
Arthur Baars
7c5fef37eb Merge pull request #13257 from smowton/smowton/hotfix/useless-assignment-to-field-exclude-method-receivers
Hotfix: Go: exclude method receivers from dead-store-of-field query
2023-05-23 16:20:34 +02:00
Alex Ford
9f5c73cf63 Ruby: add a test case for instantiating ActionDispatch::Request directly 2023-05-23 15:18:32 +01:00
Alex Ford
1c9e4c0f0b Ruby: test for RequestInputAccess instances in ActionDispatch 2023-05-23 15:17:38 +01:00
Paolo Tranquilli
09ce29b79f Merge branch 'codeql-cli-2.13.3' into redsun82/swift-hidden-ast 2023-05-23 16:12:54 +02:00
Paolo Tranquilli
a14f7dd153 Merge pull request #13238 from github/redsun82/swift-remove-props-from-interpolated-strings
Swift: remove unneeded properties from `InterpolatedStringLiteralExpr`
2023-05-23 15:57:31 +02:00
Alex Ford
c2f5bacc47 Ruby: consider more calls to e.g. ActionDispatch::Request#params as remote input sources 2023-05-23 14:50:16 +01:00
Alex Ford
27729af088 Ruby: move ActionDispatch::Request logic out of ActionController.qll 2023-05-23 14:49:57 +01:00
Alex Ford
9b4914c3f6 Ruby: split ActionDispatch modelling into multiple component files 2023-05-23 14:48:45 +01:00
Paolo Tranquilli
fce33d369b Merge branch 'codeql-cli-2.13.3' into redsun82/swift-hidden-ast 2023-05-23 15:31:29 +02:00
Chris Smowton
99c211955b Hotfix: Go: exclude method receivers from dead-store-of-field query 2023-05-23 14:31:25 +01:00
Geoffrey White
b2a958f8d3 Merge pull request #13163 from geoffw0/cleartextlogging
Swift: Make the cleartext logging query consistent with other cleartext-* queries.
2023-05-23 14:14:56 +01:00
Jeroen Ketema
ee36d32ef0 Merge pull request #12789 from jketema/inline
Turn inline expectation test into a parameterized module
2023-05-23 14:58:48 +02:00
Paolo Tranquilli
86eecea5f6 Merge branch 'codeql-cli-2.13.3' into cleartextlogging 2023-05-23 14:44:36 +02:00
Paolo Tranquilli
aca85d76ee Merge branch 'codeql-cli-2.13.3' into redsun82/swift-remove-props-from-interpolated-strings 2023-05-23 14:42:00 +02:00
Paolo Tranquilli
f964d196dc Merge pull request #13213 from geoffw0/hideenumcasedecl
Swift: Add EnumDecl.getEnumElement(_)
2023-05-23 14:37:02 +02:00
Tom Hvitved
eaa84cb819 Ruby: Include underlying SSA parameter definition in localFlowSsaParamCaptureInput 2023-05-23 13:56:29 +02:00
Tony Torralba
6f012d51c0 Merge pull request #13091 from atorralba/atorralba/java/inputstreamwrapper-transitive
Java: Make inputStreamWrapper consider supertypes transitively
2023-05-23 13:28:17 +02:00
Michael Nebel
8cef798a6f Merge pull request #13202 from michaelnebel/csharp/systemdatetimedefaults
C#: System.DateTime defaults.
2023-05-23 13:11:20 +02:00
Chris Smowton
8b28848c82 Merge pull request #13250 from smowton/smowton/hotfix/golang-field-store-varargs-function
Hotfix: Go: count passing to a vararg function as escaping
2023-05-23 12:03:48 +01:00
Paolo Tranquilli
67d4788dc5 Merge branch 'codeql-cli-2.13.3' into hideenumcasedecl 2023-05-23 12:53:07 +02:00
Paolo Tranquilli
7aac538480 Merge branch 'codeql-cli-2.13.3' into redsun82/swift-remove-props-from-interpolated-strings 2023-05-23 12:47:17 +02:00
Paolo Tranquilli
b4edc92079 Swift: make hideability spread upward in the hierarchy 2023-05-23 12:45:18 +02:00
Paolo Tranquilli
b19194bd06 Swift: make only Expr, Pattern and Type hideable 2023-05-23 12:45:18 +02:00
Paolo Tranquilli
a087fef335 Swift: implement @ql.hideable 2023-05-23 12:45:18 +02:00
Paolo Tranquilli
7dd18ff801 Swift: add @ql.hideable to schema loading 2023-05-23 12:45:18 +02:00
Arthur Baars
89985e2cb7 Merge pull request #13252 from github/redsun82/swift-workflow
Swift: trigger workflow on `codeql-cli-*`
2023-05-23 12:43:44 +02:00
Paolo Tranquilli
0574f2784f Swift: trigger workflow on codeql-cli-* 2023-05-23 12:32:28 +02:00
Jeroen Ketema
3efc78ed49 Add default for hasOptionalResult 2023-05-23 12:32:11 +02:00
Arthur Baars
674c31d54d Merge pull request #13243 from github/release-prep/2.13.3
Release preparation for version 2.13.3
2023-05-23 12:31:51 +02:00
Jeroen Ketema
adbf66a365 C++: Rewrite inline expectation test to demonstrate MergeTests 2023-05-23 12:29:06 +02:00
Jeroen Ketema
04beeef777 Add convenience module that merges two inline expectation tests 2023-05-23 12:29:06 +02:00
Jeroen Ketema
9228e0deed C++: Rewrite local flow test to use TestSig 2023-05-23 12:29:06 +02:00
Jeroen Ketema
b96bfea590 Turn inline expectation test into a parameterized module 2023-05-23 12:29:06 +02:00
Tom Hvitved
349de77474 Ruby: Include both self parameters and SSA definitions in call graph construction 2023-05-23 12:28:06 +02:00
Rasmus Wriedt Larsen
5c77edecf7 Merge pull request #12991 from Sim4n6/python-UBV
[Python] Add Unicode Bypass Validation query tests and help
2023-05-23 12:21:55 +02:00
Paolo Tranquilli
6059d8c007 Merge branch 'codeql-cli-2.13.3' into hideenumcasedecl 2023-05-23 12:19:57 +02:00
Michael Nebel
d28316d397 C#: Update the flow summaries expected test output. 2023-05-23 12:07:08 +02:00
Michael Nebel
2b8bbfe888 C#: Add the EntityFramework stub to the general flow summaries test. 2023-05-23 12:05:23 +02:00
Michael Nebel
dea8f576ad C#: Update the EntityFramework stubs to align with the real implementation. 2023-05-23 12:04:50 +02:00
Michael Nebel
97a0e44d43 C#: Update the DbSet models to target the actual Microsoft implementation instead of the stub. 2023-05-23 12:04:08 +02:00
Max Schlueter
40aa9417d0 Fix query12 and add test case 2023-05-23 11:52:51 +02:00
Chris Smowton
d5d56cde5a Dead store of field: count passing to a vararg function as escaping 2023-05-23 10:51:21 +01:00
Tony Torralba
5c5f910130 Add change note 2023-05-23 10:31:28 +02:00
Tony Torralba
654bb00946 Java: Tweak java.nio.files.Files.copy models 2023-05-23 10:27:19 +02:00
erik-krogh
f7419c9250 add expected output 2023-05-23 09:56:06 +02:00
erik-krogh
c7e21ee9ae add really long regex as a test-case 2023-05-23 09:56:06 +02:00
erik-krogh
f85b3e13c2 update expected output 2023-05-23 09:56:06 +02:00
erik-krogh
efa53d21fa rename succ to pumpEnd 2023-05-23 09:56:06 +02:00
erik-krogh
36147e7afc revert the better super-linear algorith, 2023-05-23 09:56:06 +02:00
Michael Nebel
b4481f25a9 C#: Re-write some of the summaries to use .WithElement. 2023-05-23 09:46:18 +02:00
Michael Nebel
455e3e569c C#: Update expected test output (the summaries are no longer added via EFSummariedCallable). 2023-05-23 09:46:18 +02:00
Michael Nebel
7a9820cc1b C#: Convert Entity Framework summaries for DbSet into MaD models. 2023-05-23 09:46:18 +02:00
Tony Torralba
0ff90df497 Merge pull request #13245 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-05-23 09:38:01 +02:00
Erik Krogh Kristensen
50cb5ea184 Merge pull request #13164 from erik-krogh/polyQhelp
ReDoS: add another example to the qhelp in poly-redos, showing how to just limit the length of the input
2023-05-23 09:25:15 +02:00
Erik Krogh Kristensen
e658177c31 Merge pull request #12975 from tyage/support-sub-modules
JS: Support sub modules
2023-05-23 09:24:43 +02:00
Paolo Tranquilli
c9c1f08de7 Swift: mark downgrade as backwards compatible 2023-05-23 08:36:49 +02:00
Erik Krogh Kristensen
4540ac88ad Merge pull request #13247 from github/dependabot/cargo/ql/regex-1.8.2
Bump regex from 1.8.1 to 1.8.2 in /ql
2023-05-23 08:19:18 +02:00
dependabot[bot]
3a39e8badf Bump regex from 1.8.1 to 1.8.2 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.8.1...1.8.2)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-23 04:14:09 +00:00
Mathias Vorreiter Pedersen
b32d55a21d C++: Accept test changes. 2023-05-22 18:26:29 -07:00
Mathias Vorreiter Pedersen
36285ba2c5 C++: Fix pointer/pointee conflation. 2023-05-22 17:39:43 -07:00
github-actions[bot]
abcece88f5 Add changed framework coverage reports 2023-05-23 00:16:20 +00:00
github-actions[bot]
7aa23cf11d Release preparation for version 2.13.3 2023-05-22 20:47:00 +00:00
Ed Minnix
2d69f81d85 Add change note 2023-05-22 15:57:15 -04:00
Ed Minnix
43966ebaeb Change regex used in HostnameSanitizingPrefix 2023-05-22 15:57:15 -04:00
Ed Minnix
774baead60 Add test case based on missing result 2023-05-22 15:57:15 -04:00
Erik Krogh Kristensen
653cd86c13 update qldoc 2023-05-22 20:48:21 +02:00
Jeroen Ketema
a319fc0044 Merge pull request #13234 from jketema/std-inline
C++: Include inline namespaces in `StdNamespace`
2023-05-22 19:56:15 +02:00
Arthur Baars
bec2b7fef9 QL/Ruby: update dbscheme stats 2023-05-22 19:37:58 +02:00
Arthur Baars
e6d29af5a4 sync-dbscheme-fragments: add files argument 2023-05-22 19:37:58 +02:00
Arthur Baars
2416568489 Tree-sitter-xtractor: fix clippy warnings 2023-05-22 19:37:58 +02:00
Arthur Baars
5e279f2898 Python: add upgrade/downgrade scripts 2023-05-22 19:37:58 +02:00
Arthur Baars
ef3005ea9e Python: sync shared dbscheme fragments 2023-05-22 19:37:58 +02:00
Arthur Baars
294cc930e6 Ruby: add upgrade/downgrade scripts 2023-05-22 19:37:51 +02:00
Arthur Baars
d2bc66e393 QL: switch to shared YAML extractor 2023-05-22 19:28:59 +02:00
Arthur Baars
6d7e95a142 QL/Ruby: included shared extractor code in cache key 2023-05-22 19:28:59 +02:00
Arthur Baars
7978c65467 JS: add upgrade/downgrade scripts 2023-05-22 19:28:59 +02:00
Arthur Baars
9f83dd5c7a Tree-sitter extractor: extract shared dbscheme fragments into 'prefix.dbscheme' 2023-05-22 19:28:51 +02:00
Robert Marsh
681cc4c755 C++: add neq refinement test for range analysis 2023-05-22 11:49:37 -04:00
Geoffrey White
3bcaff6059 Swift: re-run codegen. 2023-05-22 16:37:03 +01:00
Geoffrey White
830686218f Merge branch 'main' into hideenumcasedecl 2023-05-22 16:35:28 +01:00
Robert Marsh
6a997aba3b C++: fix equality refinement in new range analysis 2023-05-22 11:11:51 -04:00
Robert Marsh
4ed7450689 C++: remove unneeded pragma 2023-05-22 11:09:44 -04:00
Tom Hvitved
97b0012a5e Merge pull request #13233 from hvitved/ruby/type-tracking-summary-ret-node
Ruby: Allow for flow out of callbacks passed to summarized methods in type tracking
2023-05-22 16:05:18 +02:00
Jeroen Ketema
f31ab3a7e7 C++: Add change note 2023-05-22 16:00:12 +02:00
Robert Marsh
604affdeb0 C++: autoformat 2023-05-22 09:31:39 -04:00
Paolo Tranquilli
9a0f87434e Swift: remove unneeded properties from InterpolatedStringLiteralExpr
These properties were unused in the QL library (hence the full
upgrade/downgrade compatibility).
2023-05-22 15:28:54 +02:00
Mathias Vorreiter Pedersen
e3a5805916 Merge pull request #13237 from jketema/pointer-deref-fp
C++: Add `cpp/invalid-pointer-deref` false positives
2023-05-22 14:27:14 +01:00
Philip Ginsbach
cff4317cb1 Merge pull request #13236 from github/ginsbach/IdentifierSpecification
repair and update the Identifier section of the QL specification
2023-05-22 14:26:46 +01:00
Jeroen Ketema
ec265c6bb2 Merge pull request #13229 from MathiasVP/add-fp-testcase
C++: Add FP testcase for `cpp/overrun-write`
2023-05-22 15:26:13 +02:00
Tony Torralba
183915410d Add change note 2023-05-22 15:01:25 +02:00
Paolo Tranquilli
f56ffbc25e Merge pull request #13232 from github/redsun82/swift-hidden-ast
Swift: fix hidden AST getters
2023-05-22 14:47:11 +02:00
Jeroen Ketema
3f289b1c99 C++: Add cpp/invalid-pointer-deref false positives 2023-05-22 14:34:59 +02:00
Michael Nebel
2c37cb7ac5 C#: Add more default parameter test-cases. 2023-05-22 14:24:46 +02:00
Sim4n6
e300816b72 Merge branch 'python-UBV' of https://github.com/sim4n6/codeql-pun into python-UBV 2023-05-22 13:18:40 +01:00
Michael Nebel
6cb2ce5a38 C#: Update tests to exclude autogenerated parameterizables in attributes as these appears to give OS dependent results. 2023-05-22 14:16:37 +02:00
Michael Nebel
5a57d47b6c C#: Add more testcases, a new test, update the compiled test code and updated expected results. 2023-05-22 14:16:37 +02:00
Michael Nebel
2ca543e217 C#: Synthetic DateTime object creation for DateTime defaults via attributes. 2023-05-22 14:16:37 +02:00
Philip Ginsbach
35114d5ac4 introduce parameterName rule 2023-05-22 11:48:13 +01:00
Philip Ginsbach
42e81015d0 mention signatureExpr in section on use of identifier rules 2023-05-22 11:48:13 +01:00
Philip Ginsbach
d98fcdd6aa do not use upperId directly in type signature rules 2023-05-22 11:48:13 +01:00
Philip Ginsbach
b707815370 do not use simpleId directly in module expression rules 2023-05-22 11:48:06 +01:00
Philip Ginsbach
7ace4cd43e add rule for module signature names (differing from module names) 2023-05-22 11:44:59 +01:00
Tom Hvitved
20efe81f10 Update ruby/ql/lib/codeql/ruby/typetracking/TypeTrackerSpecific.qll
Co-authored-by: Asger F <asgerf@github.com>
2023-05-22 12:43:05 +02:00
Philip Ginsbach
d4ab1c9643 such identifiers do not actually exist in QL 2023-05-22 11:22:47 +01:00
Rasmus Wriedt Larsen
c1b90c8f05 Python: Apply suggested change 2023-05-22 11:58:32 +02:00
Rasmus Wriedt Larsen
a057365b7e Python: Accept .expected changes 2023-05-22 11:54:50 +02:00
Erik Krogh Kristensen
3647b9cfeb Merge pull request #13196 from erik-krogh/indirectCommand
JS: require arguments to be shell interpreted to be flagged by indirect-command-injection
2023-05-22 11:53:57 +02:00
Rasmus Wriedt Larsen
44d806507d Merge branch 'main' into python-UBV 2023-05-22 11:53:56 +02:00
Jeroen Ketema
f46183d0ba C++: Include inline namespaces in StdNamespace 2023-05-22 11:41:49 +02:00
Tom Hvitved
33be52f0b7 Ruby: Allow for flow out of callbacks passed to summarized methods in type tracking 2023-05-22 11:01:08 +02:00
Paolo Tranquilli
20893bdef5 Swift: accept test changes after hidden AST fix 2023-05-22 10:14:29 +02:00
erik-krogh
708a99528f initial implementation of TS 5.1 2023-05-22 10:11:32 +02:00
Tony Torralba
05c30e8fac Merge pull request #13230 from atorralba/atorralba/java/groove-template-engine-sink
Java: Add TemplateEngine.createTemplate as a Groovy injection sink
2023-05-22 10:04:29 +02:00
Paolo Tranquilli
de03bdc235 Swift: fix hidden AST getters
For consistency with the C/C++ QL library, getters of AST elements
within the hidden AST should not themselves skip other hidden AST
elements.
2023-05-22 09:57:48 +02:00
Tom Hvitved
224a2c3d91 Merge pull request #13231 from hvitved/ruby/type-tracker-missing-callback-flow-out
Ruby: Allow for flow through callbacks to summarized methods in type tracking
2023-05-22 09:38:59 +02:00
erik-krogh
710b309142 apply suggestions from doc review 2023-05-21 22:18:48 +02:00
erik-krogh
10bf17c33e Merge branch 'main' into polyQhelp 2023-05-21 22:17:06 +02:00
Tom Hvitved
128168a7e7 Ruby: Allow for flow through callbacks to summarized methods in type tracking 2023-05-21 20:51:45 +02:00
Sim4n6
97e8e0bd8e Add String Manipulation Method Calls & CGI.escapeHTML() support 2023-05-21 11:52:29 +01:00
Sim4n6
f7f0564e36 added one more test 2023-05-20 18:00:27 +01:00
Sim4n6
0a0a6dde40 Replaced CGI.escapeHTML() with the html_escape() 2023-05-20 17:59:39 +01:00
Sim4n6
ad754f1385 use of all normalization forms without the ":" prefix 2023-05-20 17:59:08 +01:00
Sim4n6
f5ff50880c Updated qhelp for the use of html_escape() 2023-05-20 17:58:24 +01:00
Sim4n6
cc3cc1faef Merge branch 'ruby-UBV' of https://github.com/sim4n6/codeql-pun into ruby-UBV 2023-05-20 12:59:50 +01:00
Sim4n6
d11cb9195c Use of CGI.escapeHTML() in test samples 2023-05-20 12:57:50 +01:00
Sim4n6
e345d7dca4 Update ruby/ql/src/experimental/cwe-176/examples/unicode_normalization.rb
Co-authored-by: Arthur Baars <aibaars@github.com>
2023-05-20 12:54:03 +01:00
Sim4n6
7cd1fd4bbf CWE-179 and CWE-180 are included in metadata 2023-05-20 12:51:45 +01:00
Sim4n6
957023ec44 nfd and nfkd are considered 2023-05-20 12:51:24 +01:00
Sim4n6
c9c7179a0b Deleted the ugly flowchart. 2023-05-20 12:49:46 +01:00
Sim4n6
c3c65ca712 Qhelp formatting 2023-05-20 12:48:26 +01:00
Sim4n6
8dcf139b45 Update ruby/ql/src/experimental/cwe-176/UnicodeBypassValidation.qhelp
Co-authored-by: Arthur Baars <aibaars@github.com>
2023-05-20 12:46:54 +01:00
Sim4n6
eb7e1de65b Update ruby/ql/lib/codeql/ruby/experimental/UnicodeBypassValidationQuery.qll
Co-authored-by: Arthur Baars <aibaars@github.com>
2023-05-20 12:43:05 +01:00
Sim4n6
69ca49f168 Deleted the UBV query change note. 2023-05-20 12:39:54 +01:00
Sim4n6
be3f59afab Replaced StringMethod() with a restrained String method calls 2023-05-20 12:17:33 +01:00
Sim4n6
d939f192d5 Deleted the UBV query change note. 2023-05-20 11:46:18 +01:00
Sim4n6
21e99d52c7 Fix a redundant import 2023-05-20 10:23:04 +01:00
Sim4n6
b8969707c5 Delete the vulnerability flow image from the QHelp file. 2023-05-20 10:21:38 +01:00
Sim4n6
16ce024429 Update python/ql/src/experimental/Security/CWE-176/UnicodeBypassValidation.qhelp
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-05-20 10:13:23 +01:00
Sim4n6
8462b14b54 Update python/ql/src/experimental/Security/CWE-176/UnicodeBypassValidation.qhelp
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-05-20 10:12:55 +01:00
Sim4n6
2a8645c447 Fix 'Singleton set literal' warning 2023-05-20 10:11:26 +01:00
Sim4n6
58be109a70 Moved UnicodeBypassValidation Customizations & Query.qll to src/experimental 2023-05-20 10:08:56 +01:00
Robert Marsh
bf07b0f97b C++: fix cxartesian product in constant off-by-one query 2023-05-19 18:32:09 -04:00
Geoffrey White
b6122d01fc Swift: Clean up the query somewhat. 2023-05-19 22:40:53 +01:00
Geoffrey White
2028b5ef95 Swift: Fix imprecise sinks. 2023-05-19 22:23:26 +01:00
Geoffrey White
19080333b9 Swift: Add a few test cases. 2023-05-19 22:18:34 +01:00
Mathias Vorreiter Pedersen
58f4b7696d Merge pull request #13223 from geoffw0/useasnominaltypedecl
Swift: Use asNominalTypeDecl more.
2023-05-19 16:53:28 +01:00
Tony Torralba
b58eb3a92c Java: Add TemplateEngine.createTemplate as a groovy injection sink 2023-05-19 17:45:47 +02:00
Mathias Vorreiter Pedersen
c15ebf83ee C++: Add testcase with FP (and also fix an incorrect test annotation). 2023-05-19 16:38:18 +01:00
Philip Ginsbach
999e7f96c7 Merge pull request #13222 from github/ginsbach/SignatureSyntax
add syntax for signature definitions to QL specification
2023-05-19 16:22:45 +01:00
Geoffrey White
881134a6f5 Swift: Add warning note to Decl.getMember. 2023-05-19 16:12:09 +01:00
Alexandre Boulgakov
f943502e41 Merge pull request #13224 from github/sashabu/tsp-empty-help-links
Swift: Drop support for plaintext diagnostics (and `helpLinks`).
2023-05-19 15:44:44 +01:00
Alexandre Boulgakov
b3e76d6052 Swift: Drop support for plaintext diagnostics (and helpLinks).
The recommended option is Markdown diagnostics, and we have already migrated everything to emit them. The empty help link we're currently emitting everywhere is a bug.
2023-05-19 15:16:02 +01:00
Alexandre Boulgakov
a1beaa6300 Merge pull request #13186 from github/redsun82/swift-diagnostics-wording
Swift: reword TSP diagnostics after doc team review
2023-05-19 15:15:46 +01:00
Geoffrey White
5ffde7a762 Update swift/ql/lib/codeql/swift/elements/decl/EnumDecl.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-05-19 14:55:39 +01:00
Alexandre Boulgakov
110b766770 Swift: Add a . to a test message to match the logging API change in this PR. 2023-05-19 14:46:12 +01:00
Philip Ginsbach
6957857773 add syntax for signature declarations to QL specification 2023-05-19 14:44:29 +01:00
Alexandre Boulgakov
1e9b849e93 Merge branch 'main' into redsun82/swift-diagnostics-wording 2023-05-19 14:43:01 +01:00
Alexandre Boulgakov
8f7279ee05 Swift: TSP message wording changes. 2023-05-19 14:39:57 +01:00
Alexandre Boulgakov
5bb2eb4155 Swift: TSP message wording changes.
Co-authored-by: Isaac Brown <101839405+isaacmbrown@users.noreply.github.com>
2023-05-19 14:37:18 +01:00
Alexandre Boulgakov
137b4a99ef Swift: TSP message wording changes.
Co-authored-by: Isaac Brown <101839405+isaacmbrown@users.noreply.github.com>
2023-05-19 14:36:24 +01:00
Alexandre Boulgakov
ddcac20a94 Swift: TSP message wording changes.
Co-authored-by: Isaac Brown <101839405+isaacmbrown@users.noreply.github.com>
2023-05-19 14:36:14 +01:00
Alexandre Boulgakov
8a15af5614 Swift: TSP message wording changes.
Co-authored-by: Isaac Brown <101839405+isaacmbrown@users.noreply.github.com>
2023-05-19 14:36:04 +01:00
Geoffrey White
68bdd51dd3 Swift: Add QLDoc encouraging this pattern. 2023-05-19 14:35:08 +01:00
Geoffrey White
0d8aa825d9 Swift: Use asNominalType() more widely to include things declared in extensions. 2023-05-19 14:19:32 +01:00
Geoffrey White
ccbd041875 Swift: Use asNominalTypeDecl() to simplify models. 2023-05-19 14:04:49 +01:00
Mathias Vorreiter Pedersen
2206216dbb Merge pull request #13221 from geoffw0/filepath
Swift: Taint model for FilePath
2023-05-19 14:01:22 +01:00
Geoffrey White
c8dfc87dae Swift: getName -> getFullName. 2023-05-19 12:18:17 +01:00
Geoffrey White
13755ad5f5 Swift: Remove placeholder lines I had left in. 2023-05-19 11:42:00 +01:00
Tony Torralba
babf429c9a Merge pull request #13220 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-05-19 08:57:15 +02:00
github-actions[bot]
66f2579437 Add changed framework coverage reports 2023-05-19 00:15:25 +00:00
Geoffrey White
6dfad79972 Swift: Model FilePath. 2023-05-18 18:56:08 +01:00
Geoffrey White
371bcc55fa Swift: Consolidate and extend tests of taint flow through FilePath. 2023-05-18 18:01:38 +01:00
Alexandre Boulgakov
fa52c32564 Merge pull request #13170 from github/sashabu/internal-error-tsp
Swift: Emit diagnostics on assertion/expectation violations.
2023-05-18 17:19:43 +01:00
Mathias Vorreiter Pedersen
e0263a719e Merge pull request #13218 from MathiasVP/c18-to-c17
C++: Replace `C18` with `C17` in documentation
2023-05-18 16:42:15 +01:00
Mathias Vorreiter Pedersen
70b08a093c C++: Replace 'C18' with 'C17'. 2023-05-18 15:55:21 +01:00
Mathias Vorreiter Pedersen
8f7bb8b11f Merge pull request #13217 from MathiasVP/cleanup-overrun-write-product-flow
C++: Small cleanup of `cpp/overrun-write`
2023-05-18 13:59:44 +01:00
Tony Torralba
a8afa4785e Merge pull request #13140 from atorralba/atorralba/java/spring-jdbc-namedparam-models
Java: Add SQLi sinks for Spring JDBC
2023-05-18 14:49:28 +02:00
Mathias Vorreiter Pedersen
a77c62473e C++: Reduce code-duplication in 'cpp/overrun-write'. 2023-05-18 13:23:15 +01:00
Mathias Vorreiter Pedersen
8cf25ba421 Merge pull request #13191 from MathiasVP/fix-pointer-pointee-conflation
C++: Fix pointer/pointee conflation
2023-05-18 13:09:10 +01:00
Alvaro Muñoz
bf3fb09dfd Apply suggestions from code review
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-05-18 12:39:41 +02:00
Mathias Vorreiter Pedersen
2e734755fb Merge pull request #13215 from MathiasVP/update-qldoc-on-typemention
C++: Update documentation for `TypeMention`
2023-05-18 10:24:13 +01:00
Jeroen Ketema
34fdeb4e6b Merge pull request #13203 from jketema/deref-size
C++: Use range analysis-based `hasSize` predicate in `cpp/invalid-pointer-deref`
2023-05-18 11:03:09 +02:00
Geoffrey White
d26a86185f Swift: Codegen. 2023-05-18 09:43:13 +01:00
Geoffrey White
f0ce5b09c6 Swift: Address QL-for-QL warning. 2023-05-18 09:43:07 +01:00
Mathias Vorreiter Pedersen
a475efbe39 Update cpp/ql/lib/semmle/code/cpp/Type.qll 2023-05-18 09:37:20 +01:00
Mathias Vorreiter Pedersen
f3b6b470f4 C++: Update documentation for 'TypeMention'. 2023-05-18 09:32:31 +01:00
Tony Torralba
2c54996499 Apply @jcogs33's suggestions from code review 2023-05-18 08:51:19 +02:00
Nicky Mouha
27519ce3ea Create IfStatementAdditionOverflow.qhelp 2023-05-17 15:27:19 -04:00
Nicky Mouha
187299fcaf Update test.cpp 2023-05-17 15:20:54 -04:00
Nicky Mouha
ef57861789 Update IfStatementAdditionOverflow.expected 2023-05-17 15:19:52 -04:00
Nicky Mouha
5c6fc2ff01 Update IfStatementAdditionOverflow.ql 2023-05-17 15:18:52 -04:00
Geoffrey White
3539e55bb2 Swift: Autoformat. 2023-05-17 19:21:41 +01:00
Geoffrey White
6c35bbf5c2 Swift: Simplify / focus the test. 2023-05-17 19:15:27 +01:00
Geoffrey White
95caaecd71 Swift: Add EnumDecl.getEnumElement(_). 2023-05-17 19:05:27 +01:00
Geoffrey White
66b13e2294 Swift: Add a test of enum decls. 2023-05-17 19:01:57 +01:00
Tony Torralba
1b06bf132c Merge pull request #12932 from atorralba/atorralba/java/promote-xxe-experimental-sinks
Java: Promote experimental XXE sinks
2023-05-17 17:39:31 +02:00
Óscar San José
cc36e3c809 Merge pull request #13192 from github/post-release-prep/codeql-cli-2.13.2-fix-release-notes-check
Change regexp to include released change-notes pattern in check-change-note CI check
2023-05-17 17:28:59 +02:00
Jeroen Ketema
d1efffe492 Merge branch 'main' into deref-size 2023-05-17 17:13:49 +02:00
Jeroen Ketema
e3aecd3f1f Merge pull request #13200 from jketema/deref-subpath
C++: Implement the `subpaths` query predicate for `cpp/invalid-pointer-deref`
2023-05-17 17:13:28 +02:00
Óscar San José
f72afd0727 fixing typo 2023-05-17 17:08:37 +02:00
Jami Cogswell
be84fc2eac C#: add change note 2023-05-17 10:52:16 -04:00
Mathias Vorreiter Pedersen
9e05569121 C++/C#: Sync identical files. 2023-05-17 15:42:44 +01:00
Mathias Vorreiter Pedersen
57cc316ecd C++: Fix bug for single-instruction basic blocks. 2023-05-17 15:42:38 +01:00
Alvaro Muñoz
b235b1cbb9 improve yaml models 2023-05-17 16:40:28 +02:00
Alvaro Muñoz
7baf244ac6 remove test predicate 2023-05-17 16:18:46 +02:00
Alvaro Muñoz
8cd85a5676 add flow support for unmarshaled object fields 2023-05-17 16:16:30 +02:00
Michael Nebel
5a1c001f07 Merge pull request #13204 from michaelnebel/csharp/madextensionmethodtest
C#: Add extension method testcase for Models as Data.
2023-05-17 16:14:13 +02:00
Mathias Vorreiter Pedersen
f1530aa4b4 Merge pull request #12977 from RasmusWL/accept-expected-changes-from-ci-script
Misc: Add script to accept `.expected` changes from CI
2023-05-17 14:55:23 +01:00
yoff
1c6d643b53 Merge pull request #13146 from yoff/python/container-summaries-1
Python: Container summaries, part 1
2023-05-17 15:45:37 +02:00
Erik Krogh Kristensen
239234c5d2 fix bad change-note
Co-authored-by: Asger F <asgerf@github.com>
2023-05-17 14:47:32 +02:00
Óscar San José
baddfc4357 Suggestion from CR 2023-05-17 14:47:28 +02:00
Mathias Vorreiter Pedersen
771abf4f97 C++/C#: Sync identical files. 2023-05-17 13:47:01 +01:00
Mathias Vorreiter Pedersen
3b2c3f6f40 C++: Use an 'EquivalenceRelation' instead of the 'shortestDistances' HOP in 'getInstruction'. This reduces the memory pressure when generating the CFG for Wireshark. 2023-05-17 13:46:51 +01:00
Mathias Vorreiter Pedersen
06d5a7f0ef Merge pull request #13139 from MathiasVP/faster-product-flow
C++: Speedup product dataflow
2023-05-17 13:40:39 +01:00
Asger F
13a989b390 Merge pull request #13194 from asgerf/js/remove-mention-of-tracked-node
JS: remove mention of TrackedNode from docs
2023-05-17 13:44:07 +02:00
Charis Kyriakou
0f93f3a5ad Remove GITHUB_TOKEN permissions note since it's no longer required 2023-05-17 12:34:47 +01:00
Michael Nebel
c2ec1b0a81 C#: Add extension method testcase for Models as Data. 2023-05-17 13:11:32 +02:00
AlexDenisov
6a8855e1e5 Merge pull request #13201 from github/alexdenisov/make-swift-versions-more-reasonable
Swift: bump all versions to 0.1.0
2023-05-17 11:43:14 +01:00
Jeroen Ketema
8ad11595cb Merge pull request #13199 from jketema/private-prod-flow
C++: Add forgotten `private` specifiers in product flow
2023-05-17 12:33:26 +02:00
Jeroen Ketema
e143002ae5 Merge pull request #13197 from jketema/test-annotation
C++: Add forgotten test annotation for `cpp/invalid-pointer-deref` test
2023-05-17 12:32:58 +02:00
Stephan Brandauer
7c02a9b6ea Merge pull request #13185 from github/fix-automodel-extraction-parameterName
Java: Automodel Extraction Parameter Name Fix
2023-05-17 12:16:44 +02:00
Jeroen Ketema
014eb255bb C++: Update expected test results 2023-05-17 12:09:22 +02:00
erik-krogh
5a82454710 add change-note 2023-05-17 12:02:21 +02:00
Jeroen Ketema
b83aaf9594 C++: Use range analysis-based hasSize predicate in cpp/invalid-pointer-deref
This is copied from `cpp/overrun-write`.
2023-05-17 11:39:41 +02:00
Alex Denisov
7e15386376 Swift: bump all versions to 0.1.0 2023-05-17 11:28:28 +02:00
Jeroen Ketema
31ae513f8c C++: Implement the subpaths query predicate for cpp/invalid-pointer-deref 2023-05-17 11:27:37 +02:00
Jeroen Ketema
883ec7a0e9 C++: Add forgotten private specifiers in product flow 2023-05-17 11:24:46 +02:00
Jeroen Ketema
b1c1513a10 C++: Add forgotten test annotation in for cpp/invalid-pointer-deref test 2023-05-17 11:21:09 +02:00
erik-krogh
cbd7601a41 implement isShellInterpreted on ExecActionsCall 2023-05-17 11:07:48 +02:00
erik-krogh
3293a55e8f require arguments to be shell interpreted to be flagged by indirect-command-injection 2023-05-17 11:07:45 +02:00
Tom Hvitved
b46983a381 Merge pull request #13068 from hvitved/ruby/type-tracking-flow-through
Ruby: Include `self` parameters in type tracking flow-through logic
2023-05-17 10:59:01 +02:00
Asger F
9ec6c7daea JS: Avoid using global vars in documentation examples 2023-05-17 10:47:25 +02:00
Asger F
f47acfb083 JS: Trim whitespace 2023-05-17 10:37:19 +02:00
Stephan Brandauer
a5ef738bb0 add extra parameters in query-messages 2023-05-17 08:37:18 +00:00
Asger F
f94fdc6348 JS: Remove mention of TrackedNode in docs 2023-05-17 10:37:12 +02:00
erik-krogh
480e71fd69 avoid contractions 2023-05-17 08:42:45 +02:00
Tom Hvitved
867bdcf74d Merge pull request #13183 from hvitved/csharp/ilogger-extension-methods
C#: Include arguments to `ILogger` extension method calls in `LogMessageSink`
2023-05-17 08:20:57 +02:00
Óscar San José
c599460a52 Change regexp to include released change-notes pattern 2023-05-16 21:53:09 +02:00
Jami Cogswell
003bb2f6f5 JS: add change note 2023-05-16 15:45:55 -04:00
Jami Cogswell
359f6ffd1e JS: update 'credentials[%]' sink kind to 'credentials-%' 2023-05-16 15:45:55 -04:00
Jami Cogswell
7880e9e92c JS: update 'command-line-injection' sink kind to 'command-injection' 2023-05-16 15:45:55 -04:00
Jeroen Ketema
2dcdc71e45 Merge pull request #13142 from MathiasVP/precompute-states-in-overrun-write
C++: Restrict flow-state space of `cpp/overrun-write`
2023-05-16 21:31:56 +02:00
Alexandre Boulgakov
060a48571a Swift: Emit diagnostics on assertion/expectation violations. 2023-05-16 19:40:00 +01:00
Michael B. Gale
f5b04ab859 Merge pull request #13187 from github/mbg/java/fix-java-version-too-old-more
Java: Use empty toolchains.xml for the `java-version-too-old` test
2023-05-16 19:26:07 +01:00
Jami Cogswell
588a62c3a4 C#: update CaptureSinkModels test case 2023-05-16 14:07:20 -04:00
Jami Cogswell
06a28f6221 C#: update 'remote' sink kind to 'file-content-store' 2023-05-16 14:07:20 -04:00
Jami Cogswell
d3da5a7b28 C#: update cwe-sink.csv file 2023-05-16 14:07:20 -04:00
Jami Cogswell
74cd2407fb C#: update 'xss' sink kind to 'js-injection' 2023-05-16 14:07:20 -04:00
Jami Cogswell
a0b502fa44 C#: update 'html' sink kind to 'html-injection' 2023-05-16 14:07:20 -04:00
Jami Cogswell
f76563d6e9 C#: update some test cases 2023-05-16 14:07:19 -04:00
Jami Cogswell
b6d011b187 C#: update 'sql' sink kind to 'sql-injection' 2023-05-16 14:07:19 -04:00
Jami Cogswell
613077c7a9 C#: update 'code' sink kind to 'code-injection' 2023-05-16 14:07:19 -04:00
Mathias Vorreiter Pedersen
402212bab9 C++: Accept query test changes. 2023-05-16 18:35:05 +01:00
Alexandre Boulgakov
7ada125299 Swift: Support fmtlib for assertions/expectations.
Specifically, this adds custom formatters using `path::operator string()` and `error_code::message()` and dereferences a (non-empty) optional. `fmtlib` provides formatters for these standard library types in `fmt/std.h`, but that file also requires RTTI (which we disable) for `std::exception` so we can't use it without either patching `fmtlib` (which they're open to: https://github.com/fmtlib/fmt/issues/3170) or enabling RTTI (which will require some consideration).
2023-05-16 18:33:28 +01:00
Mathias Vorreiter Pedersen
a5632a21d1 Merge branch 'main' into precompute-states-in-overrun-write 2023-05-16 18:09:16 +01:00
Mathias Vorreiter Pedersen
99545420d5 Merge pull request #13177 from MathiasVP/recommend-secure-randomness
Swift: Recommend a proper source of randomness in `swift/hardcoded-key`
2023-05-16 18:04:13 +01:00
Mathias Vorreiter Pedersen
9def3dd440 Update swift/ql/src/queries/Security/CWE-321/HardcodedEncryptionKey.swift
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-05-16 17:42:34 +01:00
Geoffrey White
3bd16fa1d8 Merge pull request #13184 from geoffw0/docconsistency
Swift: Mirror changes made in the tutorial docs.
2023-05-16 17:42:03 +01:00
Mathias Vorreiter Pedersen
c93a051243 C++: Accept test changes. 2023-05-16 17:41:41 +01:00
Mathias Vorreiter Pedersen
150d4f341a C++: Fix looping flow that goes from the output argument node and back into the function argument. 2023-05-16 17:39:59 +01:00
Mathias Vorreiter Pedersen
35e91bafa7 C++: Introduce 'indirect_sink' in dataflow tests. 2023-05-16 17:39:53 +01:00
Mathias Vorreiter Pedersen
f5be8cfe58 Merge pull request #13167 from geoffw0/sensitivefps
Swift: Fix some FPs from the sensitive data library
2023-05-16 17:12:47 +01:00
Mathias Vorreiter Pedersen
afd1a120ff Merge pull request #13182 from MathiasVP/add-conflation-in-dataflow
C++: Add example with conflation in dataflow
2023-05-16 17:11:18 +01:00
Michael B. Gale
2d80302108 Use empty toolchains.xml for java-version-too-old 2023-05-16 16:54:19 +01:00
Paolo Tranquilli
42d40900d3 Swift: reword TSP diagnostics after doc team review 2023-05-16 17:52:02 +02:00
Mathias Vorreiter Pedersen
c45032844e C++: Add example with conflation in dataflow. 2023-05-16 16:34:20 +01:00
Stephan Brandauer
2cd8a879a5 use asParameter().getName() instead of toString()
Co-authored-by: Taus <tausbn@github.com>
2023-05-16 17:28:02 +02:00
Paolo Tranquilli
fc9fe13278 Merge pull request #13181 from github/redsun82/swift-diagnostics-enable-warnings
Swift: turn internal error into a TSP warning
2023-05-16 17:20:46 +02:00
Tom Hvitved
406acbe6a4 Update csharp/ql/lib/change-notes/2023-05-16-ilogger-extension-methods.md
Co-authored-by: Michael B. Gale <mbg@github.com>
2023-05-16 17:13:21 +02:00
Stephan Brandauer
9845887452 automodel java fix: export method name as 'name' metadata parameter; export parameter name as 'parameterName' parameter 2023-05-16 15:07:14 +00:00
Arthur Baars
2911a6cc30 JS: remove unused tables 2023-05-16 17:03:41 +02:00
Arthur Baars
fef0e1f1c8 JS: sync shared dbscheme fragments 2023-05-16 17:03:41 +02:00
Arthur Baars
7225ef09ba Script for detecting out-of-sync dbscheme fragments 2023-05-16 17:03:41 +02:00
Tom Hvitved
c412bfde68 Add change note 2023-05-16 16:54:59 +02:00
Paolo Tranquilli
7e61e99e4a Swift: make help links optional argument more explicit 2023-05-16 16:52:22 +02:00
Michael B. Gale
ed79113c7f Merge pull request #13180 from github/mbg/java/fix-java-version-too-old
Java: Hide GHA variables in `java-version-too-old` test
2023-05-16 15:49:38 +01:00
Tom Hvitved
3027ed2ca8 C#: Include arguments to ILogger extension method calls in LogMessageSink 2023-05-16 16:04:58 +02:00
Geoffrey White
35b35ec377 Swift: Mirror changes made in the docs. 2023-05-16 14:26:16 +01:00
Michael B. Gale
9660b47879 Hide GHA variables in java-version-too-old test 2023-05-16 14:20:17 +01:00
Alexandre Boulgakov
9e9be4fc5e Merge pull request #13169 from github/sashabu/swift-tests
Swift: Use `...` to find and run all Bazel tests instead of having list them.
2023-05-16 14:20:03 +01:00
Paolo Tranquilli
8291b2229a Swift: turn internal error into a TSP warning 2023-05-16 15:18:29 +02:00
Geoffrey White
94b4ebe38b Update swift/ql/src/queries/Security/CWE-312/CleartextLogging.ql
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-05-16 14:16:30 +01:00
Alvaro Muñoz
d17199a9e1 add gson models 2023-05-16 15:00:26 +02:00
Rasmus Lerchedahl Petersen
5d68473d12 python: elide nodes without location from basic 2023-05-16 14:38:51 +02:00
Rasmus Lerchedahl Petersen
5b4f98d6c4 python: Add summaries for container constructors
Also:
- turn on flow summaries for taint
- do not restrict node type
  (as now we need summary nodes)
2023-05-16 14:38:51 +02:00
Jeroen Ketema
e8423f858f Merge pull request #13149 from MathiasVP/barrier-out-on-phi-back-edges
C++: Block flow through back-edges in `cpp/overrun-write`
2023-05-16 14:22:55 +02:00
Mathias Vorreiter Pedersen
03ef18b286 Swift: Recommend a proper source of randomness in 'swift/hardcoded-key'. 2023-05-16 11:59:41 +01:00
Kasper Svendsen
843640c486 Merge pull request #13173 from kaspersv/kaspersv/enable-implicit-this-warnings-shared-packs
Enable implicit this warnings for shared packs
2023-05-16 10:50:28 +02:00
Rasmus Lerchedahl Petersen
145eaf3947 python: remove steps for container constructors 2023-05-16 10:35:10 +02:00
Tony Torralba
770099f210 Merge branch 'main' into atorralba/java/promote-xxe-experimental-sinks 2023-05-16 09:49:34 +02:00
Kasper Svendsen
bfb098c3d6 Enable implicit this warnings for shared packs 2023-05-16 09:22:29 +02:00
Tony Torralba
ac1df4de91 Merge pull request #13166 from atorralba/atorralba/java/xpath-xxe-sink
Java: Add `XPath.evaluate` as XXE sink
2023-05-16 09:14:56 +02:00
Erik Krogh Kristensen
57858afbd9 Merge pull request #13165 from erik-krogh/proto-assign-qhelp
JS: fixup in the qhelp for `js/prototype-polluting-assignment`
2023-05-16 08:52:52 +02:00
Owen Mansel-Chan
1a9bd9ccde Merge pull request #13135 from owen-mc/go/fix-unit-test
Go: fix unit test
2023-05-16 07:50:50 +01:00
Alexandre Boulgakov
8db945a11e Swift: Use ... to find and run all Bazel tests instead of having to list them. 2023-05-15 20:51:31 +01:00
Geoffrey White
5019d3befa Swift: Update test annotations. 2023-05-15 18:23:48 +01:00
Geoffrey White
3f206cce00 Swift: Simplify out toLowerCase(). 2023-05-15 18:23:33 +01:00
Geoffrey White
047494dc95 Swift: Bank account numbers are a credential now, I guess they don't need to be private data as well. 2023-05-15 18:22:55 +01:00
Geoffrey White
252b72b573 Swift: Add some special cases to preserve (for now) result quality. 2023-05-15 18:22:50 +01:00
Geoffrey White
245e8fbc92 Swift: Use SensitiveDataHeuristics.qll in SensitiveCredential. 2023-05-15 18:14:52 +01:00
Geoffrey White
a91c45049e Swift: Add some special cases to preserve (for now) result quality. 2023-05-15 18:06:33 +01:00
Geoffrey White
e2080c5d00 Swift: SensitiveDataHeuristics.qll expects function names without an (argument:list:). 2023-05-15 17:45:56 +01:00
Geoffrey White
35e2e5d785 Swift: Use SensitiveDataHeuristics.qll in regexpProbablySafe. 2023-05-15 17:44:54 +01:00
Geoffrey White
cc72bfbbbb Swift: Add the shared SensitiveDataHeuristics.qll to Swift. 2023-05-15 17:38:14 +01:00
Philip Ginsbach
167a5723b4 Merge pull request #13156 from github/ginsbach/SpecifyParameterisedSyntax
add parameter syntax for module declarations and module references
2023-05-15 17:07:20 +01:00
Tony Torralba
7d79d87d48 Add XPath.evaluate as XXE sink 2023-05-15 17:39:35 +02:00
erik-krogh
2ebce99eae add another example of how to fix the prototype pollution issue 2023-05-15 17:24:02 +02:00
erik-krogh
7a338c408e fix typo, the variable in the example is called items 2023-05-15 17:23:40 +02:00
erik-krogh
83ca1495e0 trim the whitespace in the poly-redos examples 2023-05-15 16:47:24 +02:00
erik-krogh
d989359656 add another example to the qhelp in poly-redos, showing how to just limit the length of the input 2023-05-15 16:47:02 +02:00
Geoffrey White
4781881a6a Swift: Improve mobile/phone number regexp. 2023-05-15 15:30:30 +01:00
Tom Hvitved
826b6219a0 Ruby: Include self parameters in type tracking flow-through logic 2023-05-15 16:02:33 +02:00
Tom Hvitved
3cdb27725a Ruby: Add more call graph tests 2023-05-15 16:02:33 +02:00
Tom Hvitved
9dede31c0d Merge pull request #13077 from hvitved/ruby/track-regexp-improvements
Ruby: Improvements to `RegExpTracking`
2023-05-15 16:02:00 +02:00
Maiky
3c00235375 Add SqlSanitization to Concepts and turn private 2023-05-15 15:56:52 +02:00
Geoffrey White
a0cba8cb6b Swift: Address boolean value FPs. 2023-05-15 14:24:18 +01:00
Maiky
f46620c455 Var only used in one side of disjunct 2023-05-15 15:09:44 +02:00
Geoffrey White
27c8eb301e Swift: Fix URL-related FPs. 2023-05-15 14:08:43 +01:00
Mathias Vorreiter Pedersen
650e9e1088 C++: Fix Code Scanning error. 2023-05-15 14:05:41 +01:00
Mathias Vorreiter Pedersen
f1c124a3da C++: Share more code between 'ValidState' and 'StringSizeConfig'. 2023-05-15 14:01:17 +01:00
Geoffrey White
e59d7e0345 Swift: Remove assumption that 'username' is not sensitive (in the tests). 2023-05-15 13:58:44 +01:00
Geoffrey White
dba951111a Swift: Add more sensitive data test cases. 2023-05-15 13:58:44 +01:00
Paolo Tranquilli
725a0a5eec Merge pull request #13161 from github/redsun82/swift-markdown-diagnostics
Swift: support markdown TSP diagnostics
2023-05-15 14:47:59 +02:00
Mathias Vorreiter Pedersen
f31709fb29 C++: Make comment more clear. 2023-05-15 13:36:29 +01:00
Paolo Tranquilli
10d084fbbf Swift: update comment 2023-05-15 13:48:24 +02:00
Paolo Tranquilli
cfcd26cf0d Swift: support markdown TSP diagnostics 2023-05-15 13:48:24 +02:00
Paolo Tranquilli
d8c0054ea9 Merge pull request #13133 from github/redsun82/swift-diagnostics-locations
Swift: add location and visibility support to TSP diagnostics
2023-05-15 13:47:52 +02:00
Geoffrey White
2a4d7cb642 Swift: Make the result message consistent as well. 2023-05-15 11:53:58 +01:00
Mathias Vorreiter Pedersen
a7712b608a C++: Add more comments. 2023-05-15 11:14:06 +01:00
Geoffrey White
3193b3b171 Swift: Make the CleartextLogging.ql query ID consistent with the other swift/cleartext-* queries. 2023-05-15 10:51:21 +01:00
Rasmus Wriedt Larsen
4be226ffe4 Merge pull request #13113 from yoff/python/test-container-steps
python: Add tests for container steps
2023-05-15 11:07:27 +02:00
Asger F
20e8ee8423 Merge pull request #12748 from JarLob/yi
JS: Add more sources, more unit tests, fixes to the GitHub Actions injection query
2023-05-15 11:03:00 +02:00
Tom Hvitved
cc6da7e38e Merge pull request #13031 from hvitved/identity-consistency-check
C#: Remove local identity flow steps
2023-05-15 10:45:35 +02:00
Paolo Tranquilli
dbff3e4fa4 Swift: remove unneeded SwiftDiagnosticLogWrapper 2023-05-15 10:08:43 +02:00
Paolo Tranquilli
a2cb331ebe Swift: remove hacky binlog interception 2023-05-15 10:02:24 +02:00
Paolo Tranquilli
9a555aea5f Merge branch 'main' into redsun82/swift-diagnostics-locations 2023-05-15 10:01:45 +02:00
Tom Hvitved
027cb2d335 C#: Reenable consistency check 2023-05-15 09:36:37 +02:00
Tom Hvitved
3c173df69e C#: Update expected test output 2023-05-15 09:35:20 +02:00
Tom Hvitved
165dc0b9bf C#: Filter away phi (read) input steps from a node into itself 2023-05-15 09:35:04 +02:00
Tom Hvitved
75dd4c8653 C#: Filter away use-use steps from a node into itself 2023-05-15 09:35:04 +02:00
Paolo Tranquilli
b214003720 Merge pull request #13131 from github/sashabu/tsp-incompatible-os
Swift: Emit a diagnostic when attempting to use the autobuilder on Linux.
2023-05-15 08:23:40 +02:00
Paolo Tranquilli
95cd948f09 Swift: order help links in integration test checks
They are currently a set within the codeql cli.
2023-05-14 22:33:48 +02:00
tyage
93af0d0c2f formatting 2023-05-13 17:37:31 +00:00
tyage
6f66c047d0 JS: ignoresub pkgs in node_modules directory 2023-05-13 09:12:28 +00:00
Ian Lynagh
202037e925 Merge pull request #13148 from igfoo/igfoo/arrays
Kotlin: Add some documentation on arrays, and tweak the tests we use for them
2023-05-12 18:52:16 +01:00
Robert Marsh
584adf843a C++: restrict flowstates in constant off-by-one query 2023-05-12 12:43:10 -04:00
Max Schaefer
5dfe52afd0 Merge pull request #13152 from github/max-schaefer/unsafe-shell-command-construction-examples-sync
JavaScript: Use synchronous APIs in examples for js/shell-command-constructed-from-input.
2023-05-12 16:50:25 +01:00
Tony Torralba
549fa7e288 Java: make inputStreamWrapper only act on constructors from outside of source 2023-05-12 17:47:56 +02:00
Jeroen Ketema
ed0524d08c Merge pull request #13155 from jketema/invalid-pointer-deref-fp
C++: Add FP test case for `cpp/invalid-pointer-deref`
2023-05-12 17:33:28 +02:00
Mathias Vorreiter Pedersen
e1cc7dcdc1 C++: Tweak join orders. 2023-05-12 16:12:15 +01:00
Philip Ginsbach
c5be3fb6c0 add missing syntax for parameterised module declaration 2023-05-12 15:50:28 +01:00
Max Schaefer
ef659310d3 Merge pull request #13151 from github/max-schaefer-patch-1
JavaScript: Use gender-neutral language in qhelp for js/user-controlled-bypass
2023-05-12 15:37:32 +01:00
Jeroen Ketema
eb493a1981 C++: Add FP test case for cpp/invalid-pointer-deref
Also add reduced range analysis test case that seems to expose the underlying
reason for the FP.
2023-05-12 16:25:34 +02:00
Philip Ginsbach
41df8cafe5 'Expr' is more appropriate than 'Id' now that instantiation can be involved 2023-05-12 15:21:12 +01:00
Max Schaefer
2e7eb50319 JavaScript: Use synchronous APIs in examples for js/shell-command-constructed-from-input. 2023-05-12 14:42:11 +01:00
Kasper Svendsen
d27f84e34e Merge pull request #13143 from kaspersv/kaspersv/java-explicit-this-receivers2
Java: Make implicit this receivers explicit
2023-05-12 15:22:15 +02:00
Max Schaefer
a4f6ccf2fc JavaScript: Use gender-neutral language in qhelp for js/user-controlled-bypass 2023-05-12 14:21:40 +01:00
Mathias Vorreiter Pedersen
3f01a2157b Revert "C++: Speedup 'isSuccessor'."
This reverts commit 594da1a21a.
2023-05-12 13:41:34 +01:00
Rasmus Lerchedahl Petersen
81adf5aad4 python: remember to adjust annotation 2023-05-12 14:28:41 +02:00
Mathias Vorreiter Pedersen
de1f81a4b9 C++: Accept test changes. 2023-05-12 13:01:42 +01:00
Mathias Vorreiter Pedersen
f20a69074a C++: Remove flow through ssa phi back-edges. 2023-05-12 13:01:29 +01:00
Mathias Vorreiter Pedersen
0b7fc3cbf7 C++: Add a FP testcase involving flow through back-edges. 2023-05-12 13:00:39 +01:00
Ian Lynagh
826e87f435 Kotlin: Simplify some array tests 2023-05-12 12:54:08 +01:00
Rasmus Lerchedahl Petersen
1b848bb510 python: fix tests 2023-05-12 13:51:50 +02:00
Mathias Vorreiter Pedersen
2458fa0ab3 C++: Push conjunct into 'isSuccessor' and rename it to 'fwdIsSuccessor'. 2023-05-12 12:50:40 +01:00
Ian Lynagh
ad51767374 Kotlin: Add comment describing Kotlin array predicates 2023-05-12 12:38:05 +01:00
Harry Maclean
48f22681a5 Merge pull request #13029 from hmac/ruby-autobuilder-refactor
Shared: Share autobuilder code between Ruby and QL
2023-05-12 18:24:06 +07:00
yoff
3adaa21571 Merge branch 'main' into python/test-container-steps 2023-05-12 13:19:53 +02:00
Kasper Svendsen
c91d1cf721 Merge pull request #13145 from kaspersv/kaspersv/javascript-implicit-this-receiver3
JS: Make implicit this receivers explicit
2023-05-12 13:16:57 +02:00
yoff
72c6919f4e Merge pull request #13095 from yoff/python/interpret-summary-content
Python: Interpret summary content
2023-05-12 13:09:14 +02:00
yoff
6a5fc3c1b1 Update python/ql/test/experimental/dataflow/tainttracking/defaultAdditionalTaintStep/test_collections.py 2023-05-12 13:06:08 +02:00
Mathias Vorreiter Pedersen
594da1a21a C++: Speedup 'isSuccessor'. 2023-05-12 12:05:09 +01:00
Mathias Vorreiter Pedersen
e58b99ddd1 C++: Don't carry the sources around as columns during the main loop of product flow. 2023-05-12 11:58:43 +01:00
yoff
62b60f490c Apply suggestions from code review
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-05-12 12:54:17 +02:00
Kasper Svendsen
d40cd0f275 Java: Make implicit this receivers explicit 2023-05-12 12:47:21 +02:00
Kasper Svendsen
8e18627eae Merge pull request #13144 from kaspersv/kaspersv/go-explicit-this-receivers2
Go: Make implicit this receivers explicit
2023-05-12 12:44:35 +02:00
Kasper Svendsen
7c5625a4dc Go: Make implicit this receivers explicit 2023-05-12 12:14:13 +02:00
Kasper Svendsen
fe2f36a1fe JS: Make implicit this receivers explicit 2023-05-12 12:12:48 +02:00
Kasper Svendsen
dd7a64d8e9 Merge pull request #13141 from kaspersv/kaspersv/ql-explicit-this-receivers
QL: Enable implicit this receiver warnings
2023-05-12 11:54:46 +02:00
Mathias Vorreiter Pedersen
75e36e89de C++: Precompute the set of necessary states. 2023-05-12 10:47:23 +01:00
Kasper Svendsen
1af1bf8917 QL: Enable implicit this receiver warnings 2023-05-12 11:35:35 +02:00
Kasper Svendsen
3dbc0cf0b6 QL: Make implicit receivers explicit 2023-05-12 11:35:35 +02:00
Kasper Svendsen
a6e8b00c26 Merge pull request #13138 from kaspersv/kaspersv/js-implicit-this-warnings
JS: Enable implicit this receiver warnings
2023-05-12 11:23:27 +02:00
Mathias Vorreiter Pedersen
f7924bda0d Merge pull request #13099 from MathiasVP/heuristic-allocation-for-overrun-write
C++: Use heuristic allocation functions in `cpp/overrun-write`
2023-05-12 10:15:28 +01:00
Tony Torralba
a48fa652ce Java: Add SQLi sinks for Spring JDBC 2023-05-12 10:57:49 +02:00
Paolo Tranquilli
d7cc506080 Merge branch 'main' into sashabu/tsp-incompatible-os 2023-05-12 09:58:36 +02:00
Kasper Svendsen
7dd9906e95 JS: Enable implicit this receiver warnings 2023-05-12 09:49:14 +02:00
Kasper Svendsen
189f8515c0 JS: Make implicit this receivers explicit 2023-05-12 09:49:14 +02:00
Tony Torralba
d0451609a7 Merge pull request #13137 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-05-12 09:23:00 +02:00
Paolo Tranquilli
9ffada31a8 Swift: make internal error telemetry only for the moment 2023-05-12 09:19:44 +02:00
Paolo Tranquilli
cce9352272 Swift: add visibility customization to diagnostics 2023-05-12 09:05:45 +02:00
Paolo Tranquilli
dedbd9ab63 Swift: remove unneeded SwiftDiagnosticsDumper 2023-05-12 08:30:43 +02:00
Paolo Tranquilli
86777fa4c2 Swift: remove obsolete comment 2023-05-12 08:23:14 +02:00
Kasper Svendsen
2184fefe7f Merge pull request #13121 from kaspersv/kaspersv/javascript-explicit-this-receivers4
JS: Make implicit this receivers explicit
2023-05-12 08:21:52 +02:00
Paolo Tranquilli
03f4625b5f Swift: go back to explicit DIAGNOSE_ERROR macros 2023-05-12 06:30:58 +02:00
github-actions[bot]
996d864e73 Add changed framework coverage reports 2023-05-12 00:15:01 +00:00
Chris Smowton
ee64ea59e1 Merge pull request #12901 from porcupineyhairs/goDsn
Go: Add query to detect DSN Injection.
2023-05-11 22:45:43 +01:00
Chris Smowton
820673470e Merge pull request #13119 from porcupineyhairs/goTiming
Go : Add query to detect potential timing attacks
2023-05-11 22:38:13 +01:00
Chris Smowton
99f4eef9c5 Fix spelling 2023-05-11 22:12:35 +01:00
Chris Smowton
a10b11e09e Fix spelling and remove dead code 2023-05-11 22:12:17 +01:00
Chris Smowton
b6c2db6baf Fix duplicate query ID 2023-05-11 22:10:09 +01:00
Porcupiney Hairs
2c518c1fa6 Include changes from review 2023-05-12 01:59:42 +05:30
Porcupiney Hairs
ae6fda03b7 Include changes from review 2023-05-11 23:56:50 +05:30
Ian Lynagh
4885e584a0 Merge pull request #13042 from igfoo/igfoo/ODASA_JAVA_LAYOUT
Kotlin: Remove ODASA_JAVA_LAYOUT support
2023-05-11 18:35:08 +01:00
Owen Mansel-Chan
77c8357705 Do not obscure exit code with call to grep
The output is a bit more verbose, but this is hard to avoid
2023-05-11 18:15:41 +01:00
Owen Mansel-Chan
3981bb1f58 Indent comment in Makefile better 2023-05-11 17:12:27 +01:00
Stephan Brandauer
510febf46d Merge pull request #12830 from github/kaeluka/parameter-candidate-extraction
Java: Automodel Framework Mode Extraction Queries
2023-05-11 18:00:55 +02:00
Paolo Tranquilli
3f2a059b3b Swift: add location support to TSP diagnostics
This required a bit of an overhaul of the original integration of
JSON diagnostics into binlog.

The problem is that it is quite hard to add a kind of metadata to
binlog entries without changing its code. Another problem is that when
wanting to avoid double evaluation of logging macro arguments one
cannot really add a separate "diagnose" step easily.

The proposed solution consists in two things:
* hook into a binlog plumbing function by providing a better overload
  resolution match, which happens after logging macro expansion,
  bypassing the problem of double evaluation
* in that hook, produce the diagnostic directly, without waiting to
  reconstruct the diagnostics entry from the binlog serialized entry.

This allows to forgo the weird category to diagnostic mapping, and now a
diagnostics emission simply happens when a diagnostic source is given
as the first argument after the log format string. A flavour of
diganostics sources with locations is then added with the same
mechanism, allowing to write something like
```cpp
LOG_ERROR("[{}] ouch!", internalError.withLocation("foo.swift", 32));
```
2023-05-11 17:52:02 +02:00
Owen Mansel-Chan
760ba82c7a Fix unit tests 2023-05-11 16:40:59 +01:00
Anders Schack-Mulligen
82e780d175 Merge pull request #13128 from aschackmull/java/externalapi-jar
Java: Fix ExternalApi.jarContainer().
2023-05-11 16:31:05 +02:00
Owen Mansel-Chan
d570914fdd Merge pull request #13129 from owen-mc/go/identify-environment-output-to-stdout
Go: --identify-environment output to stdout
2023-05-11 15:20:50 +01:00
Stephan Brandauer
c31ad01579 squash ql-for-ql warnings 2023-05-11 16:18:52 +02:00
Rasmus Wriedt Larsen
62f0c64a03 Merge pull request #12552 from erik-krogh/py-type-trackers
Py: refactor regex tracking to type-trackers
2023-05-11 16:18:34 +02:00
Stephan Brandauer
61b0514b53 Merge pull request #13122 from github/java/update-mad-decls-after-triage-2023-05-11T08-52-07
Java: Update MaD Declarations after Triage
2023-05-11 16:04:36 +02:00
Alexandre Boulgakov
0915d2ad77 Swift: Emit a diagnostic when attempting to use the autobuilder on Linux. 2023-05-11 14:43:13 +01:00
Maiky
0227b94ab5 Edit change note 2023-05-11 15:40:36 +02:00
Maiky
071a77cedc Ruby : XPath Injection Query (CWE-643) 2023-05-11 15:29:54 +02:00
Owen Mansel-Chan
1beb348d95 Fix outdated message 2023-05-11 14:29:14 +01:00
Owen Mansel-Chan
02a224c28f --identify-environment should write json to stdout 2023-05-11 14:29:14 +01:00
Tony Torralba
ca6ae26aad Change provenance to ai-manual 2023-05-11 14:56:16 +02:00
Tony Torralba
c17b0e809f Apply suggestions from code review 2023-05-11 14:53:56 +02:00
Michael Nebel
a0a8468071 Merge pull request #13124 from michaelnebel/csharp/dataflowconsistency-identity-only-source
C#: Only report dataflow inconsistencies (step to itself) in source code.
2023-05-11 14:47:35 +02:00
Geoffrey White
e402c225f4 Merge pull request #13115 from geoffw0/swift-csv-labels
Swift: Accept standardized CSV sink labels
2023-05-11 13:34:48 +01:00
Anders Schack-Mulligen
587ee53917 Java: Fix ExternalApi.jarContainer(). 2023-05-11 14:09:27 +02:00
Ian Lynagh
712561ffa2 Kotlin: Fix recommended variable names in error messages 2023-05-11 13:02:35 +01:00
Stephan Brandauer
9b35a9f74a Update java/ql/lib/ext/org.apache.hadoop.fs.model.yml
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-05-11 14:01:25 +02:00
Geoffrey White
15a7fdd297 Swift: Update existing CSV sinks to new labels. 2023-05-11 12:48:48 +01:00
Owen Mansel-Chan
7df239d033 Merge pull request #13126 from owen-mc/go/add-identify-environment-scripts
Go: Add identify-environment scripts
2023-05-11 12:43:35 +01:00
Erik Krogh Kristensen
81a58003fb Merge pull request #13125 from kaspersv/kaspersv/all-implicit-this
Remove ql/implicit-this restriction to files with explicit this
2023-05-11 13:39:07 +02:00
Kasper Svendsen
a920c13869 Remove ql/implicit-this restriction to files with explicit this 2023-05-11 13:15:48 +02:00
Ian Lynagh
e7d1782eea Merge pull request #13088 from igfoo/igfoo/getTypeParameterParentLabel
Kotlin: Small simplification
2023-05-11 11:59:06 +01:00
Ian Lynagh
07808867cc Merge pull request #13086 from igfoo/igfoo/double_return
Kotlin: Remove some redundant return statments
2023-05-11 11:58:58 +01:00
Owen Mansel-Chan
874a426779 Add identify-environment scripts 2023-05-11 11:51:42 +01:00
Geoffrey White
8fac01e84f Swift: Remove the old sinks. 2023-05-11 11:29:44 +01:00
Geoffrey White
7251e90633 Merge pull request #12941 from geoffw0/textsource
Swift: Add taint sources for UITextField
2023-05-11 11:11:45 +01:00
Kasper Svendsen
489a73c2c3 JS: Make implicit this receivers explicit 2023-05-11 11:50:56 +02:00
Stephan Brandauer
e15610cfcd use ascii dash 2023-05-11 11:32:05 +02:00
Michael Nebel
59993ea347 C#: Update expected test output. 2023-05-11 11:12:24 +02:00
Mathias Vorreiter Pedersen
fd6282063e Merge pull request #12971 from MathiasVP/fix-fp-in-invalid-deref-2
C++: Fix more FPs on `cpp/invalid-pointer-deref`
2023-05-11 10:06:01 +01:00
Stephan Brandauer
b0ec089a3a Update MaD Declarations after Triage 2023-05-11 10:52:09 +02:00
Michael Nebel
75ea449147 C#: Only include source code nodes in the identity local step consistency check. 2023-05-11 10:49:39 +02:00
Erik Krogh Kristensen
71be426284 Merge pull request #13015 from kaspersv/kaspersv/js-explicit-this-receivers2
JS: Make implicit this receivers explicit
2023-05-11 10:39:11 +02:00
Geoffrey White
f1893dae85 Swift: Repair UIKit framework after merge. 2023-05-11 09:14:52 +01:00
Geoffrey White
68501b0082 Merge branch 'main' into textsource 2023-05-11 09:14:38 +01:00
Paolo Tranquilli
e925365e2d Merge pull request #13087 from github/redsun82/swift-autobuilder-no-swift
Swift: surface errors about no viable swift targets found
2023-05-11 10:14:06 +02:00
Tony Torralba
85841f62f1 Merge pull request #13118 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-05-11 09:35:19 +02:00
Kasper Svendsen
0df1e7c280 Merge pull request #13120 from kaspersv/kaspersv/swift-implicit-this-warnings
Swift: Enable implicit this receiver warnings
2023-05-11 09:29:26 +02:00
Owen Mansel-Chan
b306807046 Merge pull request #13040 from owen-mc/go/identify-environment-change-logic
Go: change logic in `go-autobuilder --identify-environment`
2023-05-11 08:22:01 +01:00
Paolo Tranquilli
5fcc5e1d4a Swift: initialize char buffer 2023-05-11 08:57:41 +02:00
Kasper Svendsen
1f0cb9eeb8 Swift: Enable implicit this receiver warnings 2023-05-11 08:35:59 +02:00
Kasper Svendsen
082e6a1245 Merge pull request #13108 from kaspersv/kaspersv/swift-explicit-this-receivers1
Swift: Make implicit this receivers explicit
2023-05-11 08:34:14 +02:00
Kasper Svendsen
1ee823b0f0 Merge pull request #13111 from kaspersv/kaspersv/swift-explicit-this-receivers3
Swift: Make implicit this receivers explicit
2023-05-11 08:33:57 +02:00
Paolo Tranquilli
92a4a798a0 Swift: apply review suggestions 2023-05-11 06:35:38 +02:00
Porcupiney Hairs
d536157c1a Go : Add query to detect potential timing attacks 2023-05-11 09:57:50 +05:30
Owen Mansel-Chan
5ef74c96de Merge pull request #13105 from owen-mc/go/change-diagnostic-message
Go: Update "go/autobuilder/package-not-found" diagnostic message
2023-05-11 05:27:09 +01:00
Owen Mansel-Chan
270ba09ffb Merge pull request #11732 from owen-mc/go/fix/model-data-flow-through-varargs
Go: Allow data flow through varargs parameters
2023-05-11 05:26:40 +01:00
github-actions[bot]
7da6bb6e24 Add changed framework coverage reports 2023-05-11 00:15:11 +00:00
Porcupiney Hairs
ec424d7e51 Go: Add query to detect DSN Injection. 2023-05-11 03:45:29 +05:30
Owen Mansel-Chan
9334cfb22c Change logic when go mod version above max supported version 2023-05-10 21:56:56 +01:00
Owen Mansel-Chan
9c5fc9714a Use "Requesting" instead of "Writing environment file" 2023-05-10 21:53:10 +01:00
Felicity Chapman
619d25e32e Merge pull request #13107 from github/felicitymay-10250-swift
Minor docs updates for Swift public beta
2023-05-10 21:23:48 +01:00
Robert Marsh
f77c77fdf9 C++: refactor off-by-one query to use flowstate 2023-05-10 15:01:01 -04:00
Felicity Chapman
f72fe3ec44 Merge branch 'main' into felicitymay-10250-swift 2023-05-10 19:01:35 +01:00
Felicity Chapman
6283ffc1bb Add Swift to path query article 2023-05-10 19:01:22 +01:00
Geoffrey White
100d960ca9 Merge pull request #12940 from geoffw0/swiftdoc
Swift: Initial language guides documentation for Swift
2023-05-10 19:00:35 +01:00
Geoffrey White
a3c8515629 Swift: Accept cross-language standardized CSV sink label. 2023-05-10 18:24:59 +01:00
Geoffrey White
c92e8dc92f Apply suggestions from code review
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-05-10 17:54:12 +01:00
Geoffrey White
f1fb3e1147 Merge pull request #4 from geoffw0/swiftdoc3
Swift: Add Swift to supported-frameworks.rst, supported-versions-compilers.rst and extractors.rst
2023-05-10 17:43:24 +01:00
Rasmus Lerchedahl Petersen
0a9515dbcd python: add tests for built-in collections
- constructors: list, tuple, set, dict
- methods:
  - general: copy, pop
  - list: append
  - set: add
  - dict: keys, values, items, get, popitem
- functions: sorted, reversed, iter, next
2023-05-10 18:10:05 +02:00
Mathias Vorreiter Pedersen
477722a94a Merge pull request #13101 from MathiasVP/member-predicates-on-CallAllocationExprTarget
C++: Cleanup `CallAllocationExprBase` with module signature members
2023-05-10 16:52:30 +01:00
Mathias Vorreiter Pedersen
87325dbfd1 Merge pull request #13112 from geoffw0/swifttodos2
Swift: Delete some more TODO comments.
2023-05-10 16:39:37 +01:00
Rasmus Wriedt Larsen
54d35dbc0b Misc: Delete empty CONSISTENCY files
As requested by `@hvitved`
2023-05-10 17:37:39 +02:00
Rasmus Wriedt Larsen
cb8c4094fc Misc: Add --force option 2023-05-10 17:20:32 +02:00
Kasper Svendsen
d299ef0c10 Merge pull request #13106 from kaspersv/kaspersv/cpp-enable-implicit-this-warnings
C++: Enable implicit this warnings
2023-05-10 17:12:58 +02:00
Owen Mansel-Chan
97ec7a07eb Address review comments 2023-05-10 15:53:08 +01:00
Geoffrey White
81c29799c5 Merge branch 'main' into swiftdoc 2023-05-10 15:47:30 +01:00
Tony Torralba
aa14105e1c Don't use the reflexive transitive closure, so that the predicate becomes a little more efficient 2023-05-10 16:45:07 +02:00
Geoffrey White
f02c1edb14 Update docs/codeql/reusables/supported-versions-compilers.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-05-10 15:40:52 +01:00
Geoffrey White
1820d36a4e Swift: Autoformat. 2023-05-10 15:36:16 +01:00
Tony Torralba
e1f868b976 Merge pull request #12965 from atorralba/atorralba/java/apache-commons-net-models
Java: Add manual models for `org.apache.commons.net`
2023-05-10 16:28:19 +02:00
Kasper Svendsen
d346d1733e Swift: Make implicit this receivers explicit 2023-05-10 16:12:52 +02:00
Geoffrey White
49da113b10 Swift: Delete unwanted TODO comment. 2023-05-10 15:06:39 +01:00
Geoffrey White
e120e84933 Swift: Delete TODOs (move to issues). 2023-05-10 14:59:23 +01:00
Geoffrey White
bbe5f5e0f0 Swift: HACK -> TODO. 2023-05-10 14:49:22 +01:00
Geoffrey White
4dcd3bec11 Swift: Delete TODOs (move to issues). 2023-05-10 14:47:44 +01:00
Kasper Svendsen
8410eb3477 C++: Enable implicit this warnings 2023-05-10 15:15:21 +02:00
Kasper Svendsen
f8b3968b38 C++: Make implicit this receivers explicit 2023-05-10 15:15:21 +02:00
Kasper Svendsen
c2a3f37502 Merge pull request #13084 from kaspersv/kaspersv/cpp-explicit-this-receivers2
C++: Make implicit this receivers explicit
2023-05-10 15:14:40 +02:00
Mathias Vorreiter Pedersen
f05cce8fc2 C++: Add a member predicate to phi nodes for checking if a phi is a read-phi and use it to restrict flow in 'cpp/invalid-pointer-deref'. 2023-05-10 14:10:13 +01:00
Owen Mansel-Chan
1c66564ccc address review comments 2023-05-10 14:05:09 +01:00
Stephan Brandauer
f3d096cf37 update DollarAtString class to use hasLocationInfo instead of getURL 2023-05-10 15:02:22 +02:00
Owen Mansel-Chan
8f41ff36fb Add change note 2023-05-10 13:50:04 +01:00
Paolo Tranquilli
8534ba0218 Swift: surface error about unsupported SPM build 2023-05-10 14:31:33 +02:00
Paolo Tranquilli
c507754324 Swift: surface error about no viable swift targets found 2023-05-10 14:31:33 +02:00
Paolo Tranquilli
335933a4d7 Merge pull request #13071 from github/redsun82/swift-xcode-failure-diag
Swift: add autobuild failure diagnostics
2023-05-10 14:31:04 +02:00
Owen Mansel-Chan
50d3cffe61 Accept review comments 2023-05-10 13:28:11 +01:00
Kasper Svendsen
e0c331d064 Swift: Make implicit this receivers explicit 2023-05-10 14:10:45 +02:00
Felicity Chapman
40df3c0280 Minor docs updates for Swift public beta 2023-05-10 13:08:07 +01:00
Tom Hvitved
425ebba278 Address review comments 2023-05-10 14:04:41 +02:00
Stephan Brandauer
79f2beca2a ql-for-ql 2023-05-10 14:04:29 +02:00
Geoffrey White
29f542b015 Swift: Add a link to the swift-beta-note.rst from supported-frameworks.rst. 2023-05-10 12:55:18 +01:00
Stephan Brandauer
cd388264d3 use new DollarAtString class to return metadata using notation 2023-05-10 13:44:50 +02:00
Kasper Svendsen
bcdd839e1c Merge pull request #13102 from kaspersv/kaspersv/csharp-enable-implicit-this-warnings
C#: Enable implicit this receiver warnings
2023-05-10 13:24:40 +02:00
Kasper Svendsen
f146ab9e55 Merge pull request #13032 from kaspersv/kaspersv/ruby-enable-implicit-this-warnings
Ruby: Enable implicit this warnings
2023-05-10 13:24:29 +02:00
Owen Mansel-Chan
fcf3cb7ea4 Update "go/autobuilder/package-not-found" message 2023-05-10 12:24:03 +01:00
Kasper Svendsen
e6ca3fe272 Ruby: Enable implicit this warnings 2023-05-10 13:03:39 +02:00
Kasper Svendsen
6b8a7c2f6f Ruby: Make implicit this receivers explicit 2023-05-10 13:03:39 +02:00
tyage
f6a8cd27ca Update javascript/ql/lib/semmle/javascript/NPM.qll
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-05-10 19:36:49 +09:00
Kasper Svendsen
5b45962dff C++: Make implicit this receiver explicit 2023-05-10 12:34:47 +02:00
Geoffrey White
beb3759de4 Swift: Add beta note to these docs. 2023-05-10 11:32:10 +01:00
Owen Mansel-Chan
edeffd8885 Merge pull request #13038 from owen-mc/go/downgrade-package-not-found-diagnostic-to-warning
Go: Downgrade go/autobuilder/package-not-found diagnostic to warning
2023-05-10 11:24:37 +01:00
Geoffrey White
e6baf66433 Swift: Delete TODOs (moved to issues). 2023-05-10 11:19:36 +01:00
Owen Mansel-Chan
375be68492 Fix diagnostics 2023-05-10 11:12:48 +01:00
Owen Mansel-Chan
edebebf603 Refactor for clarity 2023-05-10 11:12:47 +01:00
Geoffrey White
3587204403 Merge pull request #13034 from geoffw0/swifttodos
Swift: Delete some TODO comments
2023-05-10 11:09:27 +01:00
Geoffrey White
9d7ba3a876 Swift: Add footnote in supported-versions-compilers.rst 2023-05-10 11:04:08 +01:00
Stephan Brandauer
6be11d93bd document FrameworkCandidatesImpl 2023-05-10 12:03:32 +02:00
Geoffrey White
68c16c4b34 Swift: Update extractors.rst 2023-05-10 11:02:49 +01:00
Stephan Brandauer
d2d884b007 special case for Argument[this] 2023-05-10 11:53:40 +02:00
yoff
9bd3957bc8 Merge branch 'main' into python/interpret-summary-content 2023-05-10 11:41:50 +02:00
yoff
f62bbf2d4c Merge pull request #12980 from yoff/python/update-taint-debug
python: update debug queries
2023-05-10 11:40:21 +02:00
Jeroen Ketema
c3a7f98b2f Merge branch 'main' into fix-fp-in-invalid-deref-2 2023-05-10 11:31:10 +02:00
Stephan Brandauer
7ae6a992b6 fix code compilation error after main branch breaking change 2023-05-10 11:29:49 +02:00
Stephan Brandauer
9ed3c248ad Merge branch 'main' into kaeluka/parameter-candidate-extraction 2023-05-10 11:26:49 +02:00
Kasper Svendsen
89e9103a5b C#: Enable implicit this receiver warnings 2023-05-10 11:15:49 +02:00
Mathew Payne
bffc233d86 Update release notes 2023-05-10 10:09:19 +01:00
Jeroen Ketema
6a33e87c27 Merge pull request #13100 from jketema/order-by-order
C++: Fix the location of order-by in experimental `RangeNode`
2023-05-10 11:08:20 +02:00
Kasper Svendsen
2f0c36a3b8 Merge pull request #13079 from kaspersv/kaspersv/csharp-explicit-this-receivers3
C#: Make implicit this receivers explicit
2023-05-10 11:07:58 +02:00
Kasper Svendsen
c3191e989b Merge pull request #13078 from kaspersv/kaspersv/explicit-this-receivers-shared3
C#, C++: Make implicit this receivers explicit
2023-05-10 11:07:41 +02:00
Mathew Payne
681623d631 Update kind model validation 2023-05-10 10:06:22 +01:00
Mathew Payne
0f85b98cc7 Update models to match new data extensions names 2023-05-10 10:00:16 +01:00
Owen Mansel-Chan
f9d2467eaa Downgrade package-not-found diagnostic to warning
error is reserved for when the build fails.
2023-05-10 09:58:58 +01:00
Stephan Brandauer
1e5c9e8a58 simplify by using hasQualifiedName 2023-05-10 10:49:27 +02:00
Owen Mansel-Chan
12f996ff56 Deal better with goModVersion < minGoVersion 2023-05-10 09:45:48 +01:00
Tony Torralba
3f8a56722f Remove auto-generated models 2023-05-10 10:35:34 +02:00
Stephan Brandauer
f43edb8046 rename query files to make framework mode explicit 2023-05-10 10:30:58 +02:00
Stephan Brandauer
170e895593 use newtype for related location type 2023-05-10 10:28:14 +02:00
yoff
9cc7cdef4c Merge branch 'main' into python/update-taint-debug 2023-05-10 10:26:19 +02:00
Owen Mansel-Chan
32b5df69c3 Add comments explaining version choice logic 2023-05-10 09:26:18 +01:00
Mathias Vorreiter Pedersen
6aa40050bd C++: Use member predicates on parameterized module parameters now that it's available in the language. 2023-05-10 09:24:38 +01:00
Tony Torralba
9839eb1fd2 Update java/ql/lib/change-notes/2023-05-02-apache-commons-net-models.md
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-05-10 10:15:55 +02:00
Asger F
f4b5f39c57 Merge pull request #13044 from cklin/javascript-locatable-tostring-join-ordering
JS: Add pragma[only_bind_out] to Locatable::toString() calls
2023-05-10 10:08:48 +02:00
Mathias Vorreiter Pedersen
720586c437 Merge pull request #13059 from MathiasVP/remove-self-edges
C++: Remove self edges
2023-05-10 09:04:08 +01:00
Stephan Brandauer
5dab1b2a3b leftover renaming label->kind 2023-05-10 10:01:39 +02:00
Stephan Brandauer
1f60fd6d58 use specialized getAParameter predicate, instead of getParameter(_) 2023-05-10 10:01:04 +02:00
Geoffrey White
4af97274dd Swift: Delete TODO (already fixed). 2023-05-10 08:55:43 +01:00
Asger F
c376eeb133 Merge pull request #12978 from asgerf/js/github-actions-sources
JS: Add sources and sinks related to GitHub Actions
2023-05-10 09:55:24 +02:00
Jeroen Ketema
a5c7d09702 C++: Fix the location of order-by in experimental RangeNode 2023-05-10 09:50:10 +02:00
Tom Hvitved
51087d090b Address review comments 2023-05-10 09:42:41 +02:00
Stephan Brandauer
91ae61b744 more documentation 2023-05-10 09:42:22 +02:00
Tom Hvitved
211a1e188c Sync files 2023-05-10 09:36:00 +02:00
Tom Hvitved
60b0f25a9a Ruby: Improvements to RegExpTracking 2023-05-10 09:35:59 +02:00
Stephan Brandauer
46741c6e42 rename kind -> label 2023-05-10 09:34:13 +02:00
Kasper Svendsen
fa0a99983f Merge pull request #13081 from kaspersv/kaspersv/cpp-explicit-this-receivers1
C++: Make implicit this receivers explicit
2023-05-10 09:33:45 +02:00
Stephan Brandauer
85f519b7b4 documentation updates from review comments 2023-05-10 09:33:37 +02:00
Mathias Vorreiter Pedersen
363514e4ca C++: Expand heuristic to catch more sources. 2023-05-10 08:27:29 +01:00
Mathias Vorreiter Pedersen
9da7c9f696 C++: Use heuristic allocation in 'cpp/overrun-write'. 2023-05-10 08:22:56 +01:00
Mathias Vorreiter Pedersen
023b8e4f15 C++: Add a testcase that needs heuristic allocation. 2023-05-10 08:21:21 +01:00
Stephan Brandauer
94cb82e553 remove TestFileCharacteristic as it's redundant 2023-05-10 09:06:11 +02:00
yoff
25899c15c9 Merge pull request #13098 from hvitved/python/update-consistency-expected
Python: Update expected test output
2023-05-10 08:58:27 +02:00
Stephan Brandauer
d7aca9e909 use comma separator in concatenation 2023-05-10 08:57:27 +02:00
Erik Krogh Kristensen
f4f1333d5c Merge pull request #13090 from kaspersv/kaspersv/js-prevent-regression
JS: Prevent join order regression
2023-05-10 08:25:26 +02:00
Asger F
b28254327a Update javascript/ql/lib/semmle/javascript/security/dataflow/IndirectCommandInjectionCustomizations.qll
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-05-10 08:16:31 +02:00
Tom Hvitved
4d84f92e8c Python: Update expected test output 2023-05-10 08:15:15 +02:00
Paolo Tranquilli
c677c04c0c Swift: fix wrong if (diagnostics) block placement 2023-05-10 07:03:53 +02:00
Paolo Tranquilli
ec3c63a2b3 Swift: replace all usages of std::to_string with absl::StrCat or absl::StrAppend 2023-05-10 07:03:06 +02:00
Rasmus Lerchedahl Petersen
064877140e Python: interpret remaining content 2023-05-09 21:40:01 +02:00
Rasmus Lerchedahl Petersen
c1110666b5 Python: remaining content-based summary components 2023-05-09 21:40:01 +02:00
yoff
4849f43d16 Merge branch 'main' into python/update-taint-debug 2023-05-09 21:35:56 +02:00
Mathew Payne
0e932574f4 Fix Ldap class name 2023-05-09 17:42:17 +01:00
Mathew Payne
7b55955fac Update change notes 2023-05-09 17:40:12 +01:00
Mathew Payne
e84657242c Fix names 2023-05-09 17:38:15 +01:00
Mathew Payne
632e487458 Add Command Injection support 2023-05-09 17:37:00 +01:00
Mathew Payne
8f39f028e6 feat: Additional models as data extensions
- `logging`, `ldap`, and `url-redirect` sinks
2023-05-09 17:31:51 +01:00
Tony Torralba
2c41c5b0e2 Make inputStreamWrapper consider supertypes transitively 2023-05-09 17:27:16 +02:00
Ian Lynagh
9764a8c348 Kotlin: Remove some redundant return statments 2023-05-09 16:25:59 +01:00
Ian Lynagh
24d7391f5b Kotlin: Remove ODASA_JAVA_LAYOUT support
This is no longer supported, and has never been used with Kotlin.
2023-05-09 16:25:37 +01:00
Ian Lynagh
968a78e3e6 Kotlin: Small simplification
Merge two `IrFunction` cases into one.
2023-05-09 16:25:20 +01:00
Kasper Svendsen
c7d72e0d34 JS: Prevent join order regression 2023-05-09 17:01:41 +02:00
Jaroslav Lobačevski
891a94c166 Apply suggestions from code review
Co-authored-by: Asger F <asgerf@github.com>
2023-05-09 16:27:32 +02:00
Kasper Svendsen
c46898cb75 C++: Make implicit this receivers explicit 2023-05-09 15:35:54 +02:00
Kasper Svendsen
3041fdebba C#: Make implicit this receivers explicit 2023-05-09 15:34:59 +02:00
Kasper Svendsen
a129513b80 C#, C++: Make implicit this receivers explicit 2023-05-09 15:33:51 +02:00
Rasmus Lerchedahl Petersen
30d3c3e8cd python: fix warnings
- rename `Conf` -> `Config`
- comment out unused code
- rearrange code so it is easy to see how to swap comments
- autoformat
2023-05-09 15:01:31 +02:00
Asger F
3d5c8153ca Merge pull request #13076 from asgerf/js/fix-example-query-text
JS: Fix broken message in example query
2023-05-09 14:57:46 +02:00
Paolo Tranquilli
84c017083f Swift: add configuration of diagnostics logs 2023-05-09 14:42:43 +02:00
Paolo Tranquilli
ca94b20284 Swift: auto-flush logs on errors 2023-05-09 14:42:21 +02:00
Paolo Tranquilli
2904aa8439 Revert "Swift: auto-flush logs at exit"
This reverts commit 0d9dcb161f.

This turns out to introduce a subtle bug related to destruction order
between `Log::instance()` and the `Logger` instances.
2023-05-09 13:08:28 +02:00
yoff
1a57f81aca Merge pull request #12537 from yoff/python/captured-variables-for-typetracking
Python: Captured variables for type tracking and the API graph
2023-05-09 12:34:22 +02:00
Shati Patel
445712639f Merge pull request #13021 from github/shati-patel/mrva-results-view
Update screenshots for changes to variant analysis results view
2023-05-09 11:25:41 +01:00
Jaroslav Lobačevski
5aa71352dc Update javascript/ql/src/Security/CWE-094/ExpressionInjection.qhelp
Co-authored-by: Asger F <asgerf@github.com>
2023-05-09 12:23:52 +02:00
Jaroslav Lobačevski
1ad23c5366 Apply suggestions from code review
Co-authored-by: Asger F <asgerf@github.com>
2023-05-09 12:23:06 +02:00
Geoffrey White
d278340f94 Swift: Add missing link. 2023-05-09 10:55:17 +01:00
Michael Nebel
b1659bee66 Merge pull request #12909 from michaelnebel/csharp/dataflowrefactor7
C#: Re-factor the experimental PotentialTimeBomb to use new API.
2023-05-09 11:44:44 +02:00
Kasper Svendsen
f619a63f6f JS: Make implicit this receivers explicit 2023-05-09 11:37:25 +02:00
Geoffrey White
0d1df81667 Swift: Update supported-versions-compilers.rst 2023-05-09 10:37:25 +01:00
Geoffrey White
fc40673982 Swift: Add Swift to supported-frameworks.rst 2023-05-09 10:37:25 +01:00
Geoffrey White
d7382053ca Merge branch 'main' into swifttodos 2023-05-09 10:06:45 +01:00
Tony Torralba
77ec34587f Merge pull request #13073 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-05-09 10:59:44 +02:00
Asger F
aec6ba7d5e JS: Fix broken message in example query 2023-05-09 10:53:57 +02:00
Paolo Tranquilli
8f26c7e2d2 Swift: add one more help link to diagnostics 2023-05-09 10:52:26 +02:00
Mathias Vorreiter Pedersen
ffa30284ea Merge pull request #12896 from geoffw0/modernsec3
Swift: Fix member variable CSV sinks (swift/insecure-tls)
2023-05-09 09:52:22 +01:00
Mathias Vorreiter Pedersen
65dea0b5a1 Merge pull request #13074 from MathiasVP/13041-follow-up
C++: Add QLDoc to `getOverflow`
2023-05-09 09:39:12 +01:00
Calum Grant
3d713ed4a9 Merge pull request #13067 from hvitved/ruby/no-self-flow
Ruby: Remove local identity flow steps
2023-05-09 09:33:35 +01:00
Kasper Svendsen
0de6e4138f Merge pull request #13037 from kaspersv/kaspersv/java-enable-implicit-this-warnings
Java: Enable implicit this receiver warnings
2023-05-09 10:24:31 +02:00
Paolo Tranquilli
e17a8d03ab Swift: add diagnostic for no project found 2023-05-09 10:13:42 +02:00
Paolo Tranquilli
08c43bc9b0 Swift: move diagnostics definition to the source file 2023-05-09 10:11:13 +02:00
Paolo Tranquilli
0d9dcb161f Swift: auto-flush logs at exit 2023-05-09 10:08:34 +02:00
Geoffrey White
08b6755c55 Swift: Simplify hasActualResult. 2023-05-09 09:03:32 +01:00
Mathias Vorreiter Pedersen
2021f46f19 C++: Add QLDoc to 'getOverflow'. 2023-05-09 08:52:08 +01:00
Mathias Vorreiter Pedersen
b5c1024d3d Merge pull request #13041 from MathiasVP/overrun-write-only-one-alert
C++: Only one alert message per alert on `cpp/overrun-write`
2023-05-09 08:42:37 +01:00
Paolo Tranquilli
182a155ff2 Swift: fix autobuilder extern definition 2023-05-09 09:38:46 +02:00
Anders Schack-Mulligen
e996eaefb1 Merge pull request #13036 from aschackmull/java/typeprefix-perf
Java: Minor perf fix for typePrefixContainsAux1.
2023-05-09 08:57:56 +02:00
Michael Nebel
9ccc65d77f Merge pull request #12935 from michaelnebel/neutralkindsdocs
Java: Update customizing library models for java documentation.
2023-05-09 08:50:08 +02:00
Michael Nebel
f2f9944a1c Merge pull request #12931 from michaelnebel/neutralkinds
Java/C#: Introduce kind for neutrals.
2023-05-09 08:42:38 +02:00
Kasper Svendsen
b0714904c0 Java: Enable implicit this receiver warnings 2023-05-09 08:25:40 +02:00
github-actions[bot]
f235387ba6 Add changed framework coverage reports 2023-05-09 00:15:32 +00:00
Edward Minnix III
05b1bd881e Merge pull request #12852 from egregius313/egregius313/java/webgoat/model-jwsheader
Java: Model `io.jsonwebtoken.SigningKeyResolverAdapter` and `io.jsonwebtoken.JwsHeader`
2023-05-08 10:57:34 -04:00
Geoffrey White
9618c616f4 Swift: Optimize the graphics. 2023-05-08 15:41:13 +01:00
Michael Nebel
baee4cedfd Apply suggestions from code review
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-05-08 16:19:00 +02:00
Michael Nebel
efa2bd8614 Apply suggestions from code review
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-05-08 16:19:00 +02:00
Michael Nebel
8435c31213 C#/Java: Update model converter queries to handle kind information. 2023-05-08 16:19:00 +02:00
Michael Nebel
7858da66e3 C#/Java: Add change note. 2023-05-08 16:18:59 +02:00
Michael Nebel
87731b2341 C#: Update expected test output for the model generator test. 2023-05-08 16:18:59 +02:00
Michael Nebel
7c3a258d09 C#: Adjust the model generator to produce kinds for neutrals. 2023-05-08 16:18:59 +02:00
Michael Nebel
c30f080ff0 Java: Update expected test out for the model generator. 2023-05-08 16:18:59 +02:00
Michael Nebel
d103a57141 Java: Adjust the model generator to produce kinds. 2023-05-08 16:18:59 +02:00
Michael Nebel
bd23814e7c Java: Update existing neutrals to include kind information. 2023-05-08 16:18:59 +02:00
Michael Nebel
bcbda9046f Java: Extend neutrals with a kind column and introduce validation. 2023-05-08 16:18:59 +02:00
Michael Nebel
4ac0396b67 Go/Python/Ruby/Swift: Sync files and make dummy implementation. 2023-05-08 16:18:59 +02:00
Michael Nebel
fe32abecd9 C#: Update existing neutrals to include kind information. 2023-05-08 16:18:59 +02:00
Michael Nebel
4dcfb4d8cb C#: Extend neutrals with a kind column and introduce validation. 2023-05-08 16:18:59 +02:00
Michael Nebel
9558522d84 Merge pull request #13070 from michaelnebel/csharp/refactorfollowup
C#: Re-factor CIL data flow test to use the new API.
2023-05-08 16:15:56 +02:00
Chuan-kai Lin
4960305022 Merge pull request #13025 from cklin/java-location-tostring-bindingset
Java: Add pragma[only_bind_out] to Top::toString() calls
2023-05-08 06:27:42 -07:00
Michael Nebel
9e990e752f C#: Refer to the Node class via DataFlow instead of DataFlow2. 2023-05-08 15:07:24 +02:00
Paolo Tranquilli
8079af7ed6 Swift: add autobuild failure diagnostics 2023-05-08 12:54:18 +00:00
Michael Nebel
bd0133630d C#: Re-factor the CIL dataflow test to use the new API. 2023-05-08 14:05:37 +02:00
Michael Nebel
d01674f930 C#: Update expected test output. 2023-05-08 12:48:00 +02:00
Michael Nebel
e2529b8f93 C#: Re-factor the PotentialTimeBomb query to use the new API. 2023-05-08 12:48:00 +02:00
Michael Nebel
5bf552b318 Update docs/codeql/codeql-language-guides/customizing-library-models-for-java.rst
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-05-08 12:40:30 +02:00
Tom Hvitved
ededd466cb Merge pull request #13030 from hvitved/csharp/warn-as-error
C#: Never treat warnings as error in the extractor
2023-05-08 10:46:20 +02:00
Tom Hvitved
2f95af8ef2 Ruby: Remove self edges 2023-05-08 10:26:01 +02:00
Jules
884df51bf6 Merge branch 'main' into shati-patel/mrva-results-view 2023-05-08 08:06:18 +02:00
Maiky
3960853af0 CWE-089 Add Sequel SQL Injection Sink 2023-05-07 23:56:56 +02:00
Maiky
6a3d995b35 Add Mysql2 as SQL Injection Sink 2023-05-06 12:25:25 +02:00
Geoffrey White
0ab894765e Swift: Fix more underline length issues. 2023-05-05 18:13:08 +01:00
Geoffrey White
aa8aa0ba00 Swift: Fix Sphinx / Docs error. 2023-05-05 17:58:31 +01:00
Geoffrey White
3315fd2e35 Swift: Add necessary .yml files. 2023-05-05 17:55:05 +01:00
Geoffrey White
850686a8d9 Swift: Add images. 2023-05-05 17:35:27 +01:00
Mathias Vorreiter Pedersen
89bf335900 C++: Accept test changes. 2023-05-05 16:44:41 +01:00
Mathias Vorreiter Pedersen
b43702451f C++: Remove self edges from post-update SSA. 2023-05-05 15:47:00 +01:00
Mathias Vorreiter Pedersen
4048915c8c C++: Remove self edges from non-post-update SSA. 2023-05-05 15:45:44 +01:00
Owen Mansel-Chan
d329da673a Refactor logic for which version to install
This does not change the version returned. In the case the the go mod
version is supported and the go env version is below goMinVersion, the
message now talks about go env version being unsupported instead of
it being less than go mod version. This seems more sensible to me.
2023-05-05 15:44:55 +01:00
Owen Mansel-Chan
3f7a230a11 Sometimes install Go version even when one exists 2023-05-05 15:44:54 +01:00
Geoffrey White
e4382677c2 Merge branch 'main' into modernsec3 2023-05-05 13:07:01 +01:00
Mathias Vorreiter Pedersen
c0b3a1896b C++: No phi self-edges. 2023-05-05 12:16:52 +01:00
Mathias Vorreiter Pedersen
7323d4ecc1 Merge pull request #13058 from geoffw0/barrier
Swift: Standardize terminology for ConfigSig queries
2023-05-05 11:59:44 +01:00
Paolo Tranquilli
0a20885b35 Merge pull request #13056 from github/redsun82/swift-mark-generated-files
Codegen: mark generated checked in files as such
2023-05-05 12:40:44 +02:00
Geoffrey White
7c85115ff3 Swift: Remove some redundant statements in a few of the QLDoc comments. 2023-05-05 10:45:19 +01:00
Geoffrey White
4cc3a6dcf5 Swift: Fix missing QLDoc. 2023-05-05 10:43:14 +01:00
Geoffrey White
c5178de3f4 Swift: Standardize on 'AdditionalFlowStep' as well. 2023-05-05 10:21:57 +01:00
Mathias Vorreiter Pedersen
cad02441f9 Merge branch 'main' into overrun-write-only-one-alert 2023-05-05 10:14:20 +01:00
Mathias Vorreiter Pedersen
09ba9a74ce Merge pull request #12959 from MathiasVP/identity-consistency-check
DataFlow: Add an "identity-step" consistency check
2023-05-05 10:03:20 +01:00
Geoffrey White
d92ecbb3cf Swift: Standardize on 'barrier' tover 'santerminology now we use ConfigSig dataflow. 2023-05-05 10:03:18 +01:00
Paolo Tranquilli
287b23c05e Codegen: actually commit changed .gitattributes file 2023-05-05 10:10:52 +02:00
Paolo Tranquilli
95248d17d1 Codegen: prepend .gitattributes entries with / 2023-05-05 10:08:44 +02:00
Tony Torralba
929d9dbdfa Merge pull request #13046 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-05-05 10:06:53 +02:00
Paolo Tranquilli
436f2437ef Codegen: also mark generated .gitattributes as linguist-generated 2023-05-05 09:59:44 +02:00
Arthur Baars
0359d29b40 Merge pull request #13055 from hmac/tree-sitter-extractor-clippy-fixes
Shared: Fix clippy in shared extractor
2023-05-05 09:48:51 +02:00
Paolo Tranquilli
d0047ae99f Swift: also mark swift.dbscheme as linguist-generated 2023-05-05 09:43:31 +02:00
Paolo Tranquilli
1155b97232 Codegen: mark generated checked in files as such 2023-05-05 09:29:16 +02:00
Harry Maclean
9203efbdc4 Shared: Share autobuilder code between Ruby and QL 2023-05-05 07:20:14 +00:00
Harry Maclean
c7e8f0d12a Shared: Pin rust version for shared extractor 2023-05-05 06:36:55 +00:00
Harry Maclean
a577bec22c Shared: Fix clippy warnings in shared extractor 2023-05-05 06:30:12 +00:00
github-actions[bot]
3d9e5ebfd8 Add changed framework coverage reports 2023-05-05 00:14:57 +00:00
Edward Minnix III
2d5b35067e Merge pull request #12721 from egregius313/egregius313/java/move-configurations-to-libraries
Java: Move more dataflow configurations to `*Query.qll` files
2023-05-04 20:14:22 -04:00
Ed Minnix
0c604b1c34 Remove generated model 2023-05-04 16:56:14 -04:00
Ed Minnix
7a295b554b Remove Map rows 2023-05-04 16:52:40 -04:00
Edward Minnix III
a34a51737f Add SyntheticFields for JwsHeader
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-05-04 16:52:40 -04:00
Ed Minnix
62cbcdb30c Add change note 2023-05-04 16:52:40 -04:00
Ed Minnix
a4f4ff15ce Change method resolveSigningKey from class to interface
The resolveSigningKey method of SigningKeyResolverAdapter is an
implementation of that defined in SigningKeyResolver. So this changes
the type from the class to the interface it implements
2023-05-04 16:52:40 -04:00
Ed Minnix
5c10d42915 More test cases for io.jsonwebtoken.SigningKeyResolverAdapter 2023-05-04 16:52:40 -04:00
Ed Minnix
a4fa1ec768 Test case for modeling io.jsonwebtoken.SigningKeyResolverAdapter 2023-05-04 16:52:40 -04:00
Ed Minnix
3d0147765c Add missing methods to jwtk-jjwt stubs 2023-05-04 16:52:40 -04:00
Ed Minnix
a38466b0f3 Erase generics in generated model 2023-05-04 16:52:40 -04:00
Ed Minnix
26cdf24bf0 Added MaD models for io.jsonwebtoken 2023-05-04 16:52:39 -04:00
Robert Marsh
e32e28d95f Merge pull request #13035 from MathiasVP/ranked-phi-hack-for-bounded-phi
C++: Work around poor codegen for `forex` in IR-based range analysis
2023-05-04 16:48:00 -04:00
Robert Marsh
b7653ec92d C++: ignore cast arrays in constant off-by-one query 2023-05-04 16:39:02 -04:00
Robert Marsh
d9665e1678 C++: add case test for constant off-by-one query 2023-05-04 16:34:29 -04:00
Robert Marsh
3abf5d1bd2 C++: stitch paths in array off-by-one query 2023-05-04 16:28:05 -04:00
Chuan-kai Lin
0984fc7cce JS: Add pragma[only_bind_out] to Locatable::toString() calls 2023-05-04 13:20:56 -07:00
Jami
3c74c8bbe0 Merge pull request #13019 from jcogs33/jcogs33/url-open-stream-updates
Java: switch `url-open-stream` sink models to `experimentalSinkModel`
2023-05-04 15:07:44 -04:00
Chuan-kai Lin
d968cee2c4 Java: Add pragma[only_bind_out] to Top::toString() calls 2023-05-04 11:46:35 -07:00
Mathias Vorreiter Pedersen
27c4408431 Merge pull request #12997 from MathiasVP/sync-product-flow-across-calls
C++: Synchronize product dataflow paths on function entry points
2023-05-04 17:37:48 +01:00
Mathias Vorreiter Pedersen
de08ada0bc C++: Accept test changes. 2023-05-04 17:29:39 +01:00
Mathias Vorreiter Pedersen
2587f8ed96 C++: Only alert on the largest possible overflow. 2023-05-04 17:29:31 +01:00
Mathias Vorreiter Pedersen
a09a8dba95 C++: Add testcase with repeated TP alerts. 2023-05-04 16:59:54 +01:00
Stephan Brandauer
62ab91c14a fix ql-for-ql warning 2023-05-04 17:48:50 +02:00
Stephan Brandauer
27703c777a pull subtypes-logic out into helper predicate, and document it 2023-05-04 17:45:17 +02:00
Stephan Brandauer
0e5591ff86 move getCallable to signature module implementation, and document it 2023-05-04 17:35:46 +02:00
Stephan Brandauer
a616a786f0 formatting 2023-05-04 17:27:27 +02:00
Jami
4e31c46b0c Merge pull request #13024 from jcogs33/jcogs33/remove-hardcoded-jwt-key-summaries
Java: remove `hardcoded-jwt-key` experimental summary models
2023-05-04 11:18:18 -04:00
Mathias Vorreiter Pedersen
5a5240dbf9 Merge pull request #12865 from rdmarsh2/rdmarsh2/range-analysis-ast-wrapper
C++: AST-based wrapper for new range analysis
2023-05-04 16:10:21 +01:00
Paolo Tranquilli
b511c5f355 Merge pull request #13012 from github/redsun82/swift-json
Swift: add infrastructure for emitting JSON diagnostics
2023-05-04 17:04:45 +02:00
Stephan Brandauer
36aabc077e Update java/ql/src/Telemetry/AutomodelFrameworkModeCharacteristics.qll
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2023-05-04 16:50:37 +02:00
Ed Minnix
5f3c8fef3f Privacy markers and fixed imports 2023-05-04 10:25:17 -04:00
Ed Minnix
3100e98513 Add missing change notes and update date 2023-05-04 10:25:17 -04:00
Ed Minnix
74fc6382a6 Add improper validation of array size query libraries 2023-05-04 10:25:17 -04:00
Ed Minnix
c319ee4c0d Add TempDirLocalInformationDisclosureQuery 2023-05-04 10:25:16 -04:00
Ed Minnix
b087cf9a0a Add Arithmetic query libraries 2023-05-04 10:25:16 -04:00
Ed Minnix
b6361cdd3d Move CWE-190/ArithmeticCommon.qll to semmle.code.java.security 2023-05-04 10:25:16 -04:00
Ed Minnix
77ee80fd81 Add missing change notes 2023-05-04 10:25:16 -04:00
Ed Minnix
24b00bac11 Add UnsafeHostnameVerificationQuery 2023-05-04 10:25:16 -04:00
Ed Minnix
f4a6f555b4 Add NumericCastTaintedQuery 2023-05-04 10:25:13 -04:00
Ed Minnix
e65a54b85f Add BrokenCryptoAlgorithmQuery 2023-05-04 10:19:12 -04:00
Ed Minnix
4b76564911 Add MaybeBrokenCryptoAlgorithmQuery 2023-05-04 10:15:00 -04:00
Ed Minnix
e4f47ece43 Add ResponseSplittingLocalQuery 2023-05-04 10:15:00 -04:00
Ed Minnix
91b3533035 Add SqlTaintedLocalQuery 2023-05-04 10:14:59 -04:00
Ed Minnix
a0f7575b34 Add StackTraceExposureQuery 2023-05-04 10:14:59 -04:00
Ed Minnix
aff299eafd Add ExecTaintedLocal 2023-05-04 10:14:59 -04:00
Ed Minnix
b39d5088de Add InsecureCookieQuery 2023-05-04 10:14:59 -04:00
Ed Minnix
be24b29e7a Add UrlRedirectLocalQuery.qll 2023-05-04 10:14:59 -04:00
Ed Minnix
0249187282 Add ExternallyControlledFormatStringLocalQuery.qll 2023-05-04 10:14:59 -04:00
Ed Minnix
5834e4ac52 Add UrlRedirectQuery.qll 2023-05-04 10:14:59 -04:00
Ed Minnix
cc22a7d4b4 Add XssLocalQuery 2023-05-04 10:14:59 -04:00
Ed Minnix
c2b6a3f4e0 Add XPathInjectionQuery 2023-05-04 10:14:59 -04:00
Ed Minnix
c15ce27957 Add SqlConcatenatedQuery 2023-05-04 10:14:59 -04:00
Ed Minnix
1af6d5f7b3 Add TaintedPermissionsCheckQuery 2023-05-04 10:14:59 -04:00
Kasper Svendsen
4035b16ac1 Merge pull request #13008 from kaspersv/kaspersv/explicit-this-receivers-shared1
Java, C#: Make implicit this receivers explicit
2023-05-04 15:38:45 +02:00
Owen Mansel-Chan
bb3101e649 Merge pull request #13022 from owen-mc/go/identify-environment-fixes
Go: `go-autobuilder --identify-environment` fixes
2023-05-04 14:30:31 +01:00
Alex Ford
b09772e85c Merge pull request #12893 from alexrford/rb/sqlite3
Ruby: model sqlite3
2023-05-04 14:24:45 +01:00
Arthur Baars
0a5647d338 Merge pull request #13033 from github/aibaars-patch-2
Update tree-sitter-extractor-test.yml
2023-05-04 15:17:33 +02:00
Paolo Tranquilli
7ce1189e36 Swift: tweak after review comments 2023-05-04 15:14:46 +02:00
Mathias Vorreiter Pedersen
26206a85dc C++: Properly handle setter-related flow in IPA injector. 2023-05-04 14:00:17 +01:00
Anders Schack-Mulligen
1185bfc90f Merge pull request #12986 from aschackmull/java/mapvalue-precision
Java: Force high precision for MapValueContent.
2023-05-04 14:52:41 +02:00
Anders Schack-Mulligen
3b004b06b0 Java: Minor perf fix for typePrefixContainsAux1. 2023-05-04 14:21:36 +02:00
yoff
42090b55fa Merge branch 'main' into python/captured-variables-for-typetracking 2023-05-04 13:52:23 +02:00
yoff
d1206ea620 Update python/ql/test/library-tests/ApiGraphs/py3/test_captured_inheritance.py
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-05-04 13:52:08 +02:00
Geoffrey White
8211ba990d Merge branch 'main' into modernsec3 2023-05-04 12:50:27 +01:00
Geoffrey White
597b92cd16 Swift: Autoformat. 2023-05-04 12:41:49 +01:00
Geoffrey White
9317174742 Swift: Improve the LibXML2 tests for XXE and remove the TODO comment. 2023-05-04 12:28:55 +01:00
Mathias Vorreiter Pedersen
f94eb74a7b C++: Move 'rankedPhiInput' to the 'RangeUtils' module and use it in 'RangeAnalysisStage.qll'. 2023-05-04 12:20:17 +01:00
Geoffrey White
b8c96ed5a5 Swift: Delete some TODO comments (that have been turned into issues). 2023-05-04 12:17:01 +01:00
Arthur Baars
207ec410f4 Turning off clippy warnings for now 2023-05-04 13:16:59 +02:00
Arthur Baars
55e426e191 Update tree-sitter-extractor-test.yml
Fix workflow
2023-05-04 13:07:21 +02:00
Kasper Svendsen
29239939c7 Merge pull request #13010 from kaspersv/kaspersv/java-explicit-this-receivers
Java: Make implicit this receivers explicit
2023-05-04 13:06:41 +02:00
Paolo Tranquilli
b5c0cd8cac Swift: remove unused third party build file 2023-05-04 12:18:02 +02:00
Paolo Tranquilli
d61e366441 Swift: replace assert with CODEQL_ASSERT 2023-05-04 12:15:58 +02:00
Owen Mansel-Chan
d2cf1a24e0 Merge pull request #13014 from owen-mc/go/misc-go-cleanups
Go: Misc go cleanups
2023-05-04 10:34:32 +01:00
Owen Mansel-Chan
011c9272cf Remove inconsistent line break in message 2023-05-04 10:33:05 +01:00
Owen Mansel-Chan
c21b1a6e3b Be clear when no Go version in environment file 2023-05-04 10:32:21 +01:00
Owen Mansel-Chan
5d06adb1e6 Only check if go env version is supported if go mod version is supported
This is what I meant to implement in the first place.
2023-05-04 10:24:43 +01:00
Kasper Svendsen
f2031e4e5e Merge pull request #13026 from kaspersv/kaspersv/python-enable-warn-on-implicit-this
Python: Enable implicit this warnings
2023-05-04 11:12:16 +02:00
Mathias Vorreiter Pedersen
d3d706d9ab C++: Fix accidental cartesian product. 2023-05-04 09:59:16 +01:00
Tom Hvitved
ba5025d16c C#: Never treat warnings as error in the extractor 2023-05-04 10:53:50 +02:00
Paolo Tranquilli
bce483ddb1 Swift: rename log package to logging 2023-05-04 10:42:39 +02:00
Paolo Tranquilli
9544b96ff1 Merge branch 'main' into redsun82/swift-json 2023-05-04 10:34:11 +02:00
Paolo Tranquilli
3d0935affa Merge pull request #12860 from github/redsun82/swift-logging-assertions-and-prints
Swift: replace assertions and direct prints with proper logging
2023-05-04 10:25:45 +02:00
Kasper Svendsen
d9f29a85d6 Python: Enable implicit this warnings 2023-05-04 10:16:52 +02:00
Paolo Tranquilli
bd303357f7 Swift: refactor after review 2023-05-04 10:13:39 +02:00
Sim4n6
1247403d43 Updated expected results file 2023-05-04 08:56:45 +01:00
Kasper Svendsen
65deb9d90a Merge pull request #13016 from kaspersv/kaspersv/js-explicit-this-receivers3
JS: Make implicit this receivers explicit
2023-05-04 09:15:01 +02:00
Harry Maclean
149722a877 Merge pull request #12881 from hmac/extractor-high-level-api
Shared: High level extractor API
2023-05-04 13:57:40 +07:00
Kasper Svendsen
c4b2bce9de Merge pull request #13018 from kaspersv/kaspersv/go-enable-warn-on-implicit-this
Go: Enable warnings for implicit this receivers
2023-05-04 08:46:23 +02:00
Kasper Svendsen
a7f5decb2b Merge branch 'main' into kaspersv/go-enable-warn-on-implicit-this 2023-05-04 07:45:07 +02:00
Jeroen Ketema
0b2f5609d6 Merge pull request #12982 from rdmarsh2/rdmarsh2/ir-guards-unreached
C++: Handle nonreturning functions in IR generation
2023-05-03 23:20:46 +02:00
Mathias Vorreiter Pedersen
2a4b17608f C++: Accept test changes. 2023-05-03 22:04:11 +01:00
Mathias Vorreiter Pedersen
77001a070b Merge branch 'main' into identity-consistency-check 2023-05-03 22:01:06 +01:00
Robert Marsh
a2503bd7d5 C++: update change note 2023-05-03 16:28:09 -04:00
Jami Cogswell
78661f4ec9 Java: remove hardcoded-jwt-key summaries 2023-05-03 16:09:30 -04:00
Mathias Vorreiter Pedersen
e650df810d Python: Accept consistency changes. 2023-05-03 20:33:00 +01:00
Mathias Vorreiter Pedersen
924854c6dc Ruby: Accept consistency changes. 2023-05-03 20:32:33 +01:00
Mathias Vorreiter Pedersen
177dd76da6 C#: Accept consistency changes. 2023-05-03 20:30:06 +01:00
Mathias Vorreiter Pedersen
5dc9d9a10f C++: Accept consistency changes. 2023-05-03 20:29:17 +01:00
Michael Nebel
e42bf2efd8 Merge pull request #12894 from michaelnebel/csharp/untrustedinput
C#: Re-factor the UnsafeDeserializationQuery to use the new API.
2023-05-03 20:12:44 +02:00
Mathias Vorreiter Pedersen
2af48e2536 Merge pull request #12970 from MathiasVP/barrier-guards-for-indirect-expressions
C++: Barrier guards API for indirect expressions
2023-05-03 18:14:01 +01:00
Sim4n6
14ca20e782 removed redundant imports 2023-05-03 17:43:54 +01:00
Rasmus Lerchedahl Petersen
64068f1c88 python: longer name and longer comment 2023-05-03 18:23:08 +02:00
Rasmus Lerchedahl Petersen
6d9fd24f1b python: update comments 2023-05-03 18:10:15 +02:00
Mathias Vorreiter Pedersen
2d98fb7cf1 C++: Add a parameter-based version of 'getAnIndirectBarrierNode'. 2023-05-03 17:06:59 +01:00
Mathias Vorreiter Pedersen
f8ef697978 Merge pull request #13013 from MathiasVP/fix-todos-in-flow-summary
Swift: Fix TODOs in `FlowSummary.qll`
2023-05-03 17:05:28 +01:00
yoff
e49f7a5d33 Update python/ql/test/experimental/dataflow/variable-capture/by_value.py
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-05-03 18:03:39 +02:00
yoff
a905917123 Merge pull request #12937 from RasmusWL/fix-module-variable-node
Python: Hide `ModuleVariableNode` in data-flow paths
2023-05-03 17:58:26 +02:00
Owen Mansel-Chan
62653fbec5 Simplify return statements in tryReadGoDirective
This makes it easier to reason about what is returned and would have
avoided the bug with variable shadowing.
2023-05-03 16:55:19 +01:00
Owen Mansel-Chan
d30b736eb2 Move check for EmitNewerGoVersionNeeded diagnostic
This should only be done when --identify-environment has not been passed
2023-05-03 16:52:48 +01:00
Mathias Vorreiter Pedersen
8ef961b776 Merge pull request #13017 from MathiasVP/fix-todos-in-flow-summary-2
Swift: Fix TODO by reorganizing model imports
2023-05-03 16:48:58 +01:00
Owen Mansel-Chan
afb692300a Fix typo in field name 2023-05-03 16:46:44 +01:00
Rasmus Wriedt Larsen
c9680b9202 Misc: Look for .expected changes from integration-tests... 2023-05-03 17:40:21 +02:00
Rasmus Wriedt Larsen
b048f9d8c4 Misc: Allow specifying SHA directly to script 2023-05-03 17:39:20 +02:00
Owen Mansel-Chan
742a6d9264 Fix accidental variable shadowing 2023-05-03 16:32:53 +01:00
Rasmus Wriedt Larsen
e3fc6d67cc Misc: Allow no internal CI 2023-05-03 17:31:52 +02:00
shati-patel
12507aac90 Update screenshots and docs for changes to MRVA results view 2023-05-03 16:04:07 +01:00
Owen Mansel-Chan
347b5f1b1a Remove unused code 2023-05-03 16:03:17 +01:00
Owen Mansel-Chan
509dda5af5 Use raw string literals to avoid double-escaping 2023-05-03 16:02:36 +01:00
Owen Mansel-Chan
4de4f35855 Merge pull request #12957 from owen-mc/go/autobuilder-identify-environment
Go: Add `go-autobuilder --identify-environment`
2023-05-03 16:01:45 +01:00
Mathias Vorreiter Pedersen
0d6fdc674b C++: Also account for setter-related flow and jump steps. 2023-05-03 15:47:12 +01:00
Jami Cogswell
2e683b3dd2 Java: add change note 2023-05-03 10:43:50 -04:00
Alex Ford
e7213e92cf Merge remote-tracking branch 'origin/main' into rb/sqlite3 2023-05-03 15:18:07 +01:00
Alex Ford
6e6eee2dab Ruby: add test case for instance variable flow with sqlite3 2023-05-03 15:16:16 +01:00
Paolo Tranquilli
a30d5f5030 Swift: fix diagnostic source creation being called really once 2023-05-03 16:14:22 +02:00
Jami Cogswell
1d39402c98 Java: remove url-open-stream from cwe-sink csv; this removes CWE-036 from the framework coverage report 2023-05-03 10:12:12 -04:00
Alex Ford
a26f9736f1 Ruby: add change note for sqlite3 support 2023-05-03 15:12:06 +01:00
Asger F
1a9956354e JS: Restrict getInput to indirect command injection query 2023-05-03 16:10:03 +02:00
Jami Cogswell
2224c5d9be Java: remove url-open-stream kind from getInvalidModelKind 2023-05-03 10:08:50 -04:00
Paolo Tranquilli
8873e42cb1 Swift: removed unused date dependency 2023-05-03 16:02:26 +02:00
Stephan Brandauer
32f2614fe0 add typecheckable mechanism to enforce minimal set of metadata 2023-05-03 16:00:50 +02:00
Jami Cogswell
9cdb9d6fbe Java: remove url-open-stream kind from docs 2023-05-03 10:00:05 -04:00
Jami Cogswell
917268e7e6 Java: activate the models in openstream query 2023-05-03 09:57:45 -04:00
Geoffrey White
02ae44a911 Update docs/codeql/codeql-language-guides/analyzing-data-flow-in-swift.rst
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-05-03 14:48:27 +01:00
Kasper Svendsen
46727af948 Go: Enable warnings for implicit this receivers 2023-05-03 15:41:55 +02:00
Erik Krogh Kristensen
f29db40371 Merge pull request #13011 from kaspersv/kaspersv/explicit-this-receivers-shared2
JS, Python, Ruby: Make implicit this receivers explicit
2023-05-03 15:34:59 +02:00
Mathias Vorreiter Pedersen
59e495aa31 Swift: Reorganize MaD rows and frameworks to ensure we always import all frameworks in 'ExternalFlow.qll' and 'FlowSummary.qll'. 2023-05-03 14:34:43 +01:00
Geoffrey White
02dc9be239 Swift: Fix the versions in 'examples' as well. 2023-05-03 14:31:48 +01:00
Kasper Svendsen
67950c8e6b JS: Make implicit this receivers explicit 2023-05-03 15:31:00 +02:00
Geoffrey White
2999b5fea1 Swift: Mathias's fix for the non-constant format example. 2023-05-03 14:29:39 +01:00
Paolo Tranquilli
1d492f89cc Merge branch 'main' into redsun82/swift-logging-assertions-and-prints 2023-05-03 15:19:08 +02:00
Paolo Tranquilli
51763d65b0 Swift: reshape a TODO into another 2023-05-03 15:18:35 +02:00
Mathias Vorreiter Pedersen
1c80175a34 Merge pull request #13009 from MathiasVP/fix-tostring-on-regex-literals
Swift: Fix TODO on regex literals's `toString`
2023-05-03 14:17:50 +01:00
Jami Cogswell
f8b39fda2e Java: switch url-open-stream models to experimentalSinkModel 2023-05-03 09:11:24 -04:00
Kasper Svendsen
ea75996932 Merge pull request #13005 from kaspersv/kaspersv/ruby-explicit-this-receivers
Ruby: Make implicit this receivers explicit
2023-05-03 14:57:43 +02:00
Paolo Tranquilli
7709bc76a8 Merge branch 'main' into redsun82/swift-json 2023-05-03 14:55:05 +02:00
Paolo Tranquilli
f461e719da Swift: fix wrong condition for log 2023-05-03 14:54:28 +02:00
Mathias Vorreiter Pedersen
af18c98028 Swift: Fix TODOs in 'FlowSummary.qll' 2023-05-03 13:48:17 +01:00
Owen Mansel-Chan
3f645e9401 Merge pull request #13006 from kaspersv/kaspersv/go-explicit-this-receivers
Go: Make implicit this receivers explicit
2023-05-03 13:47:10 +01:00
Mathias Vorreiter Pedersen
1f018d69ab Swift: Accept test changes. 2023-05-03 13:45:17 +01:00
Stephan Brandauer
6d29273c43 make framework mode explicit in file/module names 2023-05-03 14:36:42 +02:00
Geoffrey White
1084d7ff0e Swift: Correct a couple more cases. 2023-05-03 13:35:07 +01:00
Paolo Tranquilli
8de2f9958e Swift: add support to output JSON diagnostics
New `DIAGNOSE_ERROR` and `DIAGNOSE_CRITICAL` macros are added.

These accept an ID which should indicate a diagnostic source via
a function definition in `codeql::diagnostics`, together with the usual
format + arguments accepted by other `LOG_*` macros.

When the log is flushed, these special logs will result in an error JSON
diagnostic entry in the database.
2023-05-03 14:32:31 +02:00
Paolo Tranquilli
0ad529dff8 Swift: move logging to a common directory 2023-05-03 14:32:31 +02:00
Paolo Tranquilli
c7c12a7108 Swift: add json and date dependencies 2023-05-03 14:32:30 +02:00
Geoffrey White
2fd8b87bcd Apply suggestions from code review
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-05-03 13:31:27 +01:00
Stephan Brandauer
dfb9d88198 fix ql-for-ql errors 2023-05-03 14:17:11 +02:00
Ian Lynagh
b56b843d13 Merge pull request #12987 from github/post-release-prep/codeql-cli-2.13.1
Post-release preparation for codeql-cli-2.13.1
2023-05-03 13:12:10 +01:00
Geoffrey White
205647331d Merge pull request #12955 from geoffw0/swiftoddsends
Swift: Odds and ends
2023-05-03 13:09:13 +01:00
Owen Mansel-Chan
841db151f6 Improve naming 2023-05-03 13:01:23 +01:00
Owen Mansel-Chan
0f134c6a3c Wrap long line 2023-05-03 12:52:11 +01:00
Kasper Svendsen
aca2ace843 JS, Python, Ruby: Make implicit this receivers explicit 2023-05-03 13:51:51 +02:00
Owen Mansel-Chan
f86e540d2a msg is always non-empty 2023-05-03 12:50:58 +01:00
Rasmus Wriedt Larsen
d18be93e24 Merge pull request #13004 from kaspersv/kaspersv/python-explicit-this-receiver
Python: Make implicit this receivers explicit
2023-05-03 13:50:32 +02:00
Owen Mansel-Chan
af2a9b21ab Add function comments 2023-05-03 12:47:28 +01:00
Kasper Svendsen
081085e128 Java: Make implicit this receivers explicit 2023-05-03 13:37:35 +02:00
Felicity Chapman
ca51200cd4 Merge pull request #12967 from github/felicitymay-9916-update-links
Update links to CodeQL manual in the codeql.github.com site
2023-05-03 12:24:27 +01:00
Michael Nebel
932ee0b877 C#: Delete unused deprecated abstract class. 2023-05-03 13:21:46 +02:00
Michael Nebel
5944b88334 C#: Re-factor the SafeConstructor classes to use the new API. 2023-05-03 13:09:35 +02:00
Michael Nebel
0e17fa79c4 C#: Update expected test output. 2023-05-03 13:09:35 +02:00
Michael Nebel
815602d3b5 C#: Re-factor some of the data flow configurations used by the UnsafeDeserializationQuery to use the new API. 2023-05-03 13:09:35 +02:00
Mathias Vorreiter Pedersen
9e129ac38d Swift: Fix toString on regex literals. 2023-05-03 12:09:12 +01:00
Kasper Svendsen
e071a25653 Java, C#: Make implicit this receivers explicit 2023-05-03 13:09:00 +02:00
Owen Mansel-Chan
a9d3cfccd4 use severityNote for all diagnostics 2023-05-03 12:03:12 +01:00
Owen Mansel-Chan
532e1446f0 Change diagnostic ids and use "lower than or equal to" 2023-05-03 12:03:12 +01:00
Owen Mansel-Chan
4b88279ccc Improve usage message formatting 2023-05-03 12:03:11 +01:00
Kasper Svendsen
e969018f99 Go: Make implicit this receivers explicit 2023-05-03 12:45:42 +02:00
Kasper Svendsen
68cf33e791 Ruby: Make implicit this receivers explicit 2023-05-03 12:25:01 +02:00
Kasper Svendsen
3eb5a95ee3 Python: Make implicit this receivers explicit 2023-05-03 12:16:21 +02:00
Geoffrey White
9590dde1e6 Merge branch 'main' into swiftoddsends 2023-05-03 11:13:38 +01:00
Owen Mansel-Chan
27fb42db76 Env var for path to environment file 2023-05-03 11:11:09 +01:00
Felicity Chapman
dff6f17978 Merge branch 'main' into felicitymay-9916-update-links 2023-05-03 11:05:10 +01:00
Erik Krogh Kristensen
e9c25949fa Merge pull request #13002 from kaspersv/kaspersv/javascript-explicit-this-receiver
JS: Make implicit this receivers explicit
2023-05-03 11:55:22 +02:00
Kasper Svendsen
be08b97418 Merge pull request #12999 from kaspersv/kaspersv/cpp-explicit-this-receiver
C++: Make implicit this receivers explicit
2023-05-03 11:51:21 +02:00
Kasper Svendsen
a92a55f437 Merge pull request #13001 from kaspersv/kaspersv/csharp-explicit-this-receiver
C#: Make implicit this receivers explicit
2023-05-03 11:39:31 +02:00
Stephan Brandauer
05bf13b020 use getCallable predicate 2023-05-03 11:27:14 +02:00
Kasper Svendsen
efdaffedee JS: Make implicit this receivers explicit 2023-05-03 10:49:46 +02:00
Asger F
b9ad4177f9 JS: List safe environment variables in IndirectCommandInjection 2023-05-03 10:48:14 +02:00
Kasper Svendsen
bfc48efdaa C#: Make implicit this receivers explicit 2023-05-03 10:48:00 +02:00
Kasper Svendsen
c9fba18c48 C++: Make implicit this receivers explicit 2023-05-03 10:31:01 +02:00
Asger F
4c6711d007 JS: Clarify the difference between context and input sources 2023-05-03 10:30:04 +02:00
Stephan Brandauer
09f3296134 export related locations using notation 2023-05-03 10:27:46 +02:00
Asger F
bdcda7ffe6 JS: Move change note to right location 2023-05-03 10:22:40 +02:00
tyage
22f5b7a18b JS: check scoped package and normal package 2023-05-03 13:19:59 +09:00
Robert Marsh
df1a7b8b83 C++: change note 2023-05-02 16:19:00 -04:00
Sim4n6
6d3fdc3a07 all forms considered+ more unicode normalize sink 2023-05-02 21:18:37 +01:00
Robert Marsh
8c992fb437 C++: added change note 2023-05-02 16:13:33 -04:00
Edward Minnix III
733a00039e Merge pull request #12864 from egregius313/egregius313/java/mad/update-typeAsModel
Java: Erase generics in `typeAsModel` predicate used in model generator
2023-05-02 15:28:51 -04:00
Geoffrey White
54a4b898a3 Swift: Re-run codegen. 2023-05-02 17:46:59 +01:00
Geoffrey White
a698f3fcb9 Merge branch 'main' into modernsec3 2023-05-02 17:35:08 +01:00
Owen Mansel-Chan
0c6efb8c84 Add telemetry-only diagnostics 2023-05-02 17:17:06 +01:00
Owen Mansel-Chan
3bfcbbf7af Add unit test 2023-05-02 17:17:05 +01:00
Owen Mansel-Chan
0710ed97db Refactor to be more easily testable 2023-05-02 17:17:05 +01:00
Owen Mansel-Chan
2db304edee Choose which version to install and write file 2023-05-02 17:17:04 +01:00
Mathias Vorreiter Pedersen
7fa6894aaf C++: Ensure that product dataflow library enters/leaves through the same call. 2023-05-02 17:13:36 +01:00
Geoffrey White
bb6aa11ce5 Swift: Additional test case. 2023-05-02 17:12:44 +01:00
Geoffrey White
ca50f1117e Swift: Hide locationless results in the inlineexpectations test (there's no way to make them expected). 2023-05-02 16:57:29 +01:00
Alex Ford
388b2abf68 Merge pull request #12821 from maikypedia/maikypedia/ruby-ssti
Ruby: Add Rails `render inline:` as Template Injection Sink
2023-05-02 16:56:27 +01:00
Alex Ford
82c025020d Merge remote-tracking branch 'origin/main' into maikypedia/ruby-ssti 2023-05-02 16:18:41 +01:00
Alex Ford
a571bc64ac ruby: regenerate TemplateInjection.expected 2023-05-02 16:14:20 +01:00
Sim4n6
019b85beb6 Add Unicode Bypass Validation query, test and help file 2023-05-02 15:36:39 +01:00
Sim4n6
083cd612cd add a change note markdown 2023-05-02 15:17:03 +01:00
Sim4n6
1fa1a4e268 Add Unicode Bypass Validation query tests and help 2023-05-02 15:09:16 +01:00
Robert Marsh
2bfa8b661b C++: a some QLDoc to new range analysis wrapper 2023-05-02 09:43:25 -04:00
Mathias Vorreiter Pedersen
2e5a04854e Merge pull request #12989 from MathiasVP/add-fp-overrun-write-product-flow
C++: Add testcase with `cpp/overrun-write` FP
2023-05-02 14:33:34 +01:00
Tony Torralba
ec44aa2597 Add change note 2023-05-02 15:31:20 +02:00
Tony Torralba
34f978ed26 Move manual models out of the generated directory 2023-05-02 15:29:28 +02:00
Owen Mansel-Chan
644d7f18c2 Factor out tryReadGoDirective() 2023-05-02 14:15:03 +01:00
Owen Mansel-Chan
5e87111a8b Stop using deprecate io/ioutil package 2023-05-02 14:15:02 +01:00
Owen Mansel-Chan
1e2bdd88b1 Add --identify-environment flag 2023-05-02 14:15:01 +01:00
Mathias Vorreiter Pedersen
635d290504 C++: Add testcase with FP. 2023-05-02 13:51:16 +01:00
Rasmus Wriedt Larsen
c89b57997a Python: Change variable capture tests to use fresh variable names
Instead of reusing `nonSink0` for both captureOut1NotCalled and
captureOut2NotCalled tests (I used 1/2 naming scheme to match things up
nicely).

I also added a comment highlighting that `m` is the function that is not
called (since I overlooked that initially :O)
2023-05-02 14:13:56 +02:00
Asger F
67afbee06d Merge pull request #12825 from smiddy007/JS-Allow-Truncated-Hash-Forge-NonKeyCipher
JS: Allow NonKeyCiphers to include truncated SHA-512 MDs in Forge JS libr…
2023-05-02 13:59:30 +02:00
Anders Schack-Mulligen
353d5f82a6 Merge pull request #12984 from aschackmull/dataflow/instanceof-node
Dataflow: Replace "extends Node" with "instanceof Node".
2023-05-02 13:52:33 +02:00
Asger F
0ce27d13a7 Merge pull request #12985 from asgerf/rb/meta-query-sql-injection
Ruby: add SQL injection sinks to meta query
2023-05-02 13:35:06 +02:00
Stephan Brandauer
f1644adca9 add internal tag to extraction queries; use 'ml' in query ids, instead of 'ml-powered' 2023-05-02 13:30:22 +02:00
Stephan Brandauer
bb7e473cbf use the name callable, instead of callee for methods, functions 2023-05-02 13:22:31 +02:00
Stephan Brandauer
f7f6f104d0 use NegativeEndpointType class; replace link to slack discussion 2023-05-02 13:15:30 +02:00
Mathias Vorreiter Pedersen
ab67103e6e Merge pull request #12966 from MathiasVP/dataflow-for-static-vars
C++: Dataflow for static local variables
2023-05-02 11:52:43 +01:00
github-actions[bot]
18d4af994d Post-release preparation for codeql-cli-2.13.1 2023-05-02 10:50:20 +00:00
Geoffrey White
664500d2e6 Swift: Fix member variable sinks in swift/hardcoded-key. 2023-05-02 11:26:21 +01:00
Geoffrey White
adbd2c467d Swift: Fix member variable sinks in swift/path-ionjection. 2023-05-02 11:26:20 +01:00
Tony Torralba
564bb1ccb0 Manual fixes 2023-05-02 11:27:48 +02:00
Anders Schack-Mulligen
97cd3b8576 Java: Force high precision for MapValueContent. 2023-05-02 11:19:21 +02:00
Asger F
04e393fcf8 JS: Change note 2023-05-02 11:02:58 +02:00
Paolo Tranquilli
c65c65557d Swift: accept string representation changes in test 2023-05-02 10:49:31 +02:00
Anders Schack-Mulligen
ca09649679 Dataflow: Forward hasLocationInfo. 2023-05-02 10:48:32 +02:00
Asger F
f59c149bae Ruby: add SQL injection sinks to meta query 2023-05-02 10:46:55 +02:00
Paolo Tranquilli
3685590a12 Swift: remove version control markers 2023-05-02 10:45:43 +02:00
Paolo Tranquilli
7adcd0d043 Swift: small tweak to visitBuiltinType 2023-05-02 10:45:43 +02:00
Paolo Tranquilli
87c73879cb Swift: add explanation to getExtensionIndex 2023-05-02 10:45:43 +02:00
Paolo Tranquilli
826d7c7dbe Swift: preload extension indexes
Finding each extension declaration separately within its parent seemed
to create an `O(n^2)` noticeable performance problem. This is solved
by preloading indexes and storing them in a map, so as to iterate
through the parent of an extension only once per parent instead of once
per extension.
2023-05-02 10:45:43 +02:00
Paolo Tranquilli
146591934a Swift: clean up SwiftMangler 2023-05-02 10:45:43 +02:00
Paolo Tranquilli
f6a6958c03 Swift: mangle ParameterizedProtocolType 2023-05-02 10:45:43 +02:00
Alex Denisov
92c20be038 Swift: change indexing for extension declarations to make them more stable 2023-05-02 10:45:42 +02:00
Alex Denisov
6c954eae3c Swift: handle isolated types 2023-05-02 10:45:42 +02:00
Paolo Tranquilli
dfbc248e78 Swift: mangle opened archetype and fix global actor 2023-05-02 10:45:42 +02:00
Paolo Tranquilli
0aed7d56c2 Swift: more mangling 2023-05-02 10:45:42 +02:00
Paolo Tranquilli
2592129d83 Swift: mangle remaining unmangled types appearing during test run 2023-05-02 10:45:42 +02:00
Paolo Tranquilli
c8ca6057d3 Swift: mangle several new things 2023-05-02 10:45:40 +02:00
Paolo Tranquilli
4ac91ea1b2 Swift: mangle function types, type paramters, metatypes, dependent member types 2023-05-02 10:39:46 +02:00
Anders Schack-Mulligen
2001ce34d4 Java/C#: Adjust references. 2023-05-02 10:21:09 +02:00
Tony Torralba
51c08f1314 Merge pull request #12969 from atorralba/atorralba/java/fix-model-generator-sinks-instance-parameters
Java: Fix sink model generator for instance parameters
2023-05-02 10:10:59 +02:00
Mathias Vorreiter Pedersen
fbc872cf1d Update cpp/ql/lib/change-notes/2023-04-28-static-local-dataflow.md
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-05-02 09:07:57 +01:00
Paolo Tranquilli
dcca0278b8 Swift: add more functions to deduplication test 2023-05-02 09:54:59 +02:00
Paolo Tranquilli
ab5b267a39 Swift: add GenericFunctionType to deduplication test 2023-05-02 09:54:04 +02:00
Paolo Tranquilli
2eb82fede7 Swift: restrict Type.ql for deduplication test 2023-05-02 09:52:34 +02:00
Paolo Tranquilli
b6146478dc Swift: mangle nominal and bound generic types 2023-05-02 09:49:48 +02:00
Paolo Tranquilli
1274aaaf9c Swift: mangle GenericTypeDecl 2023-05-02 09:49:48 +02:00
Paolo Tranquilli
476cf72710 Swift: mangle AnyGenericType 2023-05-02 09:49:48 +02:00
Paolo Tranquilli
348bc964be Swift: turn current decl mangling into visitor 2023-05-02 09:49:48 +02:00
Paolo Tranquilli
b269bd5010 Swift: mangle builtin and tuple types 2023-05-02 09:49:48 +02:00
Anders Schack-Mulligen
5927bb2030 Dataflow: Replace "extends Node" with "instanceof Node". 2023-05-02 09:48:34 +02:00
Maiky
5d15ec99c8 Change expected file to new 2023-05-02 09:26:41 +02:00
tyage
be9c8d28b5 JS: drop string comparison 2023-05-02 12:41:03 +09:00
tyage
0d991574ec Fix typo in test 2023-05-02 12:00:42 +09:00
Robert Marsh
c6e0ee2695 C++: fix duplicated UnreachedInstruction in raw IR 2023-05-01 22:54:37 -04:00
Robert Marsh
6dfc59874b C++: more UnreachedInstruction fixes 2023-05-01 22:25:18 -04:00
Robert Marsh
e44073718f C#: Add hasUnreachedInstruction to raw IR 2023-05-01 22:25:18 -04:00
Robert Marsh
7f12f6dc3e C++/C#: format and sync identical files 2023-05-01 22:25:18 -04:00
Robert Marsh
44b6af652e C++: use Options::exits() for noreturn functions 2023-05-01 22:25:17 -04:00
Robert Marsh
c01ee597fa C++: handle calls to noreturn functions 2023-05-01 22:25:12 -04:00
Nora Dimitrijević
383b2e183d Merge pull request #12936 from d10c/swift/rename-functions
Swift: rename ugly names in the Function AST hierarchy
2023-05-01 17:08:19 +02:00
Michael Nebel
a9cf6885d0 Merge pull request #12952 from michaelnebel/csharp/refactorcontentflow
C#: Re-factor ContentFlow to a parameterised module and use the new API.
2023-05-01 15:53:57 +02:00
Rasmus Lerchedahl Petersen
e65ff68547 python: update debug queries 2023-05-01 14:58:42 +02:00
Anders Schack-Mulligen
6c8cb0dc5e Merge pull request #12930 from aschackmull/dataflow/split-typedcontent
Dataflow: Refactor access paths to split TypedContent into an explicit pair
2023-05-01 14:58:15 +02:00
Tom Hvitved
3a8a585335 Merge pull request #12979 from hvitved/type-tracking-inline-late
Type tracking: Use `noopt`+`inline_late` in `TypeTracker::[small]step`
2023-05-01 14:58:04 +02:00
Tom Hvitved
4687ac16ff Type tracking: Use noopt+inline_late in TypeTracker::[small]step 2023-05-01 11:48:16 +02:00
Asger F
5eaaa7e074 JS: Add qldoc 2023-05-01 11:42:55 +02:00
Asger F
08785a4063 JS: Add sources from actions/core 2023-05-01 11:42:17 +02:00
Asger F
cb95dbfa14 JS: Add tests 2023-05-01 11:42:17 +02:00
yoff
0bc6f10a71 Merge pull request #12220 from amammad/amammad-python-paramiko
add some python sinks for paramiko ssh clients
2023-05-01 11:38:50 +02:00
Asger F
2c89f9747b Merge pull request #12949 from asgerf/js/angular-native
JS: Add a few more DOM element sources
2023-05-01 11:08:45 +02:00
Asger F
0497e60ce2 JS: Model actions/exec 2023-05-01 11:05:59 +02:00
Asger F
cb9b01cbb7 JS: Port new sources based on comment from JarLob 2023-05-01 11:04:54 +02:00
Nora Dimitrijević
c81ea9d747 Merge branch 'main' into swift/rename-functions 2023-05-01 11:03:26 +02:00
erik-krogh
18f8c69261 satisfy the signature of HostnameRegexpSig, which doesn't understand RegExpSink 2023-05-01 10:49:51 +02:00
Asger F
3d208c0a62 JS: Port Actions sources based on PR from R3x 2023-05-01 10:48:43 +02:00
erik-krogh
d5029c94b6 changes based on review 2023-05-01 10:42:15 +02:00
erik-krogh
a7f733ab8c move RegExpInterpretation into Concepts.qll 2023-05-01 10:42:15 +02:00
erik-krogh
2fad406b5c move StdLibRegExpInterpretation to Stdlib.qll 2023-05-01 10:42:15 +02:00
erik-krogh
a64848c022 simplify StdLibRegExpInterpretation to only consider re.compile, because the rest is handled by RegexExecution 2023-05-01 10:42:14 +02:00
erik-krogh
113ce61d40 fix nit in qldoc 2023-05-01 10:42:14 +02:00
erik-krogh
2d2602b668 use that strings are local-source-nodes in regex-tracking 2023-05-01 10:42:14 +02:00
erik-krogh
3cde11efc8 use StrConst instead of Bytes and Unicode 2023-05-01 10:42:14 +02:00
erik-krogh
ffa3425195 rename away from deprecated alias in test-files 2023-05-01 10:42:14 +02:00
erik-krogh
f2adc4f958 add missing qldoc 2023-05-01 10:42:14 +02:00
erik-krogh
59cc90e547 move Regex into a ParseRegExp file, and rename the class to RegExp 2023-05-01 10:42:14 +02:00
erik-krogh
556bb41999 move all code to find Regex flag into a module 2023-05-01 10:42:14 +02:00
erik-krogh
f0254fc089 introduce RegExpInterpretation instead of RegexString, and move RegexTreeView.qll into a regexp folder 2023-05-01 10:42:13 +02:00
erik-krogh
e677b62241 use type-tracking instead of global dataflow for tracking regular expressions 2023-05-01 10:41:53 +02:00
Michael Nebel
36ea61c25e C#: Address review comments. 2023-05-01 10:38:39 +02:00
Asger F
e9f1e99526 Merge pull request #12887 from asgerf/js/unsafe-yaml-deserialization
JS: Update model of js-yaml
2023-05-01 09:57:20 +02:00
Rasmus Wriedt Larsen
1bba5258d6 Merge pull request #11280 from RasmusWL/dict-dataflow-steps
Python: Support more dictionary read/store steps
2023-04-30 16:07:29 +02:00
Rasmus Wriedt Larsen
f2def84337 Misc: Add script to accept .expected changes from CI
This script can be used to go over `codeql test run` expected/actual log
output from actions CI checks for a PR, and apply patches locally to
make the tests pass.

Designed for use by GitHub employees, since it needs access to internal
CI runs. Just run this tool while the branch for the PR is checked out!

You need the `gh` cli tool installed and authenticated.

Example can be seen in https://github.com/github/codeql/pull/12950
2023-04-30 14:59:50 +02:00
tyage
f52c845663 Fix comment. 2023-04-30 19:52:11 +09:00
tyage
80d401fba8 JS: change note 2023-04-30 18:26:46 +09:00
tyage
71952fe551 JS: Add test for sub module 2023-04-30 18:18:35 +09:00
tyage
c0cf0b430e JS: support submodules 2023-04-30 18:07:52 +09:00
Mathias Vorreiter Pedersen
a7d238f4c4 C++: Accept consistency changes. 2023-04-28 22:41:58 +01:00
Erik Krogh Kristensen
3d41cd583f Merge pull request #12963 from tyage/track-interfile-use-router
JS: Track interfile useRouter
2023-04-28 22:41:43 +02:00
Asger F
d1c8e0abd7 Merge pull request #12951 from asgerf/js/json-with-comments
JS: Stop complaining about comments in JSON files
2023-04-28 20:53:35 +02:00
Felicity Chapman
1094018088 Remove unused file 2023-04-28 18:35:57 +01:00
Mathias Vorreiter Pedersen
490b253dc8 C++: Add change note. 2023-04-28 17:48:01 +01:00
Mathias Vorreiter Pedersen
498395b50e C++: Add QLDoc to getA(nIndirect)BarrierNode. 2023-04-28 17:42:14 +01:00
Mathias Vorreiter Pedersen
8c8b919dfb C++: Add an API for indirect barrier guards and use it in tests. 2023-04-28 14:09:08 +01:00
Mathias Vorreiter Pedersen
a6adf825bc C++: Add a test that needs indirect barrier guards. 2023-04-28 13:56:31 +01:00
Tony Torralba
77ec181cac Java: Fix sink model generator for instance parameters 2023-04-28 14:49:04 +02:00
Mathias Vorreiter Pedersen
0f0384cff6 C++: Rewrite the barrier guard tests to be expression based. This is really what we expect people to write in queries. 2023-04-28 13:49:01 +01:00
Asger F
f87740ab18 Merge pull request #12867 from asgerf/js/webpack-bundles
JS: Ignore more webpack modules
2023-04-28 14:35:57 +02:00
Tony Torralba
e0074d52eb Add autogenerated models for org.apache.commons.net 2023-04-28 14:33:23 +02:00
Asger F
1b75afb5b1 JS: Change note 2023-04-28 14:32:11 +02:00
CodeQL CI
c1a52031cf Merge pull request #12968 from github/release-prep/2.13.1
Release preparation for version 2.13.1
2023-04-28 13:14:42 +01:00
github-actions[bot]
3bd29171fb Release preparation for version 2.13.1 2023-04-28 12:14:35 +00:00
Geoffrey White
837f16c212 Swift: Address singleton set literal warning 2023-04-28 12:16:28 +01:00
Michael B. Gale
edfe2d7ab7 Merge pull request #12944 from github/mbg/go/html-template-sanitizers
Go: Add `html/template` functions as sanitisers for XSS queries
2023-04-28 12:15:57 +01:00
Felicity Chapman
8ca80d3170 Update links to CodeQL manual
Make CodeQL CLI a single item in the side navigation
2023-04-28 12:07:26 +01:00
Mathias Vorreiter Pedersen
43527573d0 C++: Fix back edge detection for phi nodes. 2023-04-28 11:58:56 +01:00
Mathias Vorreiter Pedersen
faf846bd58 C++: Disable flow through nodes that are sources of phi edges' back edges. 2023-04-28 11:36:42 +01:00
Michael B. Gale
5a44fae515 Go: add test for unrelated A->C data flow 2023-04-28 10:56:12 +01:00
Mathias Vorreiter Pedersen
2716c73f87 C++: Add change note. 2023-04-28 10:49:49 +01:00
Mathias Vorreiter Pedersen
c35cb70c9f C++: Fix inconsistencies. 2023-04-28 10:40:18 +01:00
Mathias Vorreiter Pedersen
fd2f0257b6 C++: Accept query changes. 2023-04-28 10:25:12 +01:00
Mathias Vorreiter Pedersen
24d1cac9d7 C++: Accept test changes. 2023-04-28 10:25:07 +01:00
Mathias Vorreiter Pedersen
ee7b137c24 C++: Add dataflow for static locals. 2023-04-28 10:24:57 +01:00
Mathias Vorreiter Pedersen
3eca60cc40 C++: Add static local testcases. 2023-04-28 10:23:36 +01:00
Mathias Vorreiter Pedersen
205bb76036 Merge pull request #12960 from MathiasVP/fp-invalid-deref-2
C++: Add more FPs for `cpp/invalid-pointer-deref`
2023-04-28 09:47:46 +01:00
Mathias Vorreiter Pedersen
4ef58cd662 C++: Remove unused parameter in test. 2023-04-28 09:30:30 +01:00
Owen Mansel-Chan
8415c4a4eb Remove ArgumentNode assumption 2023-04-28 09:23:38 +01:00
Owen Mansel-Chan
c7c0a73b90 Accept review suggestions 2023-04-28 09:23:37 +01:00
Owen Mansel-Chan
52cc61198d Use CallExpr.hasImplicitArgs() 2023-04-28 09:23:37 +01:00
Owen Mansel-Chan
b928f13d94 Add CallExpr.hasImplicitArgs() 2023-04-28 09:23:36 +01:00
Owen Mansel-Chan
f3c1c53b54 Add CallExpr.getCalleeType()
This avoids using `getTarget()`, so it works even when that doesn't
exist (for example when calling a variable with function type).
2023-04-28 09:23:36 +01:00
Stephan Brandauer
bd3aaf0306 remove comment that no longer applies 2023-04-28 10:16:18 +02:00
Anders Schack-Mulligen
ce64408442 Merge pull request #12954 from aschackmull/java/implicitlypublic
Java: Add SrcCallable.isImplicitlyPublic convenience predicate.
2023-04-28 10:07:45 +02:00
Asger F
ee25f97ea5 Merge pull request #12956 from asgerf/js/express-array-routes
JS: Properly recognise Express middlewares in an array
2023-04-28 09:57:35 +02:00
Mathias Vorreiter Pedersen
5f4d0892ff Merge pull request #12900 from MathiasVP/ir-translate-constant-static-local-vars-2 2023-04-28 08:46:25 +01:00
tyage
933b55d37d Track interfile useRouter 2023-04-28 15:49:26 +09:00
Asger F
8a9308c8b0 JS: Update test output 2023-04-28 07:55:20 +02:00
Owen Mansel-Chan
3f095db853 Formatted parameters always a variadic parameter 2023-04-28 06:09:11 +01:00
Owen Mansel-Chan
f2368a9441 Do not use variadic sink fn in tests 2023-04-28 06:09:11 +01:00
Owen Mansel-Chan
bc0f9030e3 use CallNode.getSyntacticArgument 2023-04-28 06:09:10 +01:00
Owen Mansel-Chan
2d3fed9c07 Accept intended test result changes 2023-04-28 06:09:10 +01:00
Owen Mansel-Chan
17077f3ec5 Update OutParameter.getExitNode for implicit varargs slices 2023-04-28 06:09:10 +01:00
amammad
b3669b818b v1.3 change name according to camelCase 2023-04-28 04:56:47 +02:00
Asger F
0c8f895e0f JS: Add one more test 2023-04-27 21:06:20 +02:00
Asger F
97a942de80 JS: Update test output 2023-04-27 21:04:35 +02:00
Robert Marsh
376e01ae3d C++: update docs for new range analysis AST wrapper 2023-04-27 14:59:18 -04:00
Mathias Vorreiter Pedersen
5c23474634 C++: Add FPs for 'cpp/invalid-pointer-deref'. 2023-04-27 18:49:05 +01:00
Mathias Vorreiter Pedersen
e506f638fc DataFlow: Sync identical files. 2023-04-27 18:40:33 +01:00
Mathias Vorreiter Pedersen
478f2dca3b C++: Add a new dataflow consistency test. 2023-04-27 18:39:41 +01:00
Geoffrey White
268db8b541 Merge pull request #3 from MathiasVP/add-puns-to-mad-2
Swift: Syntax for selecting `PostUpdateNode`s in CSV rows
2023-04-27 17:36:23 +01:00
Mathias Vorreiter Pedersen
6c095d8143 Merge pull request #12953 from MathiasVP/fp-invalid-deref
C++: Add FP for `cpp/invalid-pointer-deref`
2023-04-27 17:29:37 +01:00
Michael B. Gale
72b082806b Go: Update html-template-escaping-passthrough
Modify this query to apply sanitizers only in the data flow
between untrusted inputs and passthrough conversion types.
2023-04-27 17:14:38 +01:00
Mathias Vorreiter Pedersen
e46c53af1d C++: accept test changes. 2023-04-27 17:13:02 +01:00
Mathias Vorreiter Pedersen
1372ee7a44 Update cpp/ql/test/experimental/query-tests/Security/CWE/CWE-193/pointer-deref/test.cpp
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-04-27 17:10:44 +01:00
Asger F
0fb79bdf64 JS: Include a local step before store step 2023-04-27 17:58:02 +02:00
Asger F
c674afb674 JS: Fix condition in getRouteHandlerNode
Previous version did not account for arrays
2023-04-27 17:58:02 +02:00
Geoffrey White
74274e834e Swift: Add the four complete examples from the doc pages to the examples directory. 2023-04-27 16:52:00 +01:00
yoff
54ced06ada Merge branch 'main' into python/captured-variables-for-typetracking 2023-04-27 17:32:41 +02:00
Asger F
682ff23e04 JS: Update Express test 2023-04-27 16:36:04 +02:00
Asger F
36889f6d72 JS: Fix isResponse/isRequest 2023-04-27 16:35:56 +02:00
Asger F
70331c0ea4 JS: Decouple chaining from ExplicitResponseSource 2023-04-27 16:14:27 +02:00
Asger F
96e415aba6 JS: Track express route handlers into arrays 2023-04-27 16:14:22 +02:00
Geoffrey White
abb98be996 Swift: QLDoc Type.qll, TypeDecl.qll, and deprecate one of the predicates. 2023-04-27 15:12:54 +01:00
Geoffrey White
fc65160a78 Swift: Simplify the implemention of MethodDecl.hasQualifiedName. 2023-04-27 14:59:19 +01:00
Mathias Vorreiter Pedersen
432c0b508a C++: Add another FP. 2023-04-27 14:50:29 +01:00
Anders Schack-Mulligen
9df2ee00d6 Java: Add SrcCallable.isImplicitlyPublic convenience predicate. 2023-04-27 15:20:49 +02:00
Geoffrey White
e2e8e5ddd3 Swift: Add swift-further-reading.rst 2023-04-27 14:04:13 +01:00
Anders Schack-Mulligen
71ae0909d8 Dataflow: Enforce type pruning in all forward stages. 2023-04-27 14:55:26 +02:00
Anders Schack-Mulligen
9140cbefc0 Dataflow: Sync. 2023-04-27 14:55:23 +02:00
Geoffrey White
08854136fe Swift: QLDoc consistency. 2023-04-27 13:55:09 +01:00
Anders Schack-Mulligen
a761eea2dc Dataflow: Autoformat 2023-04-27 14:52:25 +02:00
Anders Schack-Mulligen
9ad2da6196 Java: Fix reference to TypedContent. 2023-04-27 14:52:25 +02:00
Anders Schack-Mulligen
4f2d2361a4 Dataflow: Eliminate TypedContent. 2023-04-27 14:52:25 +02:00
Anders Schack-Mulligen
5373b4d466 Dataflow: Remove superfluous predicates. 2023-04-27 14:52:25 +02:00
Anders Schack-Mulligen
b534e7b6d5 Dataflow: Remove superfluous columns 2023-04-27 14:52:25 +02:00
Anders Schack-Mulligen
a2fa97ac22 Dataflow: Replace TypedContent with Content in access paths. 2023-04-27 14:52:25 +02:00
Anders Schack-Mulligen
123534a676 Dataflow: Eliminate front type in AccessPathFront. 2023-04-27 14:52:25 +02:00
Anders Schack-Mulligen
ff3e45e1ba Dataflow: Eliminate TypedContentApprox. 2023-04-27 14:52:25 +02:00
Anders Schack-Mulligen
748bcba0ae Dataflow: Eliminate now-redundant type in nil accesspath approximations. 2023-04-27 14:52:25 +02:00
Anders Schack-Mulligen
95b95e5c27 Dataflow: Duplicate type info for AccessPathApprox tails. 2023-04-27 14:52:24 +02:00
Anders Schack-Mulligen
52f50b8d9d Dataflow: Replace AccessPath push/pop with isCons. 2023-04-27 14:52:24 +02:00
Anders Schack-Mulligen
142479eeb7 Dataflow: Duplicate type info for AccessPath tails. 2023-04-27 14:52:24 +02:00
Anders Schack-Mulligen
69202d2dae Dataflow: Include type in post-stage-5 tail relation. 2023-04-27 14:52:24 +02:00
Anders Schack-Mulligen
933d2fbb9f Dataflow: Replace RevPartialAccessPath with the now identical PartialAccessPath. 2023-04-27 14:52:24 +02:00
Anders Schack-Mulligen
2cf58fccf7 Dataflow: Remove type from PartialAccessPath. 2023-04-27 14:52:24 +02:00
Anders Schack-Mulligen
e5d36ff461 Dataflow: Add type to stage 2-5 summary ctx. 2023-04-27 14:52:24 +02:00
Anders Schack-Mulligen
77b09f3660 Dataflow: Add type to partial flow summary context 2023-04-27 14:52:24 +02:00
Anders Schack-Mulligen
11c05257d4 Dataflow: Duplicate accesspath type info in partial flow. 2023-04-27 14:52:20 +02:00
Anders Schack-Mulligen
fd36304da2 Dataflow: Add type to PathNode.toString 2023-04-27 14:50:55 +02:00
Stephan Brandauer
adcf4a3dc2 documentation clean-up 2023-04-27 14:48:48 +02:00
Stephan Brandauer
52a8230ce3 restructure shared characteristics module; add framework support for sanitizers 2023-04-27 14:46:24 +02:00
Stephan Brandauer
ffe7c62766 use US spelling 2023-04-27 14:46:24 +02:00
Stephan Brandauer
a91b71c53b add parameter names to metadata, set subtypes = false for static method candidates; remove UndocumentedMethodCharacteristics, now that we use ModelApi 2023-04-27 14:46:23 +02:00
Stephan Brandauer
3868defb87 use ModelApi to define parameters worth modeling 2023-04-27 14:46:23 +02:00
Stephan Brandauer
6eefb268dd Automodel extraction queries in java telemetry query directory 2023-04-27 14:46:08 +02:00
Anders Schack-Mulligen
5a027b95bd Dataflow: Duplicate accesspath type info in PathNode and pathStep. 2023-04-27 14:33:33 +02:00
Anders Schack-Mulligen
209d9143be Dataflow: Add type column to filter predicate 2023-04-27 14:33:33 +02:00
Anders Schack-Mulligen
c79daf0116 Dataflow: Duplicate accesspath type info of the tail in cons relations. 2023-04-27 14:33:33 +02:00
Anders Schack-Mulligen
b84b1a46d6 Dataflow: Duplicate accesspath type info as separate column. 2023-04-27 14:33:33 +02:00
Anders Schack-Mulligen
cda26ba7c0 Dataflow: Split TypedContent in store relation. 2023-04-27 14:33:32 +02:00
Anders Schack-Mulligen
246d904712 Merge pull request #12948 from aschackmull/dataflow/pathnode-type-tostring
Dataflow: Add type to PathNode.toString.
2023-04-27 14:14:10 +02:00
Mathias Vorreiter Pedersen
5a8bed0285 C++: Add FP for 'cpp/invalid-pointer-deref'. 2023-04-27 13:13:21 +01:00
Michael Nebel
8517f11477 C#: Re-factor the test case for ContentFlow. 2023-04-27 13:08:19 +02:00
Michael Nebel
1b366fc87a C#: Re-factor ContentFlow into a parameterized module and use the new API. 2023-04-27 13:08:19 +02:00
Tom Hvitved
f888382d35 Merge pull request #12906 from hvitved/ruby/track-block-no-self
Ruby: Prevent flow into `self` in `trackBlock`
2023-04-27 12:48:05 +02:00
Geoffrey White
5a77dfb5d5 Merge pull request #12905 from geoffw0/webviewdoc
Swift: Doc review for swift/unsafe-webview-fetch
2023-04-27 11:23:53 +01:00
Henry Mercer
9ded5b87a5 Merge pull request #12942 from github/henrymercer/update-diagnostics-integration-tests
C#: Update diagnostics integration tests
2023-04-27 11:23:14 +01:00
Rasmus Wriedt Larsen
aa216e6535 Python: Update inline expectations 2023-04-27 12:04:05 +02:00
Geoffrey White
507bb61c3c Swift: Add missing '.' 2023-04-27 11:00:35 +01:00
Anders Schack-Mulligen
f685ae1fa7 Java: Update one more expected output. 2023-04-27 12:00:32 +02:00
Geoffrey White
c823c58e00 Swift: WebView -> web view. 2023-04-27 10:57:25 +01:00
Rasmus Wriedt Larsen
d73289ac4e Python: Accept .expected changes 2023-04-27 11:54:39 +02:00
Geoffrey White
cc8d7bff0b Update swift/ql/src/queries/Security/CWE-079/UnsafeWebViewFetch.qhelp
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2023-04-27 10:12:13 +01:00
Asger F
410719fd9e Update JSONError.expected 2023-04-27 10:57:38 +02:00
Asger F
5a4fe1b4da JS: Stop complaining about comments in JSON files 2023-04-27 10:55:36 +02:00
Anders Schack-Mulligen
6025feebd9 C#: Update expected output. 2023-04-27 10:24:24 +02:00
Tony Torralba
21a00f9197 Merge pull request #12946 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-04-27 10:13:07 +02:00
Harry Maclean
5688da145d Shared: fix missing import 2023-04-27 07:13:59 +00:00
amammad
a541fdf5e5 v1.2 code quality improvements including commnets too 2023-04-27 08:30:46 +02:00
amammad
1bf159e9a9 Merge branch 'github:main' into amammad-python-paramiko 2023-04-26 23:28:29 -07:00
Harry Maclean
8a89aec220 Shared: Handle trap compression option properly
Extracting the compression setting from an environment variable is the
responsibility of the API consumer.
2023-04-27 05:06:57 +00:00
github-actions[bot]
e6c4bd18d6 Add changed framework coverage reports 2023-04-27 00:17:19 +00:00
Michael B. Gale
1aa1153ed6 Go: Add html/template as XSS queries sanitizer 2023-04-26 21:21:52 +01:00
Tom Hvitved
fc66aacf92 Merge pull request #12922 from hvitved/ruby/controller-template-file-join
Ruby: Fix bad join in `controllerTemplateFile`
2023-04-26 21:26:54 +02:00
Robert Marsh
3f8638643e C++: respond to PR comments 2023-04-26 14:56:10 -04:00
Henry Mercer
0040025661 Update expected output of integration tests
We now produce output using the CodeQL CLI, which ignores empty
properties during serialization.
2023-04-26 19:41:57 +01:00
Henry Mercer
067f3259c9 C#: Update diagnostics calls to use new API 2023-04-26 19:41:57 +01:00
Henry Mercer
1ae116c4cc Merge pull request #12895 from github/henrymercer/diagnostics-verify-one-based
JS: Update `DiagnosticLocation` call to gracefully handle invalid locations
2023-04-26 19:22:57 +01:00
Geoffrey White
5e7159f800 Swift: Minor edits. 2023-04-26 18:49:24 +01:00
Mathias Vorreiter Pedersen
6bfdbef697 C++: Fix implicit 'this'. 2023-04-26 18:06:44 +01:00
Geoffrey White
f2cb2b324e Swift: Add analyzing-data-flow-in-swift.rst 2023-04-26 18:02:32 +01:00
Mathias Vorreiter Pedersen
b18e096f7f C++: Fix missing result for 'getFunction' and accept test changes. 2023-04-26 18:01:39 +01:00
Mathias Vorreiter Pedersen
1dcac76992 C++: Add a weird testcase demonstrating invalid IR. 2023-04-26 17:48:02 +01:00
Henry Mercer
d7474f91dc Merge branch 'main' into henrymercer/diagnostics-verify-one-based 2023-04-26 17:26:36 +01:00
Arthur Baars
128d102bbc Merge pull request #12871 from aibaars/py-yaml
Python: add YAML support
2023-04-26 18:13:26 +02:00
Mathias Vorreiter Pedersen
60aab206b0 C++: Join on two columns instead of one.
Before:
```
Evaluated non-recursive predicate TranslatedElement#ea057665::TranslatedElement::getInstructionVariable#1#dispred#fff@146210id in 201548ms (size: 3469729).
Evaluated relational algebra for predicate TranslatedElement#ea057665::TranslatedElement::getInstructionVariable#1#dispred#fff@146210id with tuple counts:
  ...
     1812768   ~3%    {3} r65 = JOIN num#InstructionTag#c9183db3::OnlyInstructionTag#f WITH TranslatedExpr#043317a1::TranslatedNonFieldVariableAccess#ff CARTESIAN PRODUCT OUTPUT Rhs.1, Lhs.0, Rhs.0
     1812767   ~0%    {4} r66 = JOIN r65 WITH Access#8878f617::Access::getTarget#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.0
  3996407117   ~3%    {5} r67 = JOIN r66 WITH TranslatedElement#ea057665::getIRUserVariable#2#fff_102#join_rhs ON FIRST 1 OUTPUT Lhs.3, Rhs.1, Lhs.1, Lhs.2, Rhs.2
     1815194   ~0%    {3} r68 = JOIN r67 WITH TranslatedExpr#043317a1::getEnclosingDeclaration#1#ff ON FIRST 2 OUTPUT Lhs.3, Lhs.2, Lhs.4
  ...
```

After:
```
Evaluated non-recursive predicate TranslatedExpr#043317a1::accessHasEnclosingDeclarationAndVariable#3#fff@665ccb8o in 865ms (size: 2769549).
Evaluated relational algebra for predicate TranslatedExpr#043317a1::accessHasEnclosingDeclarationAndVariable#3#fff@665ccb8o with tuple counts:
        2769549  ~1%    {3} r1 = JOIN Access#8878f617::Access::getTarget#0#dispred#ff WITH TranslatedExpr#043317a1::getEnclosingDeclaration#1#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
                        return r1
...
Evaluated non-recursive predicate TranslatedElement#ea057665::TranslatedElement::getInstructionVariable#1#dispred#fff@7d4d33to in 805ms (size: 3469729).
Evaluated relational algebra for predicate TranslatedElement#ea057665::TranslatedElement::getInstructionVariable#1#dispred#fff@7d4d33to with tuple counts:
  ...
  1963209   ~0%    {2} r34 = JOIN TranslatedElement#ea057665::getIRUserVariable#2#fff WITH TranslatedExpr#043317a1::accessHasEnclosingDeclarationAndVariable#3#fff ON FIRST 2 OUTPUT Rhs.2, Lhs.2
  1815194   ~2%    {2} r35 = JOIN r34 WITH TranslatedExpr#043317a1::TranslatedNonFieldVariableAccess#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.1
  1815194   ~0%    {3} r36 = JOIN r35 WITH num#InstructionTag#c9183db3::OnlyInstructionTag#f CARTESIAN PRODUCT OUTPUT Lhs.1, Rhs.0, Lhs.0
  ...
```
2023-04-26 16:32:43 +01:00
Mathias Vorreiter Pedersen
20f555c715 Merge pull request #12938 from MathiasVP/fix-todo-is-abnormal-exit-type
Swift: Implement `isAbnormalExitType`
2023-04-26 16:16:19 +01:00
Nora Dimitrijević
5838c5d9c8 Merge branch 'main' into swift/rename-functions 2023-04-26 17:04:40 +02:00
Nora Dimitrijević
6f804ff1e7 Swift: upgrade/downgrade scripts 2023-04-26 17:03:20 +02:00
Sam Browning
35788162ec Merge pull request #12915 from github/sabrowning1/query-suite-name-fix
Update `code-scanning` query suite name to `default`
2023-04-26 10:38:21 -04:00
Mathias Vorreiter Pedersen
d114388470 Swift: Implement 'isAbnormalExitType' and accept test changes. 2023-04-26 15:36:52 +01:00
Rasmus Lerchedahl Petersen
00b85cbfb9 python: remove blank line 2023-04-26 16:26:26 +02:00
Tony Torralba
12d181143f Merge pull request #10533 from pwntester/main
Java: Add support for java.util.StringJoiner
2023-04-26 16:18:35 +02:00
Rasmus Wriedt Larsen
d274fa16a1 Python: Hide ModuleVariableNode in data-flow paths
They just add an extra step, and don't actually contribute any good
information for end-users.
2023-04-26 16:04:16 +02:00
Rasmus Wriedt Larsen
0c4bcec39e Python: Fix ModuleVariableNode.toString
In some cases mod.getName() does not have a result, so toString of
ModuleVariableNode would also not have a result, which would cause
data-flow paths that use these as an edge to not be valid :O
2023-04-26 16:03:21 +02:00
Nora Dimitrijević
16fc42a53f Swift: fix formatting 2023-04-26 16:01:57 +02:00
Mathias Vorreiter Pedersen
3d381331e1 C++: Add a test with global variable templates. 2023-04-26 15:00:32 +01:00
Rasmus Lerchedahl Petersen
20cbc08627 python: we want empty expected files
(thanks @RasmusWL)
2023-04-26 15:54:23 +02:00
Nora Dimitrijević
91a151ec2a Swift: update tests 2023-04-26 15:47:20 +02:00
Nora Dimitrijević
3d67970357 Swift: query library renamings 2023-04-26 15:47:20 +02:00
Nora Dimitrijević
4c0384b4f1 Swift: control flow and dataflow library renamings 2023-04-26 15:47:20 +02:00
Nora Dimitrijević
82eb0026e6 Swift: AST library renamings 2023-04-26 15:47:20 +02:00
Nora Dimitrijević
2d9295a5a4 Swift: [generated] library code changes 2023-04-26 15:47:20 +02:00
Nora Dimitrijević
90ad36ed6c Swift: update extractor 2023-04-26 15:47:19 +02:00
Owen Mansel-Chan
39da26e9b5 Update ParameterInput.getEntryNode for implicit varargs slices 2023-04-26 14:35:20 +01:00
Owen Mansel-Chan
1e3d81842e Update CallNode.getArgument for implicit varargs
It now has one only result corresponding to a variadic parameter. If the
argument is followed by an ellipsis then it is just the argument itself.
Otherwise it is a ImplicitVarargsSlice node.
2023-04-26 14:35:19 +01:00
Nora Dimitrijević
ce1c4b88d8 Swift: rename Function hierarchy in schema.py 2023-04-26 15:31:54 +02:00
Rasmus Lerchedahl Petersen
843329f2fb python: no longer missing 2023-04-26 15:06:03 +02:00
Rasmus Lerchedahl Petersen
66fdf6b241 python: add test for capturing by value 2023-04-26 15:05:03 +02:00
Mathias Vorreiter Pedersen
6dc6e13caa Swift: Hide 'DynamicSelfType' from the main AST. 2023-04-26 13:58:54 +01:00
Mathias Vorreiter Pedersen
11aff55a97 Swift: Add default implicit read steps when selecting PostUpdateNodes as sinks. 2023-04-26 13:58:48 +01:00
Mathias Vorreiter Pedersen
e6c8428875 Swift: Add syntax for selecting PostUpdateNodes in CSV rows. 2023-04-26 13:58:42 +01:00
Asger F
cf1e87de9e JS: Track DOM elements out of collections 2023-04-26 14:55:34 +02:00
Asger F
1f228a049f JS: Add test for iterating over DOM collections 2023-04-26 14:54:38 +02:00
Rasmus Lerchedahl Petersen
003fece490 python: add test for capturing via global 2023-04-26 14:52:40 +02:00
Anders Schack-Mulligen
8e6038577d Java: Update expected output. 2023-04-26 14:45:40 +02:00
Michael Nebel
3c1456bd02 Merge pull request #12913 from michaelnebel/csharp/inappropriateencoding
C#: Re-factor the InappropriateEncoding query to use the new API.
2023-04-26 14:45:13 +02:00
Anders Schack-Mulligen
d681671356 Dataflow: Sync. 2023-04-26 14:45:07 +02:00
Anders Schack-Mulligen
32a738b082 Dataflow: Add type to PathNode.toString. 2023-04-26 14:43:53 +02:00
Anders Schack-Mulligen
8fcfc6f4f1 Merge pull request #12934 from aschackmull/swift/no-pp-dataflowtype
Swift: Remove empty string DataFlowType in PathNode.
2023-04-26 14:42:27 +02:00
Rasmus Lerchedahl Petersen
4d95b2023e python: remember to update validTest.py 2023-04-26 14:36:52 +02:00
Asger F
0d74d88b7b JS: Add new sink to test 2023-04-26 14:33:04 +02:00
Asger F
4df05b4e74 JS: Shift line numbers in test 2023-04-26 14:33:04 +02:00
Asger F
cb04df49eb JS: Treat Angular2 ElementRef.nativeElement as a DOM value 2023-04-26 14:33:04 +02:00
Tony Torralba
5d80f0818c Fix TestModels test expectation 2023-04-26 14:32:28 +02:00
Asger F
b696936d10 Merge pull request #12921 from asgerf/js/typescript-compiler-crash
JS: Fix extractor crash related to recursive generic type alias
2023-04-26 14:21:57 +02:00
Rasmus Wriedt Larsen
abc1d658e0 Python: More .expected accepting 2023-04-26 14:10:13 +02:00
Anders Schack-Mulligen
74242638e2 Swift: One more expected output fix. 2023-04-26 14:10:13 +02:00
Anders Schack-Mulligen
8ca5484dcf Merge pull request #12933 from aschackmull/ruby/no-pp-dataflowtype
Ruby: Remove empty string DataFlowType in PathNode.
2023-04-26 14:03:56 +02:00
Michael Nebel
6eb13a6947 Java: Update customizing library models for java documentation. 2023-04-26 13:55:00 +02:00
Rasmus Lerchedahl Petersen
b71306104e python: add test for inheritance 2023-04-26 13:50:12 +02:00
Arthur Baars
5b6d3afd89 Python: Yaml printAst and tests 2023-04-26 13:41:57 +02:00
Anders Schack-Mulligen
9fe5462b1b Swift: Update more expected output. 2023-04-26 13:41:50 +02:00
Anders Schack-Mulligen
09d4fe21e8 Ruby: Update more expected output. 2023-04-26 13:37:07 +02:00
Rasmus Lerchedahl Petersen
824d4d5413 python: fix test expectations
also rename `collections.py` so it does not
clash with the standard library name.
This clash is an issue when testing locally.
2023-04-26 13:31:37 +02:00
Rasmus Wriedt Larsen
b178c9cfe6 Python: Accept dataflow/basic/*.expected 2023-04-26 13:30:11 +02:00
Rasmus Wriedt Larsen
3f39648065 Python: Remove duplicated test 2023-04-26 13:30:11 +02:00
Rasmus Wriedt Larsen
1a97e8f329 Python: Add flow-step for arg[1] to dict.setdefault 2023-04-26 13:30:11 +02:00
Anders Schack-Mulligen
6b049cb37a Swift: Update expected output. 2023-04-26 13:15:39 +02:00
Anders Schack-Mulligen
3d01763092 Swift: Remove empty string DataFlowType in PathNode. 2023-04-26 13:10:01 +02:00
Anders Schack-Mulligen
90f84bb516 Ruby: Update expected output. 2023-04-26 13:08:16 +02:00
Anders Schack-Mulligen
81ce6c7779 Ruby: Remove empty string DataFlowType in PathNode. 2023-04-26 12:54:41 +02:00
Asger F
c9c281cb9a JS: Change note 2023-04-26 12:50:59 +02:00
Asger F
5f011a262c JS: Change note 2023-04-26 12:49:24 +02:00
Asger F
611a7060b4 JS: Add tests 2023-04-26 12:46:20 +02:00
Arthur Baars
c1c2bcf419 Python: rename YAML.qll to Yaml.qll 2023-04-26 12:44:53 +02:00
Tony Torralba
0094c25791 Fix StringJoiner.add models 2023-04-26 12:40:04 +02:00
Tony Torralba
4606df5cb6 Add change note 2023-04-26 12:24:43 +02:00
Tony Torralba
fba61d51ed Remove experimental files 2023-04-26 12:24:30 +02:00
Tony Torralba
e54eaed26f Refactor tests to use InlineFlowTest 2023-04-26 12:19:59 +02:00
Tony Torralba
db73e16b70 Add tests 2023-04-26 12:12:10 +02:00
Tony Torralba
1e66a544fd Promote exxperimental XXE sinks 2023-04-26 12:11:48 +02:00
Tony Torralba
8b65937159 Move ConstantStringExpr to RangeUtils.qll 2023-04-26 12:11:08 +02:00
Asger F
a446c5452d JS: Update test output 2023-04-26 11:44:56 +02:00
Asger F
799d92b218 TS: Fix self-reference check for alias types 2023-04-26 11:44:56 +02:00
Tom Hvitved
b94289fde1 Ruby: Prevent flow into self in trackBlock 2023-04-26 10:33:04 +02:00
Michael Nebel
f32b8ad5b1 C#: Update comment for the RequiresEncodingConfig param module. 2023-04-26 10:32:23 +02:00
Michael Nebel
96fba2dac3 Apply suggestions from code review
Co-authored-by: Michael B. Gale <mbg@github.com>
2023-04-26 10:23:52 +02:00
Tony Torralba
4c102ab99c Refactor to models-as-data 2023-04-26 10:13:15 +02:00
Michael Nebel
bc08d67f19 Merge pull request #12925 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-04-26 10:11:15 +02:00
Tony Torralba
2c4246f29a Fix test comments 2023-04-26 10:08:18 +02:00
Tony Torralba
389e8c4fe8 Add review suggestions 2023-04-26 10:08:16 +02:00
Tony Torralba
0650c016f6 Add models for StringJoiner constructor 2023-04-26 10:07:59 +02:00
Tony Torralba
d54c444606 Add change note 2023-04-26 10:07:49 +02:00
Tony Torralba
311498841e Add fluent models
Add tests
2023-04-26 10:07:27 +02:00
Paolo Tranquilli
9d80a43d6a Merge pull request #12500 from github/redsun82/swift-dispatcher-rework
Swift: rework fetching and dispatching
2023-04-26 09:58:19 +02:00
Erik Krogh Kristensen
6110b7aca5 Merge pull request #12926 from github/dependabot/cargo/ql/tracing-0.1.38
Bump tracing from 0.1.37 to 0.1.38 in /ql
2023-04-26 09:49:55 +02:00
dependabot[bot]
738e3857e7 Bump tracing from 0.1.37 to 0.1.38 in /ql
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.37 to 0.1.38.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.37...tracing-0.1.38)

---
updated-dependencies:
- dependency-name: tracing
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-26 04:04:15 +00:00
github-actions[bot]
cb82bd62e7 Add changed framework coverage reports 2023-04-26 00:15:23 +00:00
Geoffrey White
33a6e722f6 Swift: Add a test for UISearchTextField. 2023-04-25 23:31:20 +01:00
Geoffrey White
e16277ef43 Swift: Add source model for UITextField. 2023-04-25 23:14:24 +01:00
Geoffrey White
22507c1566 Swift: Add a test for UITextField. 2023-04-25 22:47:48 +01:00
Edward Minnix III
e50f56cc56 Merge pull request #12917 from egregius313/egregius313/java/dataflow/refactor-inline-flow-test
Java: Refactor `InlineFlowTest` to remove usage of `DataFlow::Configuration` API
2023-04-25 16:18:56 -04:00
Rasmus Lerchedahl Petersen
0338d4ef9c This was the case locally, but not in CI.. 🤷
Revert "python: no longer missing"

This reverts commit f796177b69.
2023-04-25 21:34:27 +02:00
yoff
d4953ef26a Merge branch 'main' into python/captured-variables-for-typetracking 2023-04-25 21:32:18 +02:00
Tom Hvitved
e5f2b90aec Ruby: Fix bad join in controllerTemplateFile
Before
```
Evaluated relational algebra for predicate ActionController#32b59475::controllerTemplateFile#2#ff@6f4b2395 with tuple counts:
        31304524   ~0%    {2} r1 = JOIN locations_default_10#join_rhs WITH FileSystem#df18ed9a::Make#FileSystem#e91ad87f::Input#::Container::getRelativePath#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1
           34453   ~3%    {2} r2 = JOIN r1 WITH DataFlowPublic#e1781e31::ModuleNode::getLocation#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1

            1236   ~0%    {2} r3 = JOIN r2 WITH ActionController#32b59475::ActionControllerClass#f ON FIRST 1 OUTPUT Lhs.0, InverseAppend(("" ++ "app/controllers/"),"_controller.rb",Lhs.1)

            1236   ~1%    {2} r4 = SCAN r3 OUTPUT In.0, ("" ++ "app/views/layouts/" ++ In.1 ++ "%")

            1320   ~1%    {3} r5 = JOIN r2 WITH ActionController#32b59475::ActionControllerClass#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0, "^(.*/)app/controllers/(?:.*?)/(?:[^/]*)$"
              14   ~7%    {5} r6 = JOIN r5 WITH PRIMITIVE regexpCapture#bbff ON Lhs.0,Lhs.2
              14   ~7%    {5} r7 = SELECT r6 ON In.3 = 1
              14   ~0%    {3} r8 = SCAN r7 OUTPUT In.1, In.4, InverseAppend((In.4 ++ "app/controllers/"),"_controller.rb",In.0)

              14   ~0%    {2} r9 = SCAN r8 OUTPUT In.0, (In.1 ++ "app/views/layouts/" ++ In.2 ++ "%")

            1250   ~1%    {2} r10 = r4 UNION r9
         8813750   ~2%    {3} r11 = JOIN r10 WITH Erb#b2b9e6ed::ErbFile#ff CARTESIAN PRODUCT OUTPUT Rhs.0, Lhs.0, Lhs.1
         8813750   ~6%    {4} r12 = JOIN r11 WITH FileSystem#df18ed9a::Make#FileSystem#e91ad87f::Input#::Container::getRelativePath#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.0, Rhs.1
              41   ~6%    {4} r13 = SELECT r12 ON In.3 matches In.1
              41   ~0%    {2} r14 = SCAN r13 OUTPUT In.0, In.2

            1236   ~0%    {2} r15 = SCAN r3 OUTPUT ("" ++ "app/views/" ++ In.1), In.0

              14   ~0%    {2} r16 = SCAN r8 OUTPUT (In.1 ++ "app/views/" ++ In.2), In.0

            1250   ~0%    {2} r17 = r15 UNION r16
             581   ~0%    {2} r18 = JOIN r17 WITH FileSystem#df18ed9a::Make#FileSystem#e91ad87f::Input#::Container::getRelativePath#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
            3243   ~2%    {2} r19 = JOIN r18 WITH containerparent ON FIRST 1 OUTPUT Rhs.1, Lhs.1
            2767   ~0%    {2} r20 = JOIN r19 WITH Erb#b2b9e6ed::ErbFile#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.0

            2808   ~0%    {2} r21 = r14 UNION r20
                          return r21
```

After
```
Evaluated relational algebra for predicate ActionController#32b59475::controllerTemplateFile#2#ff@4b56c4f9 with tuple counts:
          1236   ~0%    {2} r1 = SCAN ActionController#32b59475::getActionControllerClassRelativePath#1#ff OUTPUT In.0, InverseAppend(("" ++ "app/controllers/"),"_controller.rb",In.1)

          1236   ~0%    {2} r2 = SCAN r1 OUTPUT ("" ++ "app/views/" ++ In.1), In.0

          1320   ~0%    {3} r3 = SCAN ActionController#32b59475::getActionControllerClassRelativePath#1#ff OUTPUT In.0, In.1, "^(.*/)app/controllers/(?:.*?)/(?:[^/]*)$"
            14   ~0%    {5} r4 = JOIN r3 WITH PRIMITIVE regexpCapture#bbff ON Lhs.1,Lhs.2
            14   ~0%    {5} r5 = SELECT r4 ON In.3 = 1
            14   ~0%    {3} r6 = SCAN r5 OUTPUT In.0, In.4, InverseAppend((In.4 ++ "app/controllers/"),"_controller.rb",In.1)

            14   ~0%    {2} r7 = SCAN r6 OUTPUT (In.1 ++ "app/views/" ++ In.2), In.0

          1250   ~0%    {2} r8 = r2 UNION r7
           581   ~0%    {2} r9 = JOIN r8 WITH FileSystem#df18ed9a::Make#FileSystem#e91ad87f::Input#::Container::getRelativePath#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
          3243   ~0%    {2} r10 = JOIN r9 WITH containerparent ON FIRST 1 OUTPUT Rhs.1, Lhs.1
          2767   ~0%    {2} r11 = JOIN r10 WITH Erb#b2b9e6ed::ErbFile#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.0

          1236   ~1%    {3} r12 = SCAN r1 OUTPUT In.0, "", In.1

          1250   ~1%    {3} r13 = r12 UNION r6
        102500   ~0%    {4} r14 = JOIN r13 WITH project#ActionController#32b59475::getErbFileRelativePath#1#ff CARTESIAN PRODUCT OUTPUT Rhs.0, Lhs.0, Lhs.1, Lhs.2
        102500   ~0%    {5} r15 = JOIN r14 WITH ActionController#32b59475::getErbFileRelativePath#1#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3, Lhs.0
        102500   ~0%    {4} r16 = JOIN r15 WITH Erb#b2b9e6ed::ErbFile#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.4, Lhs.0, (Lhs.2 ++ "app/views/layouts/" ++ Lhs.3 ++ "%")
            41   ~0%    {4} r17 = SELECT r16 ON In.1 matches In.3
            41   ~3%    {2} r18 = SCAN r17 OUTPUT In.0, In.2

          2808   ~1%    {2} r19 = r11 UNION r18
                        return r19
```
2023-04-25 21:04:30 +02:00
Mathias Vorreiter Pedersen
3f03cc27cd C++: Accept test changes. 2023-04-25 17:51:04 +01:00
Mathias Vorreiter Pedersen
648c08bcd9 C++: Fix enclosing functions for static locals. 2023-04-25 17:51:04 +01:00
Mathias Vorreiter Pedersen
9cc4bfec2a C++: Accept test changes. 2023-04-25 17:51:04 +01:00
Mathias Vorreiter Pedersen
d14ee931e1 C++: IR translation for non-runtime-initialized static local variables. 2023-04-25 17:51:04 +01:00
smiddy007
a2a82fcde9 Merge branch 'main' into JS-Allow-Truncated-Hash-Forge-NonKeyCipher 2023-04-25 12:23:31 -04:00
Rasmus Wriedt Larsen
95b8a22529 Merge pull request #12889 from kaspersv/kaspersv/prevent-python-join-order-regression
Prevent Python join order regression
2023-04-25 18:02:13 +02:00
Óscar San José
a95fc79874 Merge branch 'main' into sabrowning1/query-suite-name-fix 2023-04-25 16:57:26 +02:00
Ed Minnix
d98723c35a Fix naming of OkHttpFlowConfig in test 2023-04-25 10:31:27 -04:00
Jami
cff7f63193 Merge pull request #12838 from jcogs33/jcogs33/add-class-for-callables-interesting-for-modeling
Java: add class that represents callables that are interesting for MaD models
2023-04-25 09:28:56 -04:00
Alexandre Boulgakov
909f40b6ea Merge pull request #12918 from github/sashabu/absl
Swift: Fix some TODOs with Abseil.
2023-04-25 14:05:12 +01:00
Geoffrey White
84ddfe9c3f Merge pull request #12919 from geoffw0/precision2
Swift: Upgrade two queries to precision high.
2023-04-25 14:04:52 +01:00
Geoffrey White
b1712d33fe Merge pull request #12837 from geoffw0/flowsources
Swift: widen swift/predicate-injection sources
2023-04-25 14:03:58 +01:00
Rasmus Lerchedahl Petersen
f796177b69 python: no longer missing 2023-04-25 14:24:26 +02:00
Rasmus Lerchedahl Petersen
141c5af30e Merge branch 'main' of https://github.com/github/codeql into python/captured-variables-for-typetracking 2023-04-25 14:07:11 +02:00
yoff
b35637e1c5 Merge pull request #12858 from RasmusWL/paramiko-modeling
Python: Expand modeling of `paramiko`
2023-04-25 14:04:50 +02:00
Tony Torralba
89ee2b9ace Merge pull request #12911 from atorralba/atorralba/java/filecopyutils-file-sinks
Java: Fix FileCopyUtils.copy models
2023-04-25 12:06:13 +02:00
Asger F
c3c3faa4b5 JS: Alias references are not always safe to expand 2023-04-25 11:27:40 +02:00
Asger F
3694ed5ed6 JS: Deduplicate union/intersection members 2023-04-25 11:27:40 +02:00
Asger F
cab76507e7 JS: Recognize type vars on anonymous function types 2023-04-25 11:27:40 +02:00
Asger F
ff67118097 JS: Add hanging test case 2023-04-25 11:27:40 +02:00
Alex Denisov
125aab8107 Swift: rework fetching and dispatching
* visiting now happens in a later stage than fetching labels. While
  fetching a list of entities to be visited is created, and then acted
  upon in actual extraction. This partially flattens the recursive
  nature of `fetchLabel` into a loop inside `SwiftVisitor::extract`.
  Recursion in `fetchLabel` will only happen on labels fetched while
  naming an entity (calling into `SwiftMangler`).
* The choice whether to name a declaration or type has been moved from
  the translators to `SwiftMangler`. Acting on this choice is contained
  in `SwiftDispatcher::createLabel`.
* The choice whether to emit a body of a declaration has been moved from
  `DeclTranslator` to the dispatcher. This choice is also contained in
  `SwiftDispatcher::createLabel`.
* The simple functionality of the `LabelStore` has been moved to the
  `SwiftDispatcher` as well.
2023-04-25 11:15:27 +02:00
Joe Farebrother
a9d34458de Merge pull request #12658 from joefarebrother/csharp-sensitive-data
C#: Add local filesystem writes as External Location sinks
2023-04-25 10:14:48 +01:00
Geoffrey White
0ebb06e185 Merge branch 'main' into flowsources 2023-04-25 10:08:15 +01:00
Geoffrey White
2c28fae7e3 Merge pull request #12836 from geoffw0/precision
Swift: Downgrade swift/unsafe-js-eval to precision medium.
2023-04-25 09:58:11 +01:00
Geoffrey White
b0b2d6e05f Swift: Upgrade two queries to @precision high. 2023-04-25 09:42:49 +01:00
AlexDenisov
fcbd211783 Merge pull request #12910 from github/redsun82/swift-hash-lazy-trap-names
Swift: use hashing for lazy decl trap file names
2023-04-25 09:54:46 +02:00
Anders Schack-Mulligen
934a455908 Apply suggestions from code review
Update qldoc.
2023-04-25 09:35:26 +02:00
Tom Hvitved
65835cdb92 Merge pull request #12907 from hvitved/ruby/destructured-assign-join
Ruby: Fix bad join in `DestructuredAssignDesugar`
2023-04-25 08:50:27 +02:00
Owen Mansel-Chan
3e73e02175 Update PostUpdateNodes for implicit varargs slices
We don't want a post update node for the implicit varargs slice, and we
do want one for each argument which is stored in the implicit varargs
slice.
2023-04-25 07:33:35 +01:00
Owen Mansel-Chan
73b712a8c9 Allow data flow through varargs parameters 2023-04-25 07:33:34 +01:00
Alexandre Boulgakov
c88f9bf818 Swift: Use absl::StrJoin to dump arguments for logging.
This also removes the TODO about using `absl::StrJoin` to dump the environment because we can't easily get a range from a null-terminated `envp`. It also doesn't suffer from the usual awkwardness around inserting a separator *between* elements but not after the last one, so a for loop is clear enough.
2023-04-24 22:34:14 +01:00
Alexandre Boulgakov
621761b289 Swift: Use absl::bit_width to calculate TRAP label size.
It's not much cleaner due to arithmetic to convert truncating division to a ceiling, but has two advantages:
 1. It doesn't suffer from rounding issues with large TRAP labels. This is largely theoretical, but does let us handle `undefined` uniformly.
 2. It should be much faster (using LZCNT/BSR instead of floating point arithmetic). This is probably not a performance bottleneck, so *shrug*.
2023-04-24 22:31:11 +01:00
Ed Minnix
3af72fa28e Remove legacy code from InlineFlowTest 2023-04-24 17:10:32 -04:00
Ed Minnix
59e59125d6 Refactor tests 2023-04-24 17:10:32 -04:00
Alexandre Boulgakov
36d34f199b Bazel: Add Abseil C++ dependency. 2023-04-24 21:59:57 +01:00
Henry Mercer
3d1da8a45d JS: Update message when the file is not located in the source root 2023-04-24 21:08:00 +01:00
Henry Mercer
927522c563 JS: Only populate diagnostic locations within the source root 2023-04-24 20:53:42 +01:00
Owen Mansel-Chan
b47c8e8c4c Merge pull request #12912 from owen-mc/go/fix-invalid-semver-version
Go: Fix invalid SemVer version by adding "v" to the front
2023-04-24 16:47:28 +01:00
Sam Browning
0a7e525c16 Update "code-scanning" suite name to "default" 2023-04-24 11:27:34 -04:00
Paolo Tranquilli
14706b42fa Swift: strip parameters from lazy function decl trap names 2023-04-24 17:04:41 +02:00
Joe Farebrother
0ebf529dc4 Add comment + use flowTo 2023-04-24 15:49:05 +01:00
Michael Nebel
8756c031e0 C#: Re-factor the InappropriateEncoding query to use the new API. 2023-04-24 16:06:07 +02:00
Owen Mansel-Chan
1afe845ed3 Add missing "v" to semver version string
Because it was missing, that function always returned +1,
so we were doing the wrong thing when the Go version
installed was lower than 1.16.
2023-04-24 14:31:46 +01:00
Geoffrey White
5f0d334b8d Swift: Add basic-query-for-swift-code.rst. 2023-04-24 14:18:23 +01:00
Tony Torralba
e3d93c3581 Fix FileCopyUtils models 2023-04-24 15:07:19 +02:00
Paolo Tranquilli
e84bdf5bed Swift: use hashing for lazy decl trap file names
It turns out mangled names can sometimes be too long. While this code
will eventually be replaced by our own mangling, we need to use hashing
to cut down the names.

Module and decl names are preserved in the trap file names for
debuggability.
2023-04-24 14:36:36 +02:00
Paolo Tranquilli
feb31612f5 Merge pull request #12908 from github/revert-12760-redsun82/swift-logging-compiler
Revert "Swift: route compiler diagnostics through our log"
2023-04-24 14:31:18 +02:00
Paolo Tranquilli
95ef7fb3f1 Revert "Swift: route compiler diagnostics through our log" 2023-04-24 13:57:24 +02:00
Tom Hvitved
71cd973b42 Ruby: Fix bad join in DestructuredAssignDesugar
```
Evaluated relational algebra for predicate Synthesis#d9ff06b1::DestructuredAssignDesugar::LhsWithReceiver::getSynthKind#0#dispred#ff@0c55fb0w on iteration 4 running pipeline order_500000 with tuple counts:
                 0   ~0%    {2} r1 = JOIN Synthesis#d9ff06b1::ConstantWriteAccessKind#ff#prev_delta WITH Constant#c70e4e0a::ScopeResolutionConstantAccess::getName#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
                 0   ~0%    {2} r2 = JOIN r1 WITH Constant#c70e4e0a::ScopeResolutionConstantAccess::getScopeExpr#0#dispred#ff#prev ON FIRST 1 OUTPUT Lhs.0, Lhs.1

                 0   ~0%    {4} r3 = JOIN Call#841c84e8::MethodCall::getMethodName#0#dispred#ff#prev_delta WITH Call#841c84e8::Call::getNumberOfArguments#0#dispred#ff#prev ON FIRST 1 OUTPUT Lhs.1, false, Rhs.1, Lhs.0
                 0   ~0%    {2} r4 = JOIN r3 WITH Synthesis#d9ff06b1::MethodCallKind#ffff#prev ON FIRST 3 OUTPUT Lhs.3, Rhs.3

                 0   ~0%    {2} r5 = r2 UNION r4

            336618   ~3%    {1} r6 = SCAN Constant#c70e4e0a::ScopeResolutionConstantAccess::getScopeExpr#0#dispred#ff#prev_delta OUTPUT In.0
            336618   ~0%    {2} r7 = JOIN r6 WITH Constant#c70e4e0a::ScopeResolutionConstantAccess::getName#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.0
                 0   ~0%    {2} r8 = JOIN r7 WITH Synthesis#d9ff06b1::ConstantWriteAccessKind#ff#prev ON FIRST 1 OUTPUT Lhs.1, Rhs.1

                 0   ~0%    {3} r9 = SCAN Call#841c84e8::Call::getNumberOfArguments#0#dispred#ff#prev_delta OUTPUT false, In.1, In.0
                 0   ~0%    {3} r10 = JOIN r9 WITH Synthesis#d9ff06b1::MethodCallKind#ffff#reorder_1_2_0_3#prev ON FIRST 2 OUTPUT Lhs.2, Rhs.2, Rhs.3
                 0   ~0%    {2} r11 = JOIN r10 WITH Call#841c84e8::MethodCall::getMethodName#0#dispred#ff#prev ON FIRST 2 OUTPUT Lhs.0, Lhs.2

              2119   ~2%    {3} r12 = JOIN Synthesis#d9ff06b1::MethodCallKind#ffff#reorder_1_2_0_3#prev_delta WITH const_false ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.3
        2657005103   ~5%    {3} r13 = JOIN r12 WITH Call#841c84e8::Call::getNumberOfArguments#0#dispred#ff#reorder_1_0#prev ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2
           1184200   ~0%    {2} r14 = JOIN r13 WITH Call#841c84e8::MethodCall::getMethodName#0#dispred#ff#prev ON FIRST 2 OUTPUT Lhs.0, Lhs.2

           1184200   ~0%    {2} r15 = r11 UNION r14
           1184200   ~0%    {2} r16 = r8 UNION r15
           1184200   ~0%    {2} r17 = r5 UNION r16
           1184200   ~0%    {2} r18 = r17 AND NOT Synthesis#d9ff06b1::DestructuredAssignDesugar::LhsWithReceiver::getSynthKind#0#dispred#ff#prev(Lhs.0, Lhs.1)
                            return r18
```
2023-04-24 13:44:18 +02:00
Kasper Svendsen
361b15b2c7 Merge branch 'main' into kaspersv/prevent-python-join-order-regression 2023-04-24 13:35:07 +02:00
Kasper Svendsen
bfe5db20a3 Merge pull request #12891 from kaspersv/kaspersv/prevent-ruby-join-regression2
Prevent Ruby join order regression
2023-04-24 13:27:33 +02:00
Edward Minnix III
ba4d326768 Merge pull request #12902 from egregius313/egregius313/java/dataflow/refactor-integration-tests
Java: Refactor Kotlin Integration tests to new DataFlow API
2023-04-24 06:51:40 -04:00
Michael Nebel
8ade7247a1 Merge pull request #12885 from michaelnebel/mergepathgraph3
Dataflow: Introduce param module for merging three path graphs.
2023-04-24 12:49:28 +02:00
Rasmus Wriedt Larsen
7453533ba4 Python: Expand setdefault tests 2023-04-24 12:29:58 +02:00
Rasmus Wriedt Larsen
7fa84a3613 Python: Only test UnsafeUnpacking with Python 3
Apparently the fixup of .expected in the latest commit was only required
when extracting as Python 3, but not as Python 2... I honestly don't
understand why.
2023-04-24 12:29:58 +02:00
Rasmus Lerchedahl Petersen
a25c7f7549 Merge branch 'main' of https://github.com/github/codeql into python/captured-variables-for-typetracking 2023-04-24 11:50:32 +02:00
Rasmus Wriedt Larsen
bfbbb5277d Merge pull request #12888 from lcartey/mcafee-trojan-fp
Update `SimpleXmlRpcServer.ql` to avoid incorrect detection as a trojan by Mcafee
2023-04-24 11:17:52 +02:00
Erik Krogh Kristensen
b0efff0110 Merge pull request #12904 from github/dependabot/cargo/ql/tracing-subscriber-0.3.17
Bump tracing-subscriber from 0.3.16 to 0.3.17 in /ql
2023-04-24 11:05:36 +02:00
Erik Krogh Kristensen
b16444dd22 Merge pull request #12903 from github/dependabot/cargo/ql/regex-1.8.1
Bump regex from 1.8.0 to 1.8.1 in /ql
2023-04-24 11:05:13 +02:00
Geoffrey White
1f126b60ff Swift: Touch UnsafeWebViewFetch.qhelp. 2023-04-24 09:35:32 +01:00
Alex Ford
edf48f4839 Ruby: add sqlite3 to Frameworks.qll 2023-04-24 09:11:14 +01:00
Paolo Tranquilli
1ed5f6ac96 Swift: flush log files on log flushing 2023-04-24 10:08:37 +02:00
Paolo Tranquilli
f9a52f894e Merge branch 'main' into redsun82/swift-logging-assertions-and-prints 2023-04-24 09:58:19 +02:00
Paolo Tranquilli
c04ac9c04e Swift: demote wrong assertion 2023-04-24 09:57:51 +02:00
dependabot[bot]
5e274c9664 Bump tracing-subscriber from 0.3.16 to 0.3.17 in /ql
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.3.16 to 0.3.17.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.16...tracing-subscriber-0.3.17)

---
updated-dependencies:
- dependency-name: tracing-subscriber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 04:12:25 +00:00
dependabot[bot]
a5e919b6cb Bump regex from 1.8.0 to 1.8.1 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/commits/1.8.1)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 04:12:06 +00:00
Harry Maclean
9ea0b19ead Replace deprecated extension in devcontainer 2023-04-23 06:05:25 +00:00
Harry Maclean
3f6087e179 Shared: formatting 2023-04-23 06:04:55 +00:00
Harry Maclean
690c243987 Shared: add CI check for shared extractor 2023-04-23 05:50:22 +00:00
Harry Maclean
9005684b10 Shared: Add integration test for shared extractor
This is a very basic test but provides some confidence that the extractor is
working.
2023-04-23 05:29:22 +00:00
Ed Minnix
19e6a9a1d3 Fix version of PathGraph used 2023-04-21 19:08:56 -04:00
Ed Minnix
40aed29858 Refactor Java Integration tests to new API 2023-04-21 18:22:28 -04:00
jarlob
6e9f54ef55 Use double curly braces 2023-04-21 19:03:38 +02:00
Arthur Baars
b919547e31 Add change note 2023-04-21 17:42:02 +02:00
Arthur Baars
bc44b9e4fb Python: update stats for YAML tables 2023-04-21 17:42:02 +02:00
Arthur Baars
c4a7353583 Python: upgrade/downgrade scripts 2023-04-21 17:42:02 +02:00
Arthur Baars
f61565cab1 Python: add YAML library 2023-04-21 17:42:02 +02:00
Arthur Baars
9c25c150a3 Python: add YAML dbscheme fragment 2023-04-21 17:42:02 +02:00
Rasmus Wriedt Larsen
b60cab254a Python: Accept .expected change 2023-04-21 15:25:47 +02:00
Joe Farebrother
a4d7570788 Add more sources 2023-04-21 14:23:01 +01:00
Joe Farebrother
9881fdfe27 Convert sources to MaD 2023-04-21 14:19:17 +01:00
Rasmus Wriedt Larsen
4094ec5fcc Python: Change additional dict store/read steps to not affect taint-tracking 2023-04-21 14:43:24 +02:00
Rasmus Wriedt Larsen
f80a0916ac Python: Don't report get/setdefault as unresolved calls for dict tests 2023-04-21 14:42:20 +02:00
Rasmus Wriedt Larsen
e0e978bd3e Python: Fix ql4ql alerts 2023-04-21 14:18:50 +02:00
Rasmus Wriedt Larsen
b56869551d Python: Support more dictionary read/store steps
The `setdefault` behavior is kinda strange, but no reason not to support
it.
2023-04-21 14:18:50 +02:00
Rasmus Wriedt Larsen
6e31f64aaa Python: Add test for dictionary flow 2023-04-21 14:18:46 +02:00
Erik Krogh Kristensen
4bf03e7962 Merge pull request #12897 from github/dependabot/cargo/ql/regex-1.8.0
Bump regex from 1.7.3 to 1.8.0 in /ql
2023-04-21 12:57:33 +02:00
Asger F
f3b14e13b2 Merge pull request #12841 from asgerf/rb/api-graph-class-nodes
Ruby: add API node representing a module/class object
2023-04-21 10:59:51 +02:00
Harry Maclean
ac1d250596 Shared: fix language prefix in extractor 2023-04-21 15:07:47 +07:00
Paolo Tranquilli
55f23ffa6f Merge branch 'main' into redsun82/swift-logging-assertions-and-prints 2023-04-21 09:18:48 +02:00
Michael Nebel
239a763ef9 Merge pull request #12845 from michaelnebel/csharp/xssrefactor
C#: Re-factor Xss to use the new data flow API.
2023-04-21 08:55:07 +02:00
dependabot[bot]
149753c052 Bump regex from 1.7.3 to 1.8.0 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.7.3 to 1.8.0.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-21 04:03:04 +00:00
Ed Minnix
64ea4833d9 Erase generics in typeAsModel 2023-04-20 17:09:36 -04:00
Jami Cogswell
85542638d7 Java: refactor CaptureModelsSpecific; resolve conflict for isInTestFile 2023-04-20 16:23:12 -04:00
Jami Cogswell
94f11029ee Java: refactor ExternalApi 2023-04-20 16:19:15 -04:00
Jami Cogswell
2ae4b646a0 Java: adjust genVsMan query test cases 2023-04-20 16:19:15 -04:00
Jami Cogswell
2ca8103a7e Java: remove isImplicitlyPublic predicate since not needed for this use-case 2023-04-20 16:19:15 -04:00
Jami Cogswell
5dbd11a584 Java: move veryPublic predicate 2023-04-20 16:19:15 -04:00
Jami Cogswell
fa1a6da60d Java: update genVsMan query test case 2023-04-20 16:19:15 -04:00
Jami Cogswell
7c72ece4a0 Java: update genVsMan coverage query to use ModelApi instead of DataFlowTargetApi 2023-04-20 16:19:15 -04:00
Jami Cogswell
9828ad0fc3 Java: add draft of class to represent callables we are interested in modeling 2023-04-20 16:19:15 -04:00
Jami Cogswell
2e76e12316 Java: add class and predicates to approximate an effectively public method 2023-04-20 16:19:15 -04:00
Geoffrey White
bfbd45a220 Swift: Fix CSV field sinks. 2023-04-20 18:14:34 +01:00
Geoffrey White
d317ad80e5 Swift: Convert to CSV sinks. 2023-04-20 17:53:00 +01:00
Nora Dimitrijević
1f861fda25 Merge pull request #12736 from d10c/swift/capture-flow
Swift: Closure Capture Helper APIs
2023-04-20 18:45:56 +02:00
Michael Nebel
0fdeeba46f C#: Re-refactor Xss to use the new API. 2023-04-20 18:38:15 +02:00
Geoffrey White
380bf21a38 Swift: Update InsecureTLSExtensions.ql sinks to not depend on AssignExpr. 2023-04-20 17:15:48 +01:00
Geoffrey White
c1a95d57bb Swift: Add some test cases. 2023-04-20 17:15:47 +01:00
Edward Minnix III
76f8d460e7 Merge pull request #12851 from egregius313/egregius313/mad/add-groovy-stubs-to-isInTestFile
Java: Add `*/test/*` to model generator's list of ignored paths
2023-04-20 11:06:38 -04:00
Paolo Tranquilli
00436828a9 Merge pull request #12883 from github/redsun82/swift-default-output-dir
Swift: aggregate default output directories
2023-04-20 16:58:31 +02:00
Alex Ford
9dc04f30ac Ruby: model sqlite3 2023-04-20 15:47:14 +01:00
Kasper Svendsen
b707c8162e Prevent Ruby join order regression 2023-04-20 15:52:32 +02:00
Paolo Tranquilli
c7378a1e5b Merge branch 'main' into redsun82/swift-default-output-dir 2023-04-20 15:12:07 +02:00
Arthur Baars
94e0828ab9 Merge pull request #12793 from aibaars/js-yaml-extractor
JavaScript: switch to shared YamlPopulator
2023-04-20 14:46:06 +02:00
Michael Nebel
aa8291e13f Merge pull request #12870 from michaelnebel/csharp/refactordataflow6
C#: Re-factor data flow and taint tracking configurations to use the new API.
2023-04-20 14:31:20 +02:00
Kasper Svendsen
51b6da4183 Merge pull request #12875 from kaspersv/kaspersv/prevent-ruby-join-order-regression
Prevent Ruby join order regression
2023-04-20 13:50:40 +02:00
Kasper Svendsen
603a97faf9 Prevent Python join order regression 2023-04-20 13:44:30 +02:00
Luke Cartey
9dc1ea1216 Merge branch 'main' into mcafee-trojan-fp 2023-04-20 12:34:38 +01:00
Erik Krogh Kristensen
377aa68bb3 Merge pull request #12854 from natejohnson05/js-insecure-http-parser
JS - NodeJS CWE-444 InsecureHTTPParser
2023-04-20 13:09:45 +02:00
Luke Cartey
a47778c22e Update SimpleXmlRpcServer.ql to avoid av detection
This file was being flagged by McAfee as an `Exploit-Generic.src`
trojan. We have attempted to report this to Mcafee without success so
far. This commit therefore adjusts the file to avoid detection.
2023-04-20 11:59:18 +01:00
Asger F
1d0a0dec6f JS: Fix typo 2023-04-20 12:48:17 +02:00
Asger F
1acc0d2ddf JS: Update model of js-yaml 2023-04-20 12:47:13 +02:00
Michael Nebel
656d8d2451 Sync files. 2023-04-20 11:29:51 +02:00
Michael Nebel
c71278ceb7 C#: Introduce parameterized module for merging three path graphs. 2023-04-20 11:29:34 +02:00
Paolo Tranquilli
60c723e7cc Swift: aggregate default output directories
In case the extractor is run in isolation for debugging/testing, this
will avoid littering the current working directory with artifacts, and
instead having a single `extractor-out` directory to inspect or clean
up.

Also extractor logs have been nested into a `swift` directory, as the
log directory provided by the `codeql` cli is actually shared between
languages.
2023-04-20 09:20:11 +02:00
Harry Maclean
8091d57f03 Shared: Remove unused type 2023-04-20 08:07:40 +07:00
Harry Maclean
da9a49d6e4 QL: Use high level extractor API 2023-04-20 08:07:40 +07:00
Harry Maclean
c4d7658cc6 Shared: high level API for the shared extractor
This API makes it easy to create an extractor for simple use cases.
2023-04-20 08:07:40 +07:00
Jeroen Ketema
b6a7661c7e Merge pull request #12880 from MathiasVP/use-after-free-fps
C++: Add some use-after-free FP tests
2023-04-19 20:07:10 +02:00
smiddy007
bda0ef3a75 Merge branch 'github:main' into JS-Allow-Truncated-Hash-Forge-NonKeyCipher 2023-04-19 13:40:32 -04:00
smiddy007
4f7275f064 Reformat doc and move change note 2023-04-19 13:39:18 -04:00
Nate Johnson
88411ce439 Merge branch 'main' into js-insecure-http-parser 2023-04-19 13:36:24 -04:00
smiddy007
31b56bf966 Update javascript/ql/lib/change-notes/2023-04-13-Forge-truncated-sha512-hash
Co-authored-by: Asger F <asgerf@github.com>
2023-04-19 13:32:23 -04:00
Mathias Vorreiter Pedersen
533e1d818b C++: Add some use-after-free FPs. 2023-04-19 17:01:55 +01:00
Geoffrey White
7285704807 Merge pull request #12876 from geoffw0/extensiondecl
Swift: Improve ExtensionDecl.toString
2023-04-19 16:41:48 +01:00
Geoffrey White
e895cac569 Merge pull request #12877 from geoffw0/deprecated
Swift: Delete deprecated classes
2023-04-19 16:41:25 +01:00
Geoffrey White
3779d8423f Swift: Autoformat. 2023-04-19 14:57:17 +01:00
Jeroen Ketema
aa3e8d6b87 Merge pull request #12815 from jketema/anon
C++: Update test expectations after extractor changes
2023-04-19 15:51:56 +02:00
Geoffrey White
4484574301 Swift: Rename clashing CleartextStorage modules. 2023-04-19 14:29:25 +01:00
Geoffrey White
10c222e7e2 Swift: Remove deprecated classes from queries. 2023-04-19 14:26:03 +01:00
Geoffrey White
a3c66b6032 Merge pull request #12833 from geoffw0/addmodels
Swift: Add some sink models
2023-04-19 14:18:29 +01:00
Geoffrey White
49dccaa89d Swift: Fix other tests. 2023-04-19 14:16:24 +01:00
Owen Mansel-Chan
23934292f0 Merge pull request #12834 from owen-mc/go/refactor-autobuilder
Go: Refactor autobuilder
2023-04-19 14:10:23 +01:00
Owen Mansel-Chan
65c1f4a151 Merge pull request #12873 from owen-mc/go/fix-platform-specific-tests
Go: Fix platform specific tests
2023-04-19 13:52:14 +01:00
Kasper Svendsen
ba6bb79dd3 Prevent Ruby join order regression 2023-04-19 14:42:27 +02:00
Geoffrey White
e9ffefaa96 Swift: Improve ExtensionDecl.toString. 2023-04-19 13:38:04 +01:00
Jeroen Ketema
1a876f7762 C++: Update test expectations after extractor changes 2023-04-19 14:12:00 +02:00
Owen Mansel-Chan
3ca04338ca Use named initialization for struct 2023-04-19 13:06:51 +01:00
Paolo Tranquilli
c2f2a0578b Merge pull request #12868 from github/redsun82/bazel-6.1.2
Bazel: update to 6.1.2
2023-04-19 14:06:08 +02:00
Owen Mansel-Chan
219c1686fd Wrap return values of moveToTemporaryGopath in a struct 2023-04-19 12:40:23 +01:00
Erik Krogh Kristensen
d7325ba4e1 Merge pull request #12856 from p-/p--non-constant-open-improvments
Ruby: Add additional sanitizers for Kernel.open or IO.read or similar sinks with a non-constant value
2023-04-19 13:39:16 +02:00
Michael Nebel
b410791f28 C#: Re-factor InsecureRandomness to use the new API. 2023-04-19 13:36:30 +02:00
Michael Nebel
e94b492404 C#: Delete inaccessible/dead data flow configuration in JsonWebTokenHandlerLib. 2023-04-19 13:36:30 +02:00
Michael Nebel
f976eeb909 C#: Re-factor on AppendCookieTracking to use the new API. 2023-04-19 13:36:30 +02:00
Michael Nebel
1b128a21e6 C#: Re-factor AuthCookieName to use the new API. 2023-04-19 13:36:30 +02:00
Michael Nebel
1979a78f02 C#: Re-factor RequestForgery to use the new API. 2023-04-19 13:36:30 +02:00
Michael Nebel
b7e36b7dec C#: Re-factor NoDisposeCallOnLocalIDisposable to use the new API. 2023-04-19 13:36:30 +02:00
Michael Nebel
5580023ec3 C#: Re-factor FormatInvalid to use the new API. 2023-04-19 13:36:30 +02:00
Owen Mansel-Chan
1bb006f43e Move defer statements to the right place
It turns out that extracting defer statements into a separate function
changes behaviour.
2023-04-19 12:20:52 +01:00
Owen Mansel-Chan
641f16b0df Factor out extract() 2023-04-19 12:20:52 +01:00
Owen Mansel-Chan
a611769b43 Factor out installDependencies() 2023-04-19 12:20:51 +01:00
Owen Mansel-Chan
d61d595b21 Factor out function buildWithCustomCommands 2023-04-19 12:20:51 +01:00
Owen Mansel-Chan
b45c0ff848 Factor out buildWithoutCustomCommands 2023-04-19 12:20:51 +01:00
Owen Mansel-Chan
b76e655735 Factor out moving code to temp dir in gopath 2023-04-19 12:20:50 +01:00
Owen Mansel-Chan
ba48eaa8a6 Factor out calculation of source dir 2023-04-19 12:20:50 +01:00
Owen Mansel-Chan
702c22b630 Refactor calculation of inLGTM 2023-04-19 12:20:49 +01:00
Owen Mansel-Chan
f0186957ca Factor out tryUpdateGoModAndGoSum 2023-04-19 12:20:49 +01:00
Owen Mansel-Chan
0bfb242e63 Factor out logic for needGopath 2023-04-19 12:20:49 +01:00
Owen Mansel-Chan
b169f1bfdf Factor out code to fix go vendor issues 2023-04-19 12:20:48 +01:00
Owen Mansel-Chan
f872a11b85 Factor out initial ModMode calculation 2023-04-19 12:20:48 +01:00
Owen Mansel-Chan
2d8d9773c4 Factor out depMode calculation 2023-04-19 12:20:47 +01:00
Owen Mansel-Chan
d613bc8a28 Update checks for files or dirs existing
The previous way is considered outdated now.
2023-04-19 12:20:47 +01:00
Geoffrey White
c092851c28 Swift: Add a test for ExtensionDecls. 2023-04-19 11:50:49 +01:00
Owen Mansel-Chan
2914480ff6 Avoid platform-specific results
These were introduced in https://github.com/github/codeql/pull/12750 but
the relevant tests that should have caught it weren't run.
2023-04-19 11:18:19 +01:00
Owen Mansel-Chan
1cf626f712 Use latest patch version of Go 1.20 for tests 2023-04-19 11:18:09 +01:00
Tony Torralba
4e60697042 Merge pull request #12866 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-04-19 11:16:21 +02:00
Paolo Tranquilli
83674751fc Bazel: update to 6.1.2 2023-04-19 11:12:02 +02:00
Mathias Vorreiter Pedersen
8d62d5916e Merge pull request #12807 from MathiasVP/dataflow-for-keypaths
Swift: Dataflow for keypaths
2023-04-19 10:00:49 +01:00
Peter Stöckli
672cb92fbd Ruby: improve non-constant-kernel-open, recursive step for freeze
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-04-19 10:50:59 +02:00
Asger F
1c2fdc8df9 JS: Ignore more webpack modules 2023-04-19 10:29:14 +02:00
Harry Maclean
c44fbc1063 Merge pull request #12786 from hmac/merge-extractor-binaries
Ruby/QL: Merge extractor binaries
2023-04-19 15:17:25 +07:00
Paolo Tranquilli
e93686cdfc Merge branch 'main' into redsun82/swift-logging-assertions-and-prints 2023-04-19 09:16:19 +02:00
Arthur Baars
dcca0e0c6c JavaScript: switch to shared YamlPopulator 2023-04-19 08:34:38 +02:00
Michael Nebel
1caca21552 Merge pull request #12829 from michaelnebel/csharp/refactordataflow4
C#: Re-factor tainttracking and dataflow configurations to use the new API.
2023-04-19 08:32:36 +02:00
Harry Maclean
30468dd059 QL: Rename extractor to codeql-extractor-ql 2023-04-19 06:30:09 +00:00
Harry Maclean
ab4eba11ec Ruby: Rename extractor to codeql-extractor-ruby 2023-04-19 06:27:27 +00:00
Tony Torralba
62f5a5dcd5 Merge pull request #10707 from atorralba/atorralba/log-injection-sanitizers
Java: Add line break sanitizers to java/log-injection
2023-04-19 08:20:04 +02:00
Nate Johnson
4ae8377713 Merge branch 'main' into js-insecure-http-parser 2023-04-18 22:00:13 -04:00
Nate Johnson
78229bb264 Moved into experimental 2023-04-18 21:59:14 -04:00
github-actions[bot]
7abc029872 Add changed framework coverage reports 2023-04-19 00:16:15 +00:00
Robert Marsh
3c2b4e8456 C++: AST-based wrapper for new range analysis 2023-04-18 15:52:43 -04:00
Edward Minnix III
fc3c776bdc Permit CodeQL's own tests
Removing `%/test/%` accidentally removed our own test cases.

Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-04-18 15:31:49 -04:00
Mathias Vorreiter Pedersen
9aca2d8533 Merge pull request #12861 from MathiasVP/ignore-more-instructions-for-dataflow
C++: Ignore a few more instructions in dataflow
2023-04-18 18:17:11 +01:00
Geoffrey White
c7ea08aa73 Swift: Fix inline expectations. 2023-04-18 17:32:38 +01:00
Mathias Vorreiter Pedersen
fb1a871777 Merge pull request #12855 from MathiasVP/fix-joins-in-use-after-free
C++: Fix bad self-join in `cpp/use-after-free`
2023-04-18 17:13:03 +01:00
Nora Dimitrijević
7f675d8c3b Swift: more CapturedDecl test cases 2023-04-18 16:50:38 +02:00
Nora Dimitrijević
96f06f8eca Swift: refactor the public API wrt captures
This exposes capture- and access-related methods under different names.
2023-04-18 16:50:37 +02:00
Ed Minnix
83d5cde01d Change isInTestFile to ignore %/test/% 2023-04-18 10:27:20 -04:00
Edward Minnix III
09502c60d5 Merge pull request #12812 from egregius313/egregius313/java/dataflow/refactor-tests
Java: Refactor Test DataFlow configurations to new API
2023-04-18 10:22:30 -04:00
Alex Ford
924ce250dd Merge pull request #12847 from github/post-release-prep/codeql-cli-2.13.0
Post-release preparation for codeql-cli-2.13.0
2023-04-18 14:40:40 +01:00
Mathias Vorreiter Pedersen
6e5f09f7bb C++: Ignore more instructions in dataflow. 2023-04-18 13:32:24 +01:00
Mathias Vorreiter Pedersen
231b0fcab2 Swift: Add more tests. 2023-04-18 12:01:08 +01:00
Paolo Tranquilli
4b40471f7b Swift: reconfigure default logging in qltest.sh
Route all logging to console by default, which ends up in the qltest.log
file.
2023-04-18 12:48:59 +02:00
Paolo Tranquilli
61bb6c912a Swift: replace or remove assertions in translators
Assertions before fetching a non optional label are not needed as
the dispatcher will replace those with unspecified elements (and
properly log those instances).
2023-04-18 12:16:22 +02:00
Paolo Tranquilli
df84ed5953 Swift: error printing in SwiftInvocationExtractor 2023-04-18 12:16:22 +02:00
Paolo Tranquilli
a1cec3e970 Swift: replace assertions and prints in the file library 2023-04-18 12:16:22 +02:00
Paolo Tranquilli
f965495ddf Swift: replace assertions and direct prints in SwiftDispatcher
Also added opt-in logging of undefined trap labels for all emissions
outside the `SwiftDispatcher`.
2023-04-18 12:16:22 +02:00
Paolo Tranquilli
89496a87df Codegen: add const overload of forEachLabel 2023-04-18 12:14:46 +02:00
Paolo Tranquilli
dbfd85c505 Swift: replace assertions and prints in main and SwiftExtractor 2023-04-18 12:14:46 +02:00
Rasmus Wriedt Larsen
a168af349e Python: Expand modeling of paramiko 2023-04-18 11:57:20 +02:00
Rasmus Wriedt Larsen
a5a0861be0 Python: Expand test of py/paramiko-missing-host-key-validation 2023-04-18 11:56:07 +02:00
Paolo Tranquilli
f42975f132 Swift: add assertion and expectation macros 2023-04-18 11:48:45 +02:00
Peter Stöckli
2f268b309b Ruby: improve non-constant-kernel-open, freeze called on constant 2023-04-18 11:24:01 +02:00
Tony Torralba
ba49386e6c Merge pull request #12806 from GeekMasher/main
Java: Add missing write-file models for Java IO / NIO
2023-04-18 11:15:53 +02:00
Mathias Vorreiter Pedersen
61aba4683f C++: Fix bad self-join in 'cpp/use-after-free'.
Before:
```ql
[2023-04-18 09:17:24] Evaluated non-recursive predicate _ValueNumberingInternal#c9f42560::tvalueNumber#1#ff_10#join_rhs_project#Instruction#577b6a83::Initia__#loop_invariant_prefix@ae046923 in 3903ms (size: 130544).
Evaluated relational algebra for predicate _ValueNumberingInternal#c9f42560::tvalueNumber#1#ff_10#join_rhs_project#Instruction#577b6a83::Initia__#loop_invariant_prefix@ae046923 with tuple counts:
        533787724  ~0%    {2} r1 = JOIN ValueNumberingInternal#c9f42560::tvalueNumber#1#ff_10#join_rhs WITH ValueNumberingInternal#c9f42560::tvalueNumber#1#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
           130544  ~0%    {2} r2 = JOIN r1 WITH project#Instruction#577b6a83::InitializeParameterInstruction#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.0
                          return r2
```

After:
```ql
[2023-04-18 10:09:34] Evaluated non-recursive predicate _ValueNumberingInternal#c9f42560::tvalueNumber#1#ff_project#Instruction#577b6a83::InitializeParamete__#loop_invariant_prefix@eb90a6fk in 2ms (size: 18380).
Evaluated relational algebra for predicate _ValueNumberingInternal#c9f42560::tvalueNumber#1#ff_project#Instruction#577b6a83::InitializeParamete__#loop_invariant_prefix@eb90a6fk with tuple counts:
        18380  ~0%    {2} r1 = JOIN ValueNumberingInternal#c9f42560::tvalueNumber#1#ff WITH project#Instruction#577b6a83::InitializeParameterInstruction#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.0
                      return r1
```
2023-04-18 10:14:45 +01:00
Arthur Baars
e5d89b969a Merge pull request #12780 from aibaars/shared-yaml-lib
JS: extract YAML library to a shared pack
2023-04-18 11:09:53 +02:00
Tom Hvitved
f6d000eb20 Merge pull request #12805 from hvitved/remove-queries-xml
Remove all `queries.xml` files
2023-04-18 10:52:14 +02:00
Peter Stöckli
0a6bb3f7ce Ruby: improve non-constant-kernel-open, no FP's on open without arguments 2023-04-18 10:10:36 +02:00
Paolo Tranquilli
d777fd950f Merge pull request #12760 from github/redsun82/swift-logging-compiler
Swift: route compiler diagnostics through our log
2023-04-18 10:03:29 +02:00
Tony Torralba
99ad43b21e Merge pull request #12853 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-04-18 09:34:52 +02:00
Kasper Svendsen
9d34d090ab Merge pull request #12843 from kaspersv/kaspersv/prevent-bad-js-join-order
Prevent JS join order regression
2023-04-18 09:09:43 +02:00
Paolo Tranquilli
b8c55612e5 Swift: route compiler diagnostics through our log 2023-04-18 08:46:31 +02:00
Nate Johnson
bbb1ee9597 Merge branch 'main' into js-insecure-http-parser 2023-04-18 00:45:32 -04:00
Nate Johnson
cb90f9af3c Fix to include specification of flag in NODE_OPTIONS 2023-04-18 00:41:48 -04:00
Nate Johnson
522a285d9e Qhelp file for explanation 2023-04-18 00:41:28 -04:00
Nate Johnson
2e27447c65 Include example 2023-04-18 00:41:11 -04:00
Ed Minnix
e6a2528c38 Refactor XSS and SpringJDBC tests to lib configurations 2023-04-17 23:48:06 -04:00
Ed Minnix
49521f6de8 Refactor tests which extends Configuration 2023-04-17 23:48:06 -04:00
Ed Minnix
66f971e70d Refactor query tests 2023-04-17 23:48:06 -04:00
Ed Minnix
93bd2a9409 Refactor PathSanitizer test 2023-04-17 23:48:06 -04:00
Ed Minnix
547f00c3d1 Refactor Spring test 2023-04-17 23:48:06 -04:00
Ed Minnix
9631b6545f Refactor Ratpack test 2023-04-17 23:48:06 -04:00
Ed Minnix
e0e5bb131b Refactor RabbitMQ test 2023-04-17 23:48:06 -04:00
Ed Minnix
2579852e90 Refactor jms test 2023-04-17 23:48:06 -04:00
Ed Minnix
6cda285d56 Refactor Guice test 2023-04-17 23:48:06 -04:00
Ed Minnix
8d0e3ac033 Refactor Guava test 2023-04-17 23:48:06 -04:00
Ed Minnix
38e65ee36d Refactor apache-http test 2023-04-17 23:48:06 -04:00
Ed Minnix
f745642252 Refactor Android tests 2023-04-17 23:48:06 -04:00
Ed Minnix
95c28967cc Refactor dataflow library tests 2023-04-17 23:48:06 -04:00
Ed Minnix
0c380cdd72 Formatting fixes 2023-04-17 23:48:06 -04:00
Ed Minnix
13ec7db1ea Kotlin tests 2023-04-17 23:48:06 -04:00
github-actions[bot]
3c2a3abb13 Add changed framework coverage reports 2023-04-18 00:15:30 +00:00
Erik Krogh Kristensen
03e76378ca Merge pull request #12850 from smiddy007/remove-unused-example-files
JS: Remove unused example files and edit qhelp to match
2023-04-17 23:29:15 +02:00
Jami
a149c41baf Merge pull request #12155 from jcogs33/jcogs33/add-heuristic-ssrf-models
Java: add ssrf models discovered with heuristics
2023-04-17 15:45:48 -04:00
Ed Minnix
d1de453c7a Change multiple match calls to set literal 2023-04-17 15:36:44 -04:00
Mathias Vorreiter Pedersen
bb8c3de6b2 Merge pull request #12599 from rdmarsh2/rdmarsh2/range-analysis-overflow
C++: add overflow detection to new range analysis
2023-04-17 20:18:44 +01:00
Ed Minnix
027f08a0df Add groovy-stubs/test to list of directory names to ignore in model generator. 2023-04-17 14:34:04 -04:00
Jami Cogswell
25786f61be Java: minorAnalysis in change note 2023-04-17 13:48:04 -04:00
smiddy007
e4ec1ae261 Update InsufficientPasswordHash.qhelp
change file name to original
2023-04-17 13:18:47 -04:00
smiddy007
88d2f65c5f Rename InsufficientPasswordHash_NodeJS_fixed.js to InsufficientPasswordHash_fixed.js 2023-04-17 13:17:13 -04:00
smiddy007
cbe45f7e55 Rename InsufficientPasswordHash_NodeJS.js to InsufficientPasswordHash.js 2023-04-17 13:16:57 -04:00
smiddy007
36d7370998 Delete InsufficientPasswordHash_CryptoJS_fixed
file not used in qhelp
2023-04-17 13:16:25 -04:00
smiddy007
e65daaae49 Delete InsufficientPasswordHash_CryptoJS.js
not used in qhelp file
2023-04-17 13:15:10 -04:00
Mathias Vorreiter Pedersen
d833850850 C++: another 'fix test after module rename'. 2023-04-17 17:48:22 +01:00
github-actions[bot]
648f0e19ec Post-release preparation for codeql-cli-2.13.0 2023-04-17 15:39:24 +00:00
Robert Marsh
2b41aef6a7 C++: autoformat 2023-04-17 11:36:17 -04:00
Robert Marsh
ea7996f1bb C++: fix test after module rename 2023-04-17 11:30:04 -04:00
Arthur Baars
048fb8b953 Add change note 2023-04-17 16:43:21 +02:00
Mathew Payne
3526b74ce7 Merge branch 'main' into main 2023-04-17 15:10:32 +01:00
Mathias Vorreiter Pedersen
d975ceb648 Merge pull request #12818 from MathiasVP/dataflow-for-missing-scanf-qery
C++: Use the new dataflow library in `cpp/missing-check-scanf`
2023-04-17 14:34:11 +01:00
Paolo Tranquilli
901db73d55 Merge pull request #12745 from github/redsun82/swift-logging
Swift: introduce usage of binlog
2023-04-17 15:23:29 +02:00
Asger F
5272810ad9 Merge pull request #12826 from asgerf/js/more-call-graph-steps
JS: Improvements to type-tracking through 'extend' and 'this'
2023-04-17 13:50:59 +02:00
Mathew Payne
44c1b48f94 Merge branch 'main' into main 2023-04-17 12:40:23 +01:00
Mathew Payne
c77cdcf4c3 Removed the OutputStream models 2023-04-17 11:38:28 +00:00
Kasper Svendsen
ad82433a88 Prevent JS join order regression 2023-04-17 13:24:19 +02:00
Arthur Baars
34d3040ce2 Add change note 2023-04-17 12:59:14 +02:00
Asger F
e180b7e2ba Ruby: add locations for module object nodes 2023-04-17 12:49:35 +02:00
Asger F
8c0c335daf Ruby: update test output 2023-04-17 12:47:23 +02:00
Asger F
8363171f1f Ruby: Add MkModuleObject as API node for a module/class 2023-04-17 12:47:23 +02:00
Asger F
7332cec9a5 Ruby: fix missing 'self' parameters in ModuleNode.getAnImmediateReferenc 2023-04-17 12:47:23 +02:00
Asger F
29a20550f6 Ruby: use MkUse/MkDef for successors, use/def for predecessors 2023-04-17 12:47:23 +02:00
Asger F
13b1e97caa JS: Fix the ExtendCall restriction 2023-04-17 12:30:08 +02:00
Asger F
eafef91dbc JS: Update test output after ExtendCall restriction 2023-04-17 12:28:23 +02:00
Asger F
024760610a JS: Add prototype pollution test 2023-04-17 12:27:34 +02:00
Asger F
2f4a181a7d JS: revert path sanitizers in proto pollution query 2023-04-17 12:21:00 +02:00
Asger F
04079752f7 JS: update test output after adding 'this' sanitizer 2023-04-17 12:15:46 +02:00
Asger F
f87f6c8556 JS: Add test to unsafe jquery plugin 2023-04-17 12:15:05 +02:00
Asger F
b728f71b4b JS: Move 'this' sanitizer to customizations 2023-04-17 12:11:18 +02:00
Michael Nebel
e8e25b8e55 C#: Re-factor HashWithoutSalt to use the new API. 2023-04-17 11:38:37 +02:00
Michael Nebel
c7b0ae8490 C#: Re-factor the CollectionFlow test to use the new API. 2023-04-17 11:38:37 +02:00
Michael Nebel
518aceba64 Re-factor the Types testcase to use the new API. 2023-04-17 11:38:37 +02:00
Michael Nebel
388cb704d0 C#: Re-factor the CallSensitivityFlow test to use the new API. 2023-04-17 11:38:37 +02:00
Michael Nebel
eaddb627ef C#: Re-factor the GlobalFlow test to use the new API. 2023-04-17 11:38:37 +02:00
Michael Nebel
73ddc0530a C#: Re-factor InsecureSqlConnection to use the new API. 2023-04-17 11:38:37 +02:00
Michael Nebel
3687770dab C#: Re-factor AddCertToRootStore to use the new API. 2023-04-17 11:38:37 +02:00
Michael Nebel
ec68e91ba9 C#: Re-factor LambdaDataFlow to use the new API. 2023-04-17 11:38:37 +02:00
Michael Nebel
49d335695a C#: Re-factor FlowToDataSerializerConstructor to use the new API. 2023-04-17 11:38:37 +02:00
Michael Nebel
5964daa44d C#: Re-factor FalseValueFlowsToTokenValidationParametersPropertyWriteToBypassValidation to use the new API. 2023-04-17 11:38:37 +02:00
Michael Nebel
a4ee35302d C#: Re-factor CookieOptionsTracking to use the new API. 2023-04-17 11:38:37 +02:00
Michael Nebel
b3de105665 C#: Re-factor TypeNameTracking to use the new API. 2023-04-17 11:38:37 +02:00
Michael Nebel
ee7d15ac5d C#: Re-factor ExponentialRegexDataFlow to use the new API. 2023-04-17 11:38:37 +02:00
Michael Nebel
8d5ca53126 C#: Re-refactor another SettingsDataFlow to use the new API. 2023-04-17 11:38:37 +02:00
Michael Nebel
5b8544343b C#: Re-factor SettingsDataFlow to use the new API. 2023-04-17 11:38:36 +02:00
Michael Nebel
5ea6cea894 C#: Re-factor DapperCommandDefinitionMethodCallSqlExpr to use the new API. 2023-04-17 11:38:36 +02:00
Paolo Tranquilli
fdd975b992 Merge pull request #12842 from github/redsun82/swift-qlgen-qldoc
Swift: add QLdoc for generated `Raw` and `Synth` modules
2023-04-17 10:57:54 +02:00
Mathias Vorreiter Pedersen
2a14479bf3 C++: Autoformat. 2023-04-17 09:34:44 +01:00
Mathias Vorreiter Pedersen
a87e67d89d C++: Fix join orders.
Before:

```
Tuple counts for RangeAnalysisStage#38d7ce80::RangeStage#FloatDelta#0eab55d1::FloatDelta#RangeAnalysisImpl#edd69a76::ConstantBounds#FloatDelta#0eab55d1::FloatOverflow#RangeAnalysisConstantSpecific#878f81e8::CppLangImplConstant#RangeUtils#6da26777::RangeUtil#FloatDelta#0eab55d1::FloatDelta#RangeAnalysisConstantSpecific#878f81e8::CppLangImplConstant##::potentiallyOverflowingExpr#2#ff/2@36ed7auu after 42.1s:
    365        ~0%     {2} r1 = JOIN num#SemanticOpcode#e6f455a5::TNegate#f WITH SemanticExpr#91573b9a::SemExpr::getOpcode#0#dispred#fb_10#join_rhs ON FIRST 1 OUTPUT false, Rhs.1 'expr'

    0          ~0%     {2} r2 = JOIN num#SemanticOpcode#e6f455a5::TSubOne#f WITH SemanticExpr#91573b9a::SemExpr::getOpcode#0#dispred#fb_10#join_rhs ON FIRST 1 OUTPUT false, Rhs.1 'expr'

    365        ~0%     {2} r3 = r1 UNION r2

    0          ~0%     {2} r4 = JOIN num#SemanticOpcode#e6f455a5::TAddOne#f WITH project#SemanticExpr#91573b9a::SemKnownExpr#class#fff_10#join_rhs ON FIRST 1 OUTPUT true, Rhs.1 'expr'

    2          ~0%     {2} r5 = JOIN m#RangeAnalysisStage#38d7ce80::RangeStage#FloatDelta#0eab55d1::FloatDelta#RangeAnalysisImpl#edd69a76::ConstantBounds#FloatDelta#0eab55d1::FloatOverflow#RangeAnalysisConstantSpecific#878f81e8::CppLangImplConstant#RangeUtils#6da26777::RangeUtil#FloatDelta#0eab55d1::FloatDelta#RangeAnalysisConstantSpecific#878f81e8::CppLangImplConstant##::boundedPhiInp1#6#ffbfff WITH num#SemanticOpcode#e6f455a5::TMul#f CARTESIAN PRODUCT OUTPUT Rhs.0, Lhs.0 'positively'
    22026      ~0%     {2} r6 = JOIN r5 WITH SemanticExpr#91573b9a::SemExpr::getOpcode#0#dispred#fb_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'positively', Rhs.1 'expr'

    2          ~0%     {2} r7 = JOIN m#RangeAnalysisStage#38d7ce80::RangeStage#FloatDelta#0eab55d1::FloatDelta#RangeAnalysisImpl#edd69a76::ConstantBounds#FloatDelta#0eab55d1::FloatOverflow#RangeAnalysisConstantSpecific#878f81e8::CppLangImplConstant#RangeUtils#6da26777::RangeUtil#FloatDelta#0eab55d1::FloatDelta#RangeAnalysisConstantSpecific#878f81e8::CppLangImplConstant##::boundedPhiInp1#6#ffbfff WITH num#SemanticOpcode#e6f455a5::TShiftLeft#f CARTESIAN PRODUCT OUTPUT Rhs.0, Lhs.0 'positively'
    1978       ~0%     {2} r8 = JOIN r7 WITH SemanticExpr#91573b9a::SemExpr::getOpcode#0#dispred#fb_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'positively', Rhs.1 'expr'

    24004      ~0%     {2} r9 = r6 UNION r8
    24004      ~0%     {2} r10 = r4 UNION r9
    24369      ~0%     {2} r11 = r3 UNION r10

    2726       ~1%     {2} r12 = JOIN project#SemanticExpr#91573b9a::SemDivExpr#fffff WITH project#SemanticExpr#91573b9a::SemKnownExpr#class#fff#2 ON FIRST 1 OUTPUT Rhs.1, Lhs.0 'expr'
    1900       ~2%     {2} r13 = JOIN r12 WITH SemanticType#3725723c::SemFloatingPointType#ff ON FIRST 1 OUTPUT false, Lhs.1 'expr'

    4500       ~0%     {1} r14 = JOIN SemanticExpr#91573b9a::SemExpr::getOpcode#0#dispred#fb_10#join_rhs WITH num#SemanticOpcode#e6f455a5::TAdd#f ON FIRST 1 OUTPUT Lhs.1 'expr'

    0          ~0%     {1} r15 = JOIN SemanticExpr#91573b9a::SemExpr::getOpcode#0#dispred#fb_10#join_rhs WITH num#SemanticOpcode#e6f455a5::TPointerAdd#f ON FIRST 1 OUTPUT Lhs.1 'expr'

    4500       ~0%     {1} r16 = r14 UNION r15
    4000       ~0%     {2} r17 = JOIN r16 WITH project#SemanticExpr#91573b9a::SemBinaryExpr#fffff#2 ON FIRST 1 OUTPUT Rhs.1, Lhs.0 'expr'
    7000       ~0%     {2} r18 = JOIN r17 WITH SignAnalysisCommon#4b1623af::SignAnalysis#FloatDelta#0eab55d1::FloatDelta#RangeUtils#6da26777::RangeUtil#FloatDelta#0eab55d1::FloatDelta#RangeAnalysisConstantSpecific#878f81e8::CppLangImplConstant##::semExprSign#1#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'expr'

    1264       ~0%     {2} r19 = JOIN r18 WITH num#Sign#2ecc774b::TNeg#f ON FIRST 1 OUTPUT Lhs.0, Lhs.1 'expr'
    188324151  ~0%     {2} r20 = JOIN r19 WITH SignAnalysisCommon#4b1623af::SignAnalysis#FloatDelta#0eab55d1::FloatDelta#RangeUtils#6da26777::RangeUtil#FloatDelta#0eab55d1::FloatDelta#RangeAnalysisConstantSpecific#878f81e8::CppLangImplConstant##::semExprSign#1#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'expr', Rhs.1
    1000       ~0%     {2} r21 = JOIN r20 WITH project#SemanticExpr#91573b9a::SemBinaryExpr#fffff ON FIRST 2 OUTPUT false, Lhs.0 'expr'

    2900       ~0%     {2} r22 = r13 UNION r21

    3259       ~2%     {2} r23 = JOIN r18 WITH num#Sign#2ecc774b::TPos#f ON FIRST 1 OUTPUT Lhs.0, Lhs.1 'expr'
    1521124720 ~0%     {2} r24 = JOIN r23 WITH SignAnalysisCommon#4b1623af::SignAnalysis#FloatDelta#0eab55d1::FloatDelta#RangeUtils#6da26777::RangeUtil#FloatDelta#0eab55d1::FloatDelta#RangeAnalysisConstantSpecific#878f81e8::CppLangImplConstant##::semExprSign#1#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'expr', Rhs.1
    3000       ~2%     {2} r25 = JOIN r24 WITH project#SemanticExpr#91573b9a::SemBinaryExpr#fffff ON FIRST 2 OUTPUT true, Lhs.0 'expr'
```
(I stopped evaluation midway.)

After:

```ql
Evaluated relational algebra for predicate RangeAnalysisStage#38d7ce80::RangeStage#FloatDelta#0eab55d1::FloatDelta#RangeAnalysisImpl#edd69a76::ConstantBounds#FloatDelta#0eab55d1::FloatOverflow#RangeAnalysisConstantSpecific#878f81e8::CppLangImplConstant#RangeUtils#6da26777::RangeUtil#FloatDelta#0eab55d1::FloatDelta#RangeAnalysisConstantSpecific#878f81e8::CppLangImplConstant##::potentiallyOverflowingExpr#2#ff@dc3a0712 with tuple counts:
  26269   ~2%    {2} r1 = _SemanticExpr#91573b9a::SemExpr::getOpcode#0#dispred#fb_10#join_rhs_m#RangeAnalysisStage#38d7ce80::R__#shared UNION _SemanticExpr#91573b9a::SemExpr::getOpcode#0#dispred#fb_10#join_rhs_SemanticType#3725723c::SemFloati__#shared

  26269   ~2%    {2} r2 = _num#SemanticOpcode#e6f455a5::TAddOne#f_project#SemanticExpr#91573b9a::SemKnownExpr#class#fff_10#joi__#shared UNION r1

  41333   ~1%    {2} r3 = JOIN _SemanticExpr#91573b9a::SemExpr::getOpcode#0#dispred#fb_10#join_rhs_num#SemanticOpcode#e6f455a5::TAd__#shared WITH SignAnalysisCommon#4b1623af::SignAnalysis#FloatDelta#0eab55d1::FloatDelta#RangeUtils#6da26777::RangeUtil#FloatDelta#0eab55d1::FloatDelta#RangeAnalysisConstantSpecific#878f81e8::CppLangImplConstant##::semExprSign#1#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1

  5806   ~2%    {2} r4 = JOIN r3 WITH num#Sign#2ecc774b::TNeg#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0
  5806   ~1%    {3} r5 = JOIN r4 WITH project#SemanticExpr#91573b9a::SemBinaryExpr#fffff#2 ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
  3612   ~0%    {2} r6 = JOIN r5 WITH SignAnalysisCommon#4b1623af::SignAnalysis#FloatDelta#0eab55d1::FloatDelta#RangeUtils#6da26777::RangeUtil#FloatDelta#0eab55d1::FloatDelta#RangeAnalysisConstantSpecific#878f81e8::CppLangImplConstant##::semExprSign#1#ff ON FIRST 2 OUTPUT false, Lhs.2

  18476   ~1%    {2} r7 = JOIN r3 WITH num#Sign#2ecc774b::TPos#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0
  18476   ~1%    {3} r8 = JOIN r7 WITH project#SemanticExpr#91573b9a::SemBinaryExpr#fffff#2 ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
  18444   ~2%    {2} r9 = JOIN r8 WITH SignAnalysisCommon#4b1623af::SignAnalysis#FloatDelta#0eab55d1::FloatDelta#RangeUtils#6da26777::RangeUtil#FloatDelta#0eab55d1::FloatDelta#RangeAnalysisConstantSpecific#878f81e8::CppLangImplConstant##::semExprSign#1#ff ON FIRST 2 OUTPUT true, Lhs.2

  22056   ~0%    {2} r10 = r6 UNION r9

  24137   ~2%    {2} r11 = JOIN _SemanticExpr#91573b9a::SemExpr::getOpcode#0#dispred#fb_10#join_rhs_num#SemanticOpcode#e6f455a5::TPo__#shared WITH SignAnalysisCommon#4b1623af::SignAnalysis#FloatDelta#0eab55d1::FloatDelta#RangeUtils#6da26777::RangeUtil#FloatDelta#0eab55d1::FloatDelta#RangeAnalysisConstantSpecific#878f81e8::CppLangImplConstant##::semExprSign#1#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1

  16966   ~2%    {1} r12 = JOIN r11 WITH num#Sign#2ecc774b::TPos#f ON FIRST 1 OUTPUT Lhs.1
  16966   ~4%    {2} r13 = JOIN r12 WITH project#SemanticExpr#91573b9a::SemBinaryExpr#fffff ON FIRST 1 OUTPUT Rhs.1, Lhs.0
  24917   ~1%    {2} r14 = JOIN r13 WITH SignAnalysisCommon#4b1623af::SignAnalysis#FloatDelta#0eab55d1::FloatDelta#RangeUtils#6da26777::RangeUtil#FloatDelta#0eab55d1::FloatDelta#RangeAnalysisConstantSpecific#878f81e8::CppLangImplConstant##::semExprSign#1#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1
  2781   ~0%    {2} r15 = JOIN r14 WITH num#Sign#2ecc774b::TNeg#f ON FIRST 1 OUTPUT false, Lhs.1

  2817   ~0%    {1} r16 = JOIN r11 WITH num#Sign#2ecc774b::TNeg#f ON FIRST 1 OUTPUT Lhs.1
  2817   ~0%    {2} r17 = JOIN r16 WITH project#SemanticExpr#91573b9a::SemBinaryExpr#fffff ON FIRST 1 OUTPUT Rhs.1, Lhs.0
  6922   ~0%    {2} r18 = JOIN r17 WITH SignAnalysisCommon#4b1623af::SignAnalysis#FloatDelta#0eab55d1::FloatDelta#RangeUtils#6da26777::RangeUtil#FloatDelta#0eab55d1::FloatDelta#RangeAnalysisConstantSpecific#878f81e8::CppLangImplConstant##::semExprSign#1#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1
  2765   ~1%    {2} r19 = JOIN r18 WITH num#Sign#2ecc774b::TPos#f ON FIRST 1 OUTPUT true, Lhs.1

  5546   ~0%    {2} r20 = r15 UNION r19
  27602   ~0%    {2} r21 = r10 UNION r20
  53871   ~0%    {2} r22 = r2 UNION r21
                  return r22
```
2023-04-17 09:28:31 +01:00
Paolo Tranquilli
cbe247e123 Merge branch 'main' into redsun82/swift-logging 2023-04-17 10:27:14 +02:00
Paolo Tranquilli
3f139bd93b Swift: address logging review comments 2023-04-17 10:27:01 +02:00
Paolo Tranquilli
edb355b47f Swift: add QLdoc for generated Raw and Synth modules 2023-04-17 09:38:26 +02:00
Tony Torralba
f5702f5c69 Address review comment
Handle more regex cases that cover line breaks
2023-04-17 09:33:44 +02:00
Tony Torralba
e167d3ce00 Add line break sanitizers 2023-04-17 09:33:44 +02:00
Erik Krogh Kristensen
4e49df1615 Merge pull request #12839 from jcogs33/jcogs33/update-QueryDoc-regex
QL: update regexes used in `QueryDoc.getQueryName()` and in `QueryDoc.getQueryId()/getQueryLanguage()`
2023-04-17 09:03:03 +02:00
Mathias Vorreiter Pedersen
7eee589304 Merge pull request #12569 from andersfugmann/andersfugmann/use_after_free
C++: Implement use-after-free and double-free queries using the new IR use-use dataflow
2023-04-17 08:01:58 +01:00
Mathias Vorreiter Pedersen
fa5ed04286 Update cpp/ql/src/Critical/DoubleFree.qhelp
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2023-04-17 07:40:01 +01:00
Mathias Vorreiter Pedersen
dba46bd324 Update cpp/ql/src/Critical/DoubleFree.ql
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2023-04-17 07:38:30 +01:00
Asger F
ccb57f2a84 Merge pull request #12804 from asgerf/rb/api-graphs-cached
Ruby: restrict join order of API graph predicates
2023-04-17 08:24:07 +02:00
Asger F
62dca44ee5 Update UntrustedDataToExternalAPI.expected 2023-04-17 08:23:04 +02:00
Asger F
c250ba7f27 JS: Undo sanitization of path.normalize() 2023-04-17 08:23:04 +02:00
Asger F
9db63c3a6a JS: Change note 2023-04-17 08:23:04 +02:00
Asger F
b0d4b31103 JS: Trim whitespace in test 2023-04-17 08:23:04 +02:00
Asger F
c7f16cd224 JS: Add test 2023-04-17 08:23:03 +02:00
Asger F
0d598c437d JS: Fix observed FPs in UnsafeJQueryPlugin 2023-04-17 08:20:18 +02:00
Asger F
b321151a28 JS: Restrict ExtendCall flow in proto pollution query 2023-04-17 08:20:18 +02:00
Asger F
efb582b661 JS: Drive-by fix to newly gained FPs 2023-04-17 08:20:18 +02:00
Asger F
869c6d27fe JS: Add implied receiver steps 2023-04-17 08:20:18 +02:00
Asger F
74dbc71535 JS: Change Extend steps to PreCallGraphStep 2023-04-17 08:20:18 +02:00
Jami Cogswell
06bf246afe QL: update regexes 2023-04-16 16:10:23 -04:00
Geoffrey White
d94ed1b4a3 Merge pull request #12824 from geoffw0/modernsec4
Swift: Add CryptoSwift sinks in swift/weak-sensitive-data-hashing
2023-04-14 19:56:37 +01:00
Geoffrey White
706fdce527 Swift: Downgrade swift/unsafe-js-eval to precision medium. 2023-04-14 18:16:16 +01:00
Geoffrey White
2adc4c0feb Swift: PredicatUpgrade predicate injection sources from RemoteFlowSource to FlowSource. Even local input should be in parameters rather than concatenated into the predicate. 2023-04-14 17:50:57 +01:00
Geoffrey White
7b8606d411 Swift: Delete unnecessary import. 2023-04-14 16:36:22 +01:00
Edward Minnix III
38826c98f1 Merge pull request #12751 from egregius313/egregius313/dataflow-refactor-cleanup
Java: Finish dataflow refactor
2023-04-14 10:35:11 -04:00
Geoffrey White
ba982e2f85 Merge pull request #12752 from gsingh93/buffer-access-array-expr
C++: Consider ArrayExpr with non-constant size expressions as a BufferAccess
2023-04-14 15:31:20 +01:00
Michael Nebel
4bca9511cd Merge pull request #12803 from michaelnebel/csharp/refactordataflow3
C#: Re-factor dataflow queries to use the new API.
2023-04-14 16:30:55 +02:00
Geoffrey White
9ecba6a94d Swift: Add missing imports in ExternalFlow.qll. 2023-04-14 14:58:24 +01:00
Geoffrey White
619d572d50 Swift: Add RNCryptor hmacKey encryption-key sinks. 2023-04-14 14:58:15 +01:00
Geoffrey White
46da73cc11 Swift: Add realm path-injection sinks. 2023-04-14 14:50:50 +01:00
Geoffrey White
feccd307da Swift: Add realm encryption-key sinks. 2023-04-14 14:47:24 +01:00
Geoffrey White
bfdaf6951d Swift: Add some test cases. 2023-04-14 14:39:45 +01:00
Geoffrey White
21414089ee Swift: Test renaming and layout changes. 2023-04-14 14:39:32 +01:00
Owen Mansel-Chan
8a4ca7fb84 Merge pull request #10026 from pwntester/patch-2
Go: Partial URLs should not sanitize against SSRF
2023-04-14 13:52:11 +01:00
jarlob
e9dee3a185 Move actions/github-script out of Actions.qll 2023-04-14 14:26:23 +02:00
Erik Krogh Kristensen
cece307c60 Merge pull request #12802 from erik-krogh/history-xss
JS: add browser history as XSS sink
2023-04-14 13:35:19 +02:00
Asger F
f4e8656c17 Ruby: move internal methods to API::Node::Internal 2023-04-14 13:35:13 +02:00
Owen Mansel-Chan
352866b52d Add change note 2023-04-14 12:00:38 +01:00
Owen Mansel-Chan
a42dbc5bab Fix formatting again 2023-04-14 12:00:38 +01:00
Owen Mansel-Chan
d407a689fa Fix formatting by deleting spaces no blank line 2023-04-14 12:00:38 +01:00
Owen Mansel-Chan
169bde8671 Fix formatting by deleting blank line 2023-04-14 12:00:38 +01:00
Alvaro Muñoz
8bf4b55309 Partial URLs should not sanitize against SSRF
As an example:

```go
	urlPath := ctx.Req.URL.Path
	hash := urlPath[strings.LastIndex(urlPath, "/")+1:]
        req, _ := http.NewRequest("GET", source+hash, nil)
```
2023-04-14 12:00:38 +01:00
jarlob
599ec5a3b4 Add comment 2023-04-14 10:52:11 +02:00
jarlob
3724ea1a7b Extract where parts into predicates 2023-04-14 10:49:56 +02:00
jarlob
ac1c20673d Encapsulate github-script 2023-04-14 10:23:49 +02:00
jarlob
d80c541da6 Encapsulate composite actions 2023-04-14 10:06:35 +02:00
Tony Torralba
f106783c39 SensitiveResultReceiverFlow needs to be public 2023-04-14 09:04:56 +02:00
smiddy007
ec97cdc8a0 Allow NonKeyCiphers to include truncated SHA-512 MDs in Forge JS library. 2023-04-13 23:16:20 -04:00
Ed Minnix
7b56383b52 Make SensitiveResultReceiver modules private 2023-04-13 23:08:46 -04:00
Ed Minnix
0a26916245 Re-Add SensitiveResultReceiverConf as deprecated 2023-04-13 23:06:16 -04:00
Edward Minnix III
77b67cbf2e Fix typo
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-04-13 23:06:16 -04:00
Ed Minnix
0fc775027f Fix SensitiveResultReceiver test case 2023-04-13 23:06:16 -04:00
Ed Minnix
3826b9be6c Re-add allowImplicitRead 2023-04-13 23:06:16 -04:00
Ed Minnix
74b71ff7e3 Replace allowImplicitRead with default implementation 2023-04-13 23:06:16 -04:00
Ed Minnix
ea54ea47b1 Deprecate sensitiveResultReceiver 2023-04-13 23:06:16 -04:00
Edward Minnix III
3e55c47e3e flow(_, sink) to flowTo(sink)
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-04-13 23:06:16 -04:00
Ed Minnix
5ed1868324 Refactor ratpack framework test 2023-04-13 23:06:16 -04:00
Ed Minnix
88eb0231c1 Refactor taintedString.ql test 2023-04-13 23:06:16 -04:00
Ed Minnix
cd661f1d9f Refactor SensitiveResultReceiver 2023-04-13 23:06:16 -04:00
Ed Minnix
735a7383c6 Refactor HardcodedCredentialsSourceCall 2023-04-13 23:06:16 -04:00
jarlob
94065764d5 Make predicate name clearer 2023-04-14 01:05:21 +02:00
jarlob
79218a3946 Use YamlMapping for modeling Env 2023-04-14 00:56:51 +02:00
jarlob
dd52ef85cd Rename Env 2023-04-13 23:41:31 +02:00
jarlob
76834cbe53 Rename GlobalEnv 2023-04-13 23:13:56 +02:00
jarlob
a8a6913512 Simplify exists according to the warning 2023-04-13 23:10:16 +02:00
jarlob
8234ea33f0 More details in the changes file. 2023-04-13 23:05:32 +02:00
jarlob
6790318769 Added the composite word 2023-04-13 22:58:32 +02:00
Jaroslav Lobačevski
8f1bccbb4d Apply suggestions from code review (comments)
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2023-04-13 22:55:53 +02:00
Jami Cogswell
1b1838b5a8 Java: update Netty test case 2023-04-13 11:29:47 -04:00
Maiky
64cf3adfd4 Update examples 2023-04-13 17:29:14 +02:00
Maiky
820db43945 Add ERB Template Injection Sink 2023-04-13 17:21:31 +02:00
Robert Marsh
fddbffee6f C++: autoformat 2023-04-13 11:13:27 -04:00
Jami Cogswell
4f9c51a02b Java: update provenance to hq-manual now that 12595 is merged 2023-04-13 10:11:31 -04:00
Robert Marsh
316cb95547 C++: respond to overflow PR comments 2023-04-13 10:03:55 -04:00
Jami Cogswell
0e3d9e1fec Java: update options file 2023-04-13 09:57:44 -04:00
Jami Cogswell
8a756eced9 Java: add combined manual and generated stubs directory back 2023-04-13 09:54:14 -04:00
Jami Cogswell
f0749f69c7 Java: remove manual-only stub directory 2023-04-13 09:52:29 -04:00
Mathias Vorreiter Pedersen
0db05fe4fa C++: Use the new dataflow library in the 'missing scanf' query. 2023-04-13 14:51:08 +01:00
Jami Cogswell
544997d42f Java: remove generated-only stub directory 2023-04-13 09:50:22 -04:00
Jami Cogswell
523feabaa2 Java: switch Netty setUri method from summary to sink; resolve conflicts 2023-04-13 09:16:18 -04:00
Michael Nebel
e648c643ca C#: Re-factor ExceptionInformationExposure to use the new API. 2023-04-13 15:15:58 +02:00
Jami Cogswell
0ffe9ab8d5 Java: add generated stubs back, but in a different directory from existing apache-http-5 stubs 2023-04-13 09:15:03 -04:00
Jami Cogswell
f27eff4f73 Java: add tests back 2023-04-13 09:15:03 -04:00
Jami Cogswell
8aabd28461 Java: temp add old stubs back 2023-04-13 09:15:02 -04:00
Jami Cogswell
fde855b25f Java: temp removal of stubs 2023-04-13 09:15:02 -04:00
Jami Cogswell
6271b6f1c3 Java: temp removal of tests 2023-04-13 09:15:02 -04:00
Jami Cogswell
7fb8819a08 Java: fix generated stub causing lang test failure 2023-04-13 09:15:02 -04:00
Jami Cogswell
0445509080 Java: update test cases and add stubs 2023-04-13 09:15:02 -04:00
Jami Cogswell
6890434d63 Java: add change note 2023-04-13 09:15:02 -04:00
Jami Cogswell
d85bcacf84 Java: update some models, undo temp edits; resolve conflicts 2023-04-13 09:14:52 -04:00
Jami Cogswell
540b8391dc Java: add more tests 2023-04-13 09:12:55 -04:00
Jami Cogswell
99320857af Java: change model to summary and update comments 2023-04-13 09:12:55 -04:00
Jami Cogswell
8a6ff95035 Java: remove neutral which will be added in a different PR 2023-04-13 09:12:54 -04:00
Jami Cogswell
4daaf783e1 Java: remove cache ones for now 2023-04-13 09:12:54 -04:00
Jami Cogswell
cd7b79f62b Java: add tests for org.apache.hc.client5.http.fluent 2023-04-13 09:12:54 -04:00
Jami Cogswell
1afa5af3dd Java: move version 5 tests to new file and add tests for org.apache.hc.client5.http.classic.methods 2023-04-13 09:12:54 -04:00
Jami Cogswell
a9595647c4 Java: fix typo 2023-04-13 09:12:54 -04:00
Jami Cogswell
33afcd75f1 Java: add subtype-related comments, update some empty-string signatures 2023-04-13 09:12:54 -04:00
Jami Cogswell
2a23f8766e Java: add tests for org.apache.hc.client5.http.async.methods.model.yml; resolve conflicts 2023-04-13 09:12:54 -04:00
Jami Cogswell
e89df255e3 Java: add subtype-related comments on org.apache.hc.client5.http.async.methods models 2023-04-13 09:12:54 -04:00
Jami Cogswell
4ab184fc7d Java: switch HttpHost from sink to summary; resolve conflicts 2023-04-13 09:12:54 -04:00
Jami Cogswell
4ed101fa26 Java: remove some comments 2023-04-13 09:12:54 -04:00
Jami Cogswell
a991f87728 Java: add some host sinks 2023-04-13 09:12:54 -04:00
Jami Cogswell
68fe486c05 Java: remove typo FP, boolean arg is not a sink 2023-04-13 09:12:54 -04:00
Jami Cogswell
60dab3d779 Java: add models from client version 4; resolve conflicts 2023-04-13 09:12:42 -04:00
Jami Cogswell
68391acc98 Java: add models from core version 4; resolve conflict 2023-04-13 09:06:28 -04:00
Jami Cogswell
de4cfc3239 Java: remove typo sink, this api is covered by the model for org.apache.http.client.methods.HttpRequestBase.setURI instead 2023-04-13 09:06:28 -04:00
Jami Cogswell
a3976305ca Java: add initial ssrf heuristic models for apache httpcomponents version 5 2023-04-13 09:06:28 -04:00
Michael Nebel
bb75ed03da C#: Re-factor ExposureInTransmittedData to use the new API. 2023-04-13 15:05:25 +02:00
Michael Nebel
f4ee1a5119 C#: Re-factor UncontrolledFormatString to use the new API. 2023-04-13 15:01:06 +02:00
Michael Nebel
9a62f51694 C#: Re-factor AssemblyPathInjection to use the new API. 2023-04-13 14:54:25 +02:00
Michael Nebel
ca029f5718 C#: Re-factor XMLInjection to use the new API. 2023-04-13 14:50:51 +02:00
Michael Nebel
5601ad64ef C#: Re-factor UnsafeYearConstruction to use the new API. 2023-04-13 14:42:03 +02:00
Michael Nebel
eb7e401aea C#: Re-factor ThreadUnsafeICryptoTransformLambda to use the new API. 2023-04-13 14:36:52 +02:00
Michael Nebel
e3cbebae30 C#: Re-factor ProcessNameToHashTaintFlow to use the new API. 2023-04-13 14:28:27 +02:00
Michael Nebel
96f9c40fdb C#: Re-factor TaintedWebClient to use the new API. 2023-04-13 14:28:27 +02:00
Michael Nebel
a96ad600fc C#: Re-factor ZipSlip to use the new API. 2023-04-13 14:28:27 +02:00
Michael Nebel
3e4e75cee8 C#: Re-factor XPathInjection to use the new API. 2023-04-13 14:28:27 +02:00
Michael Nebel
e6be88b10e C#: Re-factor XmlEntityInjection to use the new API. 2023-04-13 14:28:27 +02:00
Michael Nebel
60544c6889 C#: Re-factor UrlRedirect to use the new API. 2023-04-13 14:28:27 +02:00
Michael Nebel
bdf1da340d C#: Re-factor TaintedPath to use the new API. 2023-04-13 14:28:27 +02:00
Mathias Vorreiter Pedersen
f9d5e56d9c s/entry/exit 2023-04-13 13:22:07 +01:00
Mathias Vorreiter Pedersen
f32d77b36c Swift: Add QLDoc. 2023-04-13 13:13:18 +01:00
Mathias Vorreiter Pedersen
68cdc3b48e Swift: Accept test changes. 2023-04-13 13:13:15 +01:00
Mathias Vorreiter Pedersen
33bc7eabbb Swift: Fix CFG for key-path expressions. 2023-04-13 13:12:09 +01:00
Mathias Vorreiter Pedersen
859b3051b7 Swift: Add consistency queries to CFG tests. 2023-04-13 13:12:02 +01:00
Mathias Vorreiter Pedersen
b2d4a82932 C++: Fix annotations. 2023-04-13 11:13:15 +01:00
Mathias Vorreiter Pedersen
1ac5db3a98 C++: Fix annotations. 2023-04-13 11:07:12 +01:00
Mathias Vorreiter Pedersen
31b71ea163 C++: Fix annotations. 2023-04-13 11:04:51 +01:00
Mathias Vorreiter Pedersen
40dde93beb C++: Fix FP and accept test changes. 2023-04-13 11:00:08 +01:00
Mathias Vorreiter Pedersen
23a7cd943f C++: Fix missing result and accept test changes. 2023-04-13 10:50:46 +01:00
Mathias Vorreiter Pedersen
416f8d5ac9 C++: Fix test annotations. 2023-04-13 10:47:17 +01:00
Mathias Vorreiter Pedersen
c76dbebd9b C++: Ensure that the 'use-after-free' query is run on 'test_free.cpp'. 2023-04-13 10:47:07 +01:00
Tom Hvitved
3cc9dec9c8 Remove all queries.xml files 2023-04-13 11:18:58 +02:00
Mathias Vorreiter Pedersen
d304022685 C++: Add QLDoc to 'isExcludeFreePair'. 2023-04-13 10:15:23 +01:00
Arthur Baars
ead8108aed Apply suggestions from code review
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-04-13 11:11:55 +02:00
Mathias Vorreiter Pedersen
e0aeea058e C++: Fix qhelp for double-free. 2023-04-13 10:10:42 +01:00
Mathias Vorreiter Pedersen
184cb74cd0 Swift: Accept test changes. 2023-04-12 17:38:34 +01:00
Mathias Vorreiter Pedersen
f46ea325e8 Swift: Add dataflow through key-path expressios by modeling them as lambdas that perform a sequence of read steps. 2023-04-12 17:38:34 +01:00
Mathias Vorreiter Pedersen
21b03927c5 Swift: Add failing tests. 2023-04-12 17:38:29 +01:00
Mathias Vorreiter Pedersen
ba4e3ae949 Update cpp/ql/src/Critical/FlowAfterFree.qll
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-04-12 16:50:57 +01:00
Mathew Payne
824ff8ad88 Add function signature to model 2023-04-12 14:54:06 +00:00
Mathew Payne
ffec22a5d2 Add change log notes 2023-04-12 14:48:28 +00:00
Mathew Payne
d0529bba2b Add missing models for Java IO
- java.io.OutputStream
- java.nio.file.Files
2023-04-12 14:43:11 +00:00
Asger F
69cb138912 Ruby: Tweak caching/inlining or API graph predicates 2023-04-12 15:56:58 +02:00
Asger F
7e23bf3938 Ruby: remove some redundant getASubclass() calls 2023-04-12 15:32:01 +02:00
erik-krogh
b1957623c1 add browser history as XSS sink 2023-04-12 13:38:18 +02:00
Mathias Vorreiter Pedersen
ab70f5722e C++: More QLDoc. 2023-04-12 11:22:31 +01:00
Mathias Vorreiter Pedersen
49cceb2901 C++: Fix joins. 2023-04-12 09:58:24 +01:00
Geoffrey White
cdcee5cc75 Swift: Add high-level CryptoSwift sinks. 2023-04-11 19:59:43 +01:00
Geoffrey White
539f8f0f70 Swift: Add mid-level CryptoSwift sinks and prevent duplication that results. Overall this doesn't give us any new results in tests, but makes paths shorter, and in the real world I expect it to add reliability. 2023-04-11 19:54:55 +01:00
Geoffrey White
51a62b54ee Swift: Add low-level CryptoSwift sinks. 2023-04-11 19:54:48 +01:00
Geoffrey White
d299d92025 Swift: Prevent potentially misleading duplicate results. 2023-04-11 19:39:09 +01:00
Geoffrey White
4995f13234 Swift: Add tests for swift/weak-sensitive-data-hashing on CryptoSwift. 2023-04-11 18:46:38 +01:00
Arthur Baars
83cd55cb29 Js/Yaml: add getFile() predicate 2023-04-11 16:01:44 +01:00
Robert Marsh
18c3feb9d8 C++: remove commented-out code
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-04-11 10:41:18 -04:00
Mathias Vorreiter Pedersen
259d5b6452 C++: Add use-after-free change note. 2023-04-11 15:30:51 +01:00
Mathias Vorreiter Pedersen
c1960c6ff9 C++: Add double-free change note. 2023-04-11 15:30:51 +01:00
Mathias Vorreiter Pedersen
3c88590df2 C++: Accept test changes for the new use-after-query. 2023-04-11 15:21:21 +01:00
Mathias Vorreiter Pedersen
725004a6fe C++: Modernize use-after-free query using dataflow. 2023-04-11 15:21:21 +01:00
Mathias Vorreiter Pedersen
17fe5f2317 C++: Change the id of the experimental double-free query to not overlap with the new non-experimental one. 2023-04-11 15:21:21 +01:00
Mathias Vorreiter Pedersen
a8151b4ee4 C++: Add double-free tests. 2023-04-11 15:21:21 +01:00
Mathias Vorreiter Pedersen
fb2ec15dad C++: Add double-free query documentation. 2023-04-11 15:21:21 +01:00
Mathias Vorreiter Pedersen
cc12e74c23 C++: Add double-free query. 2023-04-11 14:44:15 +01:00
Mathias Vorreiter Pedersen
dfe00ffe4b C++: Add a flow-after-free library. 2023-04-11 14:40:17 +01:00
erik-krogh
3c4bd5b6a7 forward toString() etc. predicates from YamlNode to Locatable 2023-04-11 15:37:01 +02:00
erik-krogh
b5e90483f5 improve the ESLint model to avoid overriding Yaml classes 2023-04-11 15:36:18 +02:00
Mathias Vorreiter Pedersen
d65bb3b232 C++: Make basic block information available from dataflow nodes. 2023-04-11 13:52:26 +01:00
yoff
9e3d57d442 Update python/ql/test/library-tests/ApiGraphs/py3/test_captured_flask.py
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-04-11 14:34:40 +02:00
Nate Johnson
a0f4a5100f Insecure HTTP parser query for JavaScript 2023-04-09 20:38:55 -04:00
jarlob
72b66ffe97 Fix comment. 2023-04-07 10:01:14 +02:00
Harry Maclean
8691845d23 Ruby: Re-add test
This got lost in an earlier refactor.
2023-04-07 15:50:48 +08:00
Harry Maclean
2ef6d5c7b9 Ruby/QL: Remove unnecessary CLI config 2023-04-07 15:49:17 +08:00
Harry Maclean
d942b54a9d Ruby: Update scripts for merged extractor 2023-04-07 15:49:17 +08:00
Harry Maclean
c13999100b QL: Update scripts for merged extractor 2023-04-07 15:49:17 +08:00
Harry Maclean
eff4729577 QL: Merge extractor binaries into one
There is now one binary, codeql-ql-extractor, which takes a positional
argument specifying whether to extract, generate or autobuild.
2023-04-07 15:49:16 +08:00
Harry Maclean
e4b4d8a3cd QL: Enable derive feature in clap
This allows nicer CLI definitions.
2023-04-07 12:04:02 +08:00
Harry Maclean
79089b40b9 Ruby: Merge extractor binaries into one
There is now one binary, codeql-ruby-extractor, which takes a positional
argument specifying whether to extract, generate or autobuild.
2023-04-07 12:04:02 +08:00
Harry Maclean
5a8a6f2971 Ruby: Enable derive feature in clap
This allows nicer CLI definitions.
2023-04-07 12:04:02 +08:00
jarlob
7573c615f6 Fix warnings 2023-04-06 23:07:22 +02:00
jarlob
3745cccedd Fix warnings 2023-04-06 23:02:08 +02:00
jarlob
af83d8af41 Add comment 2023-04-06 22:59:09 +02:00
jarlob
9c7eecf547 Add support for composite actions 2023-04-06 22:53:59 +02:00
jarlob
baefeab2d1 fix tests 2023-04-06 19:11:04 +02:00
jarlob
0a878d4db9 Support yAml extensions 2023-04-06 19:07:38 +02:00
Arthur Baars
4fca4b668c JS: use shared YAML library 2023-04-06 15:11:35 +02:00
Arthur Baars
f0b5f9c928 Shared YAML library 2023-04-06 15:11:35 +02:00
Paolo Tranquilli
acaa6a5ea7 Swift: make trap domain logger names more informative 2023-04-06 12:53:47 +02:00
Paolo Tranquilli
a5162b0b7d Swift: remove Log::configure 2023-04-06 12:53:13 +02:00
Robert Marsh
915c969efe Merge branch 'main' into rdmarsh2/range-analysis-overflow 2023-04-05 16:19:55 -04:00
Joe Farebrother
17cfd489ea Add change note 2023-04-05 14:28:49 +01:00
Joe Farebrother
8b08e6042c Update formatting 2023-04-05 14:22:55 +01:00
Joe Farebrother
37f1770623 Add unit tests for private information query 2023-04-05 13:57:23 +01:00
Joe Farebrother
941df4f274 Add test for cleartext storage 2023-04-05 13:57:23 +01:00
Joe Farebrother
cb2b2bc334 Add qldoc and remove redundant import 2023-04-05 13:57:23 +01:00
Joe Farebrother
92198e1af0 Add local file writes as external location sinks 2023-04-05 13:57:23 +01:00
jarlob
40635e60d1 Improve documentation 2023-04-05 10:26:02 +02:00
jarlob
9fba7d31f1 Improve documentation 2023-04-05 10:24:07 +02:00
jarlob
40b7910473 Fix QLDoc warnings 2023-04-05 10:14:54 +02:00
jarlob
eef1973b93 Change UI message 2023-04-05 10:05:24 +02:00
jarlob
5c5b9f99a8 Add simple taint tracking for env variables 2023-04-05 10:03:46 +02:00
Paolo Tranquilli
6ef9088076 Swift: rename LOG_IMPL->LOG_WITH_LEVEL and strengthen it 2023-04-05 06:30:49 +02:00
Robert Marsh
e4ae957cdd C++: More fixes to overflow detection 2023-04-04 09:31:03 -04:00
Paolo Tranquilli
5a01feca6c Swift: expand Logger doc comment 2023-04-04 10:37:59 +02:00
Paolo Tranquilli
6c932bc807 Swift: address logging review comments 2023-04-04 10:28:11 +02:00
Gulshan Singh
56dc2a4d4e C++: Consider ArrayExpr with non-constant size expressions as BufferAccesses 2023-04-03 23:11:14 -07:00
jarlob
39ff3c72a2 Remove label sanitizer because it is prone to race conditions 2023-04-03 23:28:31 +02:00
jarlob
8ea418216c Look for script injections in actions/github-script 2023-04-03 23:13:28 +02:00
jarlob
e941218e30 change notes added 2023-04-03 15:15:00 +02:00
jarlob
ba5747dff3 fix formatting 2023-04-03 15:10:27 +02:00
jarlob
c6eaf194a5 Remove empty.js as it is not needed anymore 2023-04-03 15:09:40 +02:00
jarlob
99d634c8a4 Add more sources, more unit tests, fixes to the GitHub Actions injection query 2023-04-03 15:02:02 +02:00
Paolo Tranquilli
abc0c7cf24 Swift: add trace logging of all trap emission 2023-04-03 11:47:24 +02:00
Paolo Tranquilli
a386c58371 Swift: add preliminary logging to dispatcher 2023-04-03 11:47:23 +02:00
Paolo Tranquilli
3fc488167f Swift: add logging to main 2023-04-03 11:47:23 +02:00
Paolo Tranquilli
ed48065c2d Swift: add logging infrastructure 2023-04-03 11:47:23 +02:00
Robert Marsh
2606abfc64 C++: sign analysis in potentiallyOverflowingExpr 2023-03-30 12:19:26 -04:00
Robert Marsh
868b2385d1 C++: fix SimpleRangeAnalysis for equivclass SemExpr 2023-03-30 12:19:25 -04:00
Robert Marsh
4b4fc97221 Merge branch 'main' into rdmarsh2/range-analysis-overflow 2023-03-30 11:45:55 -04:00
Robert Marsh
7ea74df4b3 C++: SimpleRangeAnalysis wrapper uses constant stage 2023-03-23 11:59:52 -04:00
Robert Marsh
204dbee14c C++: Move overflow detection to SimpleRangeAnalysis.qll 2023-03-21 11:02:06 -04:00
Robert Marsh
0f4157c534 C++: Add overflow detection to new range analysis 2023-03-21 11:01:58 -04:00
Rasmus Lerchedahl Petersen
f9bffb5454 python: add change note 2023-03-16 12:55:58 +01:00
Rasmus Lerchedahl Petersen
4713ba1e12 python: more results no longer missing
Adjusted `tracked.ql`
- no need to annotate results on line 0
  this could happen for global SSA variables
- no need to annotate scope entry definitons
  they look a bit weird, as the annotation goes on the
  line of the function definition.
2023-03-16 12:55:58 +01:00
Rasmus Lerchedahl Petersen
2318752c14 python: add reads of captured variables to
type tracking and the API graph.

- In `TypeTrackerSpecific.qll` we add a jump step
  - to every scope entry definition
  - from the value of any defining `DefinitionNode`
    (In our example, the definition is the class name, `Users`,
     while the assigned value is the class definition, and it is
     the latter which receives flow in this case.)
- In `LocalSources.qll` we allow scope entry definitions as local sources.
  - This feels natural enough, as they are a local source for the value, they represent.
    It is perhaps a bit funne to see an Ssa variable here,
    rather than a control flow node.
 - This is necessary in order for type tracking to see the local flow
    from the scope entry definition.
- In `ApiGraphs.qll` we no longer restrict the result of `trackUseNode`
  to be an `ExprNode`. To keep the positive formulation, we do not
  prohibit module variable nodes. Instead we restrict to the new
  `LocalSourceNodeNotModule` which avoids those cases.
2023-03-16 12:55:58 +01:00
Rasmus Lerchedahl Petersen
7e003f63b9 python: add test for flask example
This is a condensed versio of the user reported example
found [here](eb377d5918/app.py (L278))
The `MISSING` annotation indicates where our API graph falls short.
2023-03-16 12:53:40 +01:00
Nicky Mouha
2de0e2209e Update test.cpp 2023-03-16 02:34:40 -04:00
Geoffrey White
9a27016663 Swift: Make QL-for-QL happy. 2023-03-14 10:24:55 +00:00
Nicky Mouha
a2b5fbf24c Create IfStatementAdditionOverflow.expected 2023-03-12 03:31:48 -04:00
Nicky Mouha
66710ad5a0 Create IfStatementAdditionOverflow.qlref 2023-03-12 03:30:26 -04:00
Nicky Mouha
59c1ae7734 Update test.cpp 2023-03-12 03:27:10 -04:00
Nicky Mouha
2477c3a1c2 Update test.cpp 2023-03-12 03:25:52 -04:00
Nicky Mouha
91a9a7eb32 Create test.cpp 2023-03-12 01:13:32 -05:00
Nicky Mouha
dc09c9218e Update IfStatementAdditionOverflow.ql 2023-03-12 01:05:18 -05:00
Geoffrey White
f1905f21b2 Swift: Remove special case from swift/unsafe-js-eval. 2023-03-06 21:02:42 +00:00
Geoffrey White
4380495eed Swift: Model Sequence.withContiguousSrtorageIfAvailable. 2023-03-06 20:59:17 +00:00
Nicky Mouha
08f04d5386 Update IfStatementAdditionOverflow.ql 2023-02-23 17:50:02 -05:00
Nicky Mouha
ed75172bdd Update IfStatementAdditionOverflow.ql 2023-02-21 18:11:22 -05:00
Nicky Mouha
f577a04eab Update IfStatementAdditionOverflow.ql 2023-02-18 21:34:03 -05:00
amammad
f535923e67 Merge branch 'github:main' into amammad-python-paramiko 2023-02-16 17:44:15 +01:00
amammad
54582031d8 v1 2023-02-16 17:14:32 +01:00
Nicky Mouha
5a4a63f8a9 Create IfStatementAdditionOverflow.ql 2023-01-30 18:52:35 -05:00
6299 changed files with 376773 additions and 236733 deletions

View File

@@ -1,3 +1,9 @@
build --repo_env=CC=clang --repo_env=CXX=clang++ --cxxopt="-std=c++17"
common --enable_platform_specific_config
build --repo_env=CC=clang --repo_env=CXX=clang++
build:linux --cxxopt=-std=c++20
build:macos --cxxopt=-std=c++20 --cpu=darwin_x86_64
build:windows --cxxopt=/std:c++20 --cxxopt=/Zc:preprocessor
try-import %workspace%/local.bazelrc

View File

@@ -1 +1 @@
5.0.0
6.3.1

View File

@@ -1,6 +1,6 @@
{
"extensions": [
"rust-lang.rust",
"rust-lang.rust-analyzer",
"bungcip.better-toml",
"github.vscode-codeql",
"hbenl.vscode-test-explorer",

3
.github/labeler.yml vendored
View File

@@ -11,7 +11,7 @@ Go:
- change-notes/**/*go.*
Java:
- any: [ 'java/**/*', '!java/kotlin-extractor/**/*', '!java/kotlin-explorer/**/*', '!java/ql/test/kotlin/**/*' ]
- any: [ 'java/**/*', '!java/kotlin-extractor/**/*', '!java/ql/test/kotlin/**/*' ]
- change-notes/**/*java.*
JS:
@@ -20,7 +20,6 @@ JS:
Kotlin:
- java/kotlin-extractor/**/*
- java/kotlin-explorer/**/*
- java/ql/test/kotlin/**/*
Python:

View File

@@ -11,7 +11,6 @@ on:
- "*/ql/lib/**/*.yml"
- "!**/experimental/**"
- "!ql/**"
- "!swift/**"
- ".github/workflows/check-change-note.yml"
jobs:
@@ -27,9 +26,9 @@ jobs:
run: |
gh api 'repos/${{github.repository}}/pulls/${{github.event.number}}/files' --paginate --jq 'any(.[].filename ; test("/change-notes/.*[.]md$"))' |
grep true -c
- name: Fail if the change note filename doesn't match the expected format. The file name must be of the form 'YYYY-MM-DD.md' or 'YYYY-MM-DD-{title}.md', where '{title}' is arbitrary text.
- name: Fail if the change note filename doesn't match the expected format. The file name must be of the form 'YYYY-MM-DD.md', 'YYYY-MM-DD-{title}.md', where '{title}' is arbitrary text, or released/x.y.z.md for released change-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api 'repos/${{github.repository}}/pulls/${{github.event.number}}/files' --paginate --jq '[.[].filename | select(test("/change-notes/.*[.]md$"))] | all(test("/change-notes/[0-9]{4}-[0-9]{2}-[0-9]{2}.*[.]md$"))' |
gh api 'repos/${{github.repository}}/pulls/${{github.event.number}}/files' --paginate --jq '[.[].filename | select(test("/change-notes/.*[.]md$"))] | all(test("/change-notes/[0-9]{4}-[0-9]{2}-[0-9]{2}.*[.]md$") or test("/change-notes/released/[0-9]*[.][0-9]*[.][0-9]*[.]md$"))' |
grep true -c

View File

@@ -0,0 +1,29 @@
name: "Check implicit this warnings"
on:
workflow_dispatch:
pull_request:
paths:
- "**qlpack.yml"
branches:
- main
- "rc/*"
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check that implicit this warnings is enabled for all packs
shell: bash
run: |
EXIT_CODE=0
packs="$(find . -iname 'qlpack.yml')"
for pack_file in ${packs}; do
option="$(yq '.warnOnImplicitThis' ${pack_file})"
if [ "${option}" != "true" ]; then
echo "::error file=${pack_file}::warnOnImplicitThis property must be set to 'true' for pack ${pack_file}"
EXIT_CODE=1
fi
done
exit "${EXIT_CODE}"

View File

@@ -10,6 +10,7 @@ on:
- "*/ql/src/**/*.qll"
- "*/ql/lib/**/*.ql"
- "*/ql/lib/**/*.qll"
- "*/ql/lib/ext/**/*.yml"
- "misc/scripts/library-coverage/*.py"
# input data files
- "*/documentation/library-coverage/cwe-sink.csv"

View File

@@ -7,15 +7,17 @@ on:
- .github/workflows/go-tests-other-os.yml
- .github/actions/**
- codeql-workspace.yml
env:
GO_VERSION: '~1.21.0'
jobs:
test-mac:
name: Test MacOS
runs-on: macos-latest
steps:
- name: Set up Go 1.20
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
with:
go-version: 1.20.0
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code
@@ -47,10 +49,10 @@ jobs:
name: Test Windows
runs-on: windows-latest-xl
steps:
- name: Set up Go 1.20
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
with:
go-version: 1.20.0
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code

View File

@@ -15,15 +15,17 @@ on:
- .github/workflows/go-tests.yml
- .github/actions/**
- codeql-workspace.yml
env:
GO_VERSION: '~1.21.0'
jobs:
test-linux:
name: Test Linux (Ubuntu)
runs-on: ubuntu-latest-xl
steps:
- name: Set up Go 1.20
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
with:
go-version: 1.20.0
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code

View File

@@ -32,7 +32,7 @@ jobs:
path: |
ql/extractor-pack/
ql/target/release/buramu
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-extractor-${{ hashFiles('ql/**/Cargo.lock') }}-${{ hashFiles('ql/**/*.rs') }}
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-extractor-${{ hashFiles('ql/**/Cargo.lock') }}-${{ hashFiles('shared/tree-sitter-extractor') }}-${{ hashFiles('ql/**/*.rs') }}
- name: Cache cargo
if: steps.cache-extractor.outputs.cache-hit != 'true'
uses: actions/cache@v3

View File

@@ -58,12 +58,10 @@ jobs:
id: cache-extractor
with:
path: |
ruby/extractor/target/release/autobuilder
ruby/extractor/target/release/autobuilder.exe
ruby/extractor/target/release/extractor
ruby/extractor/target/release/extractor.exe
ruby/extractor/target/release/codeql-extractor-ruby
ruby/extractor/target/release/codeql-extractor-ruby.exe
ruby/extractor/ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-extractor-${{ hashFiles('ruby/extractor/rust-toolchain.toml', 'ruby/extractor/Cargo.lock') }}--${{ hashFiles('ruby/extractor/**/*.rs') }}
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-extractor-${{ hashFiles('ruby/extractor/rust-toolchain.toml', 'ruby/extractor/Cargo.lock') }}-${{ hashFiles('shared/tree-sitter-extractor') }}-${{ hashFiles('ruby/extractor/**/*.rs') }}
- uses: actions/cache@v3
if: steps.cache-extractor.outputs.cache-hit != 'true'
with:
@@ -88,15 +86,13 @@ jobs:
run: |
cd extractor
cross build --release
mv target/x86_64-unknown-linux-gnu/release/extractor target/release/
mv target/x86_64-unknown-linux-gnu/release/autobuilder target/release/
mv target/x86_64-unknown-linux-gnu/release/generator target/release/
mv target/x86_64-unknown-linux-gnu/release/codeql-extractor-ruby target/release/
- name: Release build (windows and macos)
if: steps.cache-extractor.outputs.cache-hit != 'true' && runner.os != 'Linux'
run: cd extractor && cargo build --release
- name: Generate dbscheme
if: ${{ matrix.os == 'ubuntu-latest' && steps.cache-extractor.outputs.cache-hit != 'true'}}
run: extractor/target/release/generator --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
run: extractor/target/release/codeql-extractor-ruby generate --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
- uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
@@ -111,10 +107,8 @@ jobs:
with:
name: extractor-${{ matrix.os }}
path: |
ruby/extractor/target/release/autobuilder
ruby/extractor/target/release/autobuilder.exe
ruby/extractor/target/release/extractor
ruby/extractor/target/release/extractor.exe
ruby/extractor/target/release/codeql-extractor-ruby
ruby/extractor/target/release/codeql-extractor-ruby.exe
retention-days: 1
compile-queries:
runs-on: ubuntu-latest-xl
@@ -172,13 +166,10 @@ jobs:
mkdir -p ruby
cp -r codeql-extractor.yml tools ql/lib/ruby.dbscheme.stats ruby/
mkdir -p ruby/tools/{linux64,osx64,win64}
cp linux64/autobuilder ruby/tools/linux64/autobuilder
cp osx64/autobuilder ruby/tools/osx64/autobuilder
cp win64/autobuilder.exe ruby/tools/win64/autobuilder.exe
cp linux64/extractor ruby/tools/linux64/extractor
cp osx64/extractor ruby/tools/osx64/extractor
cp win64/extractor.exe ruby/tools/win64/extractor.exe
chmod +x ruby/tools/{linux64,osx64}/{autobuilder,extractor}
cp linux64/codeql-extractor-ruby ruby/tools/linux64/extractor
cp osx64/codeql-extractor-ruby ruby/tools/osx64/extractor
cp win64/codeql-extractor-ruby.exe ruby/tools/win64/extractor.exe
chmod +x ruby/tools/{linux64,osx64}/extractor
zip -rq codeql-ruby.zip ruby
- uses: actions/upload-artifact@v3
with:

View File

@@ -14,6 +14,7 @@ on:
pull_request:
paths:
- "ruby/**"
- "shared/**"
- .github/workflows/ruby-qltest.yml
- .github/actions/fetch-codeql/action.yml
- codeql-workspace.yml

View File

@@ -16,6 +16,7 @@ on:
branches:
- main
- rc/*
- codeql-cli-*
push:
paths:
- "swift/**"
@@ -30,6 +31,7 @@ on:
branches:
- main
- rc/*
- codeql-cli-*
jobs:
# not using a matrix as you cannot depend on a specific job in a matrix, and we want to start linux checks

View File

@@ -17,4 +17,6 @@ jobs:
- uses: actions/checkout@v3
- name: Check synchronized files
run: python config/sync-files.py
- name: Check dbscheme fragments
run: python config/sync-dbscheme-fragments.py

View File

@@ -0,0 +1,46 @@
name: Test tree-sitter-extractor
on:
push:
paths:
- "shared/tree-sitter-extractor/**"
- .github/workflows/tree-sitter-extractor-test.yml
branches:
- main
- "rc/*"
pull_request:
paths:
- "shared/tree-sitter-extractor/**"
- .github/workflows/tree-sitter-extractor-test.yml
branches:
- main
- "rc/*"
env:
CARGO_TERM_COLOR: always
defaults:
run:
working-directory: shared/tree-sitter-extractor
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run tests
run: cargo test --verbose
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check formatting
run: cargo fmt --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run clippy
run: cargo clippy -- --no-deps -D warnings -A clippy::new_without_default -A clippy::too_many_arguments

View File

@@ -5,9 +5,9 @@ repos:
rev: v3.2.0
hooks:
- id: trailing-whitespace
exclude: /test/.*$(?<!\.ql)(?<!\.qll)(?<!\.qlref)
exclude: /test/.*$(?<!\.ql)(?<!\.qll)(?<!\.qlref)|.*\.patch
- id: end-of-file-fixer
exclude: /test/.*$(?<!\.ql)(?<!\.qll)(?<!\.qlref)
exclude: /test/.*$(?<!\.ql)(?<!\.qll)(?<!\.qlref)|.*\.patch
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v13.0.1
@@ -21,6 +21,11 @@ repos:
- id: autopep8
files: ^misc/codegen/.*\.py
- repo: https://github.com/warchant/pre-commit-buildifier
rev: 0.0.2
hooks:
- id: buildifier
- repo: local
hooks:
- id: codeql-format

18
.vscode/tasks.json vendored
View File

@@ -22,6 +22,22 @@
"command": "${config:python.pythonPath}",
},
"problemMatcher": []
},
{
"label": "Accept .expected changes from CI",
"type": "process",
// Non-Windows OS will usually have Python 3 already installed at /usr/bin/python3.
"command": "python3",
"args": [
"misc/scripts/accept-expected-changes-from-ci.py"
],
"group": "build",
"windows": {
// On Windows, use whatever Python interpreter is configured for this workspace. The default is
// just `python`, so if Python is already on the path, this will find it.
"command": "${config:python.pythonPath}",
},
"problemMatcher": []
}
]
}
}

View File

@@ -8,7 +8,6 @@
/swift/ @github/codeql-swift
/misc/codegen/ @github/codeql-swift
/java/kotlin-extractor/ @github/codeql-kotlin
/java/kotlin-explorer/ @github/codeql-kotlin
# ML-powered queries
/javascript/ql/experimental/adaptivethreatmodeling/ @github/codeql-ml-powered-queries-reviewers
@@ -40,3 +39,6 @@ WORKSPACE.bazel @github/codeql-ci-reviewers
/.github/workflows/ql-for-ql-* @github/codeql-ql-for-ql-reviewers
/.github/workflows/ruby-* @github/codeql-ruby
/.github/workflows/swift.yml @github/codeql-swift
# Misc
/misc/scripts/accept-expected-changes-from-ci.py @RasmusWL

View File

@@ -14,14 +14,16 @@ If you have an idea for a query that you would like to share with other CodeQL u
1. **Directory structure**
There are six language-specific query directories in this repository:
There are eight language-specific query directories in this repository:
* C/C++: `cpp/ql/src`
* C#: `csharp/ql/src`
* Java: `java/ql/src`
* Go: `go/ql/src`
* Java/Kotlin: `java/ql/src`
* JavaScript: `javascript/ql/src`
* Python: `python/ql/src`
* Ruby: `ruby/ql/src`
* Swift: `swift/ql/src`
Each language-specific directory contains further subdirectories that group queries based on their `@tags` or purpose.
- Experimental queries and libraries are stored in the `experimental` subdirectory within each language-specific directory in the [CodeQL repository](https://github.com/github/codeql). For example, experimental Java queries and libraries are stored in `java/ql/src/experimental` and any corresponding tests in `java/ql/test/experimental`.

View File

@@ -4,6 +4,8 @@ provide:
- "*/ql/test/qlpack.yml"
- "*/ql/examples/qlpack.yml"
- "*/ql/consistency-queries/qlpack.yml"
- "*/ql/automodel/src/qlpack.yml"
- "*/ql/automodel/test/qlpack.yml"
- "shared/*/qlpack.yml"
- "cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/qlpack.yml"
- "go/ql/config/legacy-support/qlpack.yml"

View File

@@ -0,0 +1,33 @@
{
"files": [
"javascript/ql/lib/semmlecode.javascript.dbscheme",
"python/ql/lib/semmlecode.python.dbscheme",
"ruby/ql/lib/ruby.dbscheme",
"ql/ql/src/ql.dbscheme"
],
"fragments": [
"/*- External data -*/",
"/*- Files and folders -*/",
"/*- Diagnostic messages -*/",
"/*- Diagnostic messages: severity -*/",
"/*- Source location prefix -*/",
"/*- Lines of code -*/",
"/*- Configuration files with key value pairs -*/",
"/*- YAML -*/",
"/*- XML Files -*/",
"/*- XML: sourceline -*/",
"/*- DEPRECATED: External defects and metrics -*/",
"/*- DEPRECATED: Snapshot date -*/",
"/*- DEPRECATED: Duplicate code -*/",
"/*- DEPRECATED: Version control data -*/",
"/*- JavaScript-specific part -*/",
"/*- Ruby dbscheme -*/",
"/*- Erb dbscheme -*/",
"/*- QL dbscheme -*/",
"/*- Dbscheme dbscheme -*/",
"/*- Yaml dbscheme -*/",
"/*- Blame dbscheme -*/",
"/*- JSON dbscheme -*/",
"/*- Python dbscheme -*/"
]
}

View File

@@ -1,24 +1,4 @@
{
"DataFlow Java/C++/C#/Go/Python/Ruby/Swift": [
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlow.qll",
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlow.qll",
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlow.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlow.qll",
"go/ql/lib/semmle/go/dataflow/internal/DataFlow.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlow.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlow.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlow.qll"
],
"DataFlowImpl Java/C++/C#/Go/Python/Ruby/Swift": [
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl.qll",
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll",
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll",
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl.qll"
],
"DataFlow Java/C++/C#/Go/Python/Ruby/Swift Legacy Configuration": [
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl1.qll",
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll",
@@ -40,41 +20,18 @@
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplForContentDataFlow.qll",
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl1.qll",
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl2.qll",
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImplForStringsNewReplacer.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl1.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImplForRegExp.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl1.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplForHttpClientLibraries.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplForPathname.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl1.qll"
],
"DataFlow Java/C++/C#/Go/Python/Ruby/Swift Common": [
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplCommon.qll",
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll",
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImplCommon.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplCommon.qll",
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImplCommon.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImplCommon.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplCommon.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImplCommon.qll"
],
"TaintTracking Java/C++/C#/Go/Python/Ruby/Swift": [
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking1/TaintTracking.qll",
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/tainttracking1/TaintTracking.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/tainttracking1/TaintTracking.qll",
"go/ql/lib/semmle/go/dataflow/internal/tainttracking1/TaintTracking.qll",
"java/ql/lib/semmle/code/java/dataflow/internal/tainttracking1/TaintTracking.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/tainttracking1/TaintTracking.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/tainttracking1/TaintTracking.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/tainttracking1/TaintTracking.qll"
],
"TaintTracking Legacy Configuration Java/C++/C#/Go/Python/Ruby/Swift": [
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking1/TaintTrackingImpl.qll",
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking2/TaintTrackingImpl.qll",
@@ -98,15 +55,6 @@
"ruby/ql/lib/codeql/ruby/dataflow/internal/tainttracking1/TaintTrackingImpl.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/tainttracking1/TaintTrackingImpl.qll"
],
"DataFlow Java/C++/C#/Python/Ruby/Swift Consistency checks": [
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplConsistency.qll",
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll",
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplConsistency.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImplConsistency.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplConsistency.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImplConsistency.qll"
],
"DataFlow Java/C#/Go/Ruby/Python/Swift Flow Summaries": [
"java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll",
@@ -513,17 +461,17 @@
"SensitiveDataHeuristics Python/JS": [
"javascript/ql/lib/semmle/javascript/security/internal/SensitiveDataHeuristics.qll",
"python/ql/lib/semmle/python/security/internal/SensitiveDataHeuristics.qll",
"ruby/ql/lib/codeql/ruby/security/internal/SensitiveDataHeuristics.qll"
],
"CFG": [
"csharp/ql/lib/semmle/code/csharp/controlflow/internal/ControlFlowGraphImplShared.qll",
"ruby/ql/lib/codeql/ruby/controlflow/internal/ControlFlowGraphImplShared.qll",
"swift/ql/lib/codeql/swift/controlflow/internal/ControlFlowGraphImplShared.qll"
"ruby/ql/lib/codeql/ruby/security/internal/SensitiveDataHeuristics.qll",
"swift/ql/lib/codeql/swift/security/internal/SensitiveDataHeuristics.qll"
],
"TypeTracker": [
"python/ql/lib/semmle/python/dataflow/new/internal/TypeTracker.qll",
"ruby/ql/lib/codeql/ruby/typetracking/TypeTracker.qll"
],
"SummaryTypeTracker": [
"python/ql/lib/semmle/python/dataflow/new/internal/SummaryTypeTracker.qll",
"ruby/ql/lib/codeql/ruby/typetracking/internal/SummaryTypeTracker.qll"
],
"AccessPathSyntax": [
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/AccessPathSyntax.qll",
"go/ql/lib/semmle/go/dataflow/internal/AccessPathSyntax.qll",
@@ -599,5 +547,9 @@
"EncryptionKeySizes Python/Java": [
"python/ql/lib/semmle/python/security/internal/EncryptionKeySizes.qll",
"java/ql/lib/semmle/code/java/security/internal/EncryptionKeySizes.qll"
],
"Python model summaries test extension": [
"python/ql/test/experimental/dataflow/model-summaries/InlineTaintTest.ext.yml",
"python/ql/test/experimental/dataflow/model-summaries/NormalDataflowTest.ext.yml"
]
}

View File

@@ -0,0 +1,86 @@
#!/usr/bin/env python3
import argparse
import json
import os
import pathlib
import re
def make_groups(blocks):
groups = {}
for block in blocks:
groups.setdefault("".join(block["lines"]), []).append(block)
return list(groups.values())
def validate_fragments(fragments):
ok = True
for header, blocks in fragments.items():
groups = make_groups(blocks)
if len(groups) > 1:
ok = False
print("Warning: dbscheme fragments with header '{}' are different for {}".format(header, ["{}:{}:{}".format(
group[0]["file"], group[0]["start"], group[0]["end"]) for group in groups]))
return ok
def main():
script_path = os.path.realpath(__file__)
script_dir = os.path.dirname(script_path)
parser = argparse.ArgumentParser(
prog=os.path.basename(script_path),
description='Sync dbscheme fragments across files.'
)
parser.add_argument('files', metavar='dbscheme_file', type=pathlib.Path, nargs='*', default=[],
help='dbscheme files to check')
args = parser.parse_args()
with open(os.path.join(script_dir, "dbscheme-fragments.json"), "r") as f:
config = json.load(f)
fragment_headers = set(config["fragments"])
fragments = {}
ok = True
for file in args.files + config["files"]:
with open(os.path.join(os.path.dirname(script_dir), file), "r") as dbscheme:
header = None
line_number = 1
block = {"file": file, "start": line_number,
"end": None, "lines": []}
def end_block():
block["end"] = line_number - 1
if len(block["lines"]) > 0:
if header is None:
if re.match(r'(?m)\A(\s|//.*$|/\*(\**[^\*])*\*+/)*\Z', "".join(block["lines"])):
# Ignore comments at the beginning of the file
pass
else:
ok = False
print("Warning: dbscheme fragment without header: {}:{}:{}".format(
block["file"], block["start"], block["end"]))
else:
fragments.setdefault(header, []).append(block)
for line in dbscheme:
m = re.match(r"^\/\*-.*-\*\/$", line)
if m:
end_block()
header = line.strip()
if header not in fragment_headers:
ok = False
print("Warning: unknown header for dbscheme fragment: '{}': {}:{}".format(
header, file, line_number))
block = {"file": file, "start": line_number,
"end": None, "lines": []}
block["lines"].append(line)
line_number += 1
block["lines"].append('\n')
line_number += 1
end_block()
if not ok or not validate_fragments(fragments):
exit(1)
if __name__ == "__main__":
main()

View File

@@ -327,7 +327,7 @@ namespace Semmle.Autobuild.Cpp.Tests
{
Actions.RunProcess[@"cmd.exe /C nuget restore C:\Project\test.sln -DisableParallelProcessing"] = 1;
Actions.RunProcess[@"cmd.exe /C C:\Project\.nuget\nuget.exe restore C:\Project\test.sln -DisableParallelProcessing"] = 0;
Actions.RunProcess[@"cmd.exe /C CALL ^""C:\Program Files ^(x86^)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat^"" && set Platform=&& type NUL && msbuild C:\Project\test.sln /t:rebuild /p:Platform=""x86"" /p:Configuration=""Release"""] = 0;
Actions.RunProcess[@"cmd.exe /C CALL ^""C:\Program^ Files^ ^(x86^)\Microsoft^ Visual^ Studio^ 14.0\VC\vcvarsall.bat^"" && set Platform=&& type NUL && msbuild C:\Project\test.sln /t:rebuild /p:Platform=""x86"" /p:Configuration=""Release"""] = 0;
Actions.RunProcessOut[@"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -prerelease -legacy -property installationPath"] = "";
Actions.RunProcess[@"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -prerelease -legacy -property installationPath"] = 1;
Actions.RunProcess[@"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -prerelease -legacy -property installationVersion"] = 0;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
description: Remove _Float128 type
compatibility: full

View File

@@ -2,3 +2,4 @@ name: codeql/cpp-downgrades
groups: cpp
downgrades: .
library: true
warnOnImplicitThis: true

View File

@@ -4,3 +4,4 @@ groups:
- examples
dependencies:
codeql/cpp-all: ${workspace}
warnOnImplicitThis: true

View File

@@ -1 +0,0 @@
<queries language="cpp"/>

View File

@@ -1,3 +1,99 @@
## 0.9.2
### Deprecated APIs
* `getAllocatorCall` on `DeleteExpr` and `DeleteArrayExpr` has been deprecated. `getDeallocatorCall` should be used instead.
### New Features
* Added `DeleteOrDeleteArrayExpr` as a super type of `DeleteExpr` and `DeleteArrayExpr`
### Minor Analysis Improvements
* `delete` and `delete[]` are now modeled as calls to the relevant `operator delete` in the IR. In the case of a dynamic delete call a new instruction `VirtualDeleteFunctionAddress` is used to represent a function that dispatches to the correct delete implementation.
* Only the 2 level indirection of `argv` (corresponding to `**argv`) is consided for `FlowSource`.
## 0.9.1
No user-facing changes.
## 0.9.0
### Breaking Changes
* The `shouldPrintFunction` predicate from `PrintAstConfiguration` has been replaced by `shouldPrintDeclaration`. Users should now override `shouldPrintDeclaration` if they want to limit the declarations that should be printed.
* The `shouldPrintFunction` predicate from `PrintIRConfiguration` has been replaced by `shouldPrintDeclaration`. Users should now override `shouldPrintDeclaration` if they want to limit the declarations that should be printed.
### Major Analysis Improvements
* The `PrintAST` library now also prints global and namespace variables and their initializers.
### Minor Analysis Improvements
* The `_Float128x` type is no longer exposed as a builtin type. As this type could not occur any code base, this should only affect queries that explicitly looked at the builtin types.
## 0.8.1
### Deprecated APIs
* The library `semmle.code.cpp.dataflow.DataFlow` has been deprecated. Please use `semmle.code.cpp.dataflow.new.DataFlow` instead.
### New Features
* The `DataFlow::StateConfigSig` signature module has gained default implementations for `isBarrier/2` and `isAdditionalFlowStep/4`.
Hence it is no longer needed to provide `none()` implementations of these predicates if they are not needed.
### Minor Analysis Improvements
* Data flow configurations can now include a predicate `neverSkip(Node node)`
in order to ensure inclusion of certain nodes in the path explanations. The
predicate defaults to the end-points of the additional flow steps provided in
the configuration, which means that such steps now always are visible by
default in path explanations.
* The `IRGuards` library has improved handling of pointer addition and subtraction operations.
## 0.8.0
### New Features
* The `ProductFlow::StateConfigSig` signature now includes default predicates for `isBarrier1`, `isBarrier2`, `isAdditionalFlowStep1`, and `isAdditionalFlowStep1`. Hence, it is no longer needed to provide `none()` implementations of these predicates if they are not needed.
### Minor Analysis Improvements
* Deleted the deprecated `getURL` predicate from the `Container`, `Folder`, and `File` classes. Use the `getLocation` predicate instead.
## 0.7.4
No user-facing changes.
## 0.7.3
### Minor Analysis Improvements
* Deleted the deprecated `hasCopyConstructor` predicate from the `Class` class in `Class.qll`.
* Deleted many deprecated predicates and classes with uppercase `AST`, `SSA`, `CFG`, `API`, etc. in their names. Use the PascalCased versions instead.
* Deleted the deprecated `CodeDuplication.qll` file.
## 0.7.2
### New Features
* Added an AST-based interface (`semmle.code.cpp.rangeanalysis.new.RangeAnalysis`) for the relative range analysis library.
* A new predicate `BarrierGuard::getAnIndirectBarrierNode` has been added to the new dataflow library (`semmle.code.cpp.dataflow.new.DataFlow`) to mark indirect expressions as barrier nodes using the `BarrierGuard` API.
### Major Analysis Improvements
* In the intermediate representation, handling of control flow after non-returning calls has been improved. This should remove false positives in queries that use the intermedite representation or libraries based on it, including the new data flow library.
### Minor Analysis Improvements
* The `StdNamespace` class now also includes all inline namespaces that are children of `std` namespace.
* The new dataflow (`semmle.code.cpp.dataflow.new.DataFlow`) and taint-tracking libraries (`semmle.code.cpp.dataflow.new.TaintTracking`) now support tracking flow through static local variables.
## 0.7.1
No user-facing changes.
## 0.7.0
### Breaking Changes

View File

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

View File

@@ -0,0 +1,15 @@
## 0.7.2
### New Features
* Added an AST-based interface (`semmle.code.cpp.rangeanalysis.new.RangeAnalysis`) for the relative range analysis library.
* A new predicate `BarrierGuard::getAnIndirectBarrierNode` has been added to the new dataflow library (`semmle.code.cpp.dataflow.new.DataFlow`) to mark indirect expressions as barrier nodes using the `BarrierGuard` API.
### Major Analysis Improvements
* In the intermediate representation, handling of control flow after non-returning calls has been improved. This should remove false positives in queries that use the intermedite representation or libraries based on it, including the new data flow library.
### Minor Analysis Improvements
* The `StdNamespace` class now also includes all inline namespaces that are children of `std` namespace.
* The new dataflow (`semmle.code.cpp.dataflow.new.DataFlow`) and taint-tracking libraries (`semmle.code.cpp.dataflow.new.TaintTracking`) now support tracking flow through static local variables.

View File

@@ -0,0 +1,7 @@
## 0.7.3
### Minor Analysis Improvements
* Deleted the deprecated `hasCopyConstructor` predicate from the `Class` class in `Class.qll`.
* Deleted many deprecated predicates and classes with uppercase `AST`, `SSA`, `CFG`, `API`, etc. in their names. Use the PascalCased versions instead.
* Deleted the deprecated `CodeDuplication.qll` file.

View File

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

View File

@@ -0,0 +1,9 @@
## 0.8.0
### New Features
* The `ProductFlow::StateConfigSig` signature now includes default predicates for `isBarrier1`, `isBarrier2`, `isAdditionalFlowStep1`, and `isAdditionalFlowStep1`. Hence, it is no longer needed to provide `none()` implementations of these predicates if they are not needed.
### Minor Analysis Improvements
* Deleted the deprecated `getURL` predicate from the `Container`, `Folder`, and `File` classes. Use the `getLocation` predicate instead.

View File

@@ -0,0 +1,19 @@
## 0.8.1
### Deprecated APIs
* The library `semmle.code.cpp.dataflow.DataFlow` has been deprecated. Please use `semmle.code.cpp.dataflow.new.DataFlow` instead.
### New Features
* The `DataFlow::StateConfigSig` signature module has gained default implementations for `isBarrier/2` and `isAdditionalFlowStep/4`.
Hence it is no longer needed to provide `none()` implementations of these predicates if they are not needed.
### Minor Analysis Improvements
* Data flow configurations can now include a predicate `neverSkip(Node node)`
in order to ensure inclusion of certain nodes in the path explanations. The
predicate defaults to the end-points of the additional flow steps provided in
the configuration, which means that such steps now always are visible by
default in path explanations.
* The `IRGuards` library has improved handling of pointer addition and subtraction operations.

View File

@@ -0,0 +1,14 @@
## 0.9.0
### Breaking Changes
* The `shouldPrintFunction` predicate from `PrintAstConfiguration` has been replaced by `shouldPrintDeclaration`. Users should now override `shouldPrintDeclaration` if they want to limit the declarations that should be printed.
* The `shouldPrintFunction` predicate from `PrintIRConfiguration` has been replaced by `shouldPrintDeclaration`. Users should now override `shouldPrintDeclaration` if they want to limit the declarations that should be printed.
### Major Analysis Improvements
* The `PrintAST` library now also prints global and namespace variables and their initializers.
### Minor Analysis Improvements
* The `_Float128x` type is no longer exposed as a builtin type. As this type could not occur any code base, this should only affect queries that explicitly looked at the builtin types.

View File

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

View File

@@ -0,0 +1,14 @@
## 0.9.2
### Deprecated APIs
* `getAllocatorCall` on `DeleteExpr` and `DeleteArrayExpr` has been deprecated. `getDeallocatorCall` should be used instead.
### New Features
* Added `DeleteOrDeleteArrayExpr` as a super type of `DeleteExpr` and `DeleteArrayExpr`
### Minor Analysis Improvements
* `delete` and `delete[]` are now modeled as calls to the relevant `operator delete` in the IR. In the case of a dynamic delete call a new instruction `VirtualDeleteFunctionAddress` is used to represent a function that dispatches to the correct delete implementation.
* Only the 2 level indirection of `argv` (corresponding to `**argv`) is consided for `FlowSource`.

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.7.0
lastReleaseVersion: 0.9.2

View File

@@ -238,7 +238,7 @@ class NoReason extends Reason, TNoReason {
class CondReason extends Reason, TCondReason {
IRGuardCondition getCond() { this = TCondReason(result) }
override string toString() { result = getCond().toString() }
override string toString() { result = this.getCond().toString() }
}
/**
@@ -260,14 +260,14 @@ private predicate typeBound(IRIntegerType typ, int lowerbound, int upperbound) {
private class NarrowingCastInstruction extends ConvertInstruction {
NarrowingCastInstruction() {
not this instanceof SafeCastInstruction and
typeBound(getResultIRType(), _, _)
typeBound(this.getResultIRType(), _, _)
}
/** Gets the lower bound of the resulting type. */
int getLowerBound() { typeBound(getResultIRType(), result, _) }
int getLowerBound() { typeBound(this.getResultIRType(), result, _) }
/** Gets the upper bound of the resulting type. */
int getUpperBound() { typeBound(getResultIRType(), _, result) }
int getUpperBound() { typeBound(this.getResultIRType(), _, result) }
}
/**

View File

@@ -109,8 +109,8 @@ private predicate safeCast(IRIntegerType fromtyp, IRIntegerType totyp) {
*/
class PtrToPtrCastInstruction extends ConvertInstruction {
PtrToPtrCastInstruction() {
getResultIRType() instanceof IRAddressType and
getUnary().getResultIRType() instanceof IRAddressType
this.getResultIRType() instanceof IRAddressType and
this.getUnary().getResultIRType() instanceof IRAddressType
}
}
@@ -119,7 +119,7 @@ class PtrToPtrCastInstruction extends ConvertInstruction {
* that cannot overflow or underflow.
*/
class SafeIntCastInstruction extends ConvertInstruction {
SafeIntCastInstruction() { safeCast(getUnary().getResultIRType(), getResultIRType()) }
SafeIntCastInstruction() { safeCast(this.getUnary().getResultIRType(), this.getResultIRType()) }
}
/**

View File

@@ -50,8 +50,8 @@ private class ConstantBitwiseAndExprRange extends SimpleRangeAnalysisExpr {
// If an operand can have negative values, the lower bound is unconstrained.
// Otherwise, the lower bound is zero.
exists(float lLower, float rLower |
lLower = getFullyConvertedLowerBounds(getLeftOperand()) and
rLower = getFullyConvertedLowerBounds(getRightOperand()) and
lLower = getFullyConvertedLowerBounds(this.getLeftOperand()) and
rLower = getFullyConvertedLowerBounds(this.getRightOperand()) and
(
(lLower < 0 or rLower < 0) and
result = exprMinVal(this)
@@ -68,10 +68,10 @@ private class ConstantBitwiseAndExprRange extends SimpleRangeAnalysisExpr {
// If an operand can have negative values, the upper bound is unconstrained.
// Otherwise, the upper bound is the minimum of the upper bounds of the operands
exists(float lLower, float lUpper, float rLower, float rUpper |
lLower = getFullyConvertedLowerBounds(getLeftOperand()) and
lUpper = getFullyConvertedUpperBounds(getLeftOperand()) and
rLower = getFullyConvertedLowerBounds(getRightOperand()) and
rUpper = getFullyConvertedUpperBounds(getRightOperand()) and
lLower = getFullyConvertedLowerBounds(this.getLeftOperand()) and
lUpper = getFullyConvertedUpperBounds(this.getLeftOperand()) and
rLower = getFullyConvertedLowerBounds(this.getRightOperand()) and
rUpper = getFullyConvertedUpperBounds(this.getRightOperand()) and
(
(lLower < 0 or rLower < 0) and
result = exprMaxVal(this)
@@ -85,6 +85,6 @@ private class ConstantBitwiseAndExprRange extends SimpleRangeAnalysisExpr {
}
override predicate dependsOnChild(Expr child) {
child = getLeftOperand() or child = getRightOperand()
child = this.getLeftOperand() or child = this.getRightOperand()
}
}

View File

@@ -50,7 +50,7 @@ class ConstantRShiftExprRange extends SimpleRangeAnalysisExpr {
* We don't handle the case where `a` and `b` are both non-constant values.
*/
ConstantRShiftExprRange() {
getUnspecifiedType() instanceof IntegralType and
this.getUnspecifiedType() instanceof IntegralType and
exists(Expr l, Expr r |
l = this.(RShiftExpr).getLeftOperand() and
r = this.(RShiftExpr).getRightOperand()
@@ -84,10 +84,10 @@ class ConstantRShiftExprRange extends SimpleRangeAnalysisExpr {
override float getLowerBounds() {
exists(int lLower, int lUpper, int rLower, int rUpper |
lLower = getFullyConvertedLowerBounds(getLeftOperand()) and
lUpper = getFullyConvertedUpperBounds(getLeftOperand()) and
rLower = getFullyConvertedLowerBounds(getRightOperand()) and
rUpper = getFullyConvertedUpperBounds(getRightOperand()) and
lLower = getFullyConvertedLowerBounds(this.getLeftOperand()) and
lUpper = getFullyConvertedUpperBounds(this.getLeftOperand()) and
rLower = getFullyConvertedLowerBounds(this.getRightOperand()) and
rUpper = getFullyConvertedUpperBounds(this.getRightOperand()) and
lLower <= lUpper and
rLower <= rUpper
|
@@ -95,8 +95,8 @@ class ConstantRShiftExprRange extends SimpleRangeAnalysisExpr {
lLower < 0
or
not (
isValidShiftExprShift(rLower, getLeftOperand()) and
isValidShiftExprShift(rUpper, getLeftOperand())
isValidShiftExprShift(rLower, this.getLeftOperand()) and
isValidShiftExprShift(rUpper, this.getLeftOperand())
)
then
// We don't want to deal with shifting negative numbers at the moment,
@@ -111,10 +111,10 @@ class ConstantRShiftExprRange extends SimpleRangeAnalysisExpr {
override float getUpperBounds() {
exists(int lLower, int lUpper, int rLower, int rUpper |
lLower = getFullyConvertedLowerBounds(getLeftOperand()) and
lUpper = getFullyConvertedUpperBounds(getLeftOperand()) and
rLower = getFullyConvertedLowerBounds(getRightOperand()) and
rUpper = getFullyConvertedUpperBounds(getRightOperand()) and
lLower = getFullyConvertedLowerBounds(this.getLeftOperand()) and
lUpper = getFullyConvertedUpperBounds(this.getLeftOperand()) and
rLower = getFullyConvertedLowerBounds(this.getRightOperand()) and
rUpper = getFullyConvertedUpperBounds(this.getRightOperand()) and
lLower <= lUpper and
rLower <= rUpper
|
@@ -122,8 +122,8 @@ class ConstantRShiftExprRange extends SimpleRangeAnalysisExpr {
lLower < 0
or
not (
isValidShiftExprShift(rLower, getLeftOperand()) and
isValidShiftExprShift(rUpper, getLeftOperand())
isValidShiftExprShift(rLower, this.getLeftOperand()) and
isValidShiftExprShift(rUpper, this.getLeftOperand())
)
then
// We don't want to deal with shifting negative numbers at the moment,
@@ -137,7 +137,7 @@ class ConstantRShiftExprRange extends SimpleRangeAnalysisExpr {
}
override predicate dependsOnChild(Expr child) {
child = getLeftOperand() or child = getRightOperand()
child = this.getLeftOperand() or child = this.getRightOperand()
}
}
@@ -163,7 +163,7 @@ class ConstantLShiftExprRange extends SimpleRangeAnalysisExpr {
* We don't handle the case where `a` and `b` are both non-constant values.
*/
ConstantLShiftExprRange() {
getUnspecifiedType() instanceof IntegralType and
this.getUnspecifiedType() instanceof IntegralType and
exists(Expr l, Expr r |
l = this.(LShiftExpr).getLeftOperand() and
r = this.(LShiftExpr).getRightOperand()
@@ -197,10 +197,10 @@ class ConstantLShiftExprRange extends SimpleRangeAnalysisExpr {
override float getLowerBounds() {
exists(int lLower, int lUpper, int rLower, int rUpper |
lLower = getFullyConvertedLowerBounds(getLeftOperand()) and
lUpper = getFullyConvertedUpperBounds(getLeftOperand()) and
rLower = getFullyConvertedLowerBounds(getRightOperand()) and
rUpper = getFullyConvertedUpperBounds(getRightOperand()) and
lLower = getFullyConvertedLowerBounds(this.getLeftOperand()) and
lUpper = getFullyConvertedUpperBounds(this.getLeftOperand()) and
rLower = getFullyConvertedLowerBounds(this.getRightOperand()) and
rUpper = getFullyConvertedUpperBounds(this.getRightOperand()) and
lLower <= lUpper and
rLower <= rUpper
|
@@ -208,8 +208,8 @@ class ConstantLShiftExprRange extends SimpleRangeAnalysisExpr {
lLower < 0
or
not (
isValidShiftExprShift(rLower, getLeftOperand()) and
isValidShiftExprShift(rUpper, getLeftOperand())
isValidShiftExprShift(rLower, this.getLeftOperand()) and
isValidShiftExprShift(rUpper, this.getLeftOperand())
)
then
// We don't want to deal with shifting negative numbers at the moment,
@@ -228,10 +228,10 @@ class ConstantLShiftExprRange extends SimpleRangeAnalysisExpr {
override float getUpperBounds() {
exists(int lLower, int lUpper, int rLower, int rUpper |
lLower = getFullyConvertedLowerBounds(getLeftOperand()) and
lUpper = getFullyConvertedUpperBounds(getLeftOperand()) and
rLower = getFullyConvertedLowerBounds(getRightOperand()) and
rUpper = getFullyConvertedUpperBounds(getRightOperand()) and
lLower = getFullyConvertedLowerBounds(this.getLeftOperand()) and
lUpper = getFullyConvertedUpperBounds(this.getLeftOperand()) and
rLower = getFullyConvertedLowerBounds(this.getRightOperand()) and
rUpper = getFullyConvertedUpperBounds(this.getRightOperand()) and
lLower <= lUpper and
rLower <= rUpper
|
@@ -239,8 +239,8 @@ class ConstantLShiftExprRange extends SimpleRangeAnalysisExpr {
lLower < 0
or
not (
isValidShiftExprShift(rLower, getLeftOperand()) and
isValidShiftExprShift(rUpper, getLeftOperand())
isValidShiftExprShift(rLower, this.getLeftOperand()) and
isValidShiftExprShift(rUpper, this.getLeftOperand())
)
then
// We don't want to deal with shifting negative numbers at the moment,
@@ -258,6 +258,6 @@ class ConstantLShiftExprRange extends SimpleRangeAnalysisExpr {
}
override predicate dependsOnChild(Expr child) {
child = getLeftOperand() or child = getRightOperand()
child = this.getLeftOperand() or child = this.getRightOperand()
}
}

View File

@@ -83,20 +83,23 @@ private class ExprRangeNode extends DataFlow::ExprNode {
private string getCallBounds(Call e) {
result =
getExprBoundAsString(e) + "(" +
concat(Expr arg, int i | arg = e.getArgument(i) | getIntegralBounds(arg) order by i, ",") +
")"
concat(Expr arg, int i |
arg = e.getArgument(i)
|
this.getIntegralBounds(arg), "," order by i
) + ")"
}
override string toString() {
exists(Expr e | e = getExpr() |
exists(Expr e | e = this.getExpr() |
if hasIntegralOrReferenceIntegralType(e)
then
result = super.toString() + ": " + getOperationBounds(e)
result = super.toString() + ": " + this.getOperationBounds(e)
or
result = super.toString() + ": " + getCallBounds(e)
result = super.toString() + ": " + this.getCallBounds(e)
or
not exists(getOperationBounds(e)) and
not exists(getCallBounds(e)) and
not exists(this.getOperationBounds(e)) and
not exists(this.getCallBounds(e)) and
result = super.toString() + ": " + getExprBoundAsString(e)
else result = super.toString()
)
@@ -108,8 +111,8 @@ private class ExprRangeNode extends DataFlow::ExprNode {
*/
private class ReferenceArgumentRangeNode extends DataFlow::DefinitionByReferenceNode {
override string toString() {
if hasIntegralOrReferenceIntegralType(asDefiningArgument())
then result = super.toString() + ": " + getExprBoundAsString(getArgument())
if hasIntegralOrReferenceIntegralType(this.asDefiningArgument())
then result = super.toString() + ": " + getExprBoundAsString(this.getArgument())
else result = super.toString()
}
}

View File

@@ -7,12 +7,12 @@ private import experimental.semmle.code.cpp.models.interfaces.SimpleRangeAnalysi
*/
class StrlenLiteralRangeExpr extends SimpleRangeAnalysisExpr, FunctionCall {
StrlenLiteralRangeExpr() {
getTarget().hasGlobalOrStdName("strlen") and getArgument(0).isConstant()
this.getTarget().hasGlobalOrStdName("strlen") and this.getArgument(0).isConstant()
}
override int getLowerBounds() { result = getArgument(0).getValue().length() }
override int getLowerBounds() { result = this.getArgument(0).getValue().length() }
override int getUpperBounds() { result = getArgument(0).getValue().length() }
override int getUpperBounds() { result = this.getArgument(0).getValue().length() }
override predicate dependsOnChild(Expr e) { none() }
}

View File

@@ -3,8 +3,8 @@ import experimental.semmle.code.cpp.models.interfaces.SimpleRangeAnalysisExpr
private class SelfSub extends SimpleRangeAnalysisExpr, SubExpr {
SelfSub() {
// Match `x - x` but not `myInt - (unsigned char)myInt`.
getLeftOperand().getExplicitlyConverted().(VariableAccess).getTarget() =
getRightOperand().getExplicitlyConverted().(VariableAccess).getTarget()
this.getLeftOperand().getExplicitlyConverted().(VariableAccess).getTarget() =
this.getRightOperand().getExplicitlyConverted().(VariableAccess).getTarget()
}
override float getLowerBounds() { result = 0 }

View File

@@ -18,10 +18,10 @@ external string selectedSourceFile();
class Cfg extends PrintAstConfiguration {
/**
* Holds if the AST for `func` should be printed.
* Print All functions from the selected file.
* Holds if the AST for `decl` should be printed.
* Print All declarations from the selected file.
*/
override predicate shouldPrintFunction(Function func) {
func.getFile() = getFileBySourceArchiveName(selectedSourceFile())
override predicate shouldPrintDeclaration(Declaration decl) {
decl.getFile() = getFileBySourceArchiveName(selectedSourceFile())
}
}

View File

@@ -1,11 +1,13 @@
name: codeql/cpp-all
version: 0.7.0
version: 0.9.2
groups: cpp
dbscheme: semmlecode.cpp.dbscheme
extractor: cpp
library: true
upgrades: upgrades
dependencies:
codeql/dataflow: ${workspace}
codeql/ssa: ${workspace}
codeql/tutorial: ${workspace}
codeql/util: ${workspace}
warnOnImplicitThis: true

View File

@@ -176,20 +176,6 @@ class Class extends UserType {
/** Holds if this class, struct or union has a constructor. */
predicate hasConstructor() { exists(this.getAConstructor()) }
/**
* Holds if this class has a copy constructor that is either explicitly
* declared (though possibly `= delete`) or is auto-generated, non-trivial
* and called from somewhere.
*
* DEPRECATED: There is more than one reasonable definition of what it means
* to have a copy constructor, and we do not want to promote one particular
* definition by naming it with this predicate. Having a copy constructor
* could mean that such a member is declared or defined in the source or that
* it is callable by a particular caller. For C++11, there's also a question
* of whether to include members that are defaulted or deleted.
*/
deprecated predicate hasCopyConstructor() { this.getAMemberFunction() instanceof CopyConstructor }
/**
* Like accessOfBaseMember but returns multiple results if there are multiple
* paths to `base` through the inheritance graph.

View File

@@ -42,7 +42,7 @@ class Compilation extends @compilation {
}
/** Gets a file compiled during this invocation. */
File getAFileCompiled() { result = getFileCompiled(_) }
File getAFileCompiled() { result = this.getFileCompiled(_) }
/** Gets the `i`th file compiled during this invocation */
File getFileCompiled(int i) { compilation_compiling_files(this, i, unresolveElement(result)) }
@@ -74,7 +74,7 @@ class Compilation extends @compilation {
/**
* Gets an argument passed to the extractor on this invocation.
*/
string getAnArgument() { result = getArgument(_) }
string getAnArgument() { result = this.getArgument(_) }
/**
* Gets the `i`th argument passed to the extractor on this invocation.

View File

@@ -39,7 +39,8 @@ class Field extends MemberVariable {
* complete most-derived object.
*/
int getAByteOffsetIn(Class mostDerivedClass) {
result = mostDerivedClass.getABaseClassByteOffset(getDeclaringType()) + getByteOffset()
result =
mostDerivedClass.getABaseClassByteOffset(this.getDeclaringType()) + this.getByteOffset()
}
/**
@@ -116,10 +117,10 @@ class BitField extends Field {
int getBitOffset() { fieldoffsets(underlyingElement(this), _, result) }
/** Holds if this bitfield is anonymous. */
predicate isAnonymous() { hasName("(unnamed bitfield)") }
predicate isAnonymous() { this.hasName("(unnamed bitfield)") }
override predicate isInitializable() {
// Anonymous bitfields are not initializable.
not isAnonymous()
not this.isAnonymous()
}
}

View File

@@ -34,14 +34,6 @@ class Container extends Locatable, @container {
*/
string getAbsolutePath() { none() } // overridden by subclasses
/**
* DEPRECATED: Use `getLocation` instead.
* Gets a URL representing the location of this container.
*
* For more information see [Providing URLs](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/#providing-urls).
*/
deprecated string getURL() { none() } // overridden by subclasses
/**
* Gets the relative path of this file or folder from the root folder of the
* analyzed source location. The relative path of the root folder itself is
@@ -183,12 +175,6 @@ class Folder extends Container, @folder {
}
override string getAPrimaryQlClass() { result = "Folder" }
/**
* DEPRECATED: Use `getLocation` instead.
* Gets the URL of this folder.
*/
deprecated override string getURL() { result = "file://" + this.getAbsolutePath() + ":0:0:0:0" }
}
/**
@@ -213,12 +199,6 @@ class File extends Container, @file {
result.hasLocationInfo(_, 0, 0, 0, 0)
}
/**
* DEPRECATED: Use `getLocation` instead.
* Gets the URL of this file.
*/
deprecated override string getURL() { result = "file://" + this.getAbsolutePath() + ":0:0:0:0" }
/** Holds if this file was compiled as C (at any point). */
predicate compiledAsC() { fileannotations(underlyingElement(this), 1, "compiled as c", "1") }

View File

@@ -24,10 +24,10 @@ class LinkTarget extends @link_target {
* captured as part of the snapshot, then everything is grouped together
* into a single dummy link target.
*/
predicate isDummy() { getBinary().getAbsolutePath() = "" }
predicate isDummy() { this.getBinary().getAbsolutePath() = "" }
/** Gets a textual representation of this element. */
string toString() { result = getBinary().getAbsolutePath() }
string toString() { result = this.getBinary().getAbsolutePath() }
/**
* Gets a function which was compiled into this link target, or had its

View File

@@ -34,7 +34,7 @@ class Macro extends PreprocessorDirective, @ppd_define {
* Gets the name of the macro. For example, `MAX` in
* `#define MAX(x,y) (((x)>(y))?(x):(y))`.
*/
string getName() { result = this.getHead().splitAt("(", 0) }
string getName() { result = this.getHead().regexpCapture("([^(]*+).*", 1) }
/** Holds if the macro has name `name`. */
predicate hasName(string name) { this.getName() = name }

View File

@@ -24,7 +24,7 @@ class NameQualifier extends NameQualifiableElement, @namequalifier {
* Gets the expression ultimately qualified by the chain of name
* qualifiers. For example, `f()` in `N1::N2::f()`.
*/
Expr getExpr() { result = getQualifiedElement+() }
Expr getExpr() { result = this.getQualifiedElement+() }
/** Gets a location for this name qualifier. */
override Location getLocation() { namequalifiers(underlyingElement(this), _, _, result) }
@@ -56,12 +56,12 @@ class NameQualifier extends NameQualifiableElement, @namequalifier {
if nqe instanceof SpecialNameQualifyingElement
then
exists(Access a |
a = getQualifiedElement() and
a = this.getQualifiedElement() and
result = a.getTarget().getDeclaringType()
)
or
exists(FunctionCall c |
c = getQualifiedElement() and
c = this.getQualifiedElement() and
result = c.getTarget().getDeclaringType()
)
else result = nqe
@@ -109,7 +109,7 @@ class NameQualifiableElement extends Element, @namequalifiableelement {
* namespace.
*/
predicate hasGlobalQualifiedName() {
getNameQualifier*().getQualifyingElement() instanceof GlobalNamespace
this.getNameQualifier*().getQualifyingElement() instanceof GlobalNamespace
}
/**
@@ -119,7 +119,7 @@ class NameQualifiableElement extends Element, @namequalifiableelement {
*/
predicate hasSuperQualifiedName() {
exists(NameQualifier nq, SpecialNameQualifyingElement snqe |
nq = getNameQualifier*() and
nq = this.getNameQualifier*() and
namequalifiers(unresolveElement(nq), _, unresolveElement(snqe), _) and
snqe.getName() = "__super"
)
@@ -164,5 +164,5 @@ library class SpecialNameQualifyingElement extends NameQualifyingElement,
/** Gets the name of this special qualifying element. */
override string getName() { specialnamequalifyingelements(underlyingElement(this), result) }
override string toString() { result = getName() }
override string toString() { result = this.getName() }
}

View File

@@ -230,8 +230,12 @@ class GlobalNamespace extends Namespace {
}
/**
* The C++ `std::` namespace.
* The C++ `std::` namespace and its inline namespaces.
*/
class StdNamespace extends Namespace {
StdNamespace() { this.hasName("std") and this.getParentNamespace() instanceof GlobalNamespace }
StdNamespace() {
this.hasName("std") and this.getParentNamespace() instanceof GlobalNamespace
or
this.isInline() and this.getParentNamespace() instanceof StdNamespace
}
}

View File

@@ -37,7 +37,7 @@ class NestedFieldAccess extends FieldAccess {
NestedFieldAccess() {
ultimateQualifier = getUltimateQualifier(this) and
getTarget() = getANestedField(ultimateQualifier.getType().stripType())
this.getTarget() = getANestedField(ultimateQualifier.getType().stripType())
}
/**

View File

@@ -6,11 +6,9 @@ private import PrintAST
* that requests that function, or no `PrintASTConfiguration` exists.
*/
private predicate shouldPrintDeclaration(Declaration decl) {
not decl instanceof Function
not (decl instanceof Function or decl instanceof GlobalOrNamespaceVariable)
or
not exists(PrintAstConfiguration c)
or
exists(PrintAstConfiguration config | config.shouldPrintFunction(decl))
exists(PrintAstConfiguration config | config.shouldPrintDeclaration(decl))
}
/**

View File

@@ -9,13 +9,13 @@ import cpp
import PrintAST
/**
* Temporarily tweak this class or make a copy to control which functions are
* Temporarily tweak this class or make a copy to control which declarations are
* printed.
*/
class Cfg extends PrintAstConfiguration {
/**
* TWEAK THIS PREDICATE AS NEEDED.
* Holds if the AST for `func` should be printed.
* Holds if the AST for `decl` should be printed.
*/
override predicate shouldPrintFunction(Function func) { any() }
override predicate shouldPrintDeclaration(Declaration decl) { any() }
}

View File

@@ -1,9 +1,9 @@
/**
* Provides queries to pretty-print a C++ AST as a graph.
*
* By default, this will print the AST for all functions in the database. To change this behavior,
* extend `PrintASTConfiguration` and override `shouldPrintFunction` to hold for only the functions
* you wish to view the AST for.
* By default, this will print the AST for all functions and global and namespace variables in
* the database. To change this behavior, extend `PrintASTConfiguration` and override
* `shouldPrintDeclaration` to hold for only the declarations you wish to view the AST for.
*/
import cpp
@@ -12,7 +12,7 @@ private import semmle.code.cpp.Print
private newtype TPrintAstConfiguration = MkPrintAstConfiguration()
/**
* The query can extend this class to control which functions are printed.
* The query can extend this class to control which declarations are printed.
*/
class PrintAstConfiguration extends TPrintAstConfiguration {
/**
@@ -21,17 +21,16 @@ class PrintAstConfiguration extends TPrintAstConfiguration {
string toString() { result = "PrintASTConfiguration" }
/**
* Holds if the AST for `func` should be printed. By default, holds for all
* functions.
* Holds if the AST for `decl` should be printed. By default, holds for all
* functions and global and namespace variables. Currently, does not support any
* other declaration types.
*/
predicate shouldPrintFunction(Function func) { any() }
predicate shouldPrintDeclaration(Declaration decl) { any() }
}
/** DEPRECATED: Alias for PrintAstConfiguration */
deprecated class PrintASTConfiguration = PrintAstConfiguration;
private predicate shouldPrintFunction(Function func) {
exists(PrintAstConfiguration config | config.shouldPrintFunction(func))
private predicate shouldPrintDeclaration(Declaration decl) {
exists(PrintAstConfiguration config | config.shouldPrintDeclaration(decl)) and
(decl instanceof Function or decl instanceof GlobalOrNamespaceVariable)
}
bindingset[s]
@@ -72,7 +71,7 @@ private predicate locationSortKeys(Locatable ast, string file, int line, int col
)
}
private Function getEnclosingFunction(Locatable ast) {
private Declaration getAnEnclosingDeclaration(Locatable ast) {
result = ast.(Expr).getEnclosingFunction()
or
result = ast.(Stmt).getEnclosingFunction()
@@ -81,6 +80,10 @@ private Function getEnclosingFunction(Locatable ast) {
or
result = ast.(Parameter).getFunction()
or
result = ast.(Expr).getEnclosingDeclaration()
or
result = ast.(Initializer).getDeclaration()
or
result = ast
}
@@ -89,21 +92,21 @@ private Function getEnclosingFunction(Locatable ast) {
* nodes for things like parameter lists and constructor init lists.
*/
private newtype TPrintAstNode =
TAstNode(Locatable ast) { shouldPrintFunction(getEnclosingFunction(ast)) } or
TAstNode(Locatable ast) { shouldPrintDeclaration(getAnEnclosingDeclaration(ast)) } or
TDeclarationEntryNode(DeclStmt stmt, DeclarationEntry entry) {
// We create a unique node for each pair of (stmt, entry), to avoid having one node with
// multiple parents due to extractor bug CPP-413.
stmt.getADeclarationEntry() = entry and
shouldPrintFunction(stmt.getEnclosingFunction())
shouldPrintDeclaration(stmt.getEnclosingFunction())
} or
TParametersNode(Function func) { shouldPrintFunction(func) } or
TParametersNode(Function func) { shouldPrintDeclaration(func) } or
TConstructorInitializersNode(Constructor ctor) {
ctor.hasEntryPoint() and
shouldPrintFunction(ctor)
shouldPrintDeclaration(ctor)
} or
TDestructorDestructionsNode(Destructor dtor) {
dtor.hasEntryPoint() and
shouldPrintFunction(dtor)
shouldPrintDeclaration(dtor)
}
/**
@@ -130,7 +133,7 @@ class PrintAstNode extends TPrintAstNode {
// The exact value of `childIndex` doesn't matter, as long as we preserve the correct order.
result =
rank[childIndex](PrintAstNode child, int nonConvertedIndex, boolean isConverted |
childAndAccessorPredicate(child, _, nonConvertedIndex, isConverted)
this.childAndAccessorPredicate(child, _, nonConvertedIndex, isConverted)
|
// Unconverted children come first, then sort by original child index within each group.
child order by isConverted, nonConvertedIndex
@@ -143,7 +146,7 @@ class PrintAstNode extends TPrintAstNode {
*/
private PrintAstNode getConvertedChild(int childIndex) {
exists(Expr expr |
expr = getChildInternal(childIndex).(AstNode).getAst() and
expr = this.getChildInternal(childIndex).(AstNode).getAst() and
expr.getFullyConverted() instanceof Conversion and
result.(AstNode).getAst() = expr.getFullyConverted() and
not expr instanceof Conversion
@@ -155,21 +158,21 @@ class PrintAstNode extends TPrintAstNode {
* at index `childIndex`, if that node has any conversions.
*/
private string getConvertedChildAccessorPredicate(int childIndex) {
exists(getConvertedChild(childIndex)) and
result = getChildAccessorPredicateInternal(childIndex) + ".getFullyConverted()"
exists(this.getConvertedChild(childIndex)) and
result = this.getChildAccessorPredicateInternal(childIndex) + ".getFullyConverted()"
}
/**
* Holds if this node should be printed in the output. By default, all nodes
* within a function are printed, but the query can override
* `PrintASTConfiguration.shouldPrintFunction` to filter the output.
* within functions and global and namespace variables are printed, but the query
* can override `PrintASTConfiguration.shouldPrintDeclaration` to filter the output.
*/
final predicate shouldPrint() { shouldPrintFunction(getEnclosingFunction()) }
final predicate shouldPrint() { shouldPrintDeclaration(this.getEnclosingDeclaration()) }
/**
* Gets the children of this node.
*/
final PrintAstNode getAChild() { result = getChild(_) }
final PrintAstNode getAChild() { result = this.getChild(_) }
/**
* Gets the parent of this node, if any.
@@ -187,7 +190,7 @@ class PrintAstNode extends TPrintAstNode {
*/
string getProperty(string key) {
key = "semmle.label" and
result = toString()
result = this.toString()
}
/**
@@ -201,12 +204,12 @@ class PrintAstNode extends TPrintAstNode {
private predicate childAndAccessorPredicate(
PrintAstNode child, string childPredicate, int nonConvertedIndex, boolean isConverted
) {
child = getChildInternal(nonConvertedIndex) and
childPredicate = getChildAccessorPredicateInternal(nonConvertedIndex) and
child = this.getChildInternal(nonConvertedIndex) and
childPredicate = this.getChildAccessorPredicateInternal(nonConvertedIndex) and
isConverted = false
or
child = getConvertedChild(nonConvertedIndex) and
childPredicate = getConvertedChildAccessorPredicate(nonConvertedIndex) and
child = this.getConvertedChild(nonConvertedIndex) and
childPredicate = this.getConvertedChildAccessorPredicate(nonConvertedIndex) and
isConverted = true
}
@@ -218,7 +221,7 @@ class PrintAstNode extends TPrintAstNode {
// The exact value of `childIndex` doesn't matter, as long as we preserve the correct order.
result =
rank[childIndex](string childPredicate, int nonConvertedIndex, boolean isConverted |
childAndAccessorPredicate(_, childPredicate, nonConvertedIndex, isConverted)
this.childAndAccessorPredicate(_, childPredicate, nonConvertedIndex, isConverted)
|
// Unconverted children come first, then sort by original child index within each group.
childPredicate order by isConverted, nonConvertedIndex
@@ -232,13 +235,17 @@ class PrintAstNode extends TPrintAstNode {
abstract string getChildAccessorPredicateInternal(int childIndex);
/**
* Gets the `Function` that contains this node.
* Gets the `Declaration` that contains this node.
*/
private Function getEnclosingFunction() { result = getParent*().(FunctionNode).getFunction() }
}
private Declaration getEnclosingDeclaration() { result = this.getParent*().getDeclaration() }
/** DEPRECATED: Alias for PrintAstNode */
deprecated class PrintASTNode = PrintAstNode;
/**
* Gets the `Declaration` this node represents.
*/
private Declaration getDeclaration() {
result = this.(AstNode).getAst() and shouldPrintDeclaration(result)
}
}
/**
* Class that restricts the elements that we compute `qlClass` for.
@@ -253,7 +260,7 @@ private class PrintableElement extends Element {
}
pragma[noinline]
string getAPrimaryQlClass0() { result = getAPrimaryQlClass() }
string getAPrimaryQlClass0() { result = this.getAPrimaryQlClass() }
}
/**
@@ -281,12 +288,9 @@ abstract class BaseAstNode extends PrintAstNode {
final Locatable getAst() { result = ast }
/** DEPRECATED: Alias for getAst */
deprecated Locatable getAST() { result = getAst() }
deprecated Locatable getAST() { result = this.getAst() }
}
/** DEPRECATED: Alias for BaseAstNode */
deprecated class BaseASTNode = BaseAstNode;
/**
* A node representing an AST node other than a `DeclarationEntry`.
*/
@@ -294,9 +298,6 @@ abstract class AstNode extends BaseAstNode, TAstNode {
AstNode() { this = TAstNode(ast) }
}
/** DEPRECATED: Alias for AstNode */
deprecated class ASTNode = AstNode;
/**
* A node representing an `Expr`.
*/
@@ -311,7 +312,7 @@ class ExprNode extends AstNode {
result = super.getProperty(key)
or
key = "Value" and
result = qlClass(expr) + getValue()
result = qlClass(expr) + this.getValue()
or
key = "Type" and
result = qlClass(expr.getType()) + expr.getType().toString()
@@ -321,7 +322,7 @@ class ExprNode extends AstNode {
}
override string getChildAccessorPredicateInternal(int childIndex) {
result = getChildAccessorWithoutConversions(ast, getChildInternal(childIndex).getAst())
result = getChildAccessorWithoutConversions(ast, this.getChildInternal(childIndex).getAst())
}
/**
@@ -441,7 +442,7 @@ class StmtNode extends AstNode {
}
override string getChildAccessorPredicateInternal(int childIndex) {
result = getChildAccessorWithoutConversions(ast, getChildInternal(childIndex).getAst())
result = getChildAccessorWithoutConversions(ast, this.getChildInternal(childIndex).getAst())
}
}
@@ -517,7 +518,7 @@ class ParametersNode extends PrintAstNode, TParametersNode {
}
override string getChildAccessorPredicateInternal(int childIndex) {
exists(getChildInternal(childIndex)) and
exists(this.getChildInternal(childIndex)) and
result = "getParameter(" + childIndex.toString() + ")"
}
@@ -544,7 +545,7 @@ class ConstructorInitializersNode extends PrintAstNode, TConstructorInitializers
}
final override string getChildAccessorPredicateInternal(int childIndex) {
exists(getChildInternal(childIndex)) and
exists(this.getChildInternal(childIndex)) and
result = "getInitializer(" + childIndex.toString() + ")"
}
@@ -571,7 +572,7 @@ class DestructorDestructionsNode extends PrintAstNode, TDestructorDestructionsNo
}
final override string getChildAccessorPredicateInternal(int childIndex) {
exists(getChildInternal(childIndex)) and
exists(this.getChildInternal(childIndex)) and
result = "getDestruction(" + childIndex.toString() + ")"
}
@@ -581,16 +582,53 @@ class DestructorDestructionsNode extends PrintAstNode, TDestructorDestructionsNo
final Destructor getDestructor() { result = dtor }
}
abstract private class FunctionOrGlobalOrNamespaceVariableNode extends AstNode {
override string toString() { result = qlClass(ast) + getIdentityString(ast) }
private int getOrder() {
this =
rank[result](FunctionOrGlobalOrNamespaceVariableNode node, Declaration decl, string file,
int line, int column |
node.getAst() = decl and
locationSortKeys(decl, file, line, column)
|
node order by file, line, column, getIdentityString(decl)
)
}
override string getProperty(string key) {
result = super.getProperty(key)
or
key = "semmle.order" and result = this.getOrder().toString()
}
}
/**
* A node representing a `GlobalOrNamespaceVariable`.
*/
class GlobalOrNamespaceVariableNode extends FunctionOrGlobalOrNamespaceVariableNode {
GlobalOrNamespaceVariable var;
GlobalOrNamespaceVariableNode() { var = ast }
override PrintAstNode getChildInternal(int childIndex) {
childIndex = 0 and
result.(AstNode).getAst() = var.getInitializer()
}
override string getChildAccessorPredicateInternal(int childIndex) {
childIndex = 0 and result = "getInitializer()"
}
}
/**
* A node representing a `Function`.
*/
class FunctionNode extends AstNode {
class FunctionNode extends FunctionOrGlobalOrNamespaceVariableNode {
Function func;
FunctionNode() { func = ast }
override string toString() { result = qlClass(func) + getIdentityString(func) }
override PrintAstNode getChildInternal(int childIndex) {
childIndex = 0 and
result.(ParametersNode).getFunction() = func
@@ -614,31 +652,10 @@ class FunctionNode extends AstNode {
or
childIndex = 3 and result = "<destructions>"
}
private int getOrder() {
this =
rank[result](FunctionNode node, Function function, string file, int line, int column |
node.getAst() = function and
locationSortKeys(function, file, line, column)
|
node order by file, line, column, getIdentityString(function)
)
}
override string getProperty(string key) {
result = super.getProperty(key)
or
key = "semmle.order" and result = getOrder().toString()
}
/**
* Gets the `Function` this node represents.
*/
final Function getFunction() { result = func }
}
private string getChildAccessorWithoutConversions(Locatable parent, Element child) {
shouldPrintFunction(getEnclosingFunction(parent)) and
shouldPrintDeclaration(getAnEnclosingDeclaration(parent)) and
(
exists(Stmt s | s = parent |
namedStmtChildPredicates(s, child, result)
@@ -657,7 +674,7 @@ private string getChildAccessorWithoutConversions(Locatable parent, Element chil
}
private predicate namedStmtChildPredicates(Locatable s, Element e, string pred) {
shouldPrintFunction(getEnclosingFunction(s)) and
shouldPrintDeclaration(getAnEnclosingDeclaration(s)) and
(
exists(int n | s.(BlockStmt).getStmt(n) = e and pred = "getStmt(" + n + ")")
or
@@ -745,12 +762,14 @@ private predicate namedStmtChildPredicates(Locatable s, Element e, string pred)
}
private predicate namedExprChildPredicates(Expr expr, Element ele, string pred) {
shouldPrintFunction(expr.getEnclosingFunction()) and
shouldPrintDeclaration(expr.getEnclosingDeclaration()) and
(
expr.(Access).getTarget() = ele and pred = "getTarget()"
or
expr.(VariableAccess).getQualifier() = ele and pred = "getQualifier()"
or
expr.(FunctionAccess).getQualifier() = ele and pred = "getQualifier()"
or
exists(Field f |
expr.(ClassAggregateLiteral).getAFieldExpr(f) = ele and
pred = "getAFieldExpr(" + f.toString() + ")"
@@ -807,17 +826,11 @@ private predicate namedExprChildPredicates(Expr expr, Element ele, string pred)
or
expr.(Conversion).getExpr() = ele and pred = "getExpr()"
or
expr.(DeleteArrayExpr).getAllocatorCall() = ele and pred = "getAllocatorCall()"
expr.(DeleteOrDeleteArrayExpr).getDeallocatorCall() = ele and pred = "getDeallocatorCall()"
or
expr.(DeleteArrayExpr).getDestructorCall() = ele and pred = "getDestructorCall()"
expr.(DeleteOrDeleteArrayExpr).getDestructorCall() = ele and pred = "getDestructorCall()"
or
expr.(DeleteArrayExpr).getExpr() = ele and pred = "getExpr()"
or
expr.(DeleteExpr).getAllocatorCall() = ele and pred = "getAllocatorCall()"
or
expr.(DeleteExpr).getDestructorCall() = ele and pred = "getDestructorCall()"
or
expr.(DeleteExpr).getExpr() = ele and pred = "getExpr()"
expr.(DeleteOrDeleteArrayExpr).getExpr() = ele and pred = "getExpr()"
or
expr.(DestructorFieldDestruction).getExpr() = ele and pred = "getExpr()"
or

View File

@@ -814,9 +814,6 @@ private predicate floatingPointTypeMapping(
// _Float128
kind = 49 and base = 2 and domain = TRealDomain() and realKind = 49 and extended = false
or
// _Float128x
kind = 50 and base = 2 and domain = TRealDomain() and realKind = 50 and extended = true
or
// _Float16
kind = 52 and base = 2 and domain = TRealDomain() and realKind = 52 and extended = false
or
@@ -1699,7 +1696,28 @@ class AutoType extends TemplateParameter {
private predicate suppressUnusedThis(Type t) { any() }
/** A source code location referring to a type */
/**
* A source code location referring to a user-defined type.
*
* Note that only _user-defined_ types have `TypeMention`s. In particular,
* built-in types, and derived types with built-in types as their base don't
* have any `TypeMention`s. For example, given
* ```cpp
* struct S { ... };
* void f(S s1, int i1) {
* S s2;
* S* s3;
* S& s4 = s2;
* decltype(s2) s5;
*
* int i2;
* int* i3;
* int i4[10];
* }
* ```
* there will be a `TypeMention` for the mention of `S` at `S s1`, `S s2`, and `S& s4 = s2`,
* but not at `decltype(s2) s5`. Additionally, there will be no `TypeMention`s for `int`.
*/
class TypeMention extends Locatable, @type_mention {
override string toString() { result = "type mention" }

View File

@@ -8,7 +8,7 @@ import cpp
*/
deprecated class StrcatFunction extends Function {
StrcatFunction() {
getName() =
this.getName() =
[
"strcat", // strcat(dst, src)
"strncat", // strncat(dst, src, max_amount)

View File

@@ -98,7 +98,7 @@ library class DefOrUse extends ControlFlowNodeBase {
pragma[noinline]
private predicate reaches_helper(boolean isDef, SemanticStackVariable v, BasicBlock bb, int i) {
getVariable(isDef) = v and
this.getVariable(isDef) = v and
bb.getNode(i) = this
}
@@ -118,21 +118,21 @@ library class DefOrUse extends ControlFlowNodeBase {
* predicates are duplicated for now.
*/
exists(BasicBlock bb, int i | reaches_helper(isDef, v, bb, i) |
exists(BasicBlock bb, int i | this.reaches_helper(isDef, v, bb, i) |
exists(int j |
j > i and
(bbDefAt(bb, j, v, defOrUse) or bbUseAt(bb, j, v, defOrUse)) and
not exists(int k | firstBarrierAfterThis(isDef, k, v) and k < j)
not exists(int k | this.firstBarrierAfterThis(isDef, k, v) and k < j)
)
or
not firstBarrierAfterThis(isDef, _, v) and
not this.firstBarrierAfterThis(isDef, _, v) and
bbSuccessorEntryReachesDefOrUse(bb, v, defOrUse, _)
)
}
private predicate firstBarrierAfterThis(boolean isDef, int j, SemanticStackVariable v) {
exists(BasicBlock bb, int i |
getVariable(isDef) = v and
this.getVariable(isDef) = v and
bb.getNode(i) = this and
j = min(int k | bbBarrierAt(bb, k, v, _) and k > i)
)

View File

@@ -627,6 +627,20 @@ private predicate sub_lt(
x = int_value(rhs.getRight()) and
k = c - x
)
or
exists(PointerSubInstruction lhs, int c, int x |
compares_lt(cmp, lhs.getAUse(), right, c, isLt, testIsTrue) and
left = lhs.getLeftOperand() and
x = int_value(lhs.getRight()) and
k = c + x
)
or
exists(PointerSubInstruction rhs, int c, int x |
compares_lt(cmp, left, rhs.getAUse(), c, isLt, testIsTrue) and
right = rhs.getLeftOperand() and
x = int_value(rhs.getRight()) and
k = c - x
)
}
// left + x < right + c => left < right + (c-x)
@@ -653,6 +667,26 @@ private predicate add_lt(
) and
k = c + x
)
or
exists(PointerAddInstruction lhs, int c, int x |
compares_lt(cmp, lhs.getAUse(), right, c, isLt, testIsTrue) and
(
left = lhs.getLeftOperand() and x = int_value(lhs.getRight())
or
left = lhs.getRightOperand() and x = int_value(lhs.getLeft())
) and
k = c - x
)
or
exists(PointerAddInstruction rhs, int c, int x |
compares_lt(cmp, left, rhs.getAUse(), c, isLt, testIsTrue) and
(
right = rhs.getLeftOperand() and x = int_value(rhs.getRight())
or
right = rhs.getRightOperand() and x = int_value(rhs.getLeft())
) and
k = c + x
)
}
// left - x == right + c => left == right + (c+x)
@@ -673,6 +707,20 @@ private predicate sub_eq(
x = int_value(rhs.getRight()) and
k = c - x
)
or
exists(PointerSubInstruction lhs, int c, int x |
compares_eq(cmp, lhs.getAUse(), right, c, areEqual, testIsTrue) and
left = lhs.getLeftOperand() and
x = int_value(lhs.getRight()) and
k = c + x
)
or
exists(PointerSubInstruction rhs, int c, int x |
compares_eq(cmp, left, rhs.getAUse(), c, areEqual, testIsTrue) and
right = rhs.getLeftOperand() and
x = int_value(rhs.getRight()) and
k = c - x
)
}
// left + x == right + c => left == right + (c-x)
@@ -699,6 +747,26 @@ private predicate add_eq(
) and
k = c + x
)
or
exists(PointerAddInstruction lhs, int c, int x |
compares_eq(cmp, lhs.getAUse(), right, c, areEqual, testIsTrue) and
(
left = lhs.getLeftOperand() and x = int_value(lhs.getRight())
or
left = lhs.getRightOperand() and x = int_value(lhs.getLeft())
) and
k = c - x
)
or
exists(PointerAddInstruction rhs, int c, int x |
compares_eq(cmp, left, rhs.getAUse(), c, areEqual, testIsTrue) and
(
right = rhs.getLeftOperand() and x = int_value(rhs.getRight())
or
right = rhs.getRightOperand() and x = int_value(rhs.getLeft())
) and
k = c + x
)
}
/** The int value of integer constant expression. */

View File

@@ -14,9 +14,6 @@ library class StandardSsa extends SsaHelper {
StandardSsa() { this = 0 }
}
/** DEPRECATED: Alias for StandardSsa */
deprecated class StandardSSA = StandardSsa;
/**
* A definition of one or more SSA variables, including phi node definitions.
* An _SSA variable_, as defined in the literature, is effectively the pair of

View File

@@ -130,7 +130,7 @@ library class SsaHelper extends int {
* Remove any custom phi nodes that are invalid.
*/
private predicate sanitized_custom_phi_node(StackVariable v, BasicBlock b) {
custom_phi_node(v, b) and
this.custom_phi_node(v, b) and
not addressTakenVariable(v) and
not isReferenceVar(v) and
b.isReachable()
@@ -142,7 +142,7 @@ library class SsaHelper extends int {
*/
cached
predicate phi_node(StackVariable v, BasicBlock b) {
frontier_phi_node(v, b) or sanitized_custom_phi_node(v, b)
this.frontier_phi_node(v, b) or this.sanitized_custom_phi_node(v, b)
}
/**
@@ -154,14 +154,15 @@ library class SsaHelper extends int {
*/
private predicate frontier_phi_node(StackVariable v, BasicBlock b) {
exists(BasicBlock x |
dominanceFrontier(x, b) and ssa_defn_rec(pragma[only_bind_into](v), pragma[only_bind_into](x))
dominanceFrontier(x, b) and
this.ssa_defn_rec(pragma[only_bind_into](v), pragma[only_bind_into](x))
) and
/* We can also eliminate those nodes where the variable is not live on any incoming edge */
live_at_start_of_bb(pragma[only_bind_into](v), b)
}
private predicate ssa_defn_rec(StackVariable v, BasicBlock b) {
phi_node(v, b)
this.phi_node(v, b)
or
variableUpdate(v, _, b, _)
}
@@ -172,7 +173,7 @@ library class SsaHelper extends int {
*/
cached
predicate ssa_defn(StackVariable v, ControlFlowNode node, BasicBlock b, int index) {
phi_node(v, b) and b.getStart() = node and index = -1
this.phi_node(v, b) and b.getStart() = node and index = -1
or
variableUpdate(v, node, b, index)
}
@@ -196,7 +197,7 @@ library class SsaHelper extends int {
* basic blocks.
*/
private predicate defUseRank(StackVariable v, BasicBlock b, int rankix, int i) {
i = rank[rankix](int j | ssa_defn(v, _, b, j) or ssa_use(v, _, b, j))
i = rank[rankix](int j | this.ssa_defn(v, _, b, j) or ssa_use(v, _, b, j))
}
/**
@@ -206,7 +207,7 @@ library class SsaHelper extends int {
* the block.
*/
private int lastRank(StackVariable v, BasicBlock b) {
result = max(int rankix | defUseRank(v, b, rankix, _)) + 1
result = max(int rankix | this.defUseRank(v, b, rankix, _)) + 1
}
/**
@@ -215,8 +216,8 @@ library class SsaHelper extends int {
*/
private predicate ssaDefRank(StackVariable v, ControlFlowNode def, BasicBlock b, int rankix) {
exists(int i |
ssa_defn(v, def, b, i) and
defUseRank(v, b, rankix, i)
this.ssa_defn(v, def, b, i) and
this.defUseRank(v, b, rankix, i)
)
}
@@ -232,21 +233,21 @@ library class SsaHelper extends int {
// use is understood to happen _before_ the definition. Phi nodes are
// at rankidx -1 and will therefore always reach the first node in the
// basic block.
ssaDefRank(v, def, b, rankix - 1)
this.ssaDefRank(v, def, b, rankix - 1)
or
ssaDefReachesRank(v, def, b, rankix - 1) and
rankix <= lastRank(v, b) and // Without this, the predicate would be infinite.
not ssaDefRank(v, _, b, rankix - 1) // Range is inclusive of but not past next def.
this.ssaDefReachesRank(v, def, b, rankix - 1) and
rankix <= this.lastRank(v, b) and // Without this, the predicate would be infinite.
not this.ssaDefRank(v, _, b, rankix - 1) // Range is inclusive of but not past next def.
}
/** Holds if SSA variable `(v, def)` reaches the end of block `b`. */
cached
predicate ssaDefinitionReachesEndOfBB(StackVariable v, ControlFlowNode def, BasicBlock b) {
live_at_exit_of_bb(v, b) and ssaDefReachesRank(v, def, b, lastRank(v, b))
live_at_exit_of_bb(v, b) and this.ssaDefReachesRank(v, def, b, this.lastRank(v, b))
or
exists(BasicBlock idom |
ssaDefinitionReachesEndOfBB(v, def, idom) and
noDefinitionsSinceIDominator(v, idom, b)
this.ssaDefinitionReachesEndOfBB(v, def, idom) and
this.noDefinitionsSinceIDominator(v, idom, b)
)
}
@@ -260,7 +261,7 @@ library class SsaHelper extends int {
private predicate noDefinitionsSinceIDominator(StackVariable v, BasicBlock idom, BasicBlock b) {
bbIDominates(idom, b) and // It is sufficient to traverse the dominator graph, cf. discussion above.
live_at_exit_of_bb(v, b) and
not ssa_defn(v, _, b, _)
not this.ssa_defn(v, _, b, _)
}
/**
@@ -269,8 +270,8 @@ library class SsaHelper extends int {
*/
private predicate ssaDefinitionReachesUseWithinBB(StackVariable v, ControlFlowNode def, Expr use) {
exists(BasicBlock b, int rankix, int i |
ssaDefReachesRank(v, def, b, rankix) and
defUseRank(v, b, rankix, i) and
this.ssaDefReachesRank(v, def, b, rankix) and
this.defUseRank(v, b, rankix, i) and
ssa_use(v, use, b, i)
)
}
@@ -279,12 +280,12 @@ library class SsaHelper extends int {
* Holds if SSA variable `(v, def)` reaches the control-flow node `use`.
*/
private predicate ssaDefinitionReaches(StackVariable v, ControlFlowNode def, Expr use) {
ssaDefinitionReachesUseWithinBB(v, def, use)
this.ssaDefinitionReachesUseWithinBB(v, def, use)
or
exists(BasicBlock b |
ssa_use(v, use, b, _) and
ssaDefinitionReachesEndOfBB(v, def, b.getAPredecessor()) and
not ssaDefinitionReachesUseWithinBB(v, _, use)
this.ssaDefinitionReachesEndOfBB(v, def, b.getAPredecessor()) and
not this.ssaDefinitionReachesUseWithinBB(v, _, use)
)
}
@@ -294,10 +295,10 @@ library class SsaHelper extends int {
*/
cached
string toString(ControlFlowNode node, StackVariable v) {
if phi_node(v, node)
if this.phi_node(v, node)
then result = "SSA phi(" + v.getName() + ")"
else (
ssa_defn(v, node, _, _) and result = "SSA def(" + v.getName() + ")"
this.ssa_defn(v, node, _, _) and result = "SSA def(" + v.getName() + ")"
)
}
@@ -307,10 +308,7 @@ library class SsaHelper extends int {
*/
cached
VariableAccess getAUse(ControlFlowNode def, StackVariable v) {
ssaDefinitionReaches(v, def, result) and
this.ssaDefinitionReaches(v, def, result) and
ssa_use(v, result, _, _)
}
}
/** DEPRECATED: Alias for SsaHelper */
deprecated class SSAHelper = SsaHelper;

View File

@@ -25,7 +25,7 @@ import cpp
*/
abstract class StackVariableReachability extends string {
bindingset[this]
StackVariableReachability() { length() >= 0 }
StackVariableReachability() { this.length() >= 0 }
/** Holds if `node` is a source for the reachability analysis using variable `v`. */
abstract predicate isSource(ControlFlowNode node, StackVariable v);
@@ -227,7 +227,7 @@ predicate bbSuccessorEntryReachesLoopInvariant(
*/
abstract class StackVariableReachabilityWithReassignment extends StackVariableReachability {
bindingset[this]
StackVariableReachabilityWithReassignment() { length() >= 0 }
StackVariableReachabilityWithReassignment() { this.length() >= 0 }
/** Override this predicate rather than `isSource` (`isSource` is used internally). */
abstract predicate isSourceActual(ControlFlowNode node, StackVariable v);
@@ -330,7 +330,7 @@ abstract class StackVariableReachabilityWithReassignment extends StackVariableRe
*/
abstract class StackVariableReachabilityExt extends string {
bindingset[this]
StackVariableReachabilityExt() { length() >= 0 }
StackVariableReachabilityExt() { this.length() >= 0 }
/** `node` is a source for the reachability analysis using variable `v`. */
abstract predicate isSource(ControlFlowNode node, StackVariable v);

View File

@@ -332,21 +332,12 @@ private Node getControlOrderChildSparse(Node n, int i) {
n = any(ConditionDeclExpr cd | i = 0 and result = cd.getInitializingExpr())
or
n =
any(DeleteExpr del |
any(DeleteOrDeleteArrayExpr del |
i = 0 and result = del.getExpr()
or
i = 1 and result = del.getDestructorCall()
or
i = 2 and result = del.getAllocatorCall()
)
or
n =
any(DeleteArrayExpr del |
i = 0 and result = del.getExpr()
or
i = 1 and result = del.getDestructorCall()
or
i = 2 and result = del.getAllocatorCall()
i = 2 and result = del.getDeallocatorCall()
)
or
n =
@@ -1385,9 +1376,6 @@ private module Cached {
conditionalSuccessor(n1, _, n2)
}
/** DEPRECATED: Alias for qlCfgSuccessor */
deprecated predicate qlCFGSuccessor = qlCfgSuccessor/2;
/**
* Holds if `n2` is a control-flow node such that the control-flow
* edge `(n1, n2)` may be taken when `n1` is an expression that is true.
@@ -1398,9 +1386,6 @@ private module Cached {
not conditionalSuccessor(n1, false, n2)
}
/** DEPRECATED: Alias for qlCfgTrueSuccessor */
deprecated predicate qlCFGTrueSuccessor = qlCfgTrueSuccessor/2;
/**
* Holds if `n2` is a control-flow node such that the control-flow
* edge `(n1, n2)` may be taken when `n1` is an expression that is false.
@@ -1410,7 +1395,4 @@ private module Cached {
conditionalSuccessor(n1, false, n2) and
not conditionalSuccessor(n1, true, n2)
}
/** DEPRECATED: Alias for qlCfgFalseSuccessor */
deprecated predicate qlCFGFalseSuccessor = qlCfgFalseSuccessor/2;
}

View File

@@ -20,10 +20,14 @@
import cpp
/**
* DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow` instead.
*
* Provides classes for performing local (intra-procedural) and
* global (inter-procedural) data flow analyses.
*/
module DataFlow {
import semmle.code.cpp.dataflow.internal.DataFlow
deprecated module DataFlow {
private import semmle.code.cpp.dataflow.internal.DataFlowImplSpecific
private import codeql.dataflow.DataFlow
import DataFlowMake<CppOldDataFlow>
import semmle.code.cpp.dataflow.internal.DataFlowImpl1
}

View File

@@ -12,9 +12,11 @@
import cpp
/**
* DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow2` instead.
*
* Provides classes for performing local (intra-procedural) and
* global (inter-procedural) data flow analyses.
*/
module DataFlow2 {
deprecated module DataFlow2 {
import semmle.code.cpp.dataflow.internal.DataFlowImpl2
}

View File

@@ -12,9 +12,11 @@
import cpp
/**
* DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow3` instead.
*
* Provides classes for performing local (intra-procedural) and
* global (inter-procedural) data flow analyses.
*/
module DataFlow3 {
deprecated module DataFlow3 {
import semmle.code.cpp.dataflow.internal.DataFlowImpl3
}

View File

@@ -12,9 +12,11 @@
import cpp
/**
* DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow4` instead.
*
* Provides classes for performing local (intra-procedural) and
* global (inter-procedural) data flow analyses.
*/
module DataFlow4 {
deprecated module DataFlow4 {
import semmle.code.cpp.dataflow.internal.DataFlowImpl4
}

View File

@@ -19,10 +19,16 @@ import semmle.code.cpp.dataflow.DataFlow
import semmle.code.cpp.dataflow.DataFlow2
/**
* DEPRECATED: Use `semmle.code.cpp.dataflow.new.TaintTracking` instead.
*
* Provides classes for performing local (intra-procedural) and
* global (inter-procedural) taint-tracking analyses.
*/
module TaintTracking {
import semmle.code.cpp.dataflow.internal.tainttracking1.TaintTracking
deprecated module TaintTracking {
import semmle.code.cpp.dataflow.internal.tainttracking1.TaintTrackingParameter::Public
private import semmle.code.cpp.dataflow.internal.DataFlowImplSpecific
private import semmle.code.cpp.dataflow.internal.TaintTrackingImplSpecific
private import codeql.dataflow.TaintTracking
import TaintFlowMake<CppOldDataFlow, CppOldTaintTracking>
import semmle.code.cpp.dataflow.internal.tainttracking1.TaintTrackingImpl
}

View File

@@ -12,9 +12,11 @@
*/
/**
* DEPRECATED: Use `semmle.code.cpp.dataflow.new.TaintTracking2` instead.
*
* Provides classes for performing local (intra-procedural) and
* global (inter-procedural) taint-tracking analyses.
*/
module TaintTracking2 {
deprecated module TaintTracking2 {
import semmle.code.cpp.dataflow.internal.tainttracking2.TaintTrackingImpl
}

View File

@@ -1,363 +0,0 @@
/**
* Provides an implementation of global (interprocedural) data flow. This file
* re-exports the local (intraprocedural) data flow analysis from
* `DataFlowImplSpecific::Public` and adds a global analysis, mainly exposed
* through the `Global` and `GlobalWithState` modules.
*/
private import DataFlowImplCommon
private import DataFlowImplSpecific::Private
import DataFlowImplSpecific::Public
import DataFlowImplCommonPublic
private import DataFlowImpl
/** An input configuration for data flow. */
signature module ConfigSig {
/**
* Holds if `source` is a relevant data flow source.
*/
predicate isSource(Node source);
/**
* Holds if `sink` is a relevant data flow sink.
*/
predicate isSink(Node sink);
/**
* Holds if data flow through `node` is prohibited. This completely removes
* `node` from the data flow graph.
*/
default predicate isBarrier(Node node) { none() }
/** Holds if data flow into `node` is prohibited. */
default predicate isBarrierIn(Node node) { none() }
/** Holds if data flow out of `node` is prohibited. */
default predicate isBarrierOut(Node node) { none() }
/**
* Holds if data may flow from `node1` to `node2` in addition to the normal data-flow steps.
*/
default predicate isAdditionalFlowStep(Node node1, Node node2) { none() }
/**
* Holds if an arbitrary number of implicit read steps of content `c` may be
* taken at `node`.
*/
default predicate allowImplicitRead(Node node, ContentSet c) { none() }
/**
* Gets the virtual dispatch branching limit when calculating field flow.
* This can be overridden to a smaller value to improve performance (a
* value of 0 disables field flow), or a larger value to get more results.
*/
default int fieldFlowBranchLimit() { result = 2 }
/**
* Gets a data flow configuration feature to add restrictions to the set of
* valid flow paths.
*
* - `FeatureHasSourceCallContext`:
* Assume that sources have some existing call context to disallow
* conflicting return-flow directly following the source.
* - `FeatureHasSinkCallContext`:
* Assume that sinks have some existing call context to disallow
* conflicting argument-to-parameter flow directly preceding the sink.
* - `FeatureEqualSourceSinkCallContext`:
* Implies both of the above and additionally ensures that the entire flow
* path preserves the call context.
*
* These features are generally not relevant for typical end-to-end data flow
* queries, but should only be used for constructing paths that need to
* somehow be pluggable in another path context.
*/
default FlowFeature getAFeature() { none() }
/** Holds if sources should be grouped in the result of `flowPath`. */
default predicate sourceGrouping(Node source, string sourceGroup) { none() }
/** Holds if sinks should be grouped in the result of `flowPath`. */
default predicate sinkGrouping(Node sink, string sinkGroup) { none() }
/**
* Holds if hidden nodes should be included in the data flow graph.
*
* This feature should only be used for debugging or when the data flow graph
* is not visualized (as it is in a `path-problem` query).
*/
default predicate includeHiddenNodes() { none() }
}
/** An input configuration for data flow using flow state. */
signature module StateConfigSig {
bindingset[this]
class FlowState;
/**
* Holds if `source` is a relevant data flow source with the given initial
* `state`.
*/
predicate isSource(Node source, FlowState state);
/**
* Holds if `sink` is a relevant data flow sink accepting `state`.
*/
predicate isSink(Node sink, FlowState state);
/**
* Holds if data flow through `node` is prohibited. This completely removes
* `node` from the data flow graph.
*/
default predicate isBarrier(Node node) { none() }
/**
* Holds if data flow through `node` is prohibited when the flow state is
* `state`.
*/
predicate isBarrier(Node node, FlowState state);
/** Holds if data flow into `node` is prohibited. */
default predicate isBarrierIn(Node node) { none() }
/** Holds if data flow out of `node` is prohibited. */
default predicate isBarrierOut(Node node) { none() }
/**
* Holds if data may flow from `node1` to `node2` in addition to the normal data-flow steps.
*/
default predicate isAdditionalFlowStep(Node node1, Node node2) { none() }
/**
* Holds if data may flow from `node1` to `node2` in addition to the normal data-flow steps.
* This step is only applicable in `state1` and updates the flow state to `state2`.
*/
predicate isAdditionalFlowStep(Node node1, FlowState state1, Node node2, FlowState state2);
/**
* Holds if an arbitrary number of implicit read steps of content `c` may be
* taken at `node`.
*/
default predicate allowImplicitRead(Node node, ContentSet c) { none() }
/**
* Gets the virtual dispatch branching limit when calculating field flow.
* This can be overridden to a smaller value to improve performance (a
* value of 0 disables field flow), or a larger value to get more results.
*/
default int fieldFlowBranchLimit() { result = 2 }
/**
* Gets a data flow configuration feature to add restrictions to the set of
* valid flow paths.
*
* - `FeatureHasSourceCallContext`:
* Assume that sources have some existing call context to disallow
* conflicting return-flow directly following the source.
* - `FeatureHasSinkCallContext`:
* Assume that sinks have some existing call context to disallow
* conflicting argument-to-parameter flow directly preceding the sink.
* - `FeatureEqualSourceSinkCallContext`:
* Implies both of the above and additionally ensures that the entire flow
* path preserves the call context.
*
* These features are generally not relevant for typical end-to-end data flow
* queries, but should only be used for constructing paths that need to
* somehow be pluggable in another path context.
*/
default FlowFeature getAFeature() { none() }
/** Holds if sources should be grouped in the result of `flowPath`. */
default predicate sourceGrouping(Node source, string sourceGroup) { none() }
/** Holds if sinks should be grouped in the result of `flowPath`. */
default predicate sinkGrouping(Node sink, string sinkGroup) { none() }
/**
* Holds if hidden nodes should be included in the data flow graph.
*
* This feature should only be used for debugging or when the data flow graph
* is not visualized (as it is in a `path-problem` query).
*/
default predicate includeHiddenNodes() { none() }
}
/**
* Gets the exploration limit for `partialFlow` and `partialFlowRev`
* measured in approximate number of interprocedural steps.
*/
signature int explorationLimitSig();
/**
* The output of a global data flow computation.
*/
signature module GlobalFlowSig {
/**
* A `Node` augmented with a call context (except for sinks) and an access path.
* Only those `PathNode`s that are reachable from a source, and which can reach a sink, are generated.
*/
class PathNode;
/**
* Holds if data can flow from `source` to `sink`.
*
* The corresponding paths are generated from the end-points and the graph
* included in the module `PathGraph`.
*/
predicate flowPath(PathNode source, PathNode sink);
/**
* Holds if data can flow from `source` to `sink`.
*/
predicate flow(Node source, Node sink);
/**
* Holds if data can flow from some source to `sink`.
*/
predicate flowTo(Node sink);
/**
* Holds if data can flow from some source to `sink`.
*/
predicate flowToExpr(DataFlowExpr sink);
}
/**
* Constructs a global data flow computation.
*/
module Global<ConfigSig Config> implements GlobalFlowSig {
private module C implements FullStateConfigSig {
import DefaultState<Config>
import Config
}
import Impl<C>
}
/** DEPRECATED: Use `Global` instead. */
deprecated module Make<ConfigSig Config> implements GlobalFlowSig {
import Global<Config>
}
/**
* Constructs a global data flow computation using flow state.
*/
module GlobalWithState<StateConfigSig Config> implements GlobalFlowSig {
private module C implements FullStateConfigSig {
import Config
}
import Impl<C>
}
/** DEPRECATED: Use `GlobalWithState` instead. */
deprecated module MakeWithState<StateConfigSig Config> implements GlobalFlowSig {
import GlobalWithState<Config>
}
signature class PathNodeSig {
/** Gets a textual representation of this element. */
string toString();
/**
* Holds if this element is at the specified location.
* The location spans column `startcolumn` of line `startline` to
* column `endcolumn` of line `endline` in file `filepath`.
* For more information, see
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
*/
predicate hasLocationInfo(
string filepath, int startline, int startcolumn, int endline, int endcolumn
);
/** Gets the underlying `Node`. */
Node getNode();
}
signature module PathGraphSig<PathNodeSig PathNode> {
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
predicate edges(PathNode a, PathNode b);
/** Holds if `n` is a node in the graph of data flow path explanations. */
predicate nodes(PathNode n, string key, string val);
/**
* Holds if `(arg, par, ret, out)` forms a subpath-tuple, that is, flow through
* a subpath between `par` and `ret` with the connecting edges `arg -> par` and
* `ret -> out` is summarized as the edge `arg -> out`.
*/
predicate subpaths(PathNode arg, PathNode par, PathNode ret, PathNode out);
}
/**
* Constructs a `PathGraph` from two `PathGraph`s by disjoint union.
*/
module MergePathGraph<
PathNodeSig PathNode1, PathNodeSig PathNode2, PathGraphSig<PathNode1> Graph1,
PathGraphSig<PathNode2> Graph2>
{
private newtype TPathNode =
TPathNode1(PathNode1 p) or
TPathNode2(PathNode2 p)
/** A node in a graph of path explanations that is formed by disjoint union of the two given graphs. */
class PathNode extends TPathNode {
/** Gets this as a projection on the first given `PathGraph`. */
PathNode1 asPathNode1() { this = TPathNode1(result) }
/** Gets this as a projection on the second given `PathGraph`. */
PathNode2 asPathNode2() { this = TPathNode2(result) }
/** Gets a textual representation of this element. */
string toString() {
result = this.asPathNode1().toString() or
result = this.asPathNode2().toString()
}
/**
* Holds if this element is at the specified location.
* The location spans column `startcolumn` of line `startline` to
* column `endcolumn` of line `endline` in file `filepath`.
* For more information, see
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
*/
predicate hasLocationInfo(
string filepath, int startline, int startcolumn, int endline, int endcolumn
) {
this.asPathNode1().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) or
this.asPathNode2().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
}
/** Gets the underlying `Node`. */
Node getNode() {
result = this.asPathNode1().getNode() or
result = this.asPathNode2().getNode()
}
}
/**
* Provides the query predicates needed to include a graph in a path-problem query.
*/
module PathGraph implements PathGraphSig<PathNode> {
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
query predicate edges(PathNode a, PathNode b) {
Graph1::edges(a.asPathNode1(), b.asPathNode1()) or
Graph2::edges(a.asPathNode2(), b.asPathNode2())
}
/** Holds if `n` is a node in the graph of data flow path explanations. */
query predicate nodes(PathNode n, string key, string val) {
Graph1::nodes(n.asPathNode1(), key, val) or
Graph2::nodes(n.asPathNode2(), key, val)
}
/**
* Holds if `(arg, par, ret, out)` forms a subpath-tuple, that is, flow through
* a subpath between `par` and `ret` with the connecting edges `arg -> par` and
* `ret -> out` is summarized as the edge `arg -> out`.
*/
query predicate subpaths(PathNode arg, PathNode par, PathNode ret, PathNode out) {
Graph1::subpaths(arg.asPathNode1(), par.asPathNode1(), ret.asPathNode1(), out.asPathNode1()) or
Graph2::subpaths(arg.asPathNode2(), par.asPathNode2(), ret.asPathNode2(), out.asPathNode2())
}
}
}

View File

@@ -5,8 +5,8 @@ private import DataFlowUtil
/**
* Gets a function that might be called by `call`.
*/
Function viableCallable(Call call) {
result = call.getTarget()
Function viableCallable(DataFlowCall call) {
result = call.(Call).getTarget()
or
// If the target of the call does not have a body in the snapshot, it might
// be because the target is just a header declaration, and the real target
@@ -58,13 +58,13 @@ private predicate functionSignature(Function f, string qualifiedName, int nparam
* Holds if the set of viable implementations that can be called by `call`
* might be improved by knowing the call context.
*/
predicate mayBenefitFromCallContext(Call call, Function f) { none() }
predicate mayBenefitFromCallContext(DataFlowCall call, Function f) { none() }
/**
* Gets a viable dispatch target of `call` in the context `ctx`. This is
* restricted to those `call`s for which a context might make a difference.
*/
Function viableImplInCallContext(Call call, Call ctx) { none() }
Function viableImplInCallContext(DataFlowCall call, DataFlowCall ctx) { none() }
/** A parameter position represented by an integer. */
class ParameterPosition extends int {

File diff suppressed because it is too large Load Diff

View File

@@ -276,6 +276,8 @@ private module Config implements FullStateConfigSig {
getConfig(state).isSource(source) and getState(state) instanceof FlowStateEmpty
}
predicate isSink(Node sink) { none() }
predicate isSink(Node sink, FlowState state) {
getConfig(state).isSink(sink, getState(state))
or
@@ -313,6 +315,8 @@ private module Config implements FullStateConfigSig {
any(Configuration config).allowImplicitRead(node, c)
}
predicate neverSkip(Node node) { none() }
int fieldFlowBranchLimit() { result = min(any(Configuration config).fieldFlowBranchLimit()) }
FlowFeature getAFeature() { result = any(Configuration config).getAFeature() }

View File

@@ -276,6 +276,8 @@ private module Config implements FullStateConfigSig {
getConfig(state).isSource(source) and getState(state) instanceof FlowStateEmpty
}
predicate isSink(Node sink) { none() }
predicate isSink(Node sink, FlowState state) {
getConfig(state).isSink(sink, getState(state))
or
@@ -313,6 +315,8 @@ private module Config implements FullStateConfigSig {
any(Configuration config).allowImplicitRead(node, c)
}
predicate neverSkip(Node node) { none() }
int fieldFlowBranchLimit() { result = min(any(Configuration config).fieldFlowBranchLimit()) }
FlowFeature getAFeature() { result = any(Configuration config).getAFeature() }

View File

@@ -276,6 +276,8 @@ private module Config implements FullStateConfigSig {
getConfig(state).isSource(source) and getState(state) instanceof FlowStateEmpty
}
predicate isSink(Node sink) { none() }
predicate isSink(Node sink, FlowState state) {
getConfig(state).isSink(sink, getState(state))
or
@@ -313,6 +315,8 @@ private module Config implements FullStateConfigSig {
any(Configuration config).allowImplicitRead(node, c)
}
predicate neverSkip(Node node) { none() }
int fieldFlowBranchLimit() { result = min(any(Configuration config).fieldFlowBranchLimit()) }
FlowFeature getAFeature() { result = any(Configuration config).getAFeature() }

View File

@@ -276,6 +276,8 @@ private module Config implements FullStateConfigSig {
getConfig(state).isSource(source) and getState(state) instanceof FlowStateEmpty
}
predicate isSink(Node sink) { none() }
predicate isSink(Node sink, FlowState state) {
getConfig(state).isSink(sink, getState(state))
or
@@ -313,6 +315,8 @@ private module Config implements FullStateConfigSig {
any(Configuration config).allowImplicitRead(node, c)
}
predicate neverSkip(Node node) { none() }
int fieldFlowBranchLimit() { result = min(any(Configuration config).fieldFlowBranchLimit()) }
FlowFeature getAFeature() { result = any(Configuration config).getAFeature() }

View File

@@ -3,288 +3,25 @@
* data-flow classes and predicates.
*/
private import DataFlowImplSpecific::Private
private import DataFlowImplSpecific::Public
private import tainttracking1.TaintTrackingParameter::Private
private import tainttracking1.TaintTrackingParameter::Public
private import cpp
private import DataFlowImplSpecific
private import TaintTrackingImplSpecific
private import codeql.dataflow.internal.DataFlowImplConsistency
module Consistency {
private newtype TConsistencyConfiguration = MkConsistencyConfiguration()
/** A class for configuring the consistency queries. */
class ConsistencyConfiguration extends TConsistencyConfiguration {
string toString() { none() }
/** Holds if `n` should be excluded from the consistency test `uniqueEnclosingCallable`. */
predicate uniqueEnclosingCallableExclude(Node n) { none() }
/** Holds if `call` should be excluded from the consistency test `uniqueCallEnclosingCallable`. */
predicate uniqueCallEnclosingCallableExclude(DataFlowCall call) { none() }
/** Holds if `n` should be excluded from the consistency test `uniqueNodeLocation`. */
predicate uniqueNodeLocationExclude(Node n) { none() }
/** Holds if `n` should be excluded from the consistency test `missingLocation`. */
predicate missingLocationExclude(Node n) { none() }
/** Holds if `n` should be excluded from the consistency test `postWithInFlow`. */
predicate postWithInFlowExclude(Node n) { none() }
/** Holds if `n` should be excluded from the consistency test `argHasPostUpdate`. */
predicate argHasPostUpdateExclude(ArgumentNode n) { none() }
/** Holds if `n` should be excluded from the consistency test `reverseRead`. */
predicate reverseReadExclude(Node n) { none() }
/** Holds if `n` should be excluded from the consistency test `postHasUniquePre`. */
predicate postHasUniquePreExclude(PostUpdateNode n) { none() }
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
predicate uniquePostUpdateExclude(Node n) { none() }
/** Holds if `(call, ctx)` should be excluded from the consistency test `viableImplInCallContextTooLargeExclude`. */
predicate viableImplInCallContextTooLargeExclude(
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
) {
none()
}
/** Holds if `(c, pos, p)` should be excluded from the consistency test `uniqueParameterNodeAtPosition`. */
predicate uniqueParameterNodeAtPositionExclude(DataFlowCallable c, ParameterPosition pos, Node p) {
none()
}
/** Holds if `(c, pos, p)` should be excluded from the consistency test `uniqueParameterNodePosition`. */
predicate uniqueParameterNodePositionExclude(DataFlowCallable c, ParameterPosition pos, Node p) {
none()
}
}
private class RelevantNode extends Node {
RelevantNode() {
this instanceof ArgumentNode or
this instanceof ParameterNode or
this instanceof ReturnNode or
this = getAnOutNode(_, _) or
simpleLocalFlowStep(this, _) or
simpleLocalFlowStep(_, this) or
jumpStep(this, _) or
jumpStep(_, this) or
storeStep(this, _, _) or
storeStep(_, _, this) or
readStep(this, _, _) or
readStep(_, _, this) or
defaultAdditionalTaintStep(this, _) or
defaultAdditionalTaintStep(_, this)
}
}
query predicate uniqueEnclosingCallable(Node n, string msg) {
exists(int c |
n instanceof RelevantNode and
c = count(nodeGetEnclosingCallable(n)) and
c != 1 and
not any(ConsistencyConfiguration conf).uniqueEnclosingCallableExclude(n) and
msg = "Node should have one enclosing callable but has " + c + "."
)
}
query predicate uniqueCallEnclosingCallable(DataFlowCall call, string msg) {
exists(int c |
c = count(call.getEnclosingCallable()) and
c != 1 and
not any(ConsistencyConfiguration conf).uniqueCallEnclosingCallableExclude(call) and
msg = "Call should have one enclosing callable but has " + c + "."
)
}
query predicate uniqueType(Node n, string msg) {
exists(int c |
n instanceof RelevantNode and
c = count(getNodeType(n)) and
c != 1 and
msg = "Node should have one type but has " + c + "."
)
}
query predicate uniqueNodeLocation(Node n, string msg) {
exists(int c |
c =
count(string filepath, int startline, int startcolumn, int endline, int endcolumn |
n.hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
) and
c != 1 and
not any(ConsistencyConfiguration conf).uniqueNodeLocationExclude(n) and
msg = "Node should have one location but has " + c + "."
)
}
query predicate missingLocation(string msg) {
exists(int c |
c =
strictcount(Node n |
not n.hasLocationInfo(_, _, _, _, _) and
not any(ConsistencyConfiguration conf).missingLocationExclude(n)
) and
msg = "Nodes without location: " + c
)
}
query predicate uniqueNodeToString(Node n, string msg) {
exists(int c |
c = count(n.toString()) and
c != 1 and
msg = "Node should have one toString but has " + c + "."
)
}
query predicate missingToString(string msg) {
exists(int c |
c = strictcount(Node n | not exists(n.toString())) and
msg = "Nodes without toString: " + c
)
}
query predicate parameterCallable(ParameterNode p, string msg) {
exists(DataFlowCallable c | isParameterNode(p, c, _) and c != nodeGetEnclosingCallable(p)) and
msg = "Callable mismatch for parameter."
}
query predicate localFlowIsLocal(Node n1, Node n2, string msg) {
simpleLocalFlowStep(n1, n2) and
nodeGetEnclosingCallable(n1) != nodeGetEnclosingCallable(n2) and
msg = "Local flow step does not preserve enclosing callable."
}
query predicate readStepIsLocal(Node n1, Node n2, string msg) {
readStep(n1, _, n2) and
nodeGetEnclosingCallable(n1) != nodeGetEnclosingCallable(n2) and
msg = "Read step does not preserve enclosing callable."
}
query predicate storeStepIsLocal(Node n1, Node n2, string msg) {
storeStep(n1, _, n2) and
nodeGetEnclosingCallable(n1) != nodeGetEnclosingCallable(n2) and
msg = "Store step does not preserve enclosing callable."
}
private DataFlowType typeRepr() { result = getNodeType(_) }
query predicate compatibleTypesReflexive(DataFlowType t, string msg) {
t = typeRepr() and
not compatibleTypes(t, t) and
msg = "Type compatibility predicate is not reflexive."
}
query predicate unreachableNodeCCtx(Node n, DataFlowCall call, string msg) {
isUnreachableInCall(n, call) and
exists(DataFlowCallable c |
c = nodeGetEnclosingCallable(n) and
not viableCallable(call) = c
) and
msg = "Call context for isUnreachableInCall is inconsistent with call graph."
}
query predicate localCallNodes(DataFlowCall call, Node n, string msg) {
(
n = getAnOutNode(call, _) and
msg = "OutNode and call does not share enclosing callable."
or
n.(ArgumentNode).argumentOf(call, _) and
msg = "ArgumentNode and call does not share enclosing callable."
) and
nodeGetEnclosingCallable(n) != call.getEnclosingCallable()
}
// This predicate helps the compiler forget that in some languages
// it is impossible for a result of `getPreUpdateNode` to be an
// instance of `PostUpdateNode`.
private Node getPre(PostUpdateNode n) {
result = n.getPreUpdateNode()
private module Input implements InputSig<CppOldDataFlow> {
predicate argHasPostUpdateExclude(Private::ArgumentNode n) {
// Is the null pointer (or something that's not really a pointer)
exists(n.asExpr().getValue())
or
none()
}
query predicate postIsNotPre(PostUpdateNode n, string msg) {
getPre(n) = n and
msg = "PostUpdateNode should not equal its pre-update node."
}
query predicate postHasUniquePre(PostUpdateNode n, string msg) {
not any(ConsistencyConfiguration conf).postHasUniquePreExclude(n) and
exists(int c |
c = count(n.getPreUpdateNode()) and
c != 1 and
msg = "PostUpdateNode should have one pre-update node but has " + c + "."
// Isn't a pointer or is a pointer to const
forall(DerivedType dt | dt = n.asExpr().getActualType() |
dt.getBaseType().isConst()
or
dt.getBaseType() instanceof RoutineType
)
}
query predicate uniquePostUpdate(Node n, string msg) {
not any(ConsistencyConfiguration conf).uniquePostUpdateExclude(n) and
1 < strictcount(PostUpdateNode post | post.getPreUpdateNode() = n) and
msg = "Node has multiple PostUpdateNodes."
}
query predicate postIsInSameCallable(PostUpdateNode n, string msg) {
nodeGetEnclosingCallable(n) != nodeGetEnclosingCallable(n.getPreUpdateNode()) and
msg = "PostUpdateNode does not share callable with its pre-update node."
}
private predicate hasPost(Node n) { exists(PostUpdateNode post | post.getPreUpdateNode() = n) }
query predicate reverseRead(Node n, string msg) {
exists(Node n2 | readStep(n, _, n2) and hasPost(n2) and not hasPost(n)) and
not any(ConsistencyConfiguration conf).reverseReadExclude(n) and
msg = "Origin of readStep is missing a PostUpdateNode."
}
query predicate argHasPostUpdate(ArgumentNode n, string msg) {
not hasPost(n) and
not any(ConsistencyConfiguration c).argHasPostUpdateExclude(n) and
msg = "ArgumentNode is missing PostUpdateNode."
}
// This predicate helps the compiler forget that in some languages
// it is impossible for a `PostUpdateNode` to be the target of
// `simpleLocalFlowStep`.
private predicate isPostUpdateNode(Node n) { n instanceof PostUpdateNode or none() }
query predicate postWithInFlow(Node n, string msg) {
isPostUpdateNode(n) and
not clearsContent(n, _) and
simpleLocalFlowStep(_, n) and
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
msg = "PostUpdateNode should not be the target of local flow."
}
query predicate viableImplInCallContextTooLarge(
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
) {
callable = viableImplInCallContext(call, ctx) and
not callable = viableCallable(call) and
not any(ConsistencyConfiguration c).viableImplInCallContextTooLargeExclude(call, ctx, callable)
}
query predicate uniqueParameterNodeAtPosition(
DataFlowCallable c, ParameterPosition pos, Node p, string msg
) {
not any(ConsistencyConfiguration conf).uniqueParameterNodeAtPositionExclude(c, pos, p) and
isParameterNode(p, c, pos) and
not exists(unique(Node p0 | isParameterNode(p0, c, pos))) and
msg = "Parameters with overlapping positions."
}
query predicate uniqueParameterNodePosition(
DataFlowCallable c, ParameterPosition pos, Node p, string msg
) {
not any(ConsistencyConfiguration conf).uniqueParameterNodePositionExclude(c, pos, p) and
isParameterNode(p, c, pos) and
not exists(unique(ParameterPosition pos0 | isParameterNode(p, c, pos0))) and
msg = "Parameter node with multiple positions."
}
query predicate uniqueContentApprox(Content c, string msg) {
not exists(unique(ContentApprox approx | approx = getContentApprox(c))) and
msg = "Non-unique content approximation."
// The above list of cases isn't exhaustive, but it narrows down the
// consistency alerts enough that most of them are interesting.
}
}
module Consistency = MakeConsistency<CppOldDataFlow, CppOldTaintTracking, Input>;

View File

@@ -276,6 +276,8 @@ private module Config implements FullStateConfigSig {
getConfig(state).isSource(source) and getState(state) instanceof FlowStateEmpty
}
predicate isSink(Node sink) { none() }
predicate isSink(Node sink, FlowState state) {
getConfig(state).isSink(sink, getState(state))
or
@@ -313,6 +315,8 @@ private module Config implements FullStateConfigSig {
any(Configuration config).allowImplicitRead(node, c)
}
predicate neverSkip(Node node) { none() }
int fieldFlowBranchLimit() { result = min(any(Configuration config).fieldFlowBranchLimit()) }
FlowFeature getAFeature() { result = any(Configuration config).getAFeature() }

View File

@@ -1,6 +1,9 @@
/**
* Provides C++-specific definitions for use in the data flow library.
*/
private import codeql.dataflow.DataFlow
module Private {
import DataFlowPrivate
import DataFlowDispatch
@@ -9,3 +12,10 @@ module Private {
module Public {
import DataFlowUtil
}
module CppOldDataFlow implements InputSig {
import Private
import Public
Node exprNode(DataFlowExpr e) { result = Public::exprNode(e) }
}

View File

@@ -2,7 +2,6 @@ private import cpp
private import DataFlowUtil
private import DataFlowDispatch
private import FlowVar
private import DataFlowImplConsistency
private import codeql.util.Unit
/** Gets the callable in which this node occurs. */
@@ -153,10 +152,11 @@ predicate jumpStep(Node n1, Node n2) { none() }
* Thus, `node2` references an object with a field `f` that contains the
* value of `node1`.
*/
predicate storeStep(Node node1, Content f, PostUpdateNode node2) {
predicate storeStep(Node node1, ContentSet f, Node node2) {
exists(ClassAggregateLiteral aggr, Field field |
// The following line requires `node2` to be both an `ExprNode` and a
// The following lines requires `node2` to be both an `ExprNode` and a
// `PostUpdateNode`, which means it must be an `ObjectInitializerNode`.
node2 instanceof PostUpdateNode and
node2.asExpr() = aggr and
f.(FieldContent).getField() = field and
aggr.getAFieldExpr(field) = node1.asExpr()
@@ -167,12 +167,13 @@ predicate storeStep(Node node1, Content f, PostUpdateNode node2) {
node1.asExpr() = a and
a.getLValue() = fa
) and
node2.getPreUpdateNode().asExpr() = fa.getQualifier() and
node2.(PostUpdateNode).getPreUpdateNode().asExpr() = fa.getQualifier() and
f.(FieldContent).getField() = fa.getTarget()
)
or
exists(ConstructorFieldInit cfi |
node2.getPreUpdateNode().(PreConstructorInitThis).getConstructorFieldInit() = cfi and
node2.(PostUpdateNode).getPreUpdateNode().(PreConstructorInitThis).getConstructorFieldInit() =
cfi and
f.(FieldContent).getField() = cfi.getTarget() and
node1.asExpr() = cfi.getExpr()
)
@@ -183,7 +184,7 @@ predicate storeStep(Node node1, Content f, PostUpdateNode node2) {
* Thus, `node1` references an object with a field `f` whose value ends up in
* `node2`.
*/
predicate readStep(Node node1, Content f, Node node2) {
predicate readStep(Node node1, ContentSet f, Node node2) {
exists(FieldAccess fr |
node1.asExpr() = fr.getQualifier() and
fr.getTarget() = f.(FieldContent).getField() and
@@ -195,7 +196,7 @@ predicate readStep(Node node1, Content f, Node node2) {
/**
* Holds if values stored inside content `c` are cleared at node `n`.
*/
predicate clearsContent(Node n, Content c) {
predicate clearsContent(Node n, ContentSet c) {
none() // stub implementation
}
@@ -205,6 +206,8 @@ predicate clearsContent(Node n, Content c) {
*/
predicate expectsContent(Node n, ContentSet c) { none() }
predicate typeStrongerThan(DataFlowType t1, DataFlowType t2) { none() }
/** Gets the type of `n` used for type pruning. */
Type getNodeType(Node n) {
suppressUnusedNode(n) and
@@ -257,8 +260,6 @@ class DataFlowCall extends Expr instanceof Call {
predicate isUnreachableInCall(Node n, DataFlowCall call) { none() } // stub implementation
int accessPathLimit() { result = 5 }
/**
* Holds if access paths with `c` at their head always should be tracked at high
* precision. This disables adaptive access path precision for such access paths.
@@ -295,22 +296,6 @@ class ContentApprox = Unit;
pragma[inline]
ContentApprox getContentApprox(Content c) { any() }
private class MyConsistencyConfiguration extends Consistency::ConsistencyConfiguration {
override predicate argHasPostUpdateExclude(ArgumentNode n) {
// Is the null pointer (or something that's not really a pointer)
exists(n.asExpr().getValue())
or
// Isn't a pointer or is a pointer to const
forall(DerivedType dt | dt = n.asExpr().getActualType() |
dt.getBaseType().isConst()
or
dt.getBaseType() instanceof RoutineType
)
// The above list of cases isn't exhaustive, but it narrows down the
// consistency alerts enough that most of them are interesting.
}
}
/**
* Gets an additional term that is added to the `join` and `branch` computations to reflect
* an additional forward or backwards branching factor that is not taken into account

View File

@@ -0,0 +1,10 @@
/**
* Provides C++-specific definitions for use in the taint tracking library.
*/
private import codeql.dataflow.TaintTracking
private import DataFlowImplSpecific
module CppOldTaintTracking implements InputSig<CppOldDataFlow> {
import TaintTrackingUtil
}

View File

@@ -39,7 +39,7 @@ predicate defaultAdditionalTaintStep(DataFlow::Node src, DataFlow::Node sink) {
* of `c` at sinks and inputs to additional taint steps.
*/
bindingset[node]
predicate defaultImplicitTaintRead(DataFlow::Node node, DataFlow::Content c) { none() }
predicate defaultImplicitTaintRead(DataFlow::Node node, DataFlow::ContentSet c) { none() }
/**
* Holds if `node` should be a sanitizer in all global taint flow configurations

View File

@@ -1,74 +0,0 @@
/**
* Provides classes for performing local (intra-procedural) and
* global (inter-procedural) taint-tracking analyses.
*/
import TaintTrackingParameter::Public
private import TaintTrackingParameter::Private
private module AddTaintDefaults<DataFlowInternal::FullStateConfigSig Config> implements
DataFlowInternal::FullStateConfigSig
{
import Config
predicate isBarrier(DataFlow::Node node) {
Config::isBarrier(node) or defaultTaintSanitizer(node)
}
predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
Config::isAdditionalFlowStep(node1, node2) or
defaultAdditionalTaintStep(node1, node2)
}
predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet c) {
Config::allowImplicitRead(node, c)
or
(
Config::isSink(node, _) or
Config::isAdditionalFlowStep(node, _) or
Config::isAdditionalFlowStep(node, _, _, _)
) and
defaultImplicitTaintRead(node, c)
}
}
/**
* Constructs a global taint tracking computation.
*/
module Global<DataFlow::ConfigSig Config> implements DataFlow::GlobalFlowSig {
private module Config0 implements DataFlowInternal::FullStateConfigSig {
import DataFlowInternal::DefaultState<Config>
import Config
}
private module C implements DataFlowInternal::FullStateConfigSig {
import AddTaintDefaults<Config0>
}
import DataFlowInternal::Impl<C>
}
/** DEPRECATED: Use `Global` instead. */
deprecated module Make<DataFlow::ConfigSig Config> implements DataFlow::GlobalFlowSig {
import Global<Config>
}
/**
* Constructs a global taint tracking computation using flow state.
*/
module GlobalWithState<DataFlow::StateConfigSig Config> implements DataFlow::GlobalFlowSig {
private module Config0 implements DataFlowInternal::FullStateConfigSig {
import Config
}
private module C implements DataFlowInternal::FullStateConfigSig {
import AddTaintDefaults<Config0>
}
import DataFlowInternal::Impl<C>
}
/** DEPRECATED: Use `GlobalWithState` instead. */
deprecated module MakeWithState<DataFlow::StateConfigSig Config> implements DataFlow::GlobalFlowSig {
import GlobalWithState<Config>
}

View File

@@ -26,6 +26,8 @@ import cpp
* global (inter-procedural) data flow analyses.
*/
module DataFlow {
import semmle.code.cpp.ir.dataflow.internal.DataFlow
private import semmle.code.cpp.ir.dataflow.internal.DataFlowImplSpecific
private import codeql.dataflow.DataFlow
import DataFlowMake<CppDataFlow>
import semmle.code.cpp.ir.dataflow.internal.DataFlowImpl1
}

View File

@@ -23,6 +23,10 @@ import semmle.code.cpp.dataflow.new.DataFlow2
* global (inter-procedural) taint-tracking analyses.
*/
module TaintTracking {
import semmle.code.cpp.ir.dataflow.internal.tainttracking1.TaintTracking
import semmle.code.cpp.ir.dataflow.internal.tainttracking1.TaintTrackingParameter::Public
private import semmle.code.cpp.ir.dataflow.internal.DataFlowImplSpecific
private import semmle.code.cpp.ir.dataflow.internal.TaintTrackingImplSpecific
private import codeql.dataflow.TaintTracking
import TaintFlowMake<CppDataFlow, CppTaintTracking>
import semmle.code.cpp.ir.dataflow.internal.tainttracking1.TaintTrackingImpl
}

View File

@@ -368,6 +368,11 @@ class FunctionAccess extends Access, @routineexpr {
/** Gets the accessed function. */
override Function getTarget() { funbind(underlyingElement(this), unresolveElement(result)) }
/**
* Gets the expression generating the function being accessed.
*/
Expr getQualifier() { this.getChild(-1) = result }
/** Gets a textual representation of this function access. */
override string toString() {
if exists(this.getTarget())

View File

@@ -76,9 +76,9 @@ class GTExpr extends RelationalOperation, @gtexpr {
override string getOperator() { result = ">" }
override Expr getGreaterOperand() { result = getLeftOperand() }
override Expr getGreaterOperand() { result = this.getLeftOperand() }
override Expr getLesserOperand() { result = getRightOperand() }
override Expr getLesserOperand() { result = this.getRightOperand() }
}
/**
@@ -92,9 +92,9 @@ class LTExpr extends RelationalOperation, @ltexpr {
override string getOperator() { result = "<" }
override Expr getGreaterOperand() { result = getRightOperand() }
override Expr getGreaterOperand() { result = this.getRightOperand() }
override Expr getLesserOperand() { result = getLeftOperand() }
override Expr getLesserOperand() { result = this.getLeftOperand() }
}
/**
@@ -108,9 +108,9 @@ class GEExpr extends RelationalOperation, @geexpr {
override string getOperator() { result = ">=" }
override Expr getGreaterOperand() { result = getLeftOperand() }
override Expr getGreaterOperand() { result = this.getLeftOperand() }
override Expr getLesserOperand() { result = getRightOperand() }
override Expr getLesserOperand() { result = this.getRightOperand() }
}
/**
@@ -124,7 +124,7 @@ class LEExpr extends RelationalOperation, @leexpr {
override string getOperator() { result = "<=" }
override Expr getGreaterOperand() { result = getRightOperand() }
override Expr getGreaterOperand() { result = this.getRightOperand() }
override Expr getLesserOperand() { result = getLeftOperand() }
override Expr getLesserOperand() { result = this.getLeftOperand() }
}

View File

@@ -152,7 +152,19 @@ class Expr extends StmtParent, @expr {
else result = this.getValue()
}
/** Holds if this expression has a value that can be determined at compile time. */
/**
* Holds if this expression has a value that can be determined at compile time.
*
* An expression has a value that can be determined at compile time when:
* - it is a compile-time constant, e.g., a literal value or the result of a constexpr
* compile-time constant;
* - it is an address of a (member) function, an address of a constexpr variable
* initialized to a constant address, or an address of an lvalue, or any of the
* previous with a constant value added to or subtracted from the address;
* - it is a reference to a (member) function, a reference to a constexpr variable
* initialized to a constant address, or a reference to an lvalue;
* - it is a non-template parameter of a uninstantiated template.
*/
cached
predicate isConstant() {
valuebind(_, underlyingElement(this))
@@ -920,19 +932,91 @@ class NewArrayExpr extends NewOrNewArrayExpr, @new_array_expr {
Expr getExtent() { result = this.getChild(2) }
}
private class TDeleteOrDeleteArrayExpr = @delete_expr or @delete_array_expr;
/**
* A C++ `delete` or `delete[]` expression.
*/
class DeleteOrDeleteArrayExpr extends Expr, TDeleteOrDeleteArrayExpr {
override int getPrecedence() { result = 16 }
/**
* Gets the call to a destructor that occurs prior to the object's memory being deallocated, if any.
*
* In the case of `delete[]` at runtime, the destructor will be called once for each element in the array, but the
* destructor call only exists once in the AST.
*/
DestructorCall getDestructorCall() { result = this.getChild(1) }
/**
* Gets the destructor to be called to destroy the object or array, if any.
*/
Destructor getDestructor() { result = this.getDestructorCall().getTarget() }
/**
* Gets the `operator delete` or `operator delete[]` that deallocates storage.
* Does not hold if the type being destroyed has a virtual destructor. In that case, the
* `operator delete` that will be called is determined at runtime based on the
* dynamic type of the object.
*/
Function getDeallocator() {
expr_deallocator(underlyingElement(this), unresolveElement(result), _)
}
/**
* DEPRECATED: use `getDeallocatorCall` instead.
*/
deprecated FunctionCall getAllocatorCall() { result = this.getChild(0) }
/**
* Gets the call to a non-default `operator delete`/`delete[]` that deallocates storage, if any.
*
* This will only be present when the type being deleted has a custom `operator delete` and
* does not have a virtual destructor.
*/
FunctionCall getDeallocatorCall() { result = this.getChild(0) }
/**
* Holds if the deallocation function expects a size argument.
*/
predicate hasSizedDeallocation() {
exists(int form |
expr_deallocator(underlyingElement(this), _, form) and
form.bitAnd(1) != 0 // Bit zero is the "size" bit
)
}
/**
* Holds if the deallocation function expects an alignment argument.
*/
predicate hasAlignedDeallocation() {
exists(int form |
expr_deallocator(underlyingElement(this), _, form) and
form.bitAnd(2) != 0 // Bit one is the "alignment" bit
)
}
/**
* Gets the object or array being deleted.
*/
Expr getExpr() {
// If there is a destructor call, the object being deleted is the qualifier
// otherwise it is the third child.
result = this.getChild(3) or result = this.getDestructorCall().getQualifier()
}
}
/**
* A C++ `delete` (non-array) expression.
* ```
* delete ptr;
* ```
*/
class DeleteExpr extends Expr, @delete_expr {
class DeleteExpr extends DeleteOrDeleteArrayExpr, @delete_expr {
override string toString() { result = "delete" }
override string getAPrimaryQlClass() { result = "DeleteExpr" }
override int getPrecedence() { result = 16 }
/**
* Gets the compile-time type of the object being deleted.
*/
@@ -945,58 +1029,6 @@ class DeleteExpr extends Expr, @delete_expr {
.(PointerType)
.getBaseType()
}
/**
* Gets the call to a destructor that occurs prior to the object's memory being deallocated, if any.
*/
DestructorCall getDestructorCall() { result = this.getChild(1) }
/**
* Gets the destructor to be called to destroy the object, if any.
*/
Destructor getDestructor() { result = this.getDestructorCall().getTarget() }
/**
* Gets the `operator delete` that deallocates storage. Does not hold
* if the type being destroyed has a virtual destructor. In that case, the
* `operator delete` that will be called is determined at runtime based on the
* dynamic type of the object.
*/
Function getDeallocator() {
expr_deallocator(underlyingElement(this), unresolveElement(result), _)
}
/**
* Holds if the deallocation function expects a size argument.
*/
predicate hasSizedDeallocation() {
exists(int form |
expr_deallocator(underlyingElement(this), _, form) and
form.bitAnd(1) != 0 // Bit zero is the "size" bit
)
}
/**
* Holds if the deallocation function expects an alignment argument.
*/
predicate hasAlignedDeallocation() {
exists(int form |
expr_deallocator(underlyingElement(this), _, form) and
form.bitAnd(2) != 0 // Bit one is the "alignment" bit
)
}
/**
* Gets the call to a non-default `operator delete` that deallocates storage, if any.
*
* This will only be present when the type being deleted has a custom `operator delete`.
*/
FunctionCall getAllocatorCall() { result = this.getChild(0) }
/**
* Gets the object being deleted.
*/
Expr getExpr() { result = this.getChild(3) or result = this.getChild(1).getChild(-1) }
}
/**
@@ -1005,13 +1037,11 @@ class DeleteExpr extends Expr, @delete_expr {
* delete[] arr;
* ```
*/
class DeleteArrayExpr extends Expr, @delete_array_expr {
class DeleteArrayExpr extends DeleteOrDeleteArrayExpr, @delete_array_expr {
override string toString() { result = "delete[]" }
override string getAPrimaryQlClass() { result = "DeleteArrayExpr" }
override int getPrecedence() { result = 16 }
/**
* Gets the element type of the array being deleted.
*/
@@ -1024,58 +1054,6 @@ class DeleteArrayExpr extends Expr, @delete_array_expr {
.(PointerType)
.getBaseType()
}
/**
* Gets the call to a destructor that occurs prior to the array's memory being deallocated, if any.
*
* At runtime, the destructor will be called once for each element in the array, but the
* destructor call only exists once in the AST.
*/
DestructorCall getDestructorCall() { result = this.getChild(1) }
/**
* Gets the destructor to be called to destroy each element in the array, if any.
*/
Destructor getDestructor() { result = this.getDestructorCall().getTarget() }
/**
* Gets the `operator delete[]` that deallocates storage.
*/
Function getDeallocator() {
expr_deallocator(underlyingElement(this), unresolveElement(result), _)
}
/**
* Holds if the deallocation function expects a size argument.
*/
predicate hasSizedDeallocation() {
exists(int form |
expr_deallocator(underlyingElement(this), _, form) and
form.bitAnd(1) != 0 // Bit zero is the "size" bit
)
}
/**
* Holds if the deallocation function expects an alignment argument.
*/
predicate hasAlignedDeallocation() {
exists(int form |
expr_deallocator(underlyingElement(this), _, form) and
form.bitAnd(2) != 0 // Bit one is the "alignment" bit
)
}
/**
* Gets the call to a non-default `operator delete` that deallocates storage, if any.
*
* This will only be present when the type being deleted has a custom `operator delete`.
*/
FunctionCall getAllocatorCall() { result = this.getChild(0) }
/**
* Gets the array being deleted.
*/
Expr getExpr() { result = this.getChild(3) or result = this.getChild(1).getChild(-1) }
}
/**

View File

@@ -4,8 +4,8 @@
* This file contains the actual implementation of `PrintIR.ql`. For test cases and very small
* databases, `PrintIR.ql` can be run directly to dump the IR for the entire database. For most
* uses, however, it is better to write a query that imports `PrintIR.qll`, extends
* `PrintIRConfiguration`, and overrides `shouldPrintFunction()` to select a subset of functions to
* dump.
* `PrintIRConfiguration`, and overrides `shouldPrintDeclaration()` to select a subset of declarations
* to dump.
*/
import implementation.aliased_ssa.PrintIR

View File

@@ -22,6 +22,8 @@
import cpp
module DataFlow {
import semmle.code.cpp.ir.dataflow.internal.DataFlow
private import semmle.code.cpp.ir.dataflow.internal.DataFlowImplSpecific
private import codeql.dataflow.DataFlow
import DataFlowMake<CppDataFlow>
import semmle.code.cpp.ir.dataflow.internal.DataFlowImpl1
}

View File

@@ -19,6 +19,10 @@ import semmle.code.cpp.ir.dataflow.DataFlow
import semmle.code.cpp.ir.dataflow.DataFlow2
module TaintTracking {
import semmle.code.cpp.ir.dataflow.internal.tainttracking1.TaintTracking
import semmle.code.cpp.ir.dataflow.internal.tainttracking1.TaintTrackingParameter::Public
private import semmle.code.cpp.ir.dataflow.internal.DataFlowImplSpecific
private import semmle.code.cpp.ir.dataflow.internal.TaintTrackingImplSpecific
private import codeql.dataflow.TaintTracking
import TaintFlowMake<CppDataFlow, CppTaintTracking>
import semmle.code.cpp.ir.dataflow.internal.tainttracking1.TaintTrackingImpl
}

View File

@@ -1,363 +0,0 @@
/**
* Provides an implementation of global (interprocedural) data flow. This file
* re-exports the local (intraprocedural) data flow analysis from
* `DataFlowImplSpecific::Public` and adds a global analysis, mainly exposed
* through the `Global` and `GlobalWithState` modules.
*/
private import DataFlowImplCommon
private import DataFlowImplSpecific::Private
import DataFlowImplSpecific::Public
import DataFlowImplCommonPublic
private import DataFlowImpl
/** An input configuration for data flow. */
signature module ConfigSig {
/**
* Holds if `source` is a relevant data flow source.
*/
predicate isSource(Node source);
/**
* Holds if `sink` is a relevant data flow sink.
*/
predicate isSink(Node sink);
/**
* Holds if data flow through `node` is prohibited. This completely removes
* `node` from the data flow graph.
*/
default predicate isBarrier(Node node) { none() }
/** Holds if data flow into `node` is prohibited. */
default predicate isBarrierIn(Node node) { none() }
/** Holds if data flow out of `node` is prohibited. */
default predicate isBarrierOut(Node node) { none() }
/**
* Holds if data may flow from `node1` to `node2` in addition to the normal data-flow steps.
*/
default predicate isAdditionalFlowStep(Node node1, Node node2) { none() }
/**
* Holds if an arbitrary number of implicit read steps of content `c` may be
* taken at `node`.
*/
default predicate allowImplicitRead(Node node, ContentSet c) { none() }
/**
* Gets the virtual dispatch branching limit when calculating field flow.
* This can be overridden to a smaller value to improve performance (a
* value of 0 disables field flow), or a larger value to get more results.
*/
default int fieldFlowBranchLimit() { result = 2 }
/**
* Gets a data flow configuration feature to add restrictions to the set of
* valid flow paths.
*
* - `FeatureHasSourceCallContext`:
* Assume that sources have some existing call context to disallow
* conflicting return-flow directly following the source.
* - `FeatureHasSinkCallContext`:
* Assume that sinks have some existing call context to disallow
* conflicting argument-to-parameter flow directly preceding the sink.
* - `FeatureEqualSourceSinkCallContext`:
* Implies both of the above and additionally ensures that the entire flow
* path preserves the call context.
*
* These features are generally not relevant for typical end-to-end data flow
* queries, but should only be used for constructing paths that need to
* somehow be pluggable in another path context.
*/
default FlowFeature getAFeature() { none() }
/** Holds if sources should be grouped in the result of `flowPath`. */
default predicate sourceGrouping(Node source, string sourceGroup) { none() }
/** Holds if sinks should be grouped in the result of `flowPath`. */
default predicate sinkGrouping(Node sink, string sinkGroup) { none() }
/**
* Holds if hidden nodes should be included in the data flow graph.
*
* This feature should only be used for debugging or when the data flow graph
* is not visualized (as it is in a `path-problem` query).
*/
default predicate includeHiddenNodes() { none() }
}
/** An input configuration for data flow using flow state. */
signature module StateConfigSig {
bindingset[this]
class FlowState;
/**
* Holds if `source` is a relevant data flow source with the given initial
* `state`.
*/
predicate isSource(Node source, FlowState state);
/**
* Holds if `sink` is a relevant data flow sink accepting `state`.
*/
predicate isSink(Node sink, FlowState state);
/**
* Holds if data flow through `node` is prohibited. This completely removes
* `node` from the data flow graph.
*/
default predicate isBarrier(Node node) { none() }
/**
* Holds if data flow through `node` is prohibited when the flow state is
* `state`.
*/
predicate isBarrier(Node node, FlowState state);
/** Holds if data flow into `node` is prohibited. */
default predicate isBarrierIn(Node node) { none() }
/** Holds if data flow out of `node` is prohibited. */
default predicate isBarrierOut(Node node) { none() }
/**
* Holds if data may flow from `node1` to `node2` in addition to the normal data-flow steps.
*/
default predicate isAdditionalFlowStep(Node node1, Node node2) { none() }
/**
* Holds if data may flow from `node1` to `node2` in addition to the normal data-flow steps.
* This step is only applicable in `state1` and updates the flow state to `state2`.
*/
predicate isAdditionalFlowStep(Node node1, FlowState state1, Node node2, FlowState state2);
/**
* Holds if an arbitrary number of implicit read steps of content `c` may be
* taken at `node`.
*/
default predicate allowImplicitRead(Node node, ContentSet c) { none() }
/**
* Gets the virtual dispatch branching limit when calculating field flow.
* This can be overridden to a smaller value to improve performance (a
* value of 0 disables field flow), or a larger value to get more results.
*/
default int fieldFlowBranchLimit() { result = 2 }
/**
* Gets a data flow configuration feature to add restrictions to the set of
* valid flow paths.
*
* - `FeatureHasSourceCallContext`:
* Assume that sources have some existing call context to disallow
* conflicting return-flow directly following the source.
* - `FeatureHasSinkCallContext`:
* Assume that sinks have some existing call context to disallow
* conflicting argument-to-parameter flow directly preceding the sink.
* - `FeatureEqualSourceSinkCallContext`:
* Implies both of the above and additionally ensures that the entire flow
* path preserves the call context.
*
* These features are generally not relevant for typical end-to-end data flow
* queries, but should only be used for constructing paths that need to
* somehow be pluggable in another path context.
*/
default FlowFeature getAFeature() { none() }
/** Holds if sources should be grouped in the result of `flowPath`. */
default predicate sourceGrouping(Node source, string sourceGroup) { none() }
/** Holds if sinks should be grouped in the result of `flowPath`. */
default predicate sinkGrouping(Node sink, string sinkGroup) { none() }
/**
* Holds if hidden nodes should be included in the data flow graph.
*
* This feature should only be used for debugging or when the data flow graph
* is not visualized (as it is in a `path-problem` query).
*/
default predicate includeHiddenNodes() { none() }
}
/**
* Gets the exploration limit for `partialFlow` and `partialFlowRev`
* measured in approximate number of interprocedural steps.
*/
signature int explorationLimitSig();
/**
* The output of a global data flow computation.
*/
signature module GlobalFlowSig {
/**
* A `Node` augmented with a call context (except for sinks) and an access path.
* Only those `PathNode`s that are reachable from a source, and which can reach a sink, are generated.
*/
class PathNode;
/**
* Holds if data can flow from `source` to `sink`.
*
* The corresponding paths are generated from the end-points and the graph
* included in the module `PathGraph`.
*/
predicate flowPath(PathNode source, PathNode sink);
/**
* Holds if data can flow from `source` to `sink`.
*/
predicate flow(Node source, Node sink);
/**
* Holds if data can flow from some source to `sink`.
*/
predicate flowTo(Node sink);
/**
* Holds if data can flow from some source to `sink`.
*/
predicate flowToExpr(DataFlowExpr sink);
}
/**
* Constructs a global data flow computation.
*/
module Global<ConfigSig Config> implements GlobalFlowSig {
private module C implements FullStateConfigSig {
import DefaultState<Config>
import Config
}
import Impl<C>
}
/** DEPRECATED: Use `Global` instead. */
deprecated module Make<ConfigSig Config> implements GlobalFlowSig {
import Global<Config>
}
/**
* Constructs a global data flow computation using flow state.
*/
module GlobalWithState<StateConfigSig Config> implements GlobalFlowSig {
private module C implements FullStateConfigSig {
import Config
}
import Impl<C>
}
/** DEPRECATED: Use `GlobalWithState` instead. */
deprecated module MakeWithState<StateConfigSig Config> implements GlobalFlowSig {
import GlobalWithState<Config>
}
signature class PathNodeSig {
/** Gets a textual representation of this element. */
string toString();
/**
* Holds if this element is at the specified location.
* The location spans column `startcolumn` of line `startline` to
* column `endcolumn` of line `endline` in file `filepath`.
* For more information, see
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
*/
predicate hasLocationInfo(
string filepath, int startline, int startcolumn, int endline, int endcolumn
);
/** Gets the underlying `Node`. */
Node getNode();
}
signature module PathGraphSig<PathNodeSig PathNode> {
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
predicate edges(PathNode a, PathNode b);
/** Holds if `n` is a node in the graph of data flow path explanations. */
predicate nodes(PathNode n, string key, string val);
/**
* Holds if `(arg, par, ret, out)` forms a subpath-tuple, that is, flow through
* a subpath between `par` and `ret` with the connecting edges `arg -> par` and
* `ret -> out` is summarized as the edge `arg -> out`.
*/
predicate subpaths(PathNode arg, PathNode par, PathNode ret, PathNode out);
}
/**
* Constructs a `PathGraph` from two `PathGraph`s by disjoint union.
*/
module MergePathGraph<
PathNodeSig PathNode1, PathNodeSig PathNode2, PathGraphSig<PathNode1> Graph1,
PathGraphSig<PathNode2> Graph2>
{
private newtype TPathNode =
TPathNode1(PathNode1 p) or
TPathNode2(PathNode2 p)
/** A node in a graph of path explanations that is formed by disjoint union of the two given graphs. */
class PathNode extends TPathNode {
/** Gets this as a projection on the first given `PathGraph`. */
PathNode1 asPathNode1() { this = TPathNode1(result) }
/** Gets this as a projection on the second given `PathGraph`. */
PathNode2 asPathNode2() { this = TPathNode2(result) }
/** Gets a textual representation of this element. */
string toString() {
result = this.asPathNode1().toString() or
result = this.asPathNode2().toString()
}
/**
* Holds if this element is at the specified location.
* The location spans column `startcolumn` of line `startline` to
* column `endcolumn` of line `endline` in file `filepath`.
* For more information, see
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
*/
predicate hasLocationInfo(
string filepath, int startline, int startcolumn, int endline, int endcolumn
) {
this.asPathNode1().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) or
this.asPathNode2().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
}
/** Gets the underlying `Node`. */
Node getNode() {
result = this.asPathNode1().getNode() or
result = this.asPathNode2().getNode()
}
}
/**
* Provides the query predicates needed to include a graph in a path-problem query.
*/
module PathGraph implements PathGraphSig<PathNode> {
/** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */
query predicate edges(PathNode a, PathNode b) {
Graph1::edges(a.asPathNode1(), b.asPathNode1()) or
Graph2::edges(a.asPathNode2(), b.asPathNode2())
}
/** Holds if `n` is a node in the graph of data flow path explanations. */
query predicate nodes(PathNode n, string key, string val) {
Graph1::nodes(n.asPathNode1(), key, val) or
Graph2::nodes(n.asPathNode2(), key, val)
}
/**
* Holds if `(arg, par, ret, out)` forms a subpath-tuple, that is, flow through
* a subpath between `par` and `ret` with the connecting edges `arg -> par` and
* `ret -> out` is summarized as the edge `arg -> out`.
*/
query predicate subpaths(PathNode arg, PathNode par, PathNode ret, PathNode out) {
Graph1::subpaths(arg.asPathNode1(), par.asPathNode1(), ret.asPathNode1(), out.asPathNode1()) or
Graph2::subpaths(arg.asPathNode2(), par.asPathNode2(), ret.asPathNode2(), out.asPathNode2())
}
}
}

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