Alex Ford
f30b735443
Merge pull request #10022 from github/release-prep/2.10.3
...
Release preparation for version 2.10.3
2022-08-11 13:52:43 +01:00
github-actions[bot]
57c4f9145b
Release preparation for version 2.10.3
2022-08-11 11:12:15 +00:00
Jeroen Ketema
a5c0fa24d7
Merge pull request #9971 from jketema/attribute-arg
...
C++: Handle all forms of constant attribute arguments
2022-08-11 11:30:18 +02:00
Jeroen Ketema
18094fb1d8
Merge pull request #10019 from erik-krogh/deleteDeadSwift
...
delete the dead TypeRepr files
2022-08-11 11:13:54 +02:00
Chris Smowton
3d4e9061a4
Merge pull request #10016 from aschackmull/java/kotlin-test-fix
...
Kotlin: Reflection test should not refer to DataFlowPrivate.
2022-08-11 10:08:38 +01:00
erik-krogh
c778b38a77
delete the dead TypeRepr files
2022-08-11 10:56:58 +02:00
Anders Schack-Mulligen
74b05d2aa4
Kotlin: Reflection test should not refer to DataFlowPrivate.
2022-08-11 09:48:10 +02:00
Anders Schack-Mulligen
87461fece4
Merge pull request #10006 from aschackmull/java/sensitive-log-dedup
...
Java: Remove SensitiveLoggingQuery results that flow through a source.
2022-08-11 09:26:33 +02:00
Anders Schack-Mulligen
ced083be61
Merge pull request #10015 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-08-11 09:20:12 +02:00
Michael Nebel
b817bd43ca
Merge pull request #10005 from michaelnebel/csharp/constructorsummaries
...
C#: Constructor summaries
2022-08-11 09:16:05 +02:00
Tom Hvitved
e106edc04e
Merge pull request #9989 from hvitved/csharp/lua-tracer-improvements2
...
C#: Handle `dotnet exec csc.dll` and the likes in the Lua tracer
2022-08-11 08:55:46 +02:00
github-actions[bot]
33ce9552cb
Add changed framework coverage reports
2022-08-11 00:17:52 +00:00
Jeroen Ketema
32a2363f85
C++: Add change note
2022-08-10 21:11:59 +02:00
Jeroen Ketema
32db845af8
C++: Add DB scheme upgrade and downgrade scripts
2022-08-10 21:11:58 +02:00
Jeroen Ketema
bdd8f2bbe9
C++: Update DB scheme stats file
2022-08-10 21:11:58 +02:00
Jeroen Ketema
8528e6b8e1
C++: Update test results for exposing attribute arguments as proper constants
2022-08-10 21:11:58 +02:00
Jeroen Ketema
b20961a065
C++: Expose constant expressions as attribute arguments
2022-08-10 21:11:58 +02:00
Jeroen Ketema
553f1c496e
C++: Update DB scheme to allow for constant expression as attribute arguments
2022-08-10 21:11:58 +02:00
Jeroen Ketema
9ae9b89529
C++: Improve accuracy of AttributeArgument.getValueText QLDoc
2022-08-10 21:11:58 +02:00
Jeroen Ketema
0e12c9d8b1
C++: Simplify this suppression for specifiers
2022-08-10 21:11:58 +02:00
Chris Smowton
cc8e9806c4
Merge pull request #10009 from smowton/smowton/java17-options
...
Java: Adapt tests as required by JDK17 extractor upgrade
2022-08-10 18:46:06 +01:00
Chris Smowton
341241cf43
Use SrcFloatingPointLiteral
2022-08-10 17:28:14 +01:00
Mathias Vorreiter Pedersen
56fddd75bb
Merge pull request #10000 from geoffw0/defaulttaint
...
Swift: Taint flow improvements
2022-08-10 16:30:09 +01:00
Geoffrey White
6ffe5fcaed
Swift: Comment some other cases.
2022-08-10 15:46:32 +01:00
Geoffrey White
537caf85f2
Swift: Fix cartesian product.
2022-08-10 15:46:30 +01:00
Geoffrey White
e09e64ee85
Swift: Restrict taint flow through + to strings.
2022-08-10 15:46:28 +01:00
Geoffrey White
f3499e98a4
Swift: Move try, ! to dataflow.
2022-08-10 15:13:04 +01:00
Nora Dimitrijević
cce39fb2ce
Merge pull request #9998 from d10c/use-strcpyfunction-in-bad-strncpy-size
...
Use StrcpyFunction in `cpp/bad-strncpy-size`
This PR:
- Uses the [StrcpyFunction](https://github.com/github/codeql/blob/main/cpp/ql/lib/semmle/code/cpp/models/implementations/Strcpy.qll#L14 ) class in the [StrncpyFlippedArgs](https://github.com/github/codeql/blob/main/cpp/ql/src/Likely%20Bugs/Memory%20Management/StrncpyFlippedArgs.ql ) query instead of an ad-hoc predicate for finding strcpy-like functions.
- Tests this by adding one previously unsupported strcpy-like function (`wcsxfrm_l`) to StrncpyFlippedArgs's test.cpp.
2022-08-10 15:11:20 +02:00
Tamás Vajk
b2c22dacc2
Merge pull request #9769 from tamasvajk/fix/ctor-field-flow
...
C#: Fix dataflow for default constructors
2022-08-10 15:06:25 +02:00
Anders Schack-Mulligen
cbd6d24b9c
Merge pull request #9963 from intrigus-lgtm/java/model-set-properties
...
Model `java.util.Properties.setProperty`
2022-08-10 14:51:00 +02:00
Anders Schack-Mulligen
ecc15a1f95
Java: Remove SensitiveLoggingQuery results that flow through a source.
2022-08-10 14:28:07 +02:00
Michael Nebel
736ae4f7d6
C#: Update FlowSummaries expected output.
2022-08-10 14:23:54 +02:00
Michael Nebel
5659db73d3
C#: Update alle manually written summaries for constructors to use Argument[Qualifier] instead of ReturnValue.
2022-08-10 14:17:16 +02:00
Nora Dimitrijević
60f4049388
Re-autoformat StrncpyFlippedArgs.ql
2022-08-10 14:14:42 +02:00
Nora Dimitrijević
05f4f98aa0
Add change note
2022-08-10 13:42:21 +02:00
Nora Dimitrijević
8e60a4a478
Update StrncpyFlippedArgs.expected
...
Add output lines for the newly implemented test case, test.cpp/test9().
2022-08-10 13:42:21 +02:00
Nora Dimitrijević
df419003ad
Use Strcpy.qll in StrncpyFlippedArgs.ql
...
As a result, the query gets access to more types of strncpy-like
functions, as demonstrated by test.cpp, which now "fails" (i.e. works) for the new test
cases instroduced
in the previous commit.
2022-08-10 13:42:21 +02:00
Nora Dimitrijević
554aea1bb8
New strcpy-variant in StrncpyFlippedArgs test
...
Added wcsxfrm_l, which is not currently caught by the query,
meaning that in this case a successful
test implies missing functionality.
2022-08-10 13:42:21 +02:00
Chris Smowton
8c32758ae5
Merge pull request #9829 from smowton/smowton/fix/kotlin-underscore-parameter-names
...
Kotlin: Don't extract a name for a '_' parameter
2022-08-10 12:28:26 +01:00
Tom Hvitved
2bb9e4859f
C#: Handle dotnet exec csc.dll and the likes in the Lua tracer
2022-08-10 12:52:18 +02:00
Rasmus Wriedt Larsen
40d25cb34c
Merge pull request #9849 from tausbn/python-fix-bad-essa-getInput-join
...
Python: Fix bad join in ESSA `getInput`
2022-08-10 11:45:23 +02:00
Michael Nebel
7fc95fb49b
Merge pull request #9988 from michaelnebel/csharp/updatestubs
...
C#: Update .NET Core and ASP.NET Core Stubs.
2022-08-10 11:02:35 +02:00
Rasmus Wriedt Larsen
b541103b7f
Merge pull request #9846 from tausbn/python-fix-bad-syntactic_call_count-join
...
Python: Fix bad join in `syntactic_call_count`
2022-08-10 10:09:51 +02:00
Michael Nebel
0aa64b3a8f
Merge pull request #10001 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-08-10 10:09:19 +02:00
Tom Hvitved
19043bdf38
Merge pull request #9976 from hvitved/ruby/hash-literal-summary-simplification
...
Ruby: Simplify flow summaries for hash literals
2022-08-10 08:57:33 +02:00
Erik Krogh Kristensen
d008975ff4
Merge pull request #9825 from erik-krogh/repeatedWord
...
QL: add ql/repeated-word query
2022-08-10 07:25:26 +02:00
github-actions[bot]
cb19ae2638
Add changed framework coverage reports
2022-08-10 00:16:31 +00:00
Harry Maclean
30ff18aec8
Merge pull request #9919 from hmac/hmac/ar-associations
...
Ruby: ActiveRecord associations
2022-08-10 11:13:39 +12:00
Esben Sparre Andreasen
0c6f28014c
Merge pull request #9821 from erik-krogh/jsQlFix
...
JS: fix some QL-for-QL warnings in JS
2022-08-09 22:06:29 +02:00
Erik Krogh Kristensen
559ec7ba56
Merge branch 'main' into repeatedWord
2022-08-09 21:22:47 +02:00
Geoffrey White
6f696ccc3c
Swift: Effect of merging with main to get the AnyTryExpr fix.
2022-08-09 19:02:59 +01:00
Geoffrey White
efcc696e6e
Merge branch 'main' into defaulttaint
2022-08-09 18:59:36 +01:00
Geoffrey White
f2fead7ec7
Merge pull request #9995 from MathiasVP/swift-cfg-for-anytry
...
Swift: CFG for `any!`
2022-08-09 18:00:28 +01:00
Geoffrey White
36f410b9f7
Swift: Move taint logic from isAdditionalTaintStep to defaultAdditionalTaintStep.
2022-08-09 17:42:28 +01:00
Geoffrey White
242dc80907
Swift: Add taint test of try.
2022-08-09 17:42:25 +01:00
Geoffrey White
3bda9af97a
Swift: Add taint test of Data.
2022-08-09 17:42:24 +01:00
Geoffrey White
42c3e29a29
Swift: Add taint test of URL.
2022-08-09 17:42:23 +01:00
Geoffrey White
068ec8ea20
Swift: More tests of taint flow through Strings.
2022-08-09 16:43:07 +01:00
Geoffrey White
0141609703
Swift: Rename test.
2022-08-09 16:41:26 +01:00
Tony Torralba
7f5fe85e2e
Merge pull request #9975 from atorralba/atorralba/asynctask-improvs
...
Java: Improve AsyncTask data flow support
2022-08-09 17:10:09 +02:00
Mathias Vorreiter Pedersen
5ee11c3d7b
Swift: Accept test changes.
2022-08-09 15:12:42 +01:00
Mathias Vorreiter Pedersen
06fecf3869
Swift: Include 'any!' in the the CFG tree for 'any' expressions.
2022-08-09 15:12:31 +01:00
Michael Nebel
eb19090746
C#: Remove unused hand written stubs.
2022-08-09 15:23:43 +02:00
Michael Nebel
cdd1172cee
C#: Use generated stubs in the RequireSSLAspNetCore like tests and update test results with new line numbers.
2022-08-09 15:18:34 +02:00
Michael Nebel
a23be5ca3b
C#: Manually re-order the values in the CookieSecurePolicy enum.
2022-08-09 15:17:14 +02:00
Michael Nebel
98f8bed037
C#: Update CookieWithoutHttpOnlyAspNetCore tests to use generated stubs and update line numbers in test output.
2022-08-09 14:54:19 +02:00
Michael Nebel
77a321ee9a
C#: Manually re-order the values in the HttpOnlyPolicy enum.
2022-08-09 14:52:54 +02:00
Michael Nebel
d6880f059d
C#: Use generated stubs for CookieHttpOnlyFalseAspNetCore testcases and update test output with new line numbers.
2022-08-09 14:32:19 +02:00
Tom Hvitved
28c8d9b885
Ruby: Add two more hash flow tests
2022-08-09 14:17:07 +02:00
Michael Nebel
3a908ac4b8
C#: Cleanup stub project references.
2022-08-09 14:15:00 +02:00
Michael Nebel
1a2fc2b565
C#: Remove unused stubs.
2022-08-09 14:14:00 +02:00
Michael Nebel
3ba893dfa8
C#: Remove System.Data.SqlClient 4.8.2 stub.
2022-08-09 13:15:44 +02:00
Michael Nebel
7c68947035
C#: Update flow summaries expected out as we now include ASP.NET Core as stubs for these tests.
2022-08-09 13:08:34 +02:00
Michael Nebel
6d96da1838
C#: Use ASP.NET Core stub instead of Microsoft.Extensions.Primitives and manual written ASP.NET Core stubs.
2022-08-09 13:08:34 +02:00
Michael Nebel
63b06d50b0
C#: Delete ServiceStack 5.11.0 and related projects.
2022-08-09 13:08:34 +02:00
Michael Nebel
094dcf989e
C#: Update FlowSummaries test expected file (this is required since the .NET Runtime stubs have been updated).
2022-08-09 13:08:34 +02:00
Michael Nebel
d76b069bc5
C#: Manual changes to stubs to ensure compilation.
2022-08-09 13:08:34 +02:00
Michael Nebel
73b6697ea6
C#: Add ServiceStack 6.2.0 and friends.
2022-08-09 13:08:17 +02:00
Chris Smowton
1c6642f3fb
Format QL
2022-08-09 11:50:54 +01:00
Chris Smowton
80f5b977d6
Use sealed classes released version
2022-08-09 11:50:54 +01:00
yo-h
c46b54b9c2
Java 17: exclude non-source locations in some tests
2022-08-09 11:50:54 +01:00
yo-h
0bf7e075e5
Java 17: adjust expected test output
2022-08-09 11:50:54 +01:00
yo-h
27b699df33
Java: adjust test options for JDK 17 upgrade
2022-08-09 11:50:54 +01:00
Erik Krogh Kristensen
add9e9dac4
Merge pull request #9548 from erik-krogh/exports
...
JS: support the "exports" property in a package.json
2022-08-09 12:16:12 +02:00
Tamás Vajk
82a56608ef
Merge pull request #9992 from tamasvajk/fix/fetch-codeql-path
...
Fix path of `fetch-codeql`
2022-08-09 10:57:11 +02:00
Geoffrey White
db8a3107b3
Merge pull request #9089 from ihsinme/ihsinme-patch-87
...
CPP: Add query for CWE-125 Out-of-bounds Read with different interpretation of the string when use mbtowc
2022-08-09 09:31:32 +01:00
Tom Hvitved
975edac34e
Merge pull request #9969 from hvitved/ruby/kwargs-missing-flow
...
Ruby: Support more flow through keyword arguments
2022-08-09 09:59:57 +02:00
Michael Nebel
b90a404658
Merge pull request #9636 from michaelnebel/csharp/sinkmodelcsv
...
C#: Convert Sinks to CSV format for SymmetricAlgorithm.
2022-08-09 09:05:12 +02:00
Tamas Vajk
2cab1ed076
Fix path of fetch-codeql
2022-08-09 07:59:25 +02:00
Tom Hvitved
dd465e739b
Code review suggestion
2022-08-09 07:46:27 +02:00
Tamas Vajk
36c913061c
C#: Fix dataflow for default constructors
2022-08-09 07:46:27 +02:00
Tamas Vajk
1a92fc90e0
C#: Add test to demonstrate missing dataflow for default constructors
2022-08-09 07:46:27 +02:00
Harry Maclean
22d7b046ab
Ruby: Fix <<
2022-08-09 15:08:17 +12:00
Harry Maclean
e3115b5ed7
Ruby: Add test for other=
2022-08-09 15:08:17 +12:00
Harry Maclean
831f722402
Ruby: Make room for new test
2022-08-09 15:08:17 +12:00
Harry Maclean
58b628b6d1
Ruby: Add change note
2022-08-09 15:08:17 +12:00
Harry Maclean
dc853d9728
Ruby: Model ActiveRecord associations
2022-08-09 15:08:17 +12:00
ihsinme
4fdf4b23bd
Update DangerousWorksWithMultibyteOrWideCharacters.ql
2022-08-08 18:46:39 +03:00
ihsinme
212b1031b2
Update DangerousWorksWithMultibyteOrWideCharacters.qhelp
2022-08-08 18:42:54 +03:00
ihsinme
7cbf79b144
Rename DangerousUseMbtowc.ql to DangerousWorksWithMultibyteOrWideCharacters.ql
2022-08-08 18:39:41 +03:00
ihsinme
9b5154f878
Update and rename DangerousUseMbtowc.qlref to DangerousWorksWithMultibyteOrWideCharacters.qlref
2022-08-08 18:39:10 +03:00
ihsinme
bce395f201
Rename DangerousUseMbtowc.expected to DangerousWorksWithMultibyteOrWideCharacters.expected
2022-08-08 18:38:24 +03:00
ihsinme
ef04b8f5b3
Rename DangerousUseMbtowc.qhelp to DangerousWorksWithMultibyteOrWideCharacters.qhelp
2022-08-08 18:37:15 +03:00
ihsinme
5ee499389e
Rename DangerousUseMbtowc.cpp to DangerousWorksWithMultibyteOrWideCharacters.cpp
2022-08-08 18:36:53 +03:00
ihsinme
02bea35da2
Update DangerousUseMbtowc.qhelp
2022-08-08 18:35:25 +03:00
Asger F
fdcb1fa115
Merge pull request #9928 from asgerf/js/source-node-type
...
JS: Simplify type hierarchy for SourceNode
2022-08-08 16:53:20 +02:00
Esben Sparre Andreasen
ab3d365ddb
Merge pull request #9535 from github/js-array-filter-taint-step
...
Tests for rebased 7010
2022-08-08 14:31:22 +02:00
Tom Hvitved
9268437a58
Ruby: Generalize SynthHashSplatParameterNode to also work for synthesized methods
2022-08-08 14:05:06 +02:00
Michael Nebel
6febbc5966
C#: Update .NET Core and ASP.NET Core.
2022-08-08 13:29:20 +02:00
Ian Lynagh
b5d6258e54
Merge pull request #9809 from igfoo/igfoo/fakeLabel
...
Kotlin: Remove the last uses of fakeLabel
2022-08-08 11:54:53 +01:00
yoff
20febb6edd
Merge pull request #9567 from RasmusWL/typetracker-decorators
...
Python: allow class decorators in `.getASubclass()`
2022-08-08 12:42:27 +02:00
Esben Sparre Andreasen
da44340334
formatting
2022-08-08 12:22:41 +02:00
Edoardo Pirovano
d3ec8a8ec3
Merge pull request #9949 from github/edoardo/trap-cache-config
...
JS: Change how TRAP cache is configured
2022-08-08 11:19:31 +01:00
Rasmus Wriedt Larsen
f89b32183f
Merge branch 'main' into typetracker-decorators
2022-08-08 11:52:09 +02:00
Edoardo Pirovano
5c3d39579a
JS: Change how TRAP cache is configured
2022-08-08 10:25:50 +01:00
Esben Sparre Andreasen
a3cf81d419
js: add filter taint test (post rebase conflicts)
2022-08-08 11:00:11 +02:00
Evgenii Protsenko
50264547bf
make array taint-step better
2022-08-08 11:00:11 +02:00
Anders Schack-Mulligen
aa3655678e
Merge pull request #9823 from aschackmull/dataflow/stage-module
...
Dataflow: Replace stage duplication with parameterised modules.
2022-08-08 10:56:32 +02:00
Tom Hvitved
d16a154f9e
Address review comment
2022-08-08 10:45:55 +02:00
Michael Nebel
cebd49af9d
Merge pull request #9968 from michaelnebel/csharp/aspreviewcomment
...
C#: Simplification of AspNetCoreRemoteFlowSourceMember.
2022-08-08 09:44:02 +02:00
Tony Torralba
98b930cd67
Accept test changes in experimental query after AsyncTask improvements
2022-08-08 09:23:12 +02:00
Tom Hvitved
27e89cbbb1
Merge pull request #9980 from hvitved/csharp/lua-tracer-improvements
...
C#: Also disable shared compilation in the tracer for `dotnet msbuild`
2022-08-08 08:57:52 +02:00
Joe Farebrother
d2007bcd6e
Merge pull request #9663 from joefarebrother/android-certificate-validation
...
Java: Add query for improper webview certificate validation
2022-08-05 20:49:15 +01:00
Mathias Vorreiter Pedersen
f2767eb03a
Merge pull request #9972 from MathiasVP/swift-taint-through-interpolated-strings
...
Swift: Taint through interpolated strings
2022-08-05 15:55:35 +01:00
Robert Marsh
10710e27df
Merge pull request #9978 from MathiasVP/swift-fix-mad
...
Swift: Fix flow summaries for methods
2022-08-05 09:53:16 -04:00
Tony Torralba
03b854a1ed
Add test for initializer method
2022-08-05 15:29:17 +02:00
Mathias Vorreiter Pedersen
6cfeb24d94
Swift: More comments.
2022-08-05 13:30:45 +01:00
Tom Hvitved
400071091c
C#: Also disable shared compilation in the tracer for dotnet msbuild
2022-08-05 14:17:16 +02:00
AlexDenisov
d3e5449e3b
Merge pull request #9979 from MathiasVP/add-inline-expectations-framework-to-Swift
...
Swift: Add InlineExpectationsTest framework
2022-08-05 14:10:41 +02:00
Joe Farebrother
dd83c17144
Use more precise control flow logic
2022-08-05 12:56:21 +01:00
Joe Farebrother
e9f9e681ef
Change man-in-the-middle back to machine-in-the-middle
...
(gender-neutral language)
This reverts commit d5ab330450d3f5c1d36d0d9b6a8f1dc32bc908e3.
2022-08-05 12:56:21 +01:00
Joe Farebrother
79b1f24133
Change machine-in-the-middle to man-in-the-middle
2022-08-05 12:56:20 +01:00
Joe Farebrother
04df556861
Add suggested reference
2022-08-05 12:56:20 +01:00
Joe Farebrother
abf894a64c
Fix typos
2022-08-05 12:56:20 +01:00
Joe Farebrother
03c2a0e818
Add missing qldoc
2022-08-05 12:56:20 +01:00
Joe Farebrother
0d09484efc
Add change note
2022-08-05 12:56:19 +01:00
Joe Farebrother
f8ccbcba70
Add qhelp
2022-08-05 12:56:19 +01:00
Joe Farebrother
a2245bb858
Fix test
2022-08-05 12:56:19 +01:00
Joe Farebrother
498ad230c2
Update stubs
2022-08-05 12:56:19 +01:00
Joe Farebrother
c4de158e0d
Add tests
2022-08-05 12:56:18 +01:00
Joe Farebrother
16e16f08dc
Add webview cert validation query
2022-08-05 12:56:18 +01:00
Mathias Vorreiter Pedersen
b20b0a091d
Update identical-files.
2022-08-05 11:49:36 +01:00
Mathias Vorreiter Pedersen
46ec7a9b82
Swift: Add the InlineExpectationsTest framework.
2022-08-05 11:49:15 +01:00
Mathias Vorreiter Pedersen
69564d2192
Swift: Add a couple of standard Comment subclasses.
2022-08-05 11:48:29 +01:00
Tony Torralba
b75b073dae
Remove unused class member
2022-08-05 12:21:22 +02:00
Mathias Vorreiter Pedersen
946b8c68a6
Swift: Accept test changes.
2022-08-05 11:19:00 +01:00
Mathias Vorreiter Pedersen
a302570349
Merge branch 'main' into swift-taint-through-interpolated-strings
2022-08-05 11:17:54 +01:00
AlexDenisov
a779f0e376
Merge pull request #9977 from github/alexdenisov/extract-swift-comments
...
Swift: extract comments
2022-08-05 12:15:56 +02:00
Mathias Vorreiter Pedersen
24c9ab8015
Swift: Fix MaD for methods
2022-08-05 10:52:28 +01:00
Alex Denisov
5e69adb0a9
Swift: extract comments
2022-08-05 11:50:48 +02:00
Mathias Vorreiter Pedersen
1c8090fa04
Merge pull request #9964 from geoffw0/cwe95
...
Swift: Query for CWE-79 / CWE-95
2022-08-05 10:38:33 +01:00
Geoffrey White
1ce06accbd
Swift: Fix capitalization issue?
2022-08-05 10:20:51 +01:00
Mathias Vorreiter Pedersen
ac26371de0
Merge pull request #9909 from geoffw0/stringlengthconflation6
...
Swift: Understand String.utf8.count etc in the string length conflation CVE query
2022-08-05 10:13:25 +01:00
Tony Torralba
9ee90f8022
Remove unnecessary import from test
2022-08-05 11:11:13 +02:00
Tony Torralba
792d34c3a1
Add change note
2022-08-05 11:10:09 +02:00
Anders Schack-Mulligen
3d47875b60
Dataflow: Generate shorter RA/DIL names.
2022-08-05 11:00:56 +02:00
Anders Schack-Mulligen
d3dcc3ce3a
Dataflow: Sync.
2022-08-05 11:00:56 +02:00
Anders Schack-Mulligen
09d0f8e0ce
Dataflow: Replace stage duplication with parameterised modules.
2022-08-05 11:00:56 +02:00
Tom Hvitved
56ee07e24c
Merge pull request #9936 from aibaars/gh-codeql-nightly
...
Use 'gh codeql' with the nightly release for CI jobs
2022-08-05 10:34:39 +02:00
Tony Torralba
5ebce6ee4f
Improve AsyncTask data flow support
...
Model the life-cycle described here: https://developer.android.com/reference/android/os/AsyncTask\#the-4-steps
2022-08-05 10:29:49 +02:00
Tom Hvitved
e0dadb4df6
Ruby: Simplify flow summaries for hash literals
2022-08-05 10:20:07 +02:00
Jeroen Ketema
ba2cee07a9
Merge pull request #8596 from rdmarsh2/rdmarsh2/dataflow-global-vars
...
C++: IR data flow through global variables
2022-08-05 10:07:00 +02:00
Anders Schack-Mulligen
1fde06c0a8
Merge pull request #9970 from aschackmull/java/confusingoverload-perf
...
Java: Improve performance of ConfusingOverloading.
2022-08-05 09:38:22 +02:00
Harry Maclean
74d529d3e3
Merge pull request #9918 from hmac/hmac/mime-type-match
...
Ruby: Model Mime::Type
2022-08-05 11:51:45 +12:00
Harry Maclean
157bbccf62
Merge pull request #9851 from hmac/hmac/active-record-improvements
...
Ruby: Recognise more AR write accesses
2022-08-05 11:49:50 +12:00
Mathias Vorreiter Pedersen
2f13c65ad7
Update swift/ql/lib/codeql/swift/controlflow/internal/ControlFlowGraphImpl.qll
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2022-08-04 22:45:45 +01:00
Mathias Vorreiter Pedersen
05e6dd85d4
Swift: Add taint tests for flow through interpolated strings.
2022-08-04 21:57:05 +01:00
Mathias Vorreiter Pedersen
9c48ce1bf2
Swift: Flow (1) through the internal function calls generated by the compiler during string interpolation, and (2) out of the internal 'TapExpr' and into the interpolated string result.
2022-08-04 21:57:05 +01:00
Mathias Vorreiter Pedersen
52b78b6e68
Swift: Don't assume we know the call target statically in 'TInOutUpdateNode'.
2022-08-04 21:57:04 +01:00
Mathias Vorreiter Pedersen
ff6b8c5c9c
Swift: Replace 'CallExpr' with 'ApplyExpr'. This is needed because not all the calls inside the interpolated string computations are 'CallExpr's.
2022-08-04 21:57:04 +01:00
Mathias Vorreiter Pedersen
3028b80e46
Swift: Control-flow through interpolated strings.
2022-08-04 21:57:04 +01:00
Tom Hvitved
6fa1e06afb
Merge pull request #9966 from hvitved/csharp/no-clr-tracer
...
C#: Disable CLR tracer
2022-08-04 20:50:19 +02:00
intrigus
b7d94906bf
Add change note
2022-08-04 16:21:55 +02:00
intrigus
88ded4679a
Accept test changes
2022-08-04 16:21:53 +02:00
intrigus
c867a1a146
Test setProperty/put with taint stored earlier
2022-08-04 16:21:51 +02:00
intrigus
0b7f0fbe54
Accept test changes
2022-08-04 16:21:50 +02:00
intrigus
55618adf6a
Model java.util.Properties.setProperty
2022-08-04 16:21:48 +02:00
Tom Hvitved
01c0d4b59f
Ruby: Support more flow through keyword arguments
2022-08-04 16:20:08 +02:00
Anders Schack-Mulligen
43d4324f65
Java: Improve performance of ConfusingOverloading.
2022-08-04 16:05:30 +02:00
Tom Hvitved
38ede25385
Ruby: Add test that illustrates missing flow for keyword arguments
2022-08-04 14:39:22 +02:00
Michael Nebel
64e8660904
C#: Simplification of AspNetCoreRemoteFlowSourceMember.
2022-08-04 14:18:25 +02:00
Tom Hvitved
bc6a74b4dd
C#: Disable CLR tracer
...
Also remove old tracer configs, as we now use the Lua tracer.
2022-08-04 13:11:07 +02:00
mc
935def739c
Merge pull request #9955 from securingdev/patch-1
...
Update Other section with example exit code details
2022-08-04 10:26:45 +01:00
mc
df1633a838
Merge branch 'main' into patch-1
2022-08-04 10:13:23 +01:00
Anders Schack-Mulligen
a5a58f46eb
Merge pull request #9945 from aschackmull/java/wrappedinvocation-joinorder
...
Java: Improve join-order.
2022-08-04 11:12:23 +02:00
mc
360cff9c24
Merge branch 'main' into patch-1
2022-08-04 10:08:55 +01:00
Anders Schack-Mulligen
c2b99747d4
Merge pull request #9951 from aschackmull/java/notintersect-perf
...
Java: Improve join-order for `not haveIntersection`.
2022-08-04 11:08:02 +02:00
mc
8905df9abb
Merge branch 'main' into patch-1
2022-08-04 10:06:01 +01:00
mc
e4c9f8a9a2
Update docs/codeql/codeql-cli/exit-codes.rst
2022-08-04 10:05:52 +01:00
Chris Smowton
96091e4fa0
Merge pull request #9947 from github/smowton/fix/golang-path-injection-numeric-sanitizer
...
Go: note that numeric-typed nodes can't cause path traversal
2022-08-04 09:00:34 +01:00
Chris Smowton
af274354a0
Merge pull request #9956 from github/smowton/feature/tainted-path-query-mad
...
Make java/path-injection recognise create-file MaD sinks
2022-08-04 08:59:59 +01:00
Harry Maclean
ee9e6b1f2e
Ruby: Add change note
2022-08-04 17:27:34 +12:00
Harry Maclean
452811dbf2
Ruby: move change note
2022-08-04 17:25:55 +12:00
Harry Maclean
83393dc195
Ruby: Recognise more AR write accesses
...
This change means we recognise calls like
```rb
User.create(params)
User.update(id, params)
```
as instances of `PersistentWriteAccess`.
2022-08-04 17:22:46 +12:00
Harry Maclean
21b4918904
Ruby: Add getPositionalArgument
...
This gets positional arguments from a call. These are arguments which
are not keyword arguments.
2022-08-04 17:22:46 +12:00
Harry Maclean
d4f7f2b75e
Ruby: Add test for AR PersistentWriteAccesses
2022-08-04 17:22:46 +12:00
Harry Maclean
7ed81db32d
Ruby: Move ActiveRecord tests to new directory
2022-08-04 17:22:46 +12:00
Harry Maclean
def1b3c3b3
Ruby: QLDoc fix
2022-08-04 17:21:29 +12:00
Harry Maclean
fdbe16945f
Ruby: Add change note
2022-08-04 17:19:05 +12:00
Geoffrey White
997068a9cb
Swift: Fix a suggestion merge conflict.
2022-08-03 18:16:31 +01:00
Geoffrey White
873c62ef78
Swift: Apply another code review suggestion.
2022-08-03 18:16:01 +01:00
Geoffrey White
e4dab17318
Apply suggestions from code review
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2022-08-03 18:14:14 +01:00
Geoffrey White
9d49986345
Swift: Make QL-for-QL happy.
2022-08-03 17:18:57 +01:00
Mathias Vorreiter Pedersen
9355f9132e
Merge pull request #9961 from MathiasVP/swift-cache-lastRefRedef
...
Swift: Cache `lastRefRedef`
2022-08-03 15:43:35 +01:00
Alex Ford
33fbec1174
Merge pull request #9917 from github/post-release-prep/codeql-cli-2.10.2
...
Post-release preparation for codeql-cli-2.10.2
2022-08-03 15:17:00 +01:00
Mathias Vorreiter Pedersen
97bd007592
Merge pull request #9962 from intrigus-lgtm/patch-7
...
C: Add additional reference to CERT C coding standard
2022-08-03 15:00:33 +01:00
Geoffrey White
39f1352847
Swift: Complete the rename.
2022-08-03 14:45:20 +01:00
Geoffrey White
81bd61288c
Swift: I think CWE-079 is the more accurate CWE for this query.
2022-08-03 14:45:19 +01:00
Geoffrey White
c635895644
Swift: Documentation.
2022-08-03 14:45:18 +01:00
Alex Ford
440547c958
Merge branch 'main' into post-release-prep/codeql-cli-2.10.2
2022-08-03 13:44:37 +01:00
Arthur Baars
912dce3ea7
Merge branch 'main' into gh-codeql-nightly
2022-08-03 14:43:07 +02:00
Arthur Baars
e23a45d02c
Merge pull request #9959 from aibaars/order-order
...
Ruby: PrintAST: more stable order for synthesized nodes
2022-08-03 14:42:42 +02:00
intrigus-lgtm
c59e6586f7
Add additional reference to CERT C coding standard
2022-08-03 14:19:53 +02:00
Mathias Vorreiter Pedersen
be7ba925f9
Swift: Cache 'lastRefRedef'.
2022-08-03 11:14:55 +01:00
Arthur Baars
35f7fdf24b
Update ruby/ql/lib/codeql/ruby/printAst.qll
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2022-08-03 12:06:47 +02:00
Chris Smowton
977823bd76
Create 2022-08-03-tainted-path-mad.md
2022-08-03 10:54:35 +01:00
Chris Smowton
84a4b6a866
Make reporting locations consistent with PathCreation; add test
2022-08-03 10:42:09 +01:00
Geoffrey White
8d9653a999
Swift: Generated security-severity tag.
2022-08-03 09:54:54 +01:00
Geoffrey White
ea17b852b4
Swift: Explain ExternalRemoteFlowSource.
2022-08-03 09:42:51 +01:00
Geoffrey White
651b73e21e
Swift: Check for tainted baseURL.
2022-08-03 09:42:48 +01:00
Rasmus Wriedt Larsen
8fb85a98d8
Merge branch 'main' into post-release-prep/codeql-cli-2.10.2
2022-08-03 10:42:02 +02:00
Mathias Vorreiter Pedersen
c582d17350
Merge pull request #9952 from MathiasVP/speedup-return-stack-allocated-memory
...
C++: Speedup `cpp/return-stack-allocated-memory`
2022-08-03 09:41:38 +01:00
Geoffrey White
53ea65b045
Swift: Implement query.
2022-08-03 09:41:28 +01:00
Chris Smowton
e04c77ce15
Rename sanitizer
2022-08-03 09:37:20 +01:00
Geoffrey White
2d76d6d51a
Swift: Tests for CWE-95.
2022-08-03 09:36:22 +01:00
Chris Smowton
03fa5d8ed0
Merge pull request #9960 from RasmusWL/fix-qltest
...
Python: Accept `.expected` for TarSlip
2022-08-03 09:28:47 +01:00
Chris Smowton
83498f58db
Add missing import
2022-08-03 08:53:43 +01:00
Rasmus Wriedt Larsen
3d0c23e441
Python: Accept .expected for TarSlip
...
Changed after merging https://github.com/github/codeql/pull/9579 ,
which improved our handling of `not` for guards.
2022-08-03 09:52:11 +02:00
Arthur Baars
d8592a2b05
Ruby: PrintAST: more stable order for synthesized nodes
2022-08-03 09:02:38 +02:00
Anders Schack-Mulligen
d9ae4605c1
Merge pull request #9948 from aschackmull/java/samenameassuper-perf
...
Java: Fix join-order in SameNameAsSuper.
2022-08-03 08:04:30 +02:00
Chris Smowton
81f3bcd802
Don't require a PathCreation for every tainted-path sink
2022-08-02 21:30:06 +01:00
Chris Smowton
c95f17fdf2
Make java/path-injection recognise create-file MaD sinks
2022-08-02 21:28:00 +01:00
Alex Ford
8e3548efb3
Merge branch 'main' into post-release-prep/codeql-cli-2.10.2
2022-08-02 20:29:26 +01:00
Arthur Baars
759fd6cc0b
Use 'gh codeql' with the nightly release for CI jobs
2022-08-02 17:01:20 +02:00
Arthur Baars
0be625f396
Merge pull request #9954 from aibaars/fix-triggers
...
CI: fix path triggers
2022-08-02 17:00:23 +02:00
Jeroen Ketema
a63df8fee9
Merge pull request #9930 from jketema/templ-var
...
C++: Update test for indexing of static template variable template arguments
2022-08-02 16:59:56 +02:00
Keith Hoodlet
b21fa0e2b0
Update Other section with example exit code
...
Add troubleshooting steps to remediate issues with the kernel killing a process.
2022-08-02 10:49:45 -04:00
Arthur Baars
64704057cb
CI: fix path triggers
2022-08-02 16:33:21 +02:00
Arthur Baars
55e15540f6
Merge pull request #9943 from aibaars/gh-codeql-follow-up
...
CI: remove unneeded PATH definitions
2022-08-02 16:22:18 +02:00
Mathias Vorreiter Pedersen
f385041ab3
C++: Add change note.
2022-08-02 14:07:22 +01:00
Mathias Vorreiter Pedersen
5181cc1295
C++: Add a 'allowInterproceduralFlow' predicate to the 'MustFlow' library to and use it instead of checking the enclosing callables after computing the dataflow graph.
2022-08-02 13:43:01 +01:00
Anders Schack-Mulligen
aabdf84300
Java: Improve join-order for not haveIntersection.
2022-08-02 14:29:03 +02:00
Anders Schack-Mulligen
80bba605e3
Java: Fix join-order in SameNameAsSuper.
2022-08-02 12:49:21 +02:00
Chris Smowton
e04a9b5805
Add change note
2022-08-02 11:37:27 +01:00
Chris Smowton
13b2b7674d
Go: note that numeric-typed nodes can't cause path traversal
2022-08-02 11:28:28 +01:00
Geoffrey White
bada5bf7c1
Swift: Placeholder query + docs for CWE-95.
2022-08-02 10:47:06 +01:00
Jeroen Ketema
34de4000ac
Merge pull request #9941 from MathiasVP/swift-taint-tracking
...
Swift: Add 'TaintTracking.qll'
2022-08-02 10:15:21 +02:00
Anders Schack-Mulligen
cd356a5ac1
Java: Improve join-order.
2022-08-02 08:49:58 +02:00
Robert Marsh
3007c96c72
C++: fix a nit
2022-08-01 15:34:03 -04:00
Robert Marsh
f0697ff28b
C++: fix QL4QL warnings
2022-08-01 15:23:59 -04:00
Robert Marsh
6dbaae6bfc
Merge branch 'main' into rdmarsh2/dataflow-global-vars
2022-08-01 14:56:24 -04:00
Robert Marsh
4f8373f577
Merge branch 'main' into rdmarsh2/dataflow-global-vars
2022-08-01 14:55:45 -04:00
Jeroen Ketema
b906c1a6b7
Merge pull request #9942 from MathiasVP/remove-microsoft-tags
...
C++: Remove internal `microsoft` tags from queries
2022-08-01 19:25:35 +02:00
Arthur Baars
c63afbf7be
CI: remove left-over 'env' commands
2022-08-01 18:49:37 +02:00
Arthur Baars
a63c168822
Merge pull request #9938 from aibaars/gh-codeql-ci
...
CI: make all jobs that fetch a CodeQL CLI use the fetch-codeql action
2022-08-01 18:36:50 +02:00
Mathias Vorreiter Pedersen
e3cb7cf9fe
C++: Remove internal 'microsoft' tags from queries.
2022-08-01 17:30:23 +01:00
Arthur Baars
7dc3d7d47e
CI: remove unneeded PATH definitions
2022-08-01 18:17:04 +02:00
Mathias Vorreiter Pedersen
e29676af72
Swift: Add 'TaintTracking.qll'.
2022-08-01 16:48:02 +01:00
Michael Nebel
02165e8ee1
Merge pull request #9327 from michaelnebel/csharp/dotnetruntimerefresh
...
C#: Re-create summary models and include source and sink models as well.
2022-08-01 16:15:54 +02:00
Arthur Baars
4d35d8da48
CI: fix Ruby build job
2022-08-01 16:15:04 +02:00
Arthur Baars
29381dc264
Use fetch-codeql in more places
2022-08-01 15:43:22 +02:00
Arthur Baars
2bbd2f36c9
Fix .github/workflows/query-list.yml
2022-08-01 12:56:07 +02:00
Arthur Baars
3b8eeb09bf
Add fetch-codeql path to Actions triggers
2022-08-01 12:56:06 +02:00
Arthur Baars
bc05cdaa4d
Implement fetch-codeql using 'gh codeql'
2022-08-01 12:55:35 +02:00
Rasmus Wriedt Larsen
1737d08145
Merge pull request #9579 from yoff/python/more-logic-tests
...
Python: Improve `BarrierGuard`
2022-08-01 11:36:11 +02:00
AlexDenisov
b5d4a2d462
Merge pull request #9926 from github/redsun82/swift-extract-module-type
...
Swift: extract `ModuleType`
2022-08-01 10:33:33 +02:00
AlexDenisov
ed67fb0933
Merge pull request #9927 from github/redsun82/swift-pcm-inconsistencies-workaround
...
Swift: append clang module names in trap keys
2022-08-01 10:33:18 +02:00
ihsinme
96e220588e
Update DangerousUseMbtowc.ql
2022-07-31 13:44:50 +03:00
Jeroen Ketema
c02e7a4896
C++: Update test for indexing of static template variable template arguments
2022-07-31 09:58:29 +02:00
Asger F
98a9cb0b55
JS: Simplify type hierarchy for SourceNode
...
The charpred caused spurious type to appear
2022-07-29 19:44:10 +02:00
Jeroen Ketema
b50f4bc1a8
Merge pull request #9903 from jketema/builtin
...
C++: Support additional compiler builtin operations
2022-07-29 17:20:19 +02:00
Paolo Tranquilli
4ce100f9a3
Swift: append clang module names in trap keys
...
We have found out there can be separate declarations (`VarDecl` or
`AccessorDecl`) which are effectively the same (with equal mangled name)
but come from different clang modules. This is the case for example
for glibc constants like `L_SET` that appear in both `SwiftGlibc` and
`CDispatch`.
In this patch, we simply avoid full deduplication in that case by
appending the module name to the trap key for non-swift modules.
A more solid solution should be found in the future.
2022-07-29 16:56:51 +02:00
Paolo Tranquilli
45e14c96f2
Swift: extract ModuleType
2022-07-29 16:48:45 +02:00
Paolo Tranquilli
13f2cf9003
Merge pull request #9922 from github/redsun82/swift-precompiled-modules-are-not-extracted
...
Swift: extract precompiled swiftmodule files
2022-07-29 16:43:34 +02:00
Paolo Tranquilli
daf1fa3c31
Swift: lock built swiftmodule traps in main
...
This should cover `-merge-modules` mode.
Dumping of the configuration to the target files was moved to a
separate pair of header/source files, as now it is also done in
`SwiftOutputRewrite.cpp`.
2022-07-29 16:27:55 +02:00
Paolo Tranquilli
405d0fcd54
Merge branch 'main' into redsun82/swift-precompiled-modules-are-not-extracted
2022-07-29 15:57:52 +02:00
Tony Torralba
593ce01362
Merge pull request #9908 from atorralba/atorralba/xml-inline-exp-test
...
Java: Add support for XML InlineExpectationsTest
2022-07-29 14:49:19 +02:00
AlexDenisov
48e93b3654
Merge pull request #9925 from github/alexdenisov/pcm-var-dedup
...
Swift: do not deduplicate PCM variables (as the mangler crashes there sometimes)
2022-07-29 14:30:41 +02:00
AlexDenisov
22c5b7af4f
Merge pull request #9921 from github/alexdenisov/type-alias-mangling
...
Swift: mangle TypeAliasDecls differently
2022-07-29 14:30:28 +02:00
Alex Denisov
34edb2537f
Swift: mangle TypeAliasDecls differently
2022-07-29 14:12:02 +02:00
Alex Denisov
5b1fe56d5f
Swift: do not deduplicate PCM variables (as the mangler crashes there sometimes)
2022-07-29 14:06:18 +02:00
Tony Torralba
ec03ebbbfc
Add spurious and missing test cases
2022-07-29 13:44:25 +02:00
Tony Torralba
6091f0dbce
Use camelCase for XML acronym
2022-07-29 13:44:11 +02:00
Paolo Tranquilli
099ab0e0c2
Swift: readd .trap suffix to swiftmodule trap files
2022-07-29 12:26:33 +02:00
Paolo Tranquilli
604328ea5f
Swift: strip suffix from swiftmodule trap files
2022-07-29 12:25:11 +02:00
Paolo Tranquilli
652230d021
Merge branch 'main' into redsun82/swift-precompiled-modules-are-not-extracted
2022-07-29 12:21:15 +02:00
Paolo Tranquilli
69633948ce
Merge pull request #9920 from github/alexdenisov/colocate-pcms
...
Swift: put all the PCM traps into the same place
2022-07-29 12:20:58 +02:00
Paolo Tranquilli
065fecc57e
Swift: extract precompiled swiftmodule files
...
Previously we were not extracting any `swiftmodule` file that was not
a system or a built-in one. This was done to avoid re-extracting
`swiftmodule` files that were built previously in the same build, but it
turned out to be too eager, as there are legitimate cases where a
non-system, non-built-in precompiled swift module can be used. An
example of that is the `PackageDescription` module used in Swift
Package Manager manifest files (`Package.swift`).
We now relax the test and trigger module extraction on all loaded
modules that do not have source files (we trigger source file extraction
for those). The catch, is that we also create empty trap files for
current output `swiftmodule` files (including possible alias locations
set up by XCode).
This means that if a following extractor run loads a previously built
`swiftmodule` file, although it will trigger module extraction, this
will however be skipped as it will find its target file already present
(this is done via the `TargetFile` semantics).
2022-07-29 11:10:03 +02:00
Alex Denisov
50e1ffda64
Swift: put all the PCM traps into the same place
2022-07-29 10:19:13 +02:00
Jeroen Ketema
a27b1ee33a
C++: Improve ErrorExpr documentation to match current practise
2022-07-29 09:08:56 +02:00
Jeroen Ketema
5a59354d73
C++: Minor clean up of the builtin operations qldoc
2022-07-29 09:08:56 +02:00
Jeroen Ketema
bce253920c
C++: Fix __builtin_shuffle qldoc
2022-07-29 09:08:56 +02:00
Jeroen Ketema
afdd21eab7
C++: Update DB scheme stats file
2022-07-29 09:08:56 +02:00
Jeroen Ketema
295ecbb401
C++: Add upgrade and downgrade scripts for new builtins
2022-07-29 09:08:56 +02:00
Jeroen Ketema
1806b8933f
C++: Add change note for newly added builtins
2022-07-29 09:08:56 +02:00
Jeroen Ketema
20b66eaf34
C++: Support __builtin_shuffle builtin
...
While here write gcc instead of GNU, which is more accurate.
2022-07-29 09:08:56 +02:00
Jeroen Ketema
81e687ea98
C++: Support __builtin_bit_cast builtin
2022-07-29 09:08:56 +02:00
Jeroen Ketema
a85d3f9b7f
C++: Support __has_unique_object_representations builtin
2022-07-29 09:08:56 +02:00
Jeroen Ketema
0c03935437
C++: Support __is_aggregate builtin
...
Fix some whitespace issues while here.
2022-07-29 09:08:56 +02:00
Jeroen Ketema
c4283dd23f
C++: Support __is_assignable builtin
...
While here fix the documentation of `__is_trivially_assignable` and
`__is_nothrow_assignable`.
2022-07-29 09:08:56 +02:00
AlexDenisov
9876c391fa
Merge pull request #9915 from github/redsun82/swift-fixes
...
Swift: small dispatcher fixes
2022-07-29 08:22:54 +02:00
Harry Maclean
2034498690
Ruby: Fix QLDoc warnings
2022-07-29 12:20:32 +12:00
Harry Maclean
f42d33312f
Ruby: Model Mime::Type
...
Add type summaries to recognise instances of Mime::Type, and recognise
arguments to Mime::Type.match? and Mime::Type.=~ as regular expression
interpretations.
2022-07-29 11:41:48 +12:00
Harry Maclean
b7be25e18f
Ruby: Make isInterpretedAsRegExp extensible
...
This allows frameworks to add new instances where a node is interpreted
as a regular expression. We introduce a class
RegExpInterpretation::Range that represents these nodes. In the future
we may want to make this a full Concept, but it's not necessary at the
moment.
2022-07-29 11:39:41 +12:00
Harry Maclean
c29eb814b2
Ruby: Reorganise ActionDispatch framework
...
Put routing modelling inside a Routing module.
2022-07-29 10:44:36 +12:00
github-actions[bot]
e8747d3176
Post-release preparation for codeql-cli-2.10.2
2022-07-28 20:00:09 +00:00
Chris Smowton
e140d2ab4f
Merge pull request #9824 from smowton/smowton/admin/wildcard-substitution-test
...
Add test for Java wildcard substitution
2022-07-28 17:07:41 +01:00
Alex Ford
2a8567960e
Merge pull request #9913 from github/release-prep/2.10.2
...
Release preparation for version 2.10.2
2022-07-28 16:56:11 +01:00
Paolo Tranquilli
985237ab2d
Swift: small dispatcher fixes
...
File extraction was not using named trap keys, and `emitDebugInfo` was
using `std::forward` when it should not.
2022-07-28 17:05:52 +02:00
Chris Smowton
1737ed50ba
Add test cases for wildcard lowering of array types
2022-07-28 15:52:00 +01:00
Chris Smowton
8cd2aeb65d
Accept test changes
2022-07-28 15:52:00 +01:00
Chris Smowton
7475f84ea5
Fix type-parameter-out-of-scope test
2022-07-28 15:51:59 +01:00
Chris Smowton
e7f275382e
Add test for Java wildcard substitution
2022-07-28 15:51:59 +01:00
Alex Ford
a8345e00fc
Update java/ql/lib/change-notes/released/0.3.2.md
2022-07-28 14:58:38 +01:00
Alex Ford
258b58cd37
Update java/ql/lib/CHANGELOG.md
2022-07-28 14:58:34 +01:00
Jeroen Ketema
15a979cfc6
Update ruby/ql/lib/change-notes/released/0.3.2.md
2022-07-28 15:45:01 +02:00
Jeroen Ketema
3137addfc1
Update ruby/ql/lib/CHANGELOG.md
2022-07-28 15:44:53 +02:00
github-actions[bot]
212786ed91
Release preparation for version 2.10.2
2022-07-28 13:38:35 +00:00
Paolo Tranquilli
8a36a2b563
Merge pull request #9912 from github/redsun82/swift-human-readable-trap-prefixes
...
Swift: make trap key prefixes readable
2022-07-28 14:34:57 +02:00
Paolo Tranquilli
ddf715e6a9
Merge pull request #9911 from github/redsun82/swift-deduplicate-vardecls
...
Swift: deduplicate `VarDecl`
2022-07-28 14:31:59 +02:00
Paolo Tranquilli
d547a417c9
Swift: accept new test results
2022-07-28 12:57:12 +02:00
Paolo Tranquilli
cb006900cd
Merge branch 'main' into redsun82/swift-deduplicate-vardecls
2022-07-28 12:55:31 +02:00
Paolo Tranquilli
7d7966e711
Swift: make trap key prefixes readable
...
This replaces numeric tag-based prefixes with the actual tag name.
While this means in general slightly larger trap files, it aids
debugging them for a human.
In the future we can make this conditional on some kind of trap debug
option, but for the moment it does not seem detrimental.
2022-07-28 12:43:30 +02:00
Paolo Tranquilli
b491884996
Merge pull request #9910 from github/redsun82/swift-no-cleanup-on-integration-tests
...
Swift: add `--no-cleanup` to integration tests
2022-07-28 12:41:53 +02:00
Paolo Tranquilli
76ea63ffbe
Swift: deduplicate VarDecl
...
Deduplication of `ConcreteVarDecl` is triggered only if its
`DeclContext` is not local. This avoids a mangled name conflict.
Also added more thourough tests for `ConcreteVarDecl` and `ParamDecl`.
2022-07-28 12:28:52 +02:00
Paolo Tranquilli
ab1370cc8f
Swift: add --no-cleanup to integration tests
2022-07-28 11:19:45 +02:00
Geoffrey White
6cd6f74be9
Swift: Repair predicate lost in merge.
2022-07-28 10:13:04 +01:00
Geoffrey White
72fd7179f6
Merge branch 'main' into stringlengthconflation6
2022-07-28 10:01:28 +01:00
Geoffrey White
e5342867c6
Swift: Add a note to the qhelp.
2022-07-28 09:52:33 +01:00
Paolo Tranquilli
e43755b34f
Merge pull request #9905 from github/redsun82/cfg-order
...
Control Flow: extend ordering
2022-07-28 10:25:49 +02:00
Paolo Tranquilli
9b26921cb6
Control flow: add order disambuigation customization
2022-07-28 09:11:42 +02:00
Geoffrey White
fe69bbf17c
Swift: It turns out NSString.length always exactly matches String.utf16.count.
2022-07-27 17:54:57 +01:00
Geoffrey White
70ca37a3d0
Swift: Model utf8, utf16 a\nd unicodeScalars sources.
2022-07-27 17:39:04 +01:00
Geoffrey White
89d5bbb8e0
Swift: Generalize the flow states in this query.
2022-07-27 17:39:01 +01:00
Geoffrey White
9e773302ed
Swift: Extend test cases.
2022-07-27 17:39:01 +01:00
Tony Torralba
7ca955a0e6
Add support for XML InlineExpectationsTest
2022-07-27 17:23:10 +02:00
Paolo Tranquilli
ebf650c0c0
Control Flow: add more ordering for edges
2022-07-27 15:01:17 +02:00
Anders Schack-Mulligen
70e6db3ce1
Merge pull request #9902 from aschackmull/java/junit5-assertnotnull
...
Java: Add support for JUnit5 assertions in the nullness queries.
2022-07-27 13:52:01 +02:00
Chris Smowton
9e7fc1731f
Merge pull request #9898 from smowton/smowton/fix/kotlin-super-calls
...
Kotlin: implement super-method calls
2022-07-27 11:31:36 +01:00
Tony Torralba
e179126abb
Merge pull request #9129 from atorralba/atorralba/get-underlying-expr
...
Java: Add Expr::getUnderlyingExpr predicate
2022-07-27 11:42:28 +02:00
Anders Schack-Mulligen
cc423af8f1
Java: Add support for JUnit5 assertions in the nullness queries.
2022-07-27 10:20:47 +02:00
Anders Schack-Mulligen
f2670bcd61
Merge pull request #9900 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-07-27 09:14:28 +02:00
AlexDenisov
f9bdca3079
Merge pull request #9818 from github/redsun82/swift-file-label-caching
...
Swift: cache file labels
2022-07-27 09:12:20 +02:00
github-actions[bot]
30accecd8a
Add changed framework coverage reports
2022-07-27 00:19:16 +00:00
Chris Smowton
5086841b46
Kotlin: implement super-method calls
...
If we only look at the dispatch receiver, these show up like `this` references rather than `super` references, preventing flow through super-calls. The super-interface case requires properly noting that interface methods with a body get a `default` modifier in order to avoid QL discarding the method as a possible callee.
2022-07-26 17:03:46 +01:00
Paolo Tranquilli
42f462504e
Merge branch 'main' into redsun82/swift-file-label-caching
2022-07-26 15:20:27 +02:00
Tony Torralba
edc8f6f0f2
Merge pull request #9894 from atorralba/atorralba/scanner_models
...
Java: Add CSV models for java.util.Scanner
2022-07-26 12:00:08 +02:00
Tony Torralba
33f5620782
Add more models
2022-07-26 11:06:11 +02:00
Tony Torralba
c56e0f7c0d
Add change note
2022-07-26 10:50:34 +02:00
Tony Torralba
95db81658b
Add CSV models for java.util.Scanner
2022-07-26 10:42:24 +02:00
Andrew Eisenberg
43ae5d4285
Merge pull request #9838 from github/aeisenberg/python-local-ref-def
...
Move python contextual queries to lib folders
2022-07-25 09:00:32 -07:00
Chris Smowton
3f6925e7be
Merge pull request #9875 from smowton/smowton/fix/charat-naming
...
Kotlin: Special-case String.charAt naming
2022-07-25 16:10:13 +01:00
Chris Smowton
715b0b3fb8
Accept test changes
2022-07-25 15:17:14 +01:00
Chris Smowton
3af2e71932
Merge pull request #9874 from smowton/smowton/fix/kotlin-for-loop-iterators
...
Kotlin: fix for-loop iterators over primitive or wildcard types
2022-07-25 15:02:49 +01:00
Jeroen Ketema
8cd0a9d245
Merge pull request #9735 from jketema/inline-yolo
...
C++: Remove `pragma[noinline]` from `ResolveGlobalVariable.ql`
2022-07-25 11:25:26 +02:00
Nick Rolfe
a61ec78f03
Merge pull request #9883 from github/nickrolfe/trap-buffering
...
Ruby/QL: speed up trap writing by putting BufWriter in front of GzEncoder
2022-07-25 08:48:54 +01:00
Paolo Tranquilli
fe73601a4e
Merge pull request #9805 from github/redsun82/swift-type-repr-collapse
...
Swift: collapse `TypeRepr` hierarchy
2022-07-25 09:31:41 +02:00
Harry Maclean
681e58c8e0
Merge pull request #9850 from hmac/hmac/arel
...
Ruby: Model Arel.sql
2022-07-25 12:09:18 +12:00
Harry Maclean
cb3ebeedf9
Merge pull request #9696 from thiggy1342/experimental-strong-params
...
RB: Experimental strong params query
2022-07-25 12:08:55 +12:00
Harry Maclean
db41ce5f76
Merge pull request #9605 from thiggy1342/experimental-manually-check-request-verb
...
RB: Experimental query to manually check request verb
2022-07-25 12:08:11 +12:00
thiggy1342
6cfde70898
Merge branch 'main' into experimental-strong-params
2022-07-22 20:41:33 -04:00
thiggy1342
b4d762fb21
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-22 20:41:23 -04:00
thiggy1342
0c0ba925a7
this one should have no tag
2022-07-22 18:44:03 +00:00
thiggy1342
f39ca1aad2
correct cwe tagged
2022-07-22 18:36:25 +00:00
Robert Marsh
0a35f97074
Merge pull request #9872 from jketema/return-join
...
C++: Fix join-order problem in `cpp/return-stack-allocated-memory`
2022-07-22 14:32:10 -04:00
thiggy1342
c2710fb038
Update ruby/ql/src/change-notes/2022-07-21-check-http-verb.md
...
Co-authored-by: Harry Maclean <hmac@github.com >
2022-07-22 13:52:00 -04:00
thiggy1342
2c095cf166
Update ruby/ql/src/change-notes/2022-07-21-weak-params.md
...
Co-authored-by: Harry Maclean <hmac@github.com >
2022-07-22 13:51:38 -04:00
Jeroen Ketema
a9d95a9418
C++: Remove pragma[noinline] from ResolveGlobalVariable.ql
2022-07-22 17:59:27 +02:00
Jeroen Ketema
23c19311fb
Merge pull request #9700 from jketema/resolve-global-variable
...
C++: Ensure only one `Variable` exists for every global variable
2022-07-22 17:57:21 +02:00
Nick Rolfe
4767d5a1ba
Ruby/QL: speed up trap writing by putting BufWriter in front of GzEncoder
2022-07-22 15:37:53 +01:00
Arthur Baars
43266b75a1
Merge pull request #9866 from aibaars/encoding
...
Ruby: handle magic coding: comments
2022-07-22 14:33:46 +02:00
Taus
5f9a03f103
Merge pull request #9880 from github/nickrolfe/ql-ql-extractor-cleanup
...
QL: sync Ruby extractor changes
2022-07-22 14:15:04 +02:00
Paolo Tranquilli
77401ded4e
Swift: reflow comment
2022-07-22 13:54:32 +02:00
Arthur Baars
d44bf326f0
Update ruby/extractor/src/main.rs
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-07-22 13:36:22 +02:00
Paolo Tranquilli
7e67338fb5
Update swift/extractor/infra/SwiftDispatcher.h
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-07-22 13:34:11 +02:00
thiggy1342
871b6515d5
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-21 18:47:07 -04:00
thiggy1342
1842bde879
add change note
2022-07-21 22:13:53 +00:00
thiggy1342
c1a6ca5f94
add change note
2022-07-21 22:11:14 +00:00
thiggy1342
486a394a7f
Update ruby/ql/src/experimental/weak-params/WeakParams.ql
...
Co-authored-by: Harry Maclean <hmac@github.com >
2022-07-21 17:26:09 -04:00
thiggy1342
8fabc06d37
fix test assertion
2022-07-21 21:25:44 +00:00
thiggy1342
cc958dc171
Update ruby/ql/src/experimental/manually-check-http-verb/ManuallyCheckHttpVerb.ql
...
Co-authored-by: Harry Maclean <hmac@github.com >
2022-07-21 17:19:33 -04:00
Arthur Baars
1399610bd4
Merge branch 'main' into encoding
2022-07-21 21:21:17 +02:00
Nick Rolfe
5f96c92fac
QL: sync Ruby extractor changes
2022-07-21 17:38:33 +01:00
Nick Rolfe
ed0325f162
Merge pull request #9878 from github/nickrolfe/extractor-cleanup
...
Ruby: some extractor refactoring
2022-07-21 17:18:24 +01:00
Arthur Baars
7be106d7bb
Ruby: handle magic coding: comments
2022-07-21 16:33:18 +02:00
Arthur Baars
27be3dff54
Merge pull request #9868 from aibaars/update-tree-sitter-ruby-3
...
Ruby: update tree-sitter-ruby
2022-07-21 16:08:32 +02:00
Nick Rolfe
8dae85e1b1
Ruby: avoid repeated construction of table name strings
2022-07-21 12:21:06 +01:00
Nick Rolfe
0a8ecd3cf7
Ruby: compute path string only once
2022-07-21 10:44:30 +01:00
Nick Rolfe
388c9ffb74
Ruby: separate trap-writer into its own module
2022-07-21 10:44:00 +01:00
Jeroen Ketema
ad8335d6f3
C++: Fix join-order problem in cpp/return-stack-allocated-memory
...
Before on Abseil:
```
Evaluated relational algebra for predicate #select#cpe#12356#fffff@3ffb21o1 with tuple counts:
1235939 ~0% {2} r1 = SCAN functions OUTPUT In.0, In.0
1235939 ~0% {2} r2 = JOIN r1 WITH functions ON FIRST 1 OUTPUT Lhs.1, Lhs.0
33500841 ~0% {2} r3 = JOIN r2 WITH DataFlowUtil::Node::getEnclosingCallable#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
280683 ~3% {3} r4 = JOIN r3 WITH MustFlow::MkLocalPathNode#0227f5a1#fff ON FIRST 1 OUTPUT Rhs.2, Lhs.1, Lhs.0
40970 ~2% {4} r5 = JOIN r4 WITH MustFlow::MustFlowConfiguration::hasFlowPath#dispred#f0820431#fff#cpe#23_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.0
40970 ~0% {5} r6 = JOIN r5 WITH MustFlow::MkLocalPathNode#0227f5a1#fff_20#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3, Lhs.0
40970 ~1% {5} r7 = JOIN r6 WITH DataFlowUtil::Cached::TInstructionNode#47741e1f#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3, Lhs.4
40970 ~1% {5} r8 = JOIN r7 WITH project#Instruction::VariableAddressInstruction#class#577b6a83#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4
40970 ~0% {6} r9 = JOIN r8 WITH SSAConstruction::Cached::getInstructionAst#2b11997e#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.1
40970 ~2% {7} r10 = JOIN r9 WITH SSAConstruction::Cached::getInstructionAst#2b11997e#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5, Rhs.1
0 ~0% {6} r11 = JOIN r10 WITH Instruction::Instruction::getEnclosingFunction#dispred#f0820431#3#ff ON FIRST 2 OUTPUT Rhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5, Lhs.6
0 ~0% {5} r12 = JOIN r11 WITH functions ON FIRST 1 OUTPUT Lhs.5, Lhs.1, Lhs.2, Lhs.3, Lhs.4
0 ~0% {5} r13 = JOIN r12 WITH Element::ElementBase::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.3, Lhs.2, Lhs.4, Rhs.1
return r13
```
After:
```
Evaluated relational algebra for predicate #select#cpe#12356#fffff@1dbc97kv with tuple counts:
40970 ~0% {2} r1 = SCAN MustFlow::MustFlowConfiguration::hasFlowPath#dispred#f0820431#fff#cpe#23 OUTPUT In.1, In.0
40970 ~0% {3} r2 = JOIN r1 WITH MustFlow::MkLocalPathNode#0227f5a1#fff_20#join_rhs ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Rhs.1
40970 ~7% {4} r3 = JOIN r2 WITH MustFlow::MkLocalPathNode#0227f5a1#fff_20#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1, Lhs.2
40970 ~2% {4} r4 = JOIN r3 WITH DataFlowUtil::Cached::TInstructionNode#47741e1f#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3
40970 ~2% {4} r5 = JOIN r4 WITH project#Instruction::VariableAddressInstruction#class#577b6a83#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3
40970 ~0% {5} r6 = JOIN r5 WITH SSAConstruction::Cached::getInstructionAst#2b11997e#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Rhs.1
40970 ~1% {6} r7 = JOIN r6 WITH SSAConstruction::Cached::getInstructionAst#2b11997e#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.1
40970 ~0% {6} r8 = JOIN r7 WITH Instruction::Instruction::getEnclosingFunction#dispred#f0820431#3#ff ON FIRST 1 OUTPUT Lhs.3, Rhs.1, Lhs.1, Lhs.2, Lhs.4, Lhs.5
0 ~0% {5} r9 = JOIN r8 WITH DataFlowUtil::Node::getEnclosingCallable#dispred#f0820431#fb ON FIRST 2 OUTPUT Lhs.5, Lhs.2, Lhs.3, Lhs.0, Lhs.4
0 ~0% {5} r10 = JOIN r9 WITH Element::ElementBase::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.3, Lhs.1, Lhs.2, Lhs.4, Rhs.1
return r10
```
2022-07-21 11:27:02 +02:00
Jeroen Ketema
466eb4a845
Merge pull request #9870 from jketema/exec-tainted-join
...
C++: Fix join-order problem in `cpp/command-line-injection`
2022-07-21 11:22:02 +02:00
Cornelius Riemenschneider
a437fcbbcc
Merge pull request #9705 from github/criemen/csharp-lua-tracing
...
C#: Implement correct behavior for `dotnet build` tracing
2022-07-21 11:01:33 +02:00
Chris Smowton
9593ceeda5
Kotlin: Special-case String.charAt naming
...
In the Kotlin universe this is called `get` so that Kotlin programmers can use the `[]` operator on `String`s.
2022-07-21 09:17:08 +01:00
Chris Smowton
0a351b73cb
Underscore query: tolerate synthetic functions
2022-07-21 09:15:27 +01:00
Chris Smowton
1cbe26a54f
Kotlin: fix for-loop iterators over primitive or wildcard types
...
Array<*> can't be queried for an argument type, and IntArray doesn't have an argument at all; both were previously causing the extractor to fail to extract the whole file due to throwing an exception.
2022-07-21 09:13:55 +01:00
Harry Maclean
4d0f6a0b96
Merge pull request #9788 from thiggy1342/add-activerecord-annotate
...
RB: Add ActiveRecord::Relation#annotate to sqlFragmentArgument()
2022-07-21 15:37:03 +12:00
thiggy1342
a10370f813
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-20 16:33:36 -04:00
thiggy1342
b3f2159a7e
Merge branch 'main' into experimental-strong-params
2022-07-20 16:33:32 -04:00
thiggy1342
17c80336f5
Merge branch 'main' into add-activerecord-annotate
2022-07-20 16:33:30 -04:00
Arthur Baars
8d80e0332e
Ruby: update tree-sitter-ruby
2022-07-20 18:16:30 +02:00
Aditya Sharad
a1d9228a66
Merge pull request #9831 from adityasharad/docs/supported-frameworks-changelog-links
...
Docs: Update supported languages page with links to CLI and pack information
2022-07-20 07:36:37 -07:00
Jeroen Ketema
694d6395d5
C++: Fix join-order problem in cpp/command-line-injection
...
Before on Abseil Linux:
```
Evaluated relational algebra for predicate ExecTainted::ExecState#class#91000ffb#fff@41084cm7 with tuple counts:
40879811 ~0% {2} r1 = SCAN DataFlowUtil::Node::getLocation#dispred#f0820431#ff OUTPUT In.1, In.0
40879811 ~0% {2} r2 = JOIN r1 WITH Location::Location::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1
7527 ~3% {3} r3 = JOIN r2 WITH ExecTainted::interestingConcatenation#91000ffb#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
7527 ~0% {4} r4 = JOIN r3 WITH DataFlowUtil::Node::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.2, Lhs.1, Lhs.0, Rhs.1
7527 ~0% {5} r5 = JOIN r4 WITH DataFlowUtil::Node::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.2, Lhs.1, Lhs.0, Lhs.3, Rhs.1
7527 ~0% {6} r6 = JOIN r5 WITH DataFlowUtil::Node::getLocation#dispred#f0820431#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.0, Lhs.3, Lhs.4
7527 ~0% {3} r7 = JOIN r6 WITH Location::Location::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT ((((((("ExecState (" ++ Rhs.1) ++ " | ") ++ Lhs.4) ++ ", ") ++ Lhs.1) ++ " | ") ++ Lhs.5 ++ ")"), Lhs.3, Lhs.2
return r7
```
After:
```
Evaluated relational algebra for predicate ExecTainted::ExecState#class#91000ffb#fff@1ffe61ps with tuple counts:
7527 ~0% {3} r1 = JOIN ExecTainted::interestingConcatenation#91000ffb#ff WITH DataFlowUtil::Node::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Rhs.1
7527 ~0% {4} r2 = JOIN r1 WITH DataFlowUtil::Node::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, Rhs.1
7527 ~1% {5} r3 = JOIN r2 WITH DataFlowUtil::Node::getLocation#dispred#f0820431#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0, Lhs.2, Lhs.3
7527 ~0% {5} r4 = JOIN r3 WITH Location::Location::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.1
7527 ~4% {6} r5 = JOIN r4 WITH DataFlowUtil::Node::getLocation#dispred#f0820431#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4
7527 ~0% {3} r6 = JOIN r5 WITH Location::Location::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT ((((((("ExecState (" ++ Rhs.1) ++ " | ") ++ Lhs.3) ++ ", ") ++ Lhs.5) ++ " | ") ++ Lhs.4 ++ ")"), Lhs.1, Lhs.2
return r6
```
2022-07-20 16:27:47 +02:00
thiggy1342
8c55a15fa6
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-20 10:27:40 -04:00
thiggy1342
6f74a2609c
Merge branch 'main' into experimental-strong-params
2022-07-20 10:26:49 -04:00
thiggy1342
f54fc1a88d
Merge branch 'main' into add-activerecord-annotate
2022-07-20 10:26:44 -04:00
Jeroen Ketema
c2b7300709
Merge pull request #9848 from geoffw0/stringlengthconflation5
...
Swift: More improvements for the string length conflation query
2022-07-20 14:05:05 +02:00
Cornelius Riemenschneider
e9e5d948b3
C#: Implement proper dotnet build handling in the Lua tracing config.
...
For proper C# tracing, `dotnet build` needs the parameter
/p:UseSharedCompilation=false. However, we can't pass that to the other
subcommands of `dotnet`, therefore we need to figure out which subcommand
of `dotnet` is being invoked.
2022-07-20 10:11:36 +00:00
Cornelius Riemenschneider
ca819573f5
Merge pull request #9862 from github/adityasharad/codeql-cli-2.10.1-mergeback
...
Merge codeql-cli-2.10.1 into main
2022-07-20 10:42:34 +02:00
Paolo Tranquilli
3527897eff
Swift: make type optional in TypeRepr
...
A type representation may not have a type in unresolved things, which
for example pop up in inactive `#if` clauses.
2022-07-20 09:13:34 +02:00
Aditya Sharad
7620a6f653
Docs: Update supported languages page with links to CLI and pack information
...
Include links to the CLI changelog, CLI releases, bundle releases,
pack changelogs, and pack source.
Clarify that this support information applies to the current version of
the CLI, bundle, query packs, and library packs.
2022-07-19 14:58:27 -07:00
Asger F
aa53841466
Merge pull request #9828 from github/post-release-prep/codeql-cli-2.10.1
...
Post-release preparation for codeql-cli-2.10.1
2022-07-19 19:49:50 +02:00
Henti Smith
018a76bb17
Merge pull request #9857 from github/henti/new_actions_predicates
...
Added Workflow.getName and Step.GetId
2022-07-19 16:12:54 +01:00
Henti Smith
dcc76ddf36
Apply suggestions from code review
...
Co-authored-by: Henry Mercer <henrymercer@github.com >
2022-07-19 15:53:12 +01:00
Henti Smith
0828474192
Added Workflow::getName and Step::GetId
2022-07-19 15:34:10 +01:00
thiggy1342
43a9b8960e
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-19 10:29:48 -04:00
thiggy1342
cf23d338f3
Merge branch 'main' into experimental-strong-params
2022-07-19 10:29:36 -04:00
thiggy1342
6bc2fe513d
Merge branch 'main' into add-activerecord-annotate
2022-07-19 10:29:24 -04:00
Asger F
b9bdee6651
Merge branch 'main' into post-release-prep/codeql-cli-2.10.1
2022-07-19 16:24:35 +02:00
Cornelius Riemenschneider
03bf9eb166
Merge pull request #9837 from github/aeisenberg/definitions.ql
...
Move definitions.ql back to src
2022-07-19 14:43:10 +02:00
Taus
bfe90413e2
Merge pull request #9847 from alexet/alexet/fix-predicate-binding
...
Python: Fix binding incorrect predicate.
2022-07-19 13:59:13 +02:00
Arthur Baars
dcbd82907f
Merge pull request #9845 from aibaars/skip-dotgit
...
Ruby: skip .git folder
2022-07-19 11:58:43 +02:00
Harry Maclean
ec1d1eb547
Ruby: Add change note
2022-07-19 14:33:51 +12:00
thiggy1342
962155fd61
fix changenotes
2022-07-19 00:33:04 +00:00
thiggy1342
9586259706
style tweak for checking multiple method names
2022-07-19 00:29:30 +00:00
thiggy1342
304203ad2f
fix path problem output
2022-07-19 00:25:50 +00:00
Harry Maclean
7b8603c89b
Ruby: Model Arel.sql
2022-07-19 11:27:15 +12:00
Taus
8c0725e8c6
Python: Fix bad join in ESSA getInput
...
Before:
```
Tuple counts for Essa::EssaEdgeRefinement::getInput#dispred#f0820431#ff/2@b84afc77 after 20.3s:
873421 ~0% {3} r1 = JOIN Essa::TEssaEdgeDefinition#24e22a14#ffff_31#join_rhs WITH Essa::TEssaEdgeDefinition#24e22a14#ffff_30#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0 'this'
181627951 ~0% {3} r2 = JOIN r1 WITH Essa::EssaDefinition::getSourceVariable#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'result', Lhs.1, Lhs.2 'this'
873418 ~0% {2} r3 = JOIN r2 WITH Essa::EssaDefinition::reachesEndOfBlock#dispred#f0820431#ff ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.0 'result'
return r3
```
It's perhaps not immediately obvious what's going on here (because of
the `...join_rhs` indirection), but basically we're joining together
`this` and `def` and their `getSourceVariable`, and only then actually
relating `this` and `def` through `reachesEndOfBlock`.
By unbinding `var`, we prevent this early join, which now encourages the
`reachesEndOfBlock` join to happen earlier:
```
Tuple counts for Essa::EssaEdgeRefinement::getInput#dispred#f0820431#ff/2@2d63e5lb after 2s
873421 ~0% {2} r1 = SCAN Essa::TEssaEdgeDefinition#24e22a14#ffff OUTPUT In.3 'this', In.1
873421 ~0% {3} r2 = JOIN r1 WITH Essa::TEssaEdgeDefinition#24e22a14#ffff_30#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0 'this'
873421 ~0% {3} r3 = JOIN r2 WITH Definitions::SsaSourceVariable#class#486534ab#f ON FIRST 1 OUTPUT Lhs.1, Lhs.2 'this', Lhs.0
8758877 ~0% {3} r4 = JOIN r3 WITH Essa::EssaDefinition::reachesEndOfBlock#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'result', Lhs.2, Lhs.1 'this'
873418 ~0% {2} r5 = JOIN r4 WITH Essa::EssaDefinition::getSourceVariable#dispred#f0820431#ff ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.0 'result'
return r5
```
2022-07-18 20:21:39 +00:00
alexet
f9b6ca76e5
Python: Fix binding incorrect predicate.
2022-07-18 16:28:19 +01:00
thiggy1342
fc00e56058
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-18 10:58:13 -04:00
Taus
bdd771989f
Python: Fix bad join in syntactic_call_count
...
On certain databases, the evaluation of this predicate was running out
of memory due to the way the `count` aggregate was being used. Here's
an example of the tuple counts involved:
```
Tuple counts for PointsToContext::syntactic_call_count#cf3039a0#ff#antijoin_rhs/1@d2199bb8 after 1m27s:
595518502 ~521250% {1} r1 = JOIN PointsToContext::syntactic_call_count#cf3039a0#ff#shared#3 WITH Flow::CallNode::getFunction#dispred#f0820431#ff_1#join_rhs ON FIRST 1 OUTPUT Lhs.1 'arg0'
26518709 ~111513% {1} r2 = JOIN PointsToContext::syntactic_call_count#cf3039a0#ff#shared#2 WITH Flow::CallNode::getFunction#dispred#f0820431#ff_1#join_rhs ON FIRST 1 OUTPUT Lhs.1 'arg0'
622037211 ~498045% {1} r3 = r1 UNION r2
return r3
```
and a timing report that looked like this:
```
time | evals | max @ iter | predicate
------|-------|--------------|----------
5m8s | | | PointsToContext::syntactic_call_count#cf3039a0#ff#shared#2@6d98d1nd
4m38s | | | PointsToContext::syntactic_call_count#cf3039a0#ff#count_range@f5df1do4
3m51s | | | PointsToContext::syntactic_call_count#cf3039a0#ff#shared#3@da3b4abf
1m58s | 7613 | 37ms @ 4609 | MRO::ClassListList::removedClassParts#f0820431#fffff#reorder_2_3_4_0_1@8155axyi
1m37s | 7613 | 33ms @ 3904 | MRO::ClassListList::bestMergeCandidate#f0820431#2#fff@8155a83w
1m27s | | | PointsToContext::syntactic_call_count#cf3039a0#ff#antijoin_rhs@d2199bb8
1m8s | 1825 | 63ms @ 404 | PointsTo::Expressions::equalityEvaluatesTo#741b54e2#fffff@8155aw7w
37.6s | | | PointsToContext::syntactic_call_count#cf3039a0#ff#join_rhs@e348fc1p
...
```
To make optimising this easier for the compiler, I moved the bodies of
the `count` aggregate into their own helper predicates (with size
linear in the number of `CallNode`s), and also factored out the many
calls to `f.getName()`.
The astute reader will notice that in writing this as a sum of `count`s
rather than a count of a disjunction, the intersection (if it exists)
will be counted twice, and so the semantics may be different. However,
since `method_call` and `function_call` require `AttrNode` and
`NameNode` functions respectively, and as these two types are disjoint,
there is no intersection, and so the semantics should be preserved.
After the change, the evaluation of `syntactic_call_count` now looks as
follows:
```
Tuple counts for PointsToContext::syntactic_call_count#cf3039a0#ff/2@662dd8s0 after 216ms:
23960 ~0% {1} r1 = @py_scope#f AND NOT py_Functions_0#antijoin_rhs(Lhs.0 's')
23960 ~0% {2} r2 = SCAN r1 OUTPUT In.0 's', 0
276309 ~7% {2} r3 = SCAN @py_scope#f OUTPUT In.0 's', "__init__"
11763 ~0% {2} r4 = JOIN r3 WITH Scope::Scope::getName#dispred#f0820431#fb ON FIRST 2 OUTPUT Lhs.0 's', 1
35723 ~0% {2} r5 = r2 UNION r4
252349 ~0% {2} r6 = JOIN @py_scope#f WITH Function::Function::getName#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.0 's', Rhs.1
240586 ~0% {2} r7 = SELECT r6 ON In.1 != "__init__"
131727 ~4% {2} r8 = r7 AND NOT project#PointsToContext::method_call#cf3039a0#ff(Lhs.1)
131727 ~0% {3} r9 = SCAN r8 OUTPUT In.1, In.0 's', 0
240586 ~0% {2} r10 = SCAN r7 OUTPUT In.1, In.0 's'
108859 ~0% {3} r11 = JOIN r10 WITH PointsToContext::syntactic_call_count#cf3039a0#ff#join_rhs ON FIRST 1 OUTPUT Lhs.0, Lhs.1 's', Rhs.1
240586 ~0% {3} r12 = r9 UNION r11
24100 ~0% {2} r13 = JOIN r12 WITH PointsToContext::syntactic_call_count#cf3039a0#ff#join_rhs#1 ON FIRST 1 OUTPUT Lhs.1 's', (Rhs.1 + Lhs.2)
240586 ~0% {2} r14 = SELECT r6 ON In.1 != "__init__"
131727 ~4% {2} r15 = r14 AND NOT project#PointsToContext::method_call#cf3039a0#ff(Lhs.1)
131727 ~0% {3} r16 = SCAN r15 OUTPUT In.0 's', In.1, 0
108859 ~4% {3} r17 = JOIN r10 WITH PointsToContext::syntactic_call_count#cf3039a0#ff#join_rhs ON FIRST 1 OUTPUT Lhs.1 's', Lhs.0, Rhs.1
240586 ~4% {3} r18 = r16 UNION r17
216486 ~2% {3} r19 = r18 AND NOT project#PointsToContext::function_call#cf3039a0#ff(Lhs.1)
216486 ~0% {2} r20 = SCAN r19 OUTPUT In.0 's', (0 + In.2)
240586 ~0% {2} r21 = r13 UNION r20
276309 ~0% {2} r22 = r5 UNION r21
return r22
```
2022-07-18 13:58:00 +00:00
Arthur Baars
c9e5206396
Ruby: skip .git folder
2022-07-18 15:26:38 +02:00
Geoffrey White
541df9b550
Swift: Remove TODO comment. We have a test for this problem now.
2022-07-18 14:26:12 +01:00
Geoffrey White
336548f746
Swift: Improve comments.
2022-07-18 14:24:16 +01:00
Geoffrey White
9474e63faf
Swift: Clean up isSink (4 - move common code out).
2022-07-18 14:24:15 +01:00
Geoffrey White
b136790efd
Swift: Clean up isSink (3 - rename f -> funcDecl and move that out as well; in the other two cases this variable didn't exist, now it does).
2022-07-18 14:24:14 +01:00
Geoffrey White
0bd94a6307
Swift: Clean up isSink (2 - rename methodName -> funcName and move that out as well).
2022-07-18 14:24:13 +01:00
Geoffrey White
4854679a40
Swift: Clean up isSink (1 - move common variables to an outer exists).
2022-07-18 14:24:13 +01:00
Geoffrey White
39fb714ad1
Swift: Add test with substring declared differently.
2022-07-18 14:24:12 +01:00
Michael Nebel
6603024488
C#: Allow encryption- prefix for sinks in CsvValidation.
2022-07-18 14:32:31 +02:00
Michael Nebel
57ba0c4e5d
C#: Move sinks into System.Security.Cryptography framework code.
2022-07-18 14:28:49 +02:00
Michael Nebel
c91d49a0fe
C#: Add provenance column to CSV format for SymmetricAlgorithm.
2022-07-18 14:28:49 +02:00
Michael Nebel
66232a8054
C#: Fix typo.
2022-07-18 14:28:49 +02:00
Michael Nebel
a5b7e2a2e1
C#: Convert set Key of SymmetricAlgorithm to Csv sink.
2022-07-18 14:28:49 +02:00
Michael Nebel
032448041d
C#: Convert CreateSymmetricKey to CSV sink.
2022-07-18 14:28:49 +02:00
Michael Nebel
1d405dba14
C#: Collapse Sink classes.
2022-07-18 14:28:49 +02:00
Michael Nebel
383ad51682
C#: Use CSV format for CreateEncryptor and CreateDecryptor sinks.
2022-07-18 14:28:49 +02:00
Michael Nebel
e6e82ef56d
C#: Update test with Decrypt example.
2022-07-18 14:28:49 +02:00
Michael Nebel
52a9fb0de7
C#: Add test for decrypt.
2022-07-18 14:28:49 +02:00
Paolo Tranquilli
e1bd4a78ff
Merge branch 'main' into redsun82/swift-type-repr-collapse
2022-07-18 14:05:43 +02:00
Paolo Tranquilli
10b7b1f183
Merge branch 'main' into redsun82/swift-file-label-caching
2022-07-18 14:02:57 +02:00
Paolo Tranquilli
410167671f
Merge pull request #9795 from github/redsun82/swift-extraction
...
Swift: extract more entities
2022-07-18 13:37:43 +02:00
Nick Rolfe
eebba36b18
Merge pull request #9708 from github/nickrolfe/pathname
...
Ruby: model the standard library's `Pathname` class
2022-07-18 11:29:30 +01:00
Paolo Tranquilli
98fc8812fc
Merge 'main' into redsun82/swift-extraction
2022-07-18 11:55:21 +02:00
Paolo Tranquilli
c779936ee8
Swift: commit forgotten files
2022-07-18 11:19:40 +02:00
Paolo Tranquilli
c08c3955d6
Swift: add UnresolvedPatternExpr test
2022-07-18 10:37:54 +02:00
Paolo Tranquilli
78fc356feb
Swift: address review comments
2022-07-18 10:29:20 +02:00
Nick Rolfe
dbd6607875
Ruby: use ASCII dash in comment
...
Co-authored-by: Harry Maclean <hmac@github.com >
2022-07-18 08:54:58 +01:00
Harry Maclean
cc5f59f313
Merge pull request #9138 from hmac/hmac/array-inclusion-guard-local-flow
...
Ruby: Make StringArrayInclusion more sensitive
2022-07-18 10:11:49 +12:00
yo-h
d4443592eb
Merge pull request #9776 from raulgarciamsft/azure-sdk-client-encryption-version
...
New queries to detect unsafe client side encryption in Azure Storage
2022-07-16 14:59:51 -04:00
Raul Garcia
6b17890e4f
Fixing warning on usage of a deprecated feature.
2022-07-16 08:30:06 -07:00
Raul Garcia
eefa659503
Update java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: yo-h <55373593+yo-h@users.noreply.github.com >
2022-07-16 08:23:59 -07:00
Raul Garcia
fe789c8aa9
Update java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: yo-h <55373593+yo-h@users.noreply.github.com >
2022-07-16 08:22:18 -07:00
Andrew Eisenberg
b897a40228
Move python contextual queries to lib folders
...
This will ensure that python projects can use jump to ref/def in
vscode when the core libraries are not installed.
2022-07-15 13:12:17 -07:00
Andrew Eisenberg
2f50549184
Move definitions.ql back to src
2022-07-15 11:48:15 -07:00
thiggy1342
a1df1d1119
Merge branch 'main' into experimental-strong-params
2022-07-15 11:17:57 -04:00
thiggy1342
ee1c09329f
Merge branch 'main' into add-activerecord-annotate
2022-07-15 11:17:48 -04:00
Chris Smowton
41ca791966
Implement is-underscore-parameter for old versions of Kotlin
2022-07-15 12:36:37 +01:00
Erik Krogh Kristensen
625e37a0da
fix typo
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2022-07-14 21:53:21 +02:00
Aditya Sharad
d50816a284
Merge pull request #9802 from adityasharad/docs/language-pack-changelogs
...
Docs: Add links from query help to query pack changelog for each language
2022-07-14 08:52:50 -07:00
Chris Smowton
d4b0163c4c
Kotlin: Don't extract a name for a '_' parameter
...
I can't reproduce the exact circumstances, but these sometimes get "<anonymous parameter X>" names and sometimes get "$noName_X" names. Whichever way, avoiding extracting a synthetic name seems safest; anyone finding the .class file and not reading the metadata indicating it came from a `_` will extract the binary name selected, or else QL will
invent a name.
2022-07-14 16:36:26 +01:00
github-actions[bot]
0ee476129a
Post-release preparation for codeql-cli-2.10.1
2022-07-14 14:38:49 +00:00
Paolo Tranquilli
5e74df3882
Swift: cache file paths
...
This required a bit of a generalization of `TrapLabelStore` to not
work only with pointers.
2022-07-14 16:32:33 +02:00
Aditya Sharad
d13f9d5d71
Update docs/codeql/query-help/javascript.rst
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-07-14 07:29:29 -07:00
Paolo Tranquilli
7fbe4f8547
Merge pull request #9815 from github/redsun82/swift-exclusive-file
...
Swift: trap output rework
2022-07-14 16:23:44 +02:00
thiggy1342
592ce3ec58
Merge branch 'main' into add-activerecord-annotate
2022-07-14 09:55:25 -04:00
Paolo Tranquilli
22ff8c2c7e
Swift: remove redundant braces
2022-07-14 15:40:48 +02:00
Paolo Tranquilli
3e06455ac1
Swift: delete TargetFile's move assignment
2022-07-14 15:39:36 +02:00
Anders Schack-Mulligen
21066d277f
Merge pull request #9819 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-07-14 15:13:37 +02:00
Erik Krogh Kristensen
5ba4f6dae8
Merge pull request #9826 from erik-krogh/combineWork
...
QL: rewrite the QL-for-QL workflow to just do everything in one go
2022-07-14 14:24:31 +02:00
Asger F
fd7561cf27
Merge pull request #9822 from github/release-prep/2.10.1
...
Release preparation for version 2.10.1
2022-07-14 14:02:41 +02:00
Erik Krogh Kristensen
1037c2b182
all comments are alive
2022-07-14 13:30:12 +02:00
Erik Krogh Kristensen
a7a9428dc1
split the sarif file into languages
2022-07-14 13:20:52 +02:00
Erik Krogh Kristensen
47c9b446f0
exclude upgrade scripts from QL-for-QL
2022-07-14 13:01:40 +02:00
Erik Krogh Kristensen
380070f2e4
rewrite the QL-for-QL workflow to just do everything in one go
2022-07-14 12:54:27 +02:00
Erik Krogh Kristensen
85a652f3d1
remove a bunch of repeated words
2022-07-14 12:42:48 +02:00
Erik Krogh Kristensen
2ea2bd8966
refine the repeated-word query
2022-07-14 12:35:09 +02:00
Erik Krogh Kristensen
cb3a0fb5de
make a Comment superclass
2022-07-14 12:25:01 +02:00
Erik Krogh Kristensen
f20c186277
add ql/repeated-word query
2022-07-14 12:20:30 +02:00
Asger F
dbff20a3d8
Update cpp/ql/lib/CHANGELOG.md
2022-07-14 12:10:03 +02:00
Asger F
9f184ec122
Update cpp/ql/lib/change-notes/released/0.3.1.md
2022-07-14 12:09:58 +02:00
Jeroen Ketema
fe1f1bb79d
Fix issues with change notes
2022-07-14 11:06:14 +02:00
Erik Krogh Kristensen
33fdcf1e4f
Merge pull request #9794 from erik-krogh/unusedVue
...
JS: exclude variables in .vue files form js/unused-local-variable
2022-07-14 10:57:06 +02:00
github-actions[bot]
d1aa0d7dd3
Release preparation for version 2.10.1
2022-07-14 08:56:03 +00:00
Asger F
855d4c2ea1
Merge pull request #9718 from asgerf/js/case-sensitive-middleware
...
JS: Add 'case sensitive middleware' query
2022-07-14 10:47:58 +02:00
Erik Krogh Kristensen
43a82004b2
Merge pull request #9798 from erik-krogh/backtrackers
...
JS: use small steps in TypeBackTracker correctly
2022-07-14 10:28:07 +02:00
Erik Krogh Kristensen
ed80089d7c
fix some QL-for-QL warnings in JS
2022-07-14 09:45:44 +02:00
Asger F
18c5a8c8da
Merge branch 'main' into js/case-sensitive-middleware
2022-07-14 09:38:35 +02:00
Asger F
da8123072d
Apply suggestions from doc review
...
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com >
2022-07-14 09:38:10 +02:00
Paolo Tranquilli
f1144b9672
Swift: small TypeRepr visit rewording
2022-07-14 06:18:51 +02:00
Paolo Tranquilli
d748cb483d
Swift: include cleanup
...
Fix a problem with `sstream` not being transitively included on macOS.
2022-07-14 06:10:12 +02:00
Paolo Tranquilli
4c53c341f6
Swift: make TargetFile::good() a class invariant
...
Fallible initialization has been moved to a factory function, and
`commit` has been moved to the destructor.
2022-07-14 06:02:35 +02:00
thiggy1342
62a10e20b2
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-13 20:28:09 -04:00
thiggy1342
8ca7d7d775
update change note
2022-07-14 00:22:38 +00:00
thiggy1342
9d277027a3
Merge branch 'main' into experimental-strong-params
2022-07-13 20:19:50 -04:00
thiggy1342
3dd61cadf4
formatting query
2022-07-14 00:19:36 +00:00
github-actions[bot]
9a186ba5d2
Add changed framework coverage reports
2022-07-14 00:18:56 +00:00
thiggy1342
ee79834cc8
formatting in qhelp
2022-07-14 00:15:39 +00:00
thiggy1342
ae634367c9
add qhelp file
2022-07-14 00:11:52 +00:00
thiggy1342
2cc703387b
use taint config for data flow
2022-07-14 00:11:52 +00:00
thiggy1342
f5301aa478
Merge branch 'main' into add-activerecord-annotate
2022-07-13 14:35:44 -04:00
Chris Smowton
80cbddf626
Merge pull request #9817 from smowton/smowton/feature/model-java-util-properties
...
Java: Model `java.util.Properties.getProperty`
2022-07-13 17:12:11 +01:00
Raul Garcia
f7c47b6c75
Update python/ql/src/experimental/Security/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.py
...
Co-authored-by: Taus <tausbn@github.com >
2022-07-13 08:34:48 -07:00
Chris Smowton
f9da4a0456
Add change note
2022-07-13 14:11:31 +01:00
Chris Smowton
b1dd3c2d84
Model java.util.Properties.getProperty
2022-07-13 13:59:28 +01:00
Erik Krogh Kristensen
9e2e32f037
Merge pull request #9322 from erik-krogh/fixAutoBuild
...
QL/RB: fix the QL-for-QL and ruby autobuilders
2022-07-13 14:39:59 +02:00
Paolo Tranquilli
6dd09c1815
Merge pull request #9796 from github/redsun82/swift-codegen-skip-cpp-pragma
...
Swift: allow skipping fields in cppgen
2022-07-13 13:20:47 +02:00
Erik Krogh Kristensen
3e4a182ee8
Merge pull request #7450 from erik-krogh/missDocParam
...
QL: Add query detecting suspiciously missing parameters from the QLDoc of a predicate
2022-07-13 12:45:15 +02:00
Paolo Tranquilli
5773a734c3
Swift: slightly simplify a cppgen change
2022-07-13 11:27:50 +02:00
Paolo Tranquilli
f7dca4d70f
Swift: trap output rework
...
Firstly, this change reworks how inter-process races are resolved.
Moreover some responsability reorganization has led to merging
`TrapArena` and `TrapOutput` again into a `TrapDomain` class.
A `TargetFile` class is introduced, that is successfully created
only for the first process that starts processing a given trap output
file. From then on `TargetFile` simply wraps around `<<` stream
operations, dumping them to a temporary file. When `TargetFile::commit`
is called, the temporary file is moved on to the actual target trap
file.
Processes that lose the race can now just ignore the unneeded
extraction and go on, while previously all processes would carry out
all extractions overwriting each other at the end.
Some of the file system logic contained in `SwiftExtractor.cpp` has been
moved to this class, and two TODOs are solved:
* introducing a better inter process file collision avoidance strategy
* better error handling for trap output operations: if unable to write
to the trap file (or carry out other basic file operations), we just
abort.
The changes to `ExprVisitor` and `StmtVisitor` are due to wanting to
hide the raw `TrapDomain::createLabel` from them, and bring more
funcionality under the generic caching/dispatching mechanism.
2022-07-13 11:19:57 +02:00
Harry Maclean
1fa2144716
Ruby: Update test fixtures
2022-07-13 21:02:08 +12:00
Erik Krogh Kristensen
fd10947ca0
use small steps in TypeBackTracker correctly
2022-07-13 10:29:57 +02:00
Erik Krogh Kristensen
cd5fbe633f
update locations in test after merging in the focus-location-pr
2022-07-13 10:12:52 +02:00
Erik Krogh Kristensen
c4f44bb67f
sync files
2022-07-13 10:01:26 +02:00
Erik Krogh Kristensen
a49d34cf0f
Merge branch 'main' into missDocParam
2022-07-13 09:58:04 +02:00
Erik Krogh Kristensen
dded3af3d8
remove more false positives from the ql/missing-parameter-qldoc query
2022-07-13 09:57:17 +02:00
Erik Krogh Kristensen
047b14e310
get the autobuilders to work after introducing test-cases
2022-07-13 09:50:55 +02:00
Erik Krogh Kristensen
eb0340dcb6
get excludes to work properly
2022-07-13 09:50:55 +02:00
Erik Krogh Kristensen
878168384e
remove tools:latest from codeql-action in QL-for-QL
2022-07-13 09:50:54 +02:00
Erik Krogh Kristensen
2850b35a04
update, and fix, the autobuilders by using the new --also-match option
2022-07-13 09:48:29 +02:00
Harry Maclean
49aab51893
Ruby: Make helper predicate private
2022-07-13 18:20:27 +12:00
Harry Maclean
ea95e2e1d0
Ruby: Use InclusionTests library in barrier guards
2022-07-13 18:20:27 +12:00
Harry Maclean
b9fc82a741
Ruby: Test both old and new-style barrier guards
2022-07-13 18:20:25 +12:00
Harry Maclean
4cfaa86d5d
Ruby: Update new-style barrier-guard
2022-07-13 18:20:14 +12:00
Harry Maclean
5f17d8370c
Ruby: Small change to isArrayExpr
2022-07-13 18:20:14 +12:00
Harry Maclean
63dcce9a31
Ruby: Refactor isArrayConstant
2022-07-13 18:20:14 +12:00
Harry Maclean
b5a3d3c488
Ruby: Extract isArrayConstant
...
This predicate might be useful elsewhere.
2022-07-13 18:20:14 +12:00
Harry Maclean
301914d80c
Ruby: Add an extra barrier guard test
2022-07-13 18:20:14 +12:00
Harry Maclean
706d1d2eee
Ruby: Make StringArrayInclusion more sensitive
...
We now recognise the following pattern as a barrier guard for `x`:
values = ["foo", "bar"]
if values.include? x
sink x
end
2022-07-13 18:20:12 +12:00
Raul Garcia
0dbb03f732
Adding CVE information.
2022-07-12 21:49:19 -07:00
thiggy1342
7df7b92d86
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-12 20:36:34 -04:00
thiggy1342
7129002573
tweak tests more
2022-07-13 00:33:58 +00:00
thiggy1342
b3f1a513d1
Update tests
2022-07-13 00:25:43 +00:00
thiggy1342
9a0a9491da
Merge branch 'main' into add-activerecord-annotate
2022-07-12 20:13:56 -04:00
thiggy1342
2566ae9889
Merge branch 'main' into experimental-strong-params
2022-07-12 20:12:51 -04:00
thiggy1342
db5f63b208
add tests
2022-07-12 23:14:16 +00:00
thiggy1342
7facc63699
remove predicate
2022-07-12 22:59:48 +00:00
Erik Krogh Kristensen
2aaedacd5d
Merge pull request #9593 from erik-krogh/param2
...
QL: followup fixes to parameterized modules
2022-07-13 00:23:11 +02:00
Erik Krogh Kristensen
89043ec4ef
Merge branch 'main' into param2
2022-07-12 23:21:11 +02:00
thiggy1342
74d6061082
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-12 17:15:54 -04:00
Erik Krogh Kristensen
5cbe01d8dc
Merge pull request #8351 from erik-krogh/inconsistentDep
...
QL: add query detecting inconsistent deprecations
2022-07-12 23:12:24 +02:00
Erik Krogh Kristensen
e092cb02cd
Merge pull request #8937 from erik-krogh/qlFocusedLocations
...
QL: more precise alert locations
2022-07-12 23:11:22 +02:00
Raul Garcia
a4adf06713
Addressing feedback for the qhelp file.
2022-07-12 13:51:12 -07:00
Jeroen Ketema
c18428f1a9
Merge pull request #9785 from bdrodes/main
...
C++: Nullness.qll bug fixes
2022-07-12 21:43:44 +02:00
Raul Garcia
d929b1338b
Addressing API::Node feedback for all predicates
2022-07-12 11:55:06 -07:00
ihsinme
e77a989133
Update DangerousUseMbtowc.expected
2022-07-12 20:22:31 +03:00
ihsinme
98af52fba5
Update DangerousUseMbtowc.ql
2022-07-12 20:19:59 +03:00
ihsinme
1291f33c39
Merge pull request #1 from geoffw0/test123
...
C++: Accept test results.
2022-07-12 20:18:59 +03:00
Ian Lynagh
83edb3b5e9
Kotlin: Remove the last uses of fakeLabel
2022-07-12 17:43:50 +01:00
Geoffrey White
f29104ccce
C++: Accept test results.
2022-07-12 16:49:04 +01:00
Raul Garcia
64343e00f4
Update java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-07-12 08:14:25 -07:00
Raul Garcia
8a48708014
Update java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-07-12 08:14:13 -07:00
Raul Garcia
2bac181094
Update java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-07-12 08:13:53 -07:00
Raul Garcia
a4e35a97ea
Update java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-07-12 08:13:38 -07:00
Raul Garcia
a51d713925
Update java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: Chris Smowton <smowton@github.com >
2022-07-12 08:13:12 -07:00
Jeroen Ketema
f7c4fa691d
Apply suggestions from code review
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2022-07-12 16:59:15 +02:00
Ian Lynagh
a0636ff843
Merge pull request #9545 from igfoo/igfoo/type_cycles
...
Java: Fix RefType.getAStrictAncestor() in the presence of type hierarchy cycles
2022-07-12 14:28:54 +01:00
Jeroen Ketema
8f9d419441
C++: Add change note
2022-07-12 15:24:09 +02:00
Jeroen Ketema
e5eabc4e47
C++: Slightly tweak nullness test and update test results
2022-07-12 15:23:33 +02:00
Jeroen Ketema
d63b0946d9
C++: Use ConditionDeclExpr in AnalysedExpr::isDef
2022-07-12 15:22:13 +02:00
Jeroen Ketema
2ceb25dc9a
C++: Order left and right operands in the logical left to right order
2022-07-12 15:21:37 +02:00
Ian Lynagh
d0bf424b19
Merge pull request #9806 from igfoo/igfoo/useType
...
Kotlin: Extract an ErrorType if we fail to correctly extract a type
2022-07-12 13:45:04 +01:00
Ian Lynagh
1bcb17b760
Update java/ql/lib/change-notes/2022-07-12-errortype.md
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-07-12 12:16:24 +01:00
Paolo Tranquilli
48c71c9407
Swift: add comment about TypeRepr in ASTNode fetching
2022-07-12 12:10:22 +02:00
Jeroen Ketema
de6a9375ba
Merge pull request #9804 from jketema/get-target
...
C++: Clarify the "most-specific" part of `FunctionCall:getTarget`
2022-07-12 12:06:50 +02:00
Ian Lynagh
2edeeaac0e
Merge pull request #9801 from igfoo/igfoo/psi
...
Kotlin: We can't extract comments for < 1.5.20
2022-07-12 11:01:30 +01:00
Ian Lynagh
965f5a980a
Java/Kotlin: Add changenote for ErrorType
2022-07-12 10:58:16 +01:00
Henry Mercer
2ddcf8364c
Merge pull request #9585 from github/henrymercer/packaging-on-ghes
...
Docs: Document packaging support for CodeQL CLI 2.9.4+ on GHES 3.6+
2022-07-12 10:36:03 +01:00
Paolo Tranquilli
033b239b22
Swift: collapse TypeRepr hierarchy
...
Now `TypeRepr` is a final class in the AST, which is more or less just
a type with a location in code.
As the frontend does not provide a direct way to get a type from a
type representation, this information must be provided when fetching
the label of a type repr.
This meant:
* removing the type repr field from `EnumIsCaseExpr`: this is a virtual
AST node introduced in place of some kinds of `IsEpxr`. The type
repr is still available from the `ConditionalCheckedCastExpr` wrapped
by this virtual node, and we will rebuild the original `IsExpr` with
the IPA layer.
* some logic to get the type of keypath roots has been added to
`KeyPathExpr`. This was done to keep the `TypeRepr` to `Type` relation
total in the DB, but goes against the design of a dumb extractor. The
logic could be moved to QL in the future
* in the control flow library, `TypeRepr` children are now ignored. As
far as I can tell, there is no runtime evaluation going on in
`TypeRepr`s, so it does not make much sense to have control flow
through them.
2022-07-12 10:49:14 +02:00
Nick Rolfe
685389d219
Merge pull request #9797 from github/nickrolfe/railties_fix
...
Ruby: fix defining every dataflow node as a command execution sink
2022-07-12 09:30:55 +01:00
Jeroen Ketema
c75599c3da
C++: Clarify the "most-specific" part of FunctionCall:getTarget
2022-07-12 10:28:19 +02:00
Nick Rolfe
217c9a8aaf
Fix typo in changenote
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2022-07-12 08:50:58 +01:00
Paolo Tranquilli
47a4cac8ee
Merge branch 'main' into redsun82/swift-extraction
2022-07-12 09:29:10 +02:00
Paolo Tranquilli
70838fe57f
Merge pull request #9774 from github/redsun82/swift-disable-change-note-check
...
Swift: disable change note checking for now
2022-07-12 09:28:37 +02:00
Raul Garcia
d5791e2d56
Addressing feedback from the PR
2022-07-11 15:45:15 -07:00
Aditya Sharad
02e11b7ee9
Docs: Add links from query help to query pack changelog for each language
2022-07-11 13:59:38 -07:00
Raul Garcia
ac05577966
Making various changes based on the feedback. Pending: 2 non-trivial fixes for Java & Python.
2022-07-11 13:25:35 -07:00
Raul Garcia
e5702d0e15
Update python/ql/src/experimental/Security/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: Taus <tausbn@github.com >
2022-07-11 13:07:37 -07:00
Raul Garcia
7fc9ae6c49
Update python/ql/src/experimental/Security/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: Taus <tausbn@github.com >
2022-07-11 13:07:20 -07:00
Andrew Eisenberg
022acf2de0
Merge pull request #9570 from github/aeisenberg/docs/packs-with-paths
...
Update docs to include how to run a pack with path
2022-07-11 11:40:11 -07:00
Ian Lynagh
960d1dba8a
Kotlin: We can't etract comments for < 1.5.20
...
We were making our own PsiSourceManager, but that didn't know about any
IrFile -> PsiFile mappings.
2022-07-11 19:36:43 +01:00
Ian Lynagh
4c68624b00
Kotlin: Pass a FileLogger to Psi2Ir
2022-07-11 19:17:21 +01:00
Ian Lynagh
b9072a3594
Kotlin: Share a Psi2Ir instance
2022-07-11 18:57:43 +01:00
Henry Mercer
4704269086
Add example registry authentication string
2022-07-11 18:36:03 +01:00
Nick Rolfe
a3628b06f1
Ruby: fix markup in changenote
2022-07-11 17:23:45 +01:00
Nick Rolfe
032aa56dc3
Ruby: add change note for system command execution sink bug
2022-07-11 17:00:07 +01:00
Nick Rolfe
6632dfaf88
Ruby: fix another SystemCommandExecution::isShellInterpreted implementation
2022-07-11 16:53:30 +01:00
Raul Garcia
5d89a5d164
Update csharp/ql/src/experimental/Security Features/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql
...
Co-authored-by: Taus <tausbn@github.com >
2022-07-11 08:42:50 -07:00
Raul Garcia
156bc34cda
Update UnsafeUsageOfClientSideEncryptionVersion.qhelp
2022-07-11 08:41:05 -07:00
thiggy1342
ad7c3e7217
Merge branch 'main' into experimental-manually-check-request-verb
2022-07-11 10:20:07 -04:00
thiggy1342
539fbbc126
Merge branch 'main' into experimental-strong-params
2022-07-11 10:20:00 -04:00
Nick Rolfe
348ad95fc0
Ruby: fix defining every dataflow node as a command execution sink
2022-07-11 15:06:27 +01:00
Paolo Tranquilli
93d06daf67
Swift: allow skipping fields in cppgen
...
Some fields of base classes pose some problems with diamond hierarchies,
and we don't use them any way as we are emitting them using directly
trap entries instead of structured C++ classes.
This introduces a `cpp_skip` pragma to skip generation of those fields
in structured generated C++ classes, and applies it to `is_unknown` and
`location`.
2022-07-11 15:59:21 +02:00
Paolo Tranquilli
39406436bf
Swift: extract IfConfigDecl
...
This also adds `UnresolvedDeclRefExpr` tests, as `IfConfigDecl`
consistently introduces those.
2022-07-11 15:11:13 +02:00
Ben Rodes
a6048dd594
Merge branch 'github:main' into main
2022-07-11 08:49:13 -04:00
Jeroen Ketema
93a4a32527
Merge pull request #9786 from jketema/lossy
...
C++: LossyFunctionResultCast updates
2022-07-11 14:14:33 +02:00
Robert Marsh
bbd7e62341
Merge pull request #9793 from jketema/nullness
...
C++: Add tests for `AnalysedExpr::isNullCheck` and `AnalysedExpr::isValidCheck`
2022-07-11 08:07:24 -04:00
Ian Lynagh
28a8999b74
Java: Add an upgrade script
2022-07-11 12:09:48 +01:00
Ian Lynagh
aa07600f5a
Java: Update stats
2022-07-11 12:09:48 +01:00
Erik Krogh Kristensen
9ed7aa9fae
exclude variables in .vue files form js/unused-local-variable
2022-07-11 12:52:23 +02:00
Chris Smowton
74641ccfee
Simplify test for no-arg constructor
2022-07-11 11:01:19 +01:00
Jeroen Ketema
6b2154eb8b
C++: Add tests for AnalysedExpr::isNullCheck and AnalysedExpr::isValidCheck
2022-07-11 11:54:48 +02:00
Paolo Tranquilli
7d5dd384c3
Swift: extract UnresolvedPatternExpr
2022-07-11 10:59:00 +02:00
Paolo Tranquilli
7c3cadc9b6
Swift: extract OpenedArchetypeType
2022-07-11 10:48:21 +02:00
thiggy1342
e8e8da1b31
fix lib test expect for ActionController
2022-07-08 19:01:01 +00:00
thiggy1342
5d3232c614
refactor to use data flow
2022-07-08 18:53:24 +00:00
thiggy1342
96e66c4a50
move tests
2022-07-08 18:39:04 +00:00
thiggy1342
0435105d16
Merge remote-tracking branch 'upstream/main' into experimental-strong-params
2022-07-08 18:36:09 +00:00
thiggy1342
6aab970a9e
refactor query to use cfg and dataflow
2022-07-08 18:32:54 +00:00
thiggy1342
bd50fd7f1e
format fix
2022-07-08 17:20:41 +00:00
thiggy1342
11e39aa030
Add changelog
2022-07-07 21:40:16 +00:00
thiggy1342
940254d251
update framework tests
2022-07-07 19:39:59 +00:00
thiggy1342
b4869158f2
expand query tests for cwe-089
2022-07-07 19:23:57 +00:00
thiggy1342
2f1cfa816f
Add annotate arguments as sqli sink
2022-07-07 19:23:06 +00:00
Raul Garcia
f8994d04d6
Clean up
2022-07-07 11:49:05 -07:00
REDMOND\brodes
4379aa4398
Adding Initializer in condition as an occurance of isDef
2022-07-07 10:32:36 -04:00
Raul Garcia
01da877d0e
Moving the new query to experimental. It was added to the wrong folder initially.
2022-07-06 14:07:14 -07:00
Jeroen Ketema
0b471c2007
C++: Improve LossyFunctionResultCast join order
...
Before on wireshark:
```
Tuple counts for #select#ff@eca61bf2:
180100 ~2% {2} r1 = SCAN Type::Type::getUnderlyingType#dispred#f0820431#ff OUTPUT In.1, In.0
84 ~2% {2} r2 = JOIN r1 WITH project#Type::FloatingPointType#class#2e8eb3ef#fffff ON FIRST 1 OUTPUT Lhs.1, Rhs.0
2021 ~0% {2} r3 = JOIN r2 WITH Function::Function::getType#dispred#f0820431#fb_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
2437 ~0% {2} r4 = JOIN r3 WITH Call::FunctionCall::getTarget#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.1
2150 ~0% {2} r5 = r4 AND NOT LossyFunctionResultCast::whiteListWrapped#377b528a#f(Lhs.1)
2150 ~0% {2} r6 = SCAN r5 OUTPUT In.1, In.0
313 ~0% {3} r7 = JOIN r6 WITH exprconv ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
313 ~0% {3} r8 = JOIN r7 WITH Cast::Conversion#class#1f33e835#b ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2
148 ~3% {2} r9 = JOIN r8 WITH Expr::Expr::isCompilerGenerated#f0820431#b ON FIRST 1 OUTPUT Lhs.2, Lhs.1
148 ~1% {3} r10 = JOIN r9 WITH Expr::Expr::getActualType#dispred#f0820431#bf ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
21 ~0% {3} r11 = JOIN r10 WITH Type::IntegralType#class#2e8eb3ef#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.0
21 ~0% {3} r12 = JOIN r11 WITH Element::ElementBase::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.2, Lhs.1, Rhs.1
21 ~0% {2} r13 = JOIN r12 WITH Element::ElementBase::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, ("Return value of type " ++ Lhs.2 ++ " is implicitly converted to " ++ Rhs.1 ++ " here.")
return r13
```
After:
```
Tuple counts for #select#ff@a5a185eg:
20 ~0% {2} r1 = SCAN project#Type::FloatingPointType#class#2e8eb3ef#fffff OUTPUT In.0, In.0
20 ~0% {2} r2 = JOIN r1 WITH project#Type::FloatingPointType#class#2e8eb3ef#fffff ON FIRST 1 OUTPUT Lhs.1, Lhs.0
84 ~2% {2} r3 = JOIN r2 WITH Type::Type::getUnderlyingType#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
2021 ~0% {2} r4 = JOIN r3 WITH Function::Function::getType#dispred#f0820431#fb_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
2437 ~0% {2} r5 = JOIN r4 WITH Call::FunctionCall::getTarget#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.1
2150 ~0% {2} r6 = r5 AND NOT LossyFunctionResultCast::whiteListWrapped#377b528a#f(Lhs.1)
2150 ~0% {2} r7 = SCAN r6 OUTPUT In.1, In.0
313 ~0% {3} r8 = JOIN r7 WITH exprconv ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
313 ~0% {3} r9 = JOIN r8 WITH Cast::Conversion#class#1f33e835#b ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2
148 ~3% {2} r10 = JOIN r9 WITH Expr::Expr::isCompilerGenerated#f0820431#b ON FIRST 1 OUTPUT Lhs.2, Lhs.1
148 ~1% {3} r11 = JOIN r10 WITH Expr::Expr::getActualType#dispred#f0820431#bf ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
21 ~0% {3} r12 = JOIN r11 WITH Type::IntegralType#class#2e8eb3ef#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.0
21 ~0% {3} r13 = JOIN r12 WITH Element::ElementBase::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.2, Lhs.1, Rhs.1
21 ~0% {2} r14 = JOIN r13 WITH Element::ElementBase::toString#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, ("Return value of type " ++ Lhs.2 ++ " is implicitly converted to " ++ Rhs.1 ++ " here.")
return r14
```
2022-07-06 21:53:12 +02:00
Jeroen Ketema
7d6fb7f91a
C++: Rename LossyFunctionResultCast tests to be correctly named
2022-07-06 21:52:13 +02:00
REDMOND\brodes
74ff579dbc
Fixing logic bug with LogicalAndExpr
2022-07-06 15:19:36 -04:00
Raul Garcia
dd1a9a22e3
Update UnsafeUsageOfClientSideEncryptionVersion.qhelp
2022-07-05 13:58:38 -07:00
Raul Garcia
f5c6b45014
Update UnsafeUsageOfClientSideEncryptionVersion.qhelp
2022-07-05 13:58:11 -07:00
Raul Garcia
56060e0610
Update csharp/ql/src/experimental/Security Features/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.qhelp
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2022-07-05 13:57:28 -07:00
ihsinme
8967f57bbc
Update DangerousUseMbtowc.ql
2022-07-04 11:17:12 +03:00
ihsinme
4e28887689
Create test3.cpp
2022-07-04 11:13:07 +03:00
ihsinme
1ce42dcd30
Create test2.cpp
2022-07-04 11:12:34 +03:00
ihsinme
6d800de377
Create test1.cpp
2022-07-04 11:11:49 +03:00
ihsinme
f53adca108
Update DangerousUseMbtowc.ql
2022-07-04 11:10:02 +03:00
Mathias Vorreiter Pedersen
3bacb18315
Merge pull request #9770 from MathiasVP/nomagic-use-in-own-init
...
C++: Add `nomagic` to `VariableAccessInInitializer`
2022-07-02 16:35:45 +01:00
Chris Smowton
4d45a2ca87
Merge pull request #9775 from smowton/smowton/fix/accessors-respect-private-member-exclusion
...
Kotlin: don't extract private setters of external classes
2022-07-02 10:27:06 +01:00
Raul Garcia
e43e5810cf
New queries to detect unsafe client side encryption in Azure Storage
2022-07-01 17:08:35 -07:00
Mathias Vorreiter Pedersen
e98bdbf73f
Merge pull request #9773 from geoffw0/stringlengthconflation4
...
Swift: More improvements to swift/string-length-conflation
2022-07-01 17:46:04 +01:00
Geoffrey White
e38254c05e
Swift: Fix typo.
2022-07-01 17:00:36 +01:00
Ian Lynagh
1730ec22d9
Kotlin: Extract an ErrorType if we fail to correctly extract a type
2022-07-01 16:33:43 +01:00
Chris Smowton
b499ba5aa8
Kotlin: don't extract private setters of external classes
...
Previously these would get extracted unlike other private methods even if the class was a standard library or other external class. This could cause inconsistencies because if we also compiled the class from source we could end up deciding different names for the property's setter: setXyz$private when seen from source, and setXyz without a
suffix when seen as an external .class file. Avoiding extracting these functions from the external perspective both restores consistency with other kinds of method and avoids these consistency problems.
2022-07-01 15:44:17 +01:00
Paolo Tranquilli
c393c9b03e
Revert "Fix change note check to accept changes to itself"
...
This reverts commit 2dca78295d .
2022-07-01 16:41:09 +02:00
Paolo Tranquilli
2dca78295d
Fix change note check to accept changes to itself
...
The file is not removed from the triggers, as we still want to check
that the workflow file itself is correct.
2022-07-01 16:35:30 +02:00
Paolo Tranquilli
e88cc31468
Swift: disable change note checking for now
2022-07-01 16:16:21 +02:00
Paolo Tranquilli
563d27333a
Merge pull request #9772 from github/redsun82/swift-extraction
...
Swift: extract ImportDecl and ModuleDecl
2022-07-01 16:14:23 +02:00
Geoffrey White
34ffd1aac5
Swift: Support String.Index and flow through * /.
2022-07-01 14:59:50 +01:00
Geoffrey White
d60d2457c2
Swift: Add String.Index.init as a source as as well.
2022-07-01 14:59:50 +01:00
Geoffrey White
bc03f6959c
Swift: Detect String -> NSString results.
2022-07-01 14:59:50 +01:00
Geoffrey White
a306f312cd
Swift: Add a test of converting Range to NSRange.
2022-07-01 14:59:50 +01:00
Geoffrey White
416977dc50
Swift: Add test cases for removeFirst, removeLast.
2022-07-01 14:59:50 +01:00
Paolo Tranquilli
8addc06799
Swift: add integration test for multiple modules
2022-07-01 15:59:36 +02:00
Paolo Tranquilli
227dad8bf5
Merge main into redsun82/swift-extraction
2022-07-01 15:56:23 +02:00
Paolo Tranquilli
7a1c3800e6
Merge pull request #9771 from github/redsun82/swift-integration-test-runner
...
Swift: locally run integration tests
2022-07-01 15:54:27 +02:00
Paolo Tranquilli
e575bab9d6
Revert unwanted committed files
2022-07-01 15:45:28 +02:00
Paolo Tranquilli
f9143f7855
Swift: fix extraction of empty files
2022-07-01 15:43:16 +02:00
Chris Smowton
4c6a9772af
Merge pull request #9768 from smowton/smowton/fix/internal-method-name-mangling
...
Kotlin: Mangle names of internal functions to match JVM symbols
2022-07-01 14:33:32 +01:00
Paolo Tranquilli
3a975174c3
Swift: extract ImportDecl and ModuleDecl
...
As `ASTMangler` crashes when called on `ModuleDecl`, we simply use
its name.
This might probably not work reliably in a scenario where multiple
modules are compiled with the same name (like `main`), but this is left
for future work. At the moment this cannot create DB inconsistencies.
2022-07-01 15:29:30 +02:00
Paolo Tranquilli
7a7440a115
Swift: move createEntry to SwiftDispatcher
2022-07-01 15:22:44 +02:00
Paolo Tranquilli
24da81fdb0
Swift: disable integration tests on macOS for now
...
Also, add swift workflow to code owned by the C team
2022-07-01 15:00:05 +02:00
Paolo Tranquilli
901e066355
Swift: locally run integration tests
...
Minimal recreations of internal `integration-tests-runner.py` and
`create_database_utils.py` are provided to be able to run the
integration tests on the codeql repository with a released codeql CLI.
For the moment we skip the database checks by default, as we are still
producing inconsistent results.
2022-07-01 15:00:05 +02:00
CodeQL CI
5b5a52fa25
Merge pull request #9551 from yoff/python/port-tarslip
...
Approved by RasmusWL
2022-07-01 12:58:25 +01:00
Erik Krogh Kristensen
7dd095c0d2
Merge pull request #9756 from erik-krogh/greyMatter
...
JS: add model for the gray-matter library to js/code-injection
2022-07-01 12:19:12 +02:00
Mathias Vorreiter Pedersen
e4636be8db
C++: Add 'nomagic' to the charpred of 'VariableAccessInInitializer'.
2022-07-01 11:07:18 +01:00
Chris Smowton
14aef792e0
Accept test changes
2022-07-01 10:35:17 +01:00
Chris Smowton
df78b7e54b
Merge pull request #9755 from smowton/smowton/feature/implement-jvmstatic-annotation
...
Kotlin: support JvmStatic annotation
2022-07-01 10:14:08 +01:00
Paolo Tranquilli
8336c67edb
Merge pull request #9762 from github/alexdenisov/vfs-followup
...
Swift: cleanup
2022-07-01 09:00:54 +02:00
Chris Smowton
b9eec13466
Accept integration test changes
2022-06-30 22:21:04 +01:00
Chris Smowton
dd93062101
Kotlin: Mangle names of internal functions to match JVM symbols
2022-06-30 21:56:25 +01:00
Ian Lynagh
144c0d63b1
Merge pull request #9766 from igfoo/igfoo/extension
...
Kotlin: Fix a label
2022-06-30 21:16:26 +01:00
Erik Krogh Kristensen
ef0ec396c4
Merge pull request #9754 from erik-krogh/chownr
...
JS: add model for chownr
2022-06-30 22:02:45 +02:00
Jeroen Ketema
08b1c5495a
Merge pull request #9767 from igfoo/igfoo/typo
...
C++: Typo: intrepret
2022-06-30 20:00:03 +02:00
Ian Lynagh
57e026d617
C++: Typo: intrepret
2022-06-30 18:22:17 +01:00
Henry Mercer
9b424ac8b2
Docs: Update guidance to install the _latest_ version of the bundle
2022-06-30 17:38:18 +01:00
Henry Mercer
92a9738bd5
Docs: Fix precedence of registries list
2022-06-30 17:32:00 +01:00
Henry Mercer
3bb51c2643
Fix rst header
2022-06-30 17:07:42 +01:00
Ian Lynagh
b373af47d1
Kotlin: Fix a label
...
We want the .javaResult.id of a TypeResults.
2022-06-30 16:59:18 +01:00
Chris Smowton
570e418b22
Fix ordering PrintAst nodes
2022-06-30 16:07:32 +01:00
Chris Smowton
ec95cbace4
PrintAst: Tie-break multiple class members created at the same source location
...
Otherwise Kotlin introducing a getter, setter and field declaration based on the same property tied in the sort order, and so could be output in different orders on different machines.
2022-06-30 15:29:56 +01:00
Chris Smowton
0d0d240fd4
Accept test changes re: new compiler-generated nodes
2022-06-30 15:29:20 +01:00
Ian Lynagh
83fd9c3b3e
Merge pull request #9763 from igfoo/igfoo/foreach
...
Kotlin: Replace a map call with forEach
2022-06-30 15:02:57 +01:00
Mathias Vorreiter Pedersen
6b5785bffa
Merge pull request #9765 from geoffw0/stringlengthconflation3
...
Swift: Improvements to the string length conflation query
2022-06-30 14:49:12 +01:00
Erik Krogh Kristensen
eaec1ac561
add change-note
2022-06-30 15:11:49 +02:00
yoff
cf9b69b5f2
python: More helpful comment
2022-06-30 13:07:13 +00:00
yoff
b0a29b146a
Update python/ql/lib/semmle/python/security/dataflow/TarSlipQuery.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-06-30 14:54:01 +02:00
yoff
df7ffb2880
Update python/ql/lib/semmle/python/security/dataflow/TarSlipCustomizations.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-06-30 14:53:49 +02:00
Ian Lynagh
0e56e50d18
Kotlin: Replace a map call with forEach
2022-06-30 13:50:22 +01:00
Chris Smowton
8214c3b78e
Add AST dump for JvmStatic annotation test
2022-06-30 13:11:43 +01:00
Chris Smowton
98761041f1
Prevent labelling proxies of default getters and setters as themselves default getters and setters
2022-06-30 13:11:00 +01:00
Chris Smowton
bf581b971c
Rename willExtract properties to shouldExtract
2022-06-30 12:51:09 +01:00
Chris Smowton
5a47e1dd95
Annotate generated static proxy methods as compiler-generated
2022-06-30 12:48:11 +01:00
Chris Smowton
466cf7573b
Autoformat
2022-06-30 12:42:39 +01:00
Chris Smowton
b4124ac553
Add test
2022-06-30 12:42:39 +01:00
Chris Smowton
bfdb21d551
Kotlin: support JvmStatic annotation
...
This makes non-companion object methods into static methods, and for companion objects introduces static proxy methods that call the companion instance method.
Note this doesn't quite implement what kotlinc does, since it will also eliminate getters and setters by promoting an object field into a static field, but our translation is simpler and only differs in private members' details.
2022-06-30 12:42:38 +01:00
Chris Smowton
28c05e7a56
Merge pull request #9704 from smowton/smowton/fix/generic-inner-class
...
Kotlin: note that raw inner classes nest within a raw outer
2022-06-30 12:10:36 +01:00
Geoffrey White
68c76006bd
Swift: Allow trivial taint-like flow.
2022-06-30 11:52:57 +01:00
Geoffrey White
0251fb2d35
Swift: Add result annotations to test.
2022-06-30 11:52:44 +01:00
Geoffrey White
2bd25fc589
Swift: Add QLDoc.
2022-06-30 11:52:17 +01:00
Mathias Vorreiter Pedersen
51e3ff9d09
Merge pull request #9736 from github/redsun82/swift-fix-warnings
...
Swift: fix QL warnings about overriding methods
2022-06-30 11:44:44 +01:00
Alex Denisov
5a04d62969
Swift: cleanup extraction
2022-06-30 12:32:03 +02:00
Alex Denisov
133a6caaa3
Swift: cleanup output rewriting code
2022-06-30 12:03:53 +02:00
AlexDenisov
4367044a8b
Merge pull request #9702 from github/alexdenisov/swift-multiple-modules
...
Swift: emit intermediate build artifacts for own consumption later
2022-06-30 11:24:48 +02:00
Chris Smowton
ab52a020fa
Add test
2022-06-30 10:22:56 +01:00
Chris Smowton
8e5bbea9f9
Use map...firstOrNull not firstNotNullOfOrNull
...
The latter was introduced in Kotlin 1.5, so we can't use it in all supported versions.
2022-06-30 10:15:44 +01:00
Chris Smowton
2d98eb591e
Kotlin: note that raw inner classes nest within a raw outer.
...
Previously the Java extractor did this but the Kotlin extractor nested them within an unbound outer type.
2022-06-30 10:15:44 +01:00
AlexDenisov
d42b752c6d
Apply suggestions from code review
...
Co-authored-by: Paolo Tranquilli <redsun82@github.com >
2022-06-30 11:10:43 +02:00
Nick Rolfe
02dd933e5f
Ruby: move Pathname from core to stdlib
2022-06-30 10:08:25 +01:00
AlexDenisov
b5c1ec8958
Update swift/extractor/SwiftOutputRewrite.cpp
...
Co-authored-by: Paolo Tranquilli <redsun82@github.com >
2022-06-30 11:08:23 +02:00
AlexDenisov
6b0e734c47
Update swift/extractor/SwiftOutputRewrite.cpp
...
Co-authored-by: Paolo Tranquilli <redsun82@github.com >
2022-06-30 11:06:03 +02:00
AlexDenisov
b9f4a09f19
Merge branch 'main' into alexdenisov/swift-multiple-modules
2022-06-30 10:13:34 +02:00
AlexDenisov
de9e8855a8
Merge pull request #9759 from github/alexdenisov/fix-test-file
...
Swift: fix test case
2022-06-30 09:33:19 +02:00
Tony Torralba
48d85407ad
Merge pull request #9757 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-06-30 09:21:04 +02:00
Erik Krogh Kristensen
11be15aab1
inline field into the charpred
2022-06-30 09:00:10 +02:00
Erik Krogh Kristensen
f71a64b99d
recognize when the js engine in gray-matter is set to something safe
2022-06-30 09:00:10 +02:00
Erik Krogh Kristensen
22d285f777
add model for the gray-matter libary to js/code-injection
2022-06-30 09:00:10 +02:00
Alex Denisov
1dd3141e2d
Swift: address more code review comments
2022-06-30 08:57:22 +02:00
Alex Denisov
35da75f685
Swift: rename method
2022-06-30 08:48:36 +02:00
AlexDenisov
522d48aa33
Apply suggestions from code review
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-06-30 08:47:17 +02:00
Alex Denisov
5d5f3f82b1
Swift: fix test case
2022-06-30 07:41:28 +02:00
AlexDenisov
7ee11056d7
Merge pull request #9750 from github/alexdenisov/extract-imported-modules
...
Swift: also extract imported modules
2022-06-30 07:15:51 +02:00
github-actions[bot]
e9d3f658a3
Add changed framework coverage reports
2022-06-30 00:18:31 +00:00
Erik Krogh Kristensen
7cef4322e7
add model for chownr
2022-06-29 22:09:23 +02:00
Andrew Eisenberg
fbeecd6c08
Merge pull request #9744 from github/aeisenberg/move-contextual-queries
2022-06-29 11:44:33 -07:00
Andrew Eisenberg
06c68661ed
Merge pull request #9753 from github/aeisenberg/pack-pull-quote
...
Recommend installing the latest version of the CLI to use packaging
2022-06-29 10:46:24 -07:00
Erik Krogh Kristensen
399fd85fd8
Merge pull request #9748 from erik-krogh/navigation
...
JS: add navigation.navigate as an XSS / URL sink
2022-06-29 19:34:59 +02:00
Andrew Eisenberg
3c8f415f69
Recommend installing the latest version of the CLI to use packaging
2022-06-29 10:33:27 -07:00
Andrew Eisenberg
7864a7580e
Fix import statements
2022-06-29 10:22:45 -07:00
Andrew Eisenberg
41244180b3
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
2022-06-29 10:18:13 -07:00
Andrew Eisenberg
ddf06f8617
Add change notes and qldoc for moved files
2022-06-29 10:03:12 -07:00
Henry Mercer
4dcec2b98c
Apply suggestions from code review
...
Co-authored-by: Felicity Chapman <felicitymay@github.com >
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com >
2022-06-29 17:49:59 +01:00
Alex Denisov
5233a5e17b
Swift: also extract imported modules
2022-06-29 17:27:57 +02:00
Andrew Eisenberg
a3f4d1bf66
Move contextual queries from src to lib
...
With this change, users are now able to run View AST command in
vscode within vscode workspaces that do not include the core libraries.
The relevant core library only needs to be installed in the package
cache.
2022-06-29 07:51:26 -07:00
Alex Ford
578a967160
Merge pull request #9641 from boveus/patch-1
...
Make ActiveRecordInstanceMethodCall Public
2022-06-29 14:39:36 +01:00
Paolo Tranquilli
d00fec34c3
Merge pull request #9336 from MathiasVP/swift-decls-in-cfg
...
Swift: CFG for local declarations
2022-06-29 15:10:45 +02:00
Erik Krogh Kristensen
0e4954a68c
add navigation.navigate as an XSS / URL sink
2022-06-29 14:56:20 +02:00
Brandon Stewart
5888325549
Merge branch 'main' into patch-1
2022-06-29 08:42:24 -04:00
Mathias Vorreiter Pedersen
e03646aba4
Merge pull request #9737 from geoffw0/arithmetic
...
Swift: Add ArithmeticOperation.qll library
2022-06-29 13:40:20 +01:00
Nick Rolfe
5db2f9a768
Merge remote-tracking branch 'origin/main' into nickrolfe/pathname
2022-06-29 13:16:49 +01:00
Nick Rolfe
c1302a90e0
Ruby: use MaD for more precise Pathname flow summaries
2022-06-29 13:16:18 +01:00
yoff
8988a02806
Merge pull request #9733 from tausbn/python-fix-bad-mro-flatten-list-join
...
Python: Fix bad join in MRO `flatten_list`
2022-06-29 13:29:48 +02:00
yoff
f122af81ea
Merge pull request #9741 from tausbn/python-fix-bad-join-in-regexpbackref-getgroup
...
Python: Fix bad join in `RegExpBackRef::getGroup`
2022-06-29 13:23:07 +02:00
Mathias Vorreiter Pedersen
f35ab7c292
Swift: Accept test changes to the cfg. These happen due to the fixes in 9e0cf62cda.
2022-06-29 12:20:07 +01:00
yoff
731f866242
Merge pull request #9717 from tausbn/python-fix-bad-mro-linearization-of-bases-join
...
Python: Fix bad join in MRO
2022-06-29 13:08:18 +02:00
Mathias Vorreiter Pedersen
15dc08351e
Merge pull request #9747 from MathiasVP/fix-joins-in-swift-cwe-135
...
Swift: Don't join on index in `swift/string-length-conflation`
2022-06-29 11:58:36 +01:00
Geoffrey White
8b7535af81
Swift: Don't use abstract classes.
2022-06-29 11:49:22 +01:00
Geoffrey White
2cf65c7d35
Swift: Autoformat tests.
2022-06-29 11:49:21 +01:00
Geoffrey White
822002d37d
Swift: Missing qldoc.
2022-06-29 11:49:20 +01:00
Mathias Vorreiter Pedersen
cc25e2644f
Swift: Don't join on index in 'swift/string-length-conflation'.
2022-06-29 11:40:46 +01:00
Ian Lynagh
d285e19e77
Merge pull request #9731 from igfoo/igfoo/private
...
Kotlin: Make more methods private
2022-06-29 11:24:33 +01:00
Mathias Vorreiter Pedersen
4356155eeb
Merge branch 'main' into swift-decls-in-cfg
2022-06-29 10:03:34 +01:00
Alex Denisov
4d81206a87
Swift: teach extractor to emit build artifacts for later consumption
2022-06-29 10:58:24 +02:00
AlexDenisov
1997d6b18c
Merge pull request #9745 from github/alexdenisov/put-traps-into-a-temp-folder
...
Swift: store TRAP files in a temporary folder until the extraction is complete
2022-06-29 10:55:27 +02:00
Jeroen Ketema
55e052af26
Merge pull request #9686 from aschackmull/dataflow/no-node-scan
...
Dataflow performance: Avoid node scans
2022-06-29 10:38:56 +02:00
AlexDenisov
e1ef637c54
Update swift/extractor/SwiftExtractorConfiguration.h
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2022-06-29 10:16:14 +02:00
AlexDenisov
968ede3d4a
Merge pull request #9746 from github/alexdenisov/add-test-case-showing-modules-loading-issue
...
Swift: add a test case showing module loading problem
2022-06-29 10:07:56 +02:00
Paolo Tranquilli
296b8cb630
Merge pull request #9719 from github/redsun82/swift-enum-is-case
...
Swift: add EnumIsCase test
2022-06-29 09:55:20 +02:00
Tony Torralba
12fa6967dc
Merge pull request #8669 from joefarebrother/intent-verification
...
Java: Add query for Improper Verification of Intent by Broadcast Receiver (CWE-925)
2022-06-29 09:43:07 +02:00
Jeroen Ketema
8b13d1fab8
Merge pull request #9726 from github/rdmarsh2/stack-address-join-order
...
C++: fix join order in UsingExpiredStackAddress
2022-06-29 09:35:47 +02:00
Tony Torralba
741b2a923a
Merge pull request #9207 from joefarebrother/android-external-storage
...
Java: Add sources for Android external storage
2022-06-29 09:34:51 +02:00
Alex Denisov
57811a4efc
Swift: add a test case showing module loading problem
...
Extractor fails to load separate modules that were built by another
version of an actual compiler.
2022-06-29 07:38:18 +02:00
Alex Denisov
488befb577
Swift: store TRAP files in a temporary folder until the extraction is complete
...
Currently, we have a number of assertions in the codebase and certain
assumptions about the AST. These don't always hold, sometimes leading to
a crash in the extractor.
The crashes leave incomplete TRAP files that cannot be imported into the
database.
With this change, we still get those incomplete TRAP files, but we also
get a database in the end (even thoough it is also incomplete as we
cannot import everything).
2022-06-29 07:17:06 +02:00
AlexDenisov
6c68872163
Merge pull request #9743 from MathiasVP/fix-path-problem
...
Swift: Fix `kind` in `swift/string-length-conflation`
2022-06-29 06:58:36 +02:00
Mathias Vorreiter Pedersen
c2e57c3c9b
Swift: Fix 'kind' in 'swift/string-length-conflation'.
2022-06-28 22:33:28 +01:00
Brandon Stewart
13fae22756
Merge branch 'main' into patch-1
2022-06-28 17:27:07 -04:00
yoff
1105cd569b
Merge branch 'main' into python/port-tarslip
2022-06-28 22:17:28 +02:00
yoff
6087bc6888
Merge branch 'main' into python/more-logic-tests
2022-06-28 22:16:38 +02:00
yoff
ac0c8d238f
python: only clear taint on false-edge
2022-06-28 20:14:52 +00:00
Taus
38b8640582
Python: Fix bad join in RegExpBackRef::getGroup
...
Although this wasn't (as far as I know) causing any performance issues,
it was making the join-order badness report quite noisy, and so I
figured it was worth fixing.
Before:
```
Tuple counts for RegexTreeView::RegExpBackRef::getGroup#dispred#f0820431#ff/2@d3441d0b after 84ms:
1501195 ~3% {2} r1 = JOIN RegexTreeView::RegExpTerm::getLiteral#dispred#f0820431#ff_10#join_rhs WITH RegexTreeView::RegExpTerm::getLiteral#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'result', Lhs.1 'result'
149 ~0% {5} r2 = JOIN r1 WITH RegexTreeView::RegExpBackRef#class#31aac2a7#ffff ON FIRST 1 OUTPUT Rhs.1, Rhs.2, Rhs.3, Lhs.1 'result', Lhs.0 'this'
149 ~1% {3} r3 = JOIN r2 WITH regex::RegexString::numbered_backreference#dispred#f0820431#ffff ON FIRST 3 OUTPUT Lhs.3 'result', Rhs.3, Lhs.4 'this'
4 ~0% {2} r4 = JOIN r3 WITH RegexTreeView::RegExpGroup::getNumber#dispred#f0820431#ff ON FIRST 2 OUTPUT Lhs.2 'this', Lhs.0 'result'
1501195 ~3% {2} r5 = JOIN RegexTreeView::RegExpTerm::getLiteral#dispred#f0820431#ff_10#join_rhs WITH RegexTreeView::RegExpTerm::getLiteral#dispred#f0820431#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'result', Rhs.1 'result'
42526 ~0% {5} r6 = JOIN r5 WITH RegexTreeView::RegExpGroup#31aac2a7#ffff ON FIRST 1 OUTPUT Lhs.1 'this', Lhs.0 'result', Rhs.1, Rhs.2, Rhs.3
22 ~0% {8} r7 = JOIN r6 WITH RegexTreeView::RegExpBackRef#class#31aac2a7#ffff ON FIRST 1 OUTPUT Lhs.2, Lhs.3, Lhs.4, Lhs.1 'result', Lhs.0 'this', Rhs.1, Rhs.2, Rhs.3
0 ~0% {6} r8 = JOIN r7 WITH regex::RegexString::getGroupName#dispred#f0820431#ffff ON FIRST 3 OUTPUT Lhs.5, Lhs.6, Lhs.7, Rhs.3, Lhs.3 'result', Lhs.4 'this'
0 ~0% {2} r9 = JOIN r8 WITH regex::RegexString::named_backreference#dispred#f0820431#ffff ON FIRST 4 OUTPUT Lhs.5 'this', Lhs.4 'result'
4 ~0% {2} r10 = r4 UNION r9
return r10
```
In this case I opted for a classical solution: tying together the
literal and number (or name) part of the backreference in order to
encourage a two-column join.
After:
```
Tuple counts for RegexTreeView::RegExpBackRef::getGroup#dispred#f0820431#ff/2@b0cc4d5n after 0ms:
898 ~1% {3} r1 = JOIN RegexTreeView::RegExpTerm::getLiteral#dispred#f0820431#ff WITH RegexTreeView::RegExpGroup::getNumber#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Lhs.0 'result'
4 ~0% {2} r2 = JOIN r1 WITH RegexTreeView::RegExpBackRef::hasLiteralAndNumber#f0820431#fff_120#join_rhs ON FIRST 2 OUTPUT Rhs.2 'this', Lhs.2 'result'
1110 ~0% {5} r3 = JOIN RegexTreeView::RegExpGroup#31aac2a7#ffff WITH RegexTreeView::RegExpTerm::getLiteral#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.3, Lhs.0 'result', Rhs.1
146 ~0% {3} r4 = JOIN r3 WITH regex::RegexString::getGroupName#dispred#f0820431#ffff ON FIRST 3 OUTPUT Lhs.4, Rhs.3, Lhs.3 'result'
0 ~0% {2} r5 = JOIN r4 WITH RegexTreeView::RegExpBackRef::hasLiteralAndName#f0820431#fff_120#join_rhs ON FIRST 2 OUTPUT Rhs.2 'this', Lhs.2 'result'
4 ~0% {2} r6 = r2 UNION r5
return r6
```
2022-06-28 16:51:09 +00:00
Andrew Eisenberg
0f8ffb12e6
Update docs/codeql/codeql-cli/analyzing-databases-with-the-codeql-cli.rst
2022-06-28 09:45:54 -07:00
Mathias Vorreiter Pedersen
f97cc9e37c
Merge pull request #9739 from MathiasVP/swift-conflation-query-high-precision
...
Swift: Set 'swift/string-length-conflation' to precision `high`
2022-06-28 17:26:23 +01:00
Mathias Vorreiter Pedersen
1a7f5db8e2
Swift: Set 'swift/string-length-conflation' to precision high and delete the placeholder query.
2022-06-28 17:01:06 +01:00
Mathias Vorreiter Pedersen
f2ae73b6be
Merge pull request #9738 from geoffw0/misc
...
Swift: Add a Locatable.getFile() shortcut similar to the one in CPP.
2022-06-28 16:44:02 +01:00
Erik Krogh Kristensen
b81251865f
Merge pull request #9716 from erik-krogh/htmlTypeSan
...
JS: sanitize non-strings from html-constructed-from-input
2022-06-28 17:31:00 +02:00
Mathias Vorreiter Pedersen
677f6dafcd
Merge pull request #9732 from github/redsun82/swift-dot-syntax-call-expr
...
Swift: add DotSyntaxCallExpr tests
2022-06-28 16:09:10 +01:00
Geoffrey White
ff06e3cb6b
Swift: Add a Locatable.getFile() shortcut similar to the one in CPP.
2022-06-28 15:49:49 +01:00
Geoffrey White
8a8a7ead9b
Swift: Add tests for ArithmeticOperation.qll.
2022-06-28 15:34:23 +01:00
Geoffrey White
a5fff9af5d
Swift: Create ArithmeticOperation.qll.
2022-06-28 15:34:15 +01:00
Geoffrey White
9e0cf62cda
Swift: Fix + simplify LogicalOperation.qll.
2022-06-28 15:33:03 +01:00
Paolo Tranquilli
363f7a88a9
Swift: fix QL warnings about overriding methods
...
The `getName` in `Type.qll` was issuing a warning in other generated
classes having a `getName` from a `name` property in `schema.yml`.
To fix the possible inconsistency, `diagnostic_name` is being renamed to
`name` in the schema. Despite the scary doc comment on
`swift::Type::getString` (namely `for use in diagnostics only`), that
seems to be the right generic naming mechanism for types, and it
coincides with the name we were extracting on types with an explicit
`name` property.
In case we find a case where `Type::getString` gives something wrong,
we can probably just patch it on that specific type class.
2022-06-28 16:30:25 +02:00
Taus
b98c482c47
Python: Fix bad join in MRO flatten_list
...
This bad join was identified by the join-order-badness report, which
showed that:
py/use-of-input:MRO::flatten_list#f4eaf05f#fff#9c5fe54whnlqffdgu65vhb8uhpg# (order_500000)
calculated a whopping 212,820,108 tuples in order to produce an output of
size 55516, roughly 3833 times more effort than needed.
Here's a snippet of the slowest iteration of that predicate:
```
Tuple counts for MRO::flatten_list#f4eaf05f#fff/3@i1839#0265eb3w after 14ms:
0 ~0% {3} r1 = JOIN MRO::need_flattening#f4eaf05f#f#prev_delta WITH MRO::ConsList#f4eaf05f#fff#reorder_2_0_1#prev ON FIRST 1 OUTPUT Rhs.1, Lhs.0 'list', Rhs.2
0 ~0% {3} r2 = JOIN r1 WITH MRO::ClassList::length#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.2, Lhs.1 'list', Rhs.1 'n'
0 ~0% {3} r3 = JOIN r2 WITH MRO::ClassListList::flatten#dispred#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.1 'list', Lhs.2 'n', Rhs.1 'result'
0 ~0% {3} r4 = SCAN MRO::ConsList#f4eaf05f#fff#prev_delta OUTPUT In.2 'list', In.0, In.1
0 ~0% {3} r5 = JOIN r4 WITH MRO::need_flattening#f4eaf05f#f#prev ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.0 'list'
0 ~0% {3} r6 = JOIN r5 WITH MRO::ClassList::length#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.1, Lhs.2 'list', Rhs.1 'n'
0 ~0% {3} r7 = JOIN r6 WITH MRO::ClassListList::flatten#dispred#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.1 'list', Lhs.2 'n', Rhs.1 'result'
0 ~0% {3} r8 = r3 UNION r7
26355 ~2% {3} r9 = SCAN MRO::ConsList#f4eaf05f#fff#prev OUTPUT In.2 'list', In.0, In.1
0 ~0% {3} r10 = JOIN r9 WITH MRO::need_flattening#f4eaf05f#f#prev ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.0 'list'
0 ~0% {3} r11 = JOIN r10 WITH MRO::ClassList::length#f0820431#ff#prev_delta ON FIRST 1 OUTPUT Lhs.1, Lhs.2 'list', Rhs.1 'n'
0 ~0% {3} r12 = JOIN r11 WITH MRO::ClassListList::flatten#dispred#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.1 'list', Lhs.2 'n', Rhs.1 'result'
...
```
(... and a bunch more lines. The same construction appears several times,
but the join order is the same each time.)
Clearly it would be better to start with whatever is in `need_flattening`,
and then do the other joins. This is what the present fix does (by
unbinding `list` in all but the `needs_flattening` call).
After the fix, the slowest iteration is as follows:
```
Tuple counts for MRO::flatten_list#f4eaf05f#fff/3@i2617#8155ab3w after 9ms:
0 ~0% {2} r1 = SCAN MRO::need_flattening#f4eaf05f#f#prev_delta OUTPUT In.0 'list', In.0 'list'
0 ~0% {3} r2 = JOIN r1 WITH MRO::ConsList#f4eaf05f#fff#reorder_2_0_1#prev ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'list', Rhs.2
0 ~0% {3} r3 = JOIN r2 WITH MRO::ClassList::length#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.2, Lhs.1 'list', Rhs.1 'n'
0 ~0% {3} r4 = JOIN r3 WITH MRO::ClassListList::flatten#dispred#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.1 'list', Lhs.2 'n', Rhs.1 'result'
1 ~0% {2} r5 = SCAN MRO::need_flattening#f4eaf05f#f#prev OUTPUT In.0 'list', In.0 'list'
0 ~0% {3} r6 = JOIN r5 WITH MRO::ConsList#f4eaf05f#fff#reorder_2_0_1#prev_delta ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'list', Rhs.2
0 ~0% {3} r7 = JOIN r6 WITH MRO::ClassList::length#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.2, Lhs.1 'list', Rhs.1 'n'
0 ~0% {3} r8 = JOIN r7 WITH MRO::ClassListList::flatten#dispred#f0820431#ff#prev ON FIRST 1 OUTPUT Lhs.1 'list', Lhs.2 'n', Rhs.1 'result'
...
```
(... and so on. The remainder is 0 tuples all the way.)
In total, we went from
```
40.6s | 7614 | 15ms @ 1839 | MRO::flatten_list#f4eaf05f#fff@0265eb3w
```
to
```
7.8s | 7614 | 11ms @ 2617 | MRO::flatten_list#f4eaf05f#fff@8155ab3w
```
2022-06-28 14:17:47 +00:00
Paolo Tranquilli
5c6ac2a5f2
Swift: accept test results
2022-06-28 16:15:05 +02:00
Geoffrey White
63376da90f
Swift: Add tests for LogicalOperaion.qll.
2022-06-28 15:04:47 +01:00
Paolo Tranquilli
6ff45d3dbe
Merge main into redsun82/swift-enum-is-case
2022-06-28 16:03:38 +02:00
Brandon Stewart
c7b4133fbe
Merge branch 'main' into patch-1
2022-06-28 09:46:46 -04:00
Paolo Tranquilli
364085a596
Swift: add DotSyntaxCallExpr tests
2022-06-28 15:44:42 +02:00
AlexDenisov
c4c3a52804
Merge pull request #9730 from github/redsun82/swift-trap-newlines
...
Swift: add missing newlines in trap
2022-06-28 15:41:05 +02:00
Ian Lynagh
3026456a39
Kotlin: Make more methods private
2022-06-28 14:38:13 +01:00
Jeroen Ketema
a7956ad422
C++: Add change note
2022-06-28 15:32:43 +02:00
Jeroen Ketema
82c9b8b494
C++: Ensure only one Variable exists for every global variable
...
Depending on the extraction order, before this change there might be multiple
`GlobalVariable`s per declared global variable. See the tests in
`cpp/ql/test/library-tests/variables/global`. This change ensures that only one
of those `GlobalVariable`s is visible to the user if we can locate a unique
definition. If not, the old situation persists.
Note that an exception needs to be made for templated variables. Here, the
definition refers to the non-instantiated template, while a declaration that
is not a definition refers to an instantiation. In case the instantiation refers
to a template parameter, the mangled names of the template and the instantiation
will be identical. This happens for example in the following case:
```
template <typename T>
T x = T(42); // Uninstantiated templated variable
template <typename T>
class C {
T y = x<T>; // Instantiation using a template parameter
};
```
Since the uninstantiated template and the instantiation are two different
entities, we do not unify them as described above.
2022-06-28 15:32:43 +02:00
Paolo Tranquilli
7175869518
Swift: add missing newlines in trap
...
This is mostly cosmetic and for debugging, as the trap importer is
perfectly happy with trap entries on the same line without spaces
between them.
2022-06-28 15:17:18 +02:00
Henry Mercer
a7bd2030b6
Address review comments
2022-06-28 13:52:26 +01:00
Brandon Stewart
33d1aae92a
Update ruby/ql/lib/codeql/ruby/frameworks/ActiveRecord.qll
...
Co-authored-by: Harry Maclean <hmac@github.com >
2022-06-28 08:51:01 -04:00
Brandon Stewart
1dc26a0ca3
Update ruby/ql/lib/codeql/ruby/frameworks/ActiveRecord.qll
...
Co-authored-by: Harry Maclean <hmac@github.com >
2022-06-28 08:50:54 -04:00
Asger F
a522562f93
Merge pull request #9369 from asgerf/python/api-graph-api
...
Python: API graph renaming and documentation
2022-06-28 14:48:12 +02:00
Arthur Baars
6e836c7eb8
Merge pull request #9706 from aibaars/update-tree-sitter-ruby-2
...
Ruby: update tree-sitter-ruby
2022-06-28 14:14:15 +02:00
Erik Krogh Kristensen
112caa3f5d
rewrite qldoc based on review
2022-06-28 13:23:44 +02:00
yoff
834d2603a2
python: update use of barrier guard
2022-06-28 11:15:37 +00:00
Paolo Tranquilli
7f8bff571d
Merge pull request #9729 from github/redsun82/swift-extraction
...
Swift: extract `ProtocolCompositionType` and all `BuiltinType`s
2022-06-28 12:30:47 +02:00
Paolo Tranquilli
131524d867
Swift: accept test changes
...
These are due to the changes on `toBeTested` that include canonical
types.
2022-06-28 12:16:08 +02:00
Asger F
b3b53360ae
Python: change category to deprecated because library is apparently supported anymore
2022-06-28 12:14:28 +02:00
Asger F
5dfc3c6537
Python: rename change note again
2022-06-28 12:10:26 +02:00
Paolo Tranquilli
68a341d72c
Swift: use createEntry in the whole type visitor
2022-06-28 12:06:19 +02:00
Paolo Tranquilli
57981384df
Swift: extract ProtocolComposition- and BuiltinType
2022-06-28 12:01:36 +02:00
Paolo Tranquilli
b41cbaec33
Swift: add possibility to add flags in tests
2022-06-28 12:01:36 +02:00
Paolo Tranquilli
f2b589743a
Swift: add possibility to collapse class hierarchy in tests
2022-06-28 12:01:36 +02:00
Asger F
d9f57e6d23
Python: rename change note file
2022-06-28 11:41:07 +02:00
Asger F
6d25fb6988
Python: add change note
2022-06-28 11:28:30 +02:00
Ian Lynagh
780f5abc67
Merge pull request #9724 from igfoo/igfoo/private
...
Kotlin: Make more methods private
2022-06-28 10:21:55 +01:00
Ian Lynagh
b6790ef735
Merge pull request #9725 from igfoo/igfoo/inline
...
Kotlin: Extract inlineability of functions
2022-06-28 10:21:30 +01:00
Asger F
c33690381e
JS: Add explicit 'this'
2022-06-28 10:21:44 +02:00
Asger F
c1a2e2abe0
JS: Rename to isLikelyCaseSensitiveRegExp
2022-06-28 10:21:33 +02:00
Tony Torralba
e0b4c63a53
Add new source kind to CsvValidation
2022-06-28 10:16:40 +02:00
Joe Farebrother
49b419c52e
Update models to include manual tag
2022-06-28 10:10:28 +02:00
Joe Farebrother
55e78e3e25
Minor doc fixes + making directFileRead private
2022-06-28 10:10:28 +02:00
Joe Farebrother
a41f28ebe5
Use more file openning methods
2022-06-28 10:10:28 +02:00
Joe Farebrother
58fba20689
Add change note
2022-06-28 10:10:28 +02:00
Joe Farebrother
cb717a22bf
Fix failing test cases
2022-06-28 10:10:27 +02:00
Joe Farebrother
810854d6b5
Add tests
2022-06-28 10:10:27 +02:00
Joe Farebrother
0e04f2b2e8
Add external storage souces
2022-06-28 10:10:27 +02:00
Asger F
fd28397056
JS: Fix typo
2022-06-28 10:10:23 +02:00
Asger F
9cf48fc804
JS: Clarify that strings are case insensitive by default
2022-06-28 10:09:56 +02:00
Asger F
b1251f0c63
JS: invertCase -> toOtherCase
2022-06-28 10:07:57 +02:00
Asger F
4c73ab2679
Apply suggestions from code review
...
Co-authored-by: Taus <tausbn@github.com >
2022-06-28 09:48:53 +02:00
Asger F
a033338d20
Python: Explicitly mention lack of transitive flow in asSource/asSink
2022-06-28 09:46:26 +02:00
Asger F
9b27a7cbcd
Python: Dont claim that external libraries are excluded from the database
2022-06-28 09:28:26 +02:00
Asger F
0346b6b67a
Merge pull request #9698 from github/post-release-prep/codeql-cli-2.10.0
...
Post-release preparation for codeql-cli-2.10.0
2022-06-28 09:05:13 +02:00
yoff
67b6f215dc
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2022-06-28 08:05:53 +02:00
yoff
1788507571
python: add qldoc
2022-06-27 21:00:12 +00:00
Rasmus Lerchedahl Petersen
a1fe8a5b2b
python: handle not in BarrierGuard
...
in the program
```python
if not is_safe(path):
return
```
the last node in the `ConditionBlock` is `not is_safe(path)`,
so it would never match "a call to is_safe".
Thus, guards inside `not` would not be part of `GuardNode`
(nor `BarrierGuard`). Now they can.
2022-06-27 20:10:47 +00:00
Rasmus Lerchedahl Petersen
882000afb3
python: not is confusing our logic
...
- added `is_unsafe`
- added "negated version" of two tests.
These versions do not use `not` and the analysis gets the taint right.
2022-06-27 20:10:47 +00:00
Brandon Stewart
4fb0264ec8
Merge branch 'main' into patch-1
2022-06-27 16:07:15 -04:00
Taus
dc0f50d49a
Python: Clean up variable names
...
Makes it more consistent with the names used in
`legalMergeCandidateNonEmpty`.
2022-06-27 19:54:09 +00:00
Taus
8fc9ce9699
Python: Fix bad join in MRO
...
Fixes a bad join in `list_of_linearization_of_bases_plus_bases`.
Previvously, we joined together `ConsList` and `getBase` before filtering
these out using the recursive call. Now we do the recursion first.
Co-authored-by: yoff <yoff@github.com >
2022-06-27 19:54:09 +00:00
Robert Marsh
829fdd1ff6
C++: fix join order in UsingExpiredStackAddress
2022-06-27 15:28:14 -04:00
Andrew Eisenberg
43bb439b82
Add version info for running subset of queries
2022-06-27 12:03:23 -07:00
Ian Lynagh
3543864e0b
Merge pull request #9723 from igfoo/igfoo/delegates
...
Kotlin: Mark DELEGATED_PROPERTY_ACCESSORs as compiler-generated
2022-06-27 19:48:53 +01:00
Asger F
cc57cb8af5
Merge branch 'main' into post-release-prep/codeql-cli-2.10.0
2022-06-27 20:37:25 +02:00
Ian Lynagh
44e69e1c09
Kotlin: Add Modifier.isInline()
2022-06-27 19:33:08 +01:00
Ian Lynagh
af672b4899
Kotlin: Add a changenote for Modifier.isInline()
2022-06-27 19:31:01 +01:00
Ian Lynagh
4a404aee76
Kotlin: Add inline info to methods test
2022-06-27 19:27:26 +01:00
Ian Lynagh
06060954ec
Kotlin: Extract inlineability of functions
2022-06-27 19:25:56 +01:00
Ian Lynagh
4e4b34290b
Kotlin: Make more methods private
2022-06-27 18:20:33 +01:00
Ian Lynagh
7dc490ff7c
Kotlin: Enhance methods test
2022-06-27 17:59:52 +01:00
Ian Lynagh
7430a413ad
Kotlin: Mark DELEGATED_PROPERTY_ACCESSORs as compiler-generated
2022-06-27 17:57:40 +01:00
Paolo Tranquilli
9d97fe7f30
Swift: generalize EnumIsCaseExpr test
2022-06-27 17:22:48 +02:00
Paolo Tranquilli
7f694f3b90
Swift: add EnumIsCase test
2022-06-27 16:25:46 +02:00
Asger F
3c9e743495
JS: Add change note
2022-06-27 16:16:38 +02:00
Asger F
17d139c87d
JS: Add qhelp
2022-06-27 16:14:30 +02:00
Brandon Stewart
99ae1b3f0d
Merge branch 'main' into patch-1
2022-06-27 10:12:26 -04:00
Brandon Stewart
52290fd4ae
run codeql query format
2022-06-27 10:01:40 -04:00
Asger F
dfe276aa18
Merge pull request #9715 from asgerf/js/always-check-file-header
...
JS: always sniff file header of TypeScript files
2022-06-27 14:58:57 +02:00
Rasmus Wriedt Larsen
9e154ff4bd
Merge branch 'main' into python/port-tarslip
2022-06-27 14:36:15 +02:00
Erik Krogh Kristensen
34e7589844
sanitize non-strings from unsafe-html-construction
2022-06-27 13:53:44 +02:00
Asger F
c8b2be616f
JS: Bump extractor version string
2022-06-27 13:52:44 +02:00
Asger F
c082578688
JS: Always sniff file type of TypeScript files
2022-06-27 13:48:00 +02:00
Arthur Baars
051b865230
Ruby: update tree-sitter-ruby
2022-06-27 13:03:04 +02:00
Nick Rolfe
280c959dc8
Merge branch 'main' into nickrolfe/pathname
2022-06-27 11:11:17 +01:00
Ian Lynagh
c72377cf2c
Merge pull request #9711 from igfoo/igfoo/integ
...
Kotlin: Add integration tests
2022-06-27 11:08:12 +01:00
Mathias Vorreiter Pedersen
41b23572f0
Merge pull request #9673 from geoffw0/stringlengthconflation2
...
Swift: String length conflation query
2022-06-27 10:29:09 +01:00
Asger F
5991e9b83c
Merge pull request #9714 from asgerf/ruby/fix-api-graphdeprecation
...
Ruby: fix deprecation warning
2022-06-27 11:09:11 +02:00
Asger F
09476d1c13
Ruby: fix deprecation warning
2022-06-27 10:01:37 +02:00
Harry Maclean
101111bd2f
Merge pull request #9574 from hmac/hmac/action-cable-logger
...
Ruby: More Rails modeling
2022-06-27 19:56:54 +12:00
Asger F
d92430b0e7
JS: Fix FP from char class
2022-06-27 09:08:37 +02:00
Asger F
9e4116618a
JS: Add CaseSensitiveMiddlewarePath query
2022-06-27 09:08:37 +02:00
Asger F
d6fd43fe12
Merge pull request #9364 from asgerf/ruby/api-graph-api
...
Ruby: API graph renaming an documentation
2022-06-27 08:54:24 +02:00
Brandon Stewart
29e73e1a04
Update ActiveRecord.qll
2022-06-24 15:35:36 -04:00
Brandon Stewart
463c096d4c
Update ActiveRecord.qll
2022-06-24 15:33:02 -04:00
Brandon Stewart
2047954013
Merge branch 'main' into patch-1
2022-06-24 15:30:11 -04:00
Brandon Stewart
ff9a7244c2
Update ActiveRecord.qll
2022-06-24 15:28:09 -04:00
Ian Lynagh
861a368734
Merge pull request #9703 from igfoo/igfoo/generated
...
Kotlin: Record more kinds of elements as compiler-generated
2022-06-24 19:46:56 +01:00
Ian Lynagh
0ddd5bb162
Merge pull request #9709 from igfoo/igfoo/isLocalFunction
...
Kotlin: Let useFunction worry about isLocalFunction for us
2022-06-24 19:22:43 +01:00
Mathias Vorreiter Pedersen
9f58ba1a1a
Merge pull request #9707 from github/redsun82/swift-extraction
...
Swift: extract more types
2022-06-24 18:38:28 +01:00
Ian Lynagh
0b312b61e4
Kotlin: qlformat some test queries
2022-06-24 18:35:58 +01:00
Ian Lynagh
31b3c1fff8
Kotlin: Add integration tests
2022-06-24 17:33:58 +01:00
Paolo Tranquilli
41fb55a7a8
Swift: extract all ReferenceStorageTypes
2022-06-24 18:10:31 +02:00
Geoffrey White
9013d56f37
Swift: Strengthen claim about severity in the qhelp.
2022-06-24 17:09:37 +01:00
Paolo Tranquilli
fd209e57cd
Swift: extract InoutType
2022-06-24 17:29:46 +02:00
Ian Lynagh
73a79e064c
Kotlin: Accept test output
2022-06-24 16:24:41 +01:00
Geoffrey White
ef283d9b7a
Swift: Metadata.
2022-06-24 16:20:16 +01:00
Asger F
3a44584de5
Merge pull request #9695 from asgerf/js/unused-var-template-placeholder
...
JS: Fix unused variable FP in template placeholders
2022-06-24 17:19:35 +02:00
Paolo Tranquilli
189a47e30d
Swift: extract VariadicSequenceType
2022-06-24 17:15:45 +02:00
Paolo Tranquilli
346110e8dd
Swift: extract DynamicSelfType
2022-06-24 16:49:58 +02:00
Paolo Tranquilli
4281605ba7
Swift: extract existential types
2022-06-24 16:28:18 +02:00
Paolo Tranquilli
631156dbc6
Swift: extract Nested- and PrimaryArchetypeType
2022-06-24 16:28:17 +02:00
Ian Lynagh
4791aaae52
Kotlin: Use an enum for compiler-generated-kinds
...
For now this is in KotlinFileExtractor, but we can move it out later if
we have generated things elsewhere.
2022-06-24 15:19:50 +01:00
Ian Lynagh
c0b6d1d093
Kotlin: Let useFunction worry about isLocalFunction for us
2022-06-24 14:24:02 +01:00
Ian Lynagh
46446f9dfa
Kotlin: Move the isLocalFunction check deeper into useFunction
2022-06-24 14:22:45 +01:00
Nick Rolfe
c1515db09c
Ruby: modeling of some file-related concepts for the Pathname class
2022-06-24 14:14:07 +01:00
Nick Rolfe
03d0f66247
Ruby: add flow summaries for Pathname class
2022-06-24 14:14:06 +01:00
Ian Lynagh
27b83a0b33
Java: Add an upgrade script
2022-06-24 14:01:07 +01:00
Ian Lynagh
008a8f0bba
Kotlin: Add an enum class to the methods test
2022-06-24 14:00:47 +01:00
Ian Lynagh
20817a54da
Kotlin: Mark enum class special members as cmopiler-generated
2022-06-24 14:00:47 +01:00
Ian Lynagh
c5d6ca7afc
Kotlin: Accept method test changes
2022-06-24 14:00:47 +01:00
Ian Lynagh
50eeb47244
Kotlin: Mark <clinit> as compiler-generated
2022-06-24 14:00:47 +01:00
Ian Lynagh
c0600820ac
Kotlin: Update methods test
2022-06-24 14:00:47 +01:00
Ian Lynagh
c06eb09100
Kotlin: Record that DEFAULT_PROPERTY_ACCESSOR are compiler-generated
2022-06-24 14:00:47 +01:00
Ian Lynagh
aefd89ed49
Kotlin: Add compiler-generated info to methods test
2022-06-24 14:00:47 +01:00
Ian Lynagh
5fc294d49e
Kotlin: Record that generated data class members are compiler-generated
2022-06-24 14:00:47 +01:00
Tamás Vajk
381bcf7dad
Merge pull request #9153 from tamasvajk/kotlin-simplify-loop-breaks-1
...
Kotlin: Unify loop `break`/`continue` statement handling between java and kotlin
2022-06-24 14:45:57 +02:00
Geoffrey White
f2ae2dbe1f
Swift: Consistency.
2022-06-24 12:28:10 +01:00
Geoffrey White
ef3d4f3242
Swift: Add qhelp and example.
2022-06-24 12:27:10 +01:00
Paolo Tranquilli
6230a3a3c5
Merge pull request #9685 from github/redsun82/swift-code-reorg
...
Swift: split up generated C++ code
2022-06-24 13:24:42 +02:00
Paolo Tranquilli
299e1af22e
Merge main into redsun82/swift-code-reorg
2022-06-24 13:06:14 +02:00
Paolo Tranquilli
80ffd81b2c
Merge pull request #9614 from github/alexdenisov/swift-extract-all-inputs-with-outputs
...
Swift: extract all output-producing source files, not only primary files
2022-06-24 12:23:36 +02:00
Chris Smowton
d0e521ef4a
Merge pull request #9681 from smowton/smowton/fix/reintroduce-obinit
...
Kotlin: reintroduce obinit when we have multiple secondary constructors and no primary
2022-06-24 10:25:24 +01:00
Chris Smowton
fcc8691394
Merge pull request #9625 from smowton/smowton/test/kotlin-1-7-support
...
Switch to using Kotlin 1.7 by default
2022-06-24 10:24:54 +01:00
Ian Lynagh
ae16a874c8
Merge pull request #9694 from igfoo/igfoo/useFunction
...
Kotlin: Some useFunction simplification
2022-06-24 09:31:14 +01:00
Paolo Tranquilli
b708e627ad
Merge pull request #9701 from github/redsun82/swift-final-resolve
...
Swift: make `Element::resolve` final
2022-06-24 10:30:33 +02:00
Paolo Tranquilli
8ca529e8d9
Swift: make Element::resolve final
...
One should only override `getResolveStep` (or `convertsFrom` for `Expr`
classes), as otherwise the resolution/conversion becomes inconsitent.
2022-06-24 10:05:58 +02:00
Paolo Tranquilli
d14eab84fa
Merge pull request #9699 from github/redsun82/swift-stop-stub-reverts
...
Swift: yet another fix to stub revert prevention
2022-06-24 10:04:55 +02:00
Paolo Tranquilli
bc44007e18
Swift: yet another fix to stub revert prevention
2022-06-24 09:40:03 +02:00
github-actions[bot]
d506f448ef
Post-release preparation for codeql-cli-2.10.0
2022-06-24 07:36:33 +00:00
Paolo Tranquilli
f539be33d5
Merge pull request #9697 from github/redsun82/swift-stop-stub-reverts
...
Swift: fix stub revert prevention
2022-06-24 09:32:29 +02:00
Paolo Tranquilli
a9bd784ba2
Swift: fix stub revert prevention
...
It turns out the threshold of 5 lines for stub modification detection
was too strict: in case of a long class name the QL formatter will put
the closing brace of the empty class definition on a new line, leading
to codegen fail with an error thinking the stub was modified.
On the other side of things, also adding a base to a stub class was not
being detected as a modification.
Now the modification test is slightly smarter. If the stub still marked
as generated and
* has more than 6 lines, or
* the contents does not match a regexp aproximation of a plain stub
then codegen will abort. The test will still avoid reading the whole
contents of all the stubs.
2022-06-24 09:02:40 +02:00
thiggy1342
6ea1aad5fc
more style fixes
2022-06-23 22:57:51 -04:00
thiggy1342
ce2edd4b28
style tweaks
2022-06-24 02:46:48 +00:00
thiggy1342
ca074e2275
add qhelp file
2022-06-24 02:19:06 +00:00
thiggy1342
cf36333082
forgot to finish this test
2022-06-24 02:18:48 +00:00
thiggy1342
45dd38df6e
polish up dataflow query
2022-06-24 01:50:20 +00:00
Ian Lynagh
eb1b3f801d
Merge pull request #9689 from igfoo/igfoo/makeprivate
...
Kotlin: Make some more methods private
2022-06-23 21:28:07 +01:00
Ian Lynagh
bee703a870
Kotlin: Inline away useFunctionCommon
2022-06-23 21:23:21 +01:00
Chris Smowton
a124d83265
Autoformat
2022-06-23 20:13:27 +01:00
Robert Marsh
4a522831c4
C++: update change note for IR global var flow
2022-06-23 14:39:13 -04:00
Robert Marsh
e45c982dd1
C++: change note for global variables in dataflow
2022-06-23 14:32:52 -04:00
Ian Lynagh
3934491dcc
Kotlin: Refactor useFunction*
...
They now work in a way more similar to other families of functions we
have.
2022-06-23 19:19:47 +01:00
Asger F
f5a19a1013
JS: Fix unused variable FP in template placeholders
2022-06-23 19:26:32 +02:00
Geoffrey White
1a980c94a0
Swift: Query description.
2022-06-23 18:13:48 +01:00
Ian Lynagh
ab19d8c3c3
Kotlin: Move useFunctionCommon
2022-06-23 17:59:28 +01:00
Brandon Stewart
caeef68bde
Update ActiveRecord.qll
2022-06-23 12:31:05 -04:00
Brandon Stewart
173bea2579
Update ActiveRecord.qll
2022-06-23 12:18:26 -04:00
Brandon Stewart
fa622f551a
Update ruby/ql/lib/codeql/ruby/frameworks/ActiveRecord.qll
...
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com >
2022-06-23 12:16:50 -04:00
Mathias Vorreiter Pedersen
71efffd79b
Merge pull request #9691 from rdmarsh2/rdmarsh2/swift/ssa-perf-1
...
Swift: remove check for inout params in SSA gen
2022-06-23 17:16:38 +01:00
Mathias Vorreiter Pedersen
998a75e768
Merge pull request #9690 from github/redsun82/swift-stop-stub-reverts
...
Swift: prevent accidental revert of modified stub
2022-06-23 17:13:52 +01:00
Geoffrey White
911d30bd9a
Swift: Proper query message.
2022-06-23 17:12:02 +01:00
Robert Marsh
946d0358c9
Swift: remove check for inout params in SSA gen
...
This check is unnecessary since it's enforced by the compiler, and is
causing a bad join order.
2022-06-23 15:59:34 +00:00
Paolo Tranquilli
ad38cf2026
Swift: prevent accidental revert of modified stub
...
If one modifies a QL stub but forgets to remove the `// generated`
header comment, codegen will now abort with an error rather than
silently reverting the change.
This is based on the rough heuristic of just counting the lines. If any
change is done to the stub class, the number of lines is bound to be
5 or more.
2022-06-23 17:49:21 +02:00
Paolo Tranquilli
a6ae6cfad0
Merge pull request #9688 from github/redsun82/swift-autopep8
...
Swift: autopep8 codegen
2022-06-23 17:49:09 +02:00
Ian Lynagh
bd8a8d00aa
Kotlin: Make some more methods private
2022-06-23 16:44:06 +01:00
Chris Smowton
b5010337a4
Avoid extracting needless obinit methods where we're only extracting a class' outline.
2022-06-23 16:26:54 +01:00
Chris Smowton
3cf7f96298
Ensure <obinit>'s return type is void not Unit
2022-06-23 16:26:54 +01:00
Chris Smowton
af5230349b
Kotlin: reintroduce obinit when we have multiple secondary constructors and no primary
...
This avoids DB inconsistencies because complex initialisers are extracted to more than one function.
2022-06-23 16:26:54 +01:00
Paolo Tranquilli
7334b4e03a
Swift: autopep8 all python files
...
Additionally set up a pre-commit hook and a CI check for that.
2022-06-23 17:13:56 +02:00
Geoffrey White
64d7296847
Swift: Remove redundant cast.
2022-06-23 16:04:26 +01:00
Geoffrey White
3291029e6d
Swift: Address further review comments.
2022-06-23 16:00:56 +01:00
Geoffrey White
ebcb1e9448
Swift: Clean up other uses of toString.
2022-06-23 15:53:55 +01:00
Chris Smowton
1aae3c5f5e
Fix whenexpr test
...
Prior to Kotlin 1.7 the gratuitous `?` was ignored for typing purposes; now it yields a `String?`. We should make the test work everywhere by using a real nullable type.
2022-06-23 15:34:40 +01:00
Chris Smowton
e64a8bc79a
Use binary names not fqnames for uniquing IrDeclarations
...
Otherwise we fall into the trap of confusing the two overloads of `MapsKt.iterator` which have differing jvmnames.
2022-06-23 15:34:40 +01:00
Chris Smowton
57ea34d3ff
Unique external classes/functions by fqname
...
Previously we used the IrDeclaration itself, but in Kotlin 1.7 this can be ambiguous because we can get more than one copy of a class in different modules.
2022-06-23 15:34:40 +01:00
Chris Smowton
8c57308661
Prevent extracting hidden functions
...
I'm not sure how these looked in 1.6 and below yet, but in 1.7 they appear with visibility = public, but a descriptor field set to indicate they have a name clash with a 'real' function.
2022-06-23 15:34:40 +01:00
Chris Smowton
2b2c384933
Kotlin: Move from 1.7.0-RC to 1.7.0
2022-06-23 15:34:40 +01:00
Chris Smowton
4899aabb05
Switch to using Kotlin 1.7 by default
2022-06-23 15:34:40 +01:00
Chris Smowton
45c85228bd
Implement Kotlin 1.7 support
...
- Implement getIrStubFromDescriptor for Kotlin 1.7
- Stop using ClassSymbol.signature, which is now only populated for classes built from Kotlin, and noteworthily is null for primitive and other internally-synthesised types.
2022-06-23 15:34:40 +01:00
Mathias Vorreiter Pedersen
43d449f1f7
Merge pull request #9687 from github/redsun82/swift-codegen-tag-to-pragma
...
Swift: tag -> pragma in codegen
2022-06-23 15:21:58 +01:00
Ian Lynagh
3b2b884f09
Merge pull request #9683 from igfoo/igfoo/getDiagnosticLocation
...
Kotlin: Remove unused function getDiagnosticLocation
2022-06-23 14:09:00 +01:00
Paolo Tranquilli
8d4637ddfd
Swift: tag -> pragma in codegen
...
For the use the former tags are meant for, pragma is a more
meaningful name. It now also accepts both strings and lists of strings.
2022-06-23 14:52:21 +02:00
Anders Schack-Mulligen
dc517a758e
Autoformat
2022-06-23 14:44:40 +02:00
Anders Schack-Mulligen
4a317a25d3
Dataflow: Sync.
2022-06-23 14:34:52 +02:00
Anders Schack-Mulligen
c27290563a
Dataflow: Perf fix, avoid node scans.
2022-06-23 14:34:05 +02:00
Paolo Tranquilli
0957f63cc7
Swift: update codegen workflow to include all files
2022-06-23 14:31:48 +02:00
Paolo Tranquilli
a9877ed2fd
Swift: split generated C++ files by directory
2022-06-23 14:24:03 +02:00
Paolo Tranquilli
b2ebf63d2e
Swift: split generated C++ code into .h and .cpp
2022-06-23 14:22:58 +02:00
Ian Lynagh
1713c416c0
Kotlin: Remove unused function getDiagnosticLocation
2022-06-23 13:07:09 +01:00
Geoffrey White
3b48cb02bc
Swift: Add Type.getName().
2022-06-23 12:54:56 +01:00
Geoffrey White
01f697abe9
Swift: Rename argName -> paramName.
2022-06-23 12:16:04 +01:00
Geoffrey White
5222ba9073
Swift: Suggestions from review.
2022-06-23 12:02:32 +01:00
Rasmus Wriedt Larsen
3248f7b423
Merge pull request #9649 from RasmusWL/certificate-modeling
...
Python/JS/Ruby: Ignore common words (like certain) as sensitive data source
2022-06-23 12:04:58 +02:00
Mathias Vorreiter Pedersen
9b587843ff
Merge pull request #9669 from rdmarsh2/rdmarsh2/swift/dataflow-lambda-flow
...
Swift: implement LambdaCall in dataflow library
2022-06-23 10:38:45 +01:00
Tamas Vajk
cf18a9a04b
Fix bad join order in Shadowing::shadows
...
Fixes the bad join order in `Shadowing::shadows`:
Tuple counts for Shadowing::shadows#f4fb89a3#ffff@c4b8a90j:
182915 ~0% {2} r1 = Variable::LocalVariableDecl::getCallable#dispred#f0820431#ff AND NOT Shadowing::shadows#f4fb89a3#ffff#antijoin_rhs(Lhs.0, Lhs.1)
182915 ~0% {3} r2 = JOIN r1 WITH localvars ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Rhs.2
182915 ~3% {4} r3 = JOIN r2 WITH Member::Member::getDeclaringType#dispred#f0820431#bf ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0, Lhs.2
182833 ~0% {4} r4 = JOIN r3 WITH classes ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.3, Lhs.0
182833 ~3% {5} r5 = JOIN r4 WITH Element::Element::getName#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.2, Lhs.0, Lhs.1, Lhs.3, Rhs.1
183352620 ~5% {5} r6 = JOIN r5 WITH Member::Field::getType#dispred#f0820431#bf_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.3, Lhs.1, Lhs.2, Lhs.4
40529 ~0% {5} r7 = JOIN r6 WITH Member::Field::getDeclaringType#dispred#f0820431#fb ON FIRST 2 OUTPUT Lhs.0, Lhs.4, Lhs.2, Lhs.3, Lhs.1
678 ~4% {4} r8 = JOIN r7 WITH Element::Element::getName#dispred#f0820431#ff ON FIRST 2 OUTPUT Lhs.2, Lhs.3, Lhs.4, Lhs.0
670 ~4% {4} r9 = r8 AND NOT Member::Field::isStatic#dispred#f0820431#b(Lhs.3)
670 ~3% {4} r10 = SCAN r9 OUTPUT In.0, In.2, In.3, In.1
return r10
After the fix:
Tuple counts for Shadowing::shadows#f4fb89a3#ffff@95ca976v:
182915 ~0% {2} r1 = Variable::LocalVariableDecl::getCallable#dispred#f0820431#ff AND NOT Shadowing::shadows#f4fb89a3#ffff#antijoin_rhs(Lhs.0, Lhs.1)
182915 ~0% {3} r2 = JOIN r1 WITH localvars ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Rhs.2
182915 ~0% {4} r3 = JOIN r2 WITH Member::Member::getDeclaringType#dispred#f0820431#bf ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Lhs.2, Rhs.1
182915 ~7% {5} r4 = JOIN r3 WITH Element::Element::getName#dispred#f0820431#ff ON FIRST 1 OUTPUT Lhs.3, Rhs.1, Lhs.2, Lhs.0, Lhs.1
678 ~4% {4} r5 = JOIN r4 WITH Shadowing::getField#f4fb89a3#ffff ON FIRST 3 OUTPUT Lhs.3, Lhs.4, Lhs.0, Rhs.3
670 ~4% {4} r6 = r5 AND NOT Member::Field::isStatic#dispred#f0820431#b(Lhs.3)
670 ~3% {4} r7 = SCAN r6 OUTPUT In.0, In.2, In.3, In.1
return r7
2022-06-23 10:30:39 +02:00
Tamas Vajk
e65a046235
Fix test file after rebase
2022-06-23 09:51:48 +02:00
Tamas Vajk
579bfc22f3
Fix performance change in SecurityFlag
2022-06-23 08:46:33 +02:00
Tamas Vajk
79ec998636
Fix DB change compatibility to backwards
2022-06-23 08:45:11 +02:00
Tamas Vajk
7dad2f7fcb
Fix DB upgrade properties
2022-06-23 08:45:11 +02:00
Tamas Vajk
074b90ea1a
Add change note
2022-06-23 08:45:11 +02:00
Tamas Vajk
053ca2e940
Update DB stats file
2022-06-23 08:45:11 +02:00
Tamas Vajk
e03b48f293
Add DB upgrade folder
2022-06-23 08:45:11 +02:00
Tamas Vajk
dabc956dbf
Unify loop break/continue statement handling between java and kotlin
2022-06-23 08:45:11 +02:00
AlexDenisov
decb136471
Update swift/extractor/SwiftExtractor.cpp
...
Co-authored-by: Paolo Tranquilli <redsun82@github.com >
2022-06-23 07:23:17 +02:00
thiggy1342
e838b83f5f
attempt to introduce dataflow tracking
2022-06-23 02:21:47 +00:00
Robert Marsh
813a8548d7
C++: accept test changes for globals in data flow
2022-06-22 16:42:42 -04:00
Geoffrey White
07b89b89d7
Swift: Clean up a bit.
2022-06-22 19:35:37 +01:00
Geoffrey White
19026e9ed5
Swift: Work around toString change.
2022-06-22 19:16:09 +01:00
Geoffrey White
da7f49155d
Swift: Use dataflow.
2022-06-22 19:16:09 +01:00
Geoffrey White
28d801fde3
Swift: CWE-135 query sources and sinks.
2022-06-22 19:16:08 +01:00
Robert Marsh
42929a70e8
Swift: implement LambdaCall in dataflow library
2022-06-22 17:30:54 +00:00
Michael Nebel
8899bf7f05
C#: Update tests.
2022-06-22 13:03:23 +02:00
Michael Nebel
0ef97b41c8
C#: Update .NET Runtime models and add sources and sinks.
2022-06-22 13:03:10 +02:00
Rasmus Wriedt Larsen
876ba71d9b
Python/JS/Ruby: Add change-note
2022-06-22 11:14:05 +02:00
Rasmus Wriedt Larsen
2ce4b7b9fc
SensitiveDataHeuristics: sync
2022-06-22 11:05:14 +02:00
Rasmus Wriedt Larsen
4be375521f
Python: Handle _ in sensitive-data-sources
2022-06-22 11:05:14 +02:00
Rasmus Wriedt Larsen
4a844312f4
Python: _ in var name not handled by sensitive-data-sources
2022-06-22 11:05:14 +02:00
Rasmus Wriedt Larsen
5dc2bb717a
Python: ignore common words (certain/concert) as sensitive source
2022-06-22 11:05:05 +02:00
Rasmus Wriedt Larsen
abdcfd55c3
Python: uncertainty is treated as a certificate :O
2022-06-22 10:16:28 +02:00
thiggy1342
995f365568
just check string literal
2022-06-22 02:17:01 +00:00
thiggy1342
c767f241ad
narrow query scope
2022-06-22 02:12:23 +00:00
thiggy1342
f6c4b5c44b
Merge branch 'experimental-manually-check-request-verb' of https://github.com/thiggy1342/codeql into experimental-manually-check-request-verb
2022-06-21 21:27:39 +00:00
thiggy1342
990747cd22
Limit findings to just those called in Controllers
2022-06-21 21:27:18 +00:00
thiggy1342
53729f99c5
restrict findings to just controller classes
2022-06-21 20:28:29 +00:00
thiggy1342
bbe17b3667
Merge branch 'experimental-strong-params' of https://github.com/thiggy1342/codeql into experimental-strong-params
2022-06-21 19:31:18 +00:00
thiggy1342
83b720d730
first draft of weak params query
2022-06-21 19:28:53 +00:00
Brandon Stewart
a2e2dcdfd5
Make ActiveRecordInstanceMethodCall Public
2022-06-21 14:44:52 -04:00
Andrew Eisenberg
1ec838e671
Update docs/codeql/codeql-cli/analyzing-databases-with-the-codeql-cli.rst
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2022-06-21 09:14:23 -07:00
Asger F
a1af9c3d7d
Ruby: update predicate docs
2022-06-21 12:44:16 +02:00
Asger F
d15b90e21a
Ruby: Add deprecation
2022-06-21 12:44:16 +02:00
Asger F
9838e2e101
Ruby: Rename getAValueReachingRhs -> getAValueReachingSink
2022-06-21 12:44:16 +02:00
Asger F
7c877c7861
Ruby: Rename getARhs -> asSink
2022-06-21 12:44:16 +02:00
Asger F
2f8086bb57
Ruby: Rename getAUse -> getAValueReachableFromSource
2022-06-21 12:44:16 +02:00
Asger F
573c5c5efe
Ruby: Rename getAnImmediateUse -> asSource
2022-06-21 12:44:16 +02:00
Asger F
f2403e2610
Ruby: port API graph doc comment
2022-06-21 12:44:16 +02:00
Asger F
092a6a01ac
Python: Update member documentation
2022-06-21 12:44:06 +02:00
Asger F
fecbfa6ca3
Python: add deprecation
2022-06-21 12:44:06 +02:00
Asger F
3a669a8d21
Python: getAValueReachingRhs -> getAValueReachingSink
2022-06-21 12:44:06 +02:00
Asger F
b096f9ec72
Python: Rename getAUse -> getAValueReachableFromSource
2022-06-21 12:44:06 +02:00
Asger F
181a53bd03
Python: Rename getAnImmediateUse -> asSource
2022-06-21 12:44:06 +02:00
Asger F
60fde3c031
Python: Rename getARhs -> asSink
2022-06-21 12:44:06 +02:00
Asger F
8f259d4bb6
Python: port API graph doc comment
2022-06-21 12:44:06 +02:00
Erik Krogh Kristensen
73b657ce25
QL: focus alert locations
2022-06-21 12:26:18 +02:00
Robert Marsh
d28c39cd73
C++: update test expectations
2022-06-20 15:56:00 -04:00
Robert Marsh
8b47b838ca
C++: autoformat
2022-06-20 15:56:00 -04:00
Robert Marsh
5a3e546bfe
C++: update test expectations
2022-06-20 15:55:50 -04:00
Robert Marsh
33910a85b9
C++: restrict global variable IR generation
2022-06-20 15:51:44 -04:00
Robert Marsh
7818dafecc
C++: cleanup some implicit this usage
2022-06-20 15:48:30 -04:00
Robert Marsh
54488eb49b
C++: fix global vars accesses in global vars
2022-06-20 15:46:49 -04:00
Robert Marsh
a3f1d61913
C++: test for global var access in a global var
2022-06-20 15:26:28 -04:00
Robert Marsh
048e5d8474
C++: IR data flow through global variables
2022-06-20 15:15:45 -04:00
Robert Marsh
c216176de1
C++: sync and accept new consistency test
2022-06-20 15:15:40 -04:00
Andrew Eisenberg
3547c338ef
Update docs/codeql/codeql-cli/analyzing-databases-with-the-codeql-cli.rst
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2022-06-20 12:00:43 -07:00
Robert Marsh
f0634140b6
C++: fix inconsistencies from IR global vars
2022-06-20 14:41:10 -04:00
Jeroen Ketema
89d4f84731
C++: Update tests for frontend update
2022-06-20 14:41:09 -04:00
Robert Marsh
e0878d7d3c
C++: Fix IR variable reuse for global var inits
2022-06-20 14:41:02 -04:00
Robert Marsh
767b0cfdfb
Revert "Merge pull request #8933 from MathiasVP/revert-globals"
...
This reverts commit 2517371a37 , reversing
changes made to db856798b9 .
2022-06-20 14:26:10 -04:00
Andrew Eisenberg
9d6b1bf142
Apply suggestions from code review
...
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com >
2022-06-20 10:24:56 -07:00
Alex Denisov
42dc6814f0
Swift: extract all output-producing source files, not only primary files
2022-06-20 14:06:54 +02:00
Erik Krogh Kristensen
7d62b9e131
move the pruning for module resolution of TypeExprs
2022-06-20 12:12:57 +02:00
yoff
94145e9e74
Update python/ql/lib/semmle/python/security/dataflow/TarSlipCustomizations.qll
2022-06-20 10:14:52 +02:00
Harry Maclean
e1dcc207b4
Ruby: Model methods in Rails::Generators::Actions
...
These methods are sinks for command injection.
2022-06-20 13:36:09 +12:00
Harry Maclean
20ff4c4299
Ruby: Model ActiveRecord::Relation#touch_all
2022-06-20 13:36:02 +12:00
Harry Maclean
7dfab371f6
Ruby: Model redirect_back and redirect_back_or_to
...
These are ActionController methods that redirect to the HTTP Referer,
falling back to the given location if there is no Referer.
2022-06-20 13:36:02 +12:00
Harry Maclean
a298f5eb5e
Ruby: Recognise File.atomic_write as a file writer
...
This method is an ActiveSupport extension, but there's no harm in
recognising it universally as any identically-named method is likely to
also be a file writer.
2022-06-20 13:36:02 +12:00
Harry Maclean
0ce14fc4e5
Ruby: Recognise ActionCable logger class
2022-06-20 13:36:02 +12:00
Harry Maclean
4ecd595b73
Remove duplicate import
2022-06-20 13:36:02 +12:00
Erik Krogh Kristensen
6d3808bd89
remove redundant cast
2022-06-19 23:19:01 +02:00
Erik Krogh Kristensen
15f9e084d5
fix spurious resolved predicate expressions
2022-06-19 22:49:02 +02:00
Erik Krogh Kristensen
f8b451a514
get all calls to resolve to a unique predicate (within reason)
2022-06-19 22:38:09 +02:00
Erik Krogh Kristensen
f08f02ed66
use the explicit super type to resolve calls
2022-06-19 20:38:16 +02:00
Erik Krogh Kristensen
115110475d
fix getName() on module instantiations
2022-06-19 20:09:32 +02:00
Erik Krogh Kristensen
26df367a8a
fix some instances of spuriously resolving to multiple predicates
2022-06-19 20:09:31 +02:00
Erik Krogh Kristensen
1856e2b389
fixup the $schema in all .sarif files
2022-06-19 20:09:31 +02:00
Erik Krogh Kristensen
6e2f3e2fcb
merge all .sarif files at the end of the QL-for-QL workflow
2022-06-19 20:09:31 +02:00
Erik Krogh Kristensen
638a886dfe
move create-extractor-pack to a scripts folder
2022-06-19 20:09:31 +02:00
Erik Krogh Kristensen
0391db6787
simplify some code based on review
2022-06-19 20:09:31 +02:00
Erik Krogh Kristensen
7e93416e97
only resolve module types if we know that the TypeExpr could possibly resolve to a module
2022-06-19 20:09:31 +02:00
Erik Krogh Kristensen
a59f0d36f5
run the implicit-this patch on QL-for-QL
2022-06-19 20:09:31 +02:00
Erik Krogh Kristensen
3a4f0299c7
fix typo
2022-06-19 20:09:31 +02:00
thiggy1342
3478e7e910
first draft of weak params query
2022-06-18 20:43:58 +00:00
thiggy1342
0456870136
Merge branch 'main' into experimental-manually-check-request-verb
2022-06-18 15:21:53 -04:00
thiggy1342
ecb2114b7b
replace duplicate post with put
2022-06-18 19:21:17 +00:00
thiggy1342
8b36191023
drop precision to low for now
2022-06-18 18:38:58 +00:00
thiggy1342
059c4d38ad
refine query to use appropriate types
2022-06-18 18:26:45 +00:00
thiggy1342
8aa2602d9e
trying to hone in on eq comparison and include?
2022-06-18 03:09:04 +00:00
Rasmus Wriedt Larsen
f1b0a814e0
Python: Apply suggestions from code review
...
Co-authored-by: yoff <lerchedahl@gmail.com >
2022-06-17 15:04:57 +02:00
Henry Mercer
4733653939
Add a note on how to install dependencies from GHES
2022-06-16 15:08:16 -07:00
Henry Mercer
e4462b7aac
Add a section on authenticating to Container registries
2022-06-16 14:39:37 -07:00
Henry Mercer
5931ea4ab8
Add section on managing packs on GHES
2022-06-16 14:37:34 -07:00
Andrew Eisenberg
b993558987
Update docs to include how to run a pack with path
...
`scope/name@range:path` is a valid way to specify a set of queries.
2022-06-15 10:14:51 -07:00
Rasmus Wriedt Larsen
d6e68258a4
Python: API-graphs: allow class decorators in .getASubclass()
2022-06-15 17:30:34 +02:00
Rasmus Wriedt Larsen
5f32f898d5
Python: API-graphs: test class decorators and subclass
...
A class decorator could change the class definition in any way.
In this specific case, it would be better if we allowed the subclass to
be found with API graphs still.
inspired by
c2250cfb80/tests/auth_tests/test_views.py (L40-L46)
2022-06-15 16:16:34 +02:00
Rasmus Wriedt Larsen
b2c8e0fe8d
Python: Add comment to test
2022-06-15 15:59:54 +02:00
Rasmus Wriedt Larsen
24c9aff2fc
Python: Fix a type-tracking test
2022-06-15 15:58:17 +02:00
Rasmus Lerchedahl Petersen
0608d4d2f9
python: fix alerts
...
Also, remove the `toLowerCase` again,
as I do not know what effect it will have.
2022-06-15 14:18:29 +02:00
Rasmus Lerchedahl Petersen
40b61fa85f
python: fix qldocs and clean-up dead code
2022-06-15 14:07:35 +02:00
Rasmus Lerchedahl Petersen
f4ce382b7d
python: update test expectations
2022-06-15 12:40:14 +02:00
Joe Farebrother
f46dd8cc85
Fix misspellings
2022-06-14 15:34:08 +01:00
Joe Farebrother
a6736a99e4
Apply doc review suggestions -
...
fix typos and capitilisation; reword description.
2022-06-14 14:56:24 +01:00
Joe Farebrother
c71586e1f8
Remove checks for dynamically registered recievers
2022-06-14 14:56:24 +01:00
Joe Farebrother
320c671b73
Adress reveiw comments - make use of existing ql libraries
2022-06-14 14:56:24 +01:00
Joe Farebrother
9d048e78af
Apply suggestions from code review - fix typos/style, make things private
...
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com >
2022-06-14 14:56:23 +01:00
Joe Farebrother
d88d216388
Add change note
2022-06-14 14:56:23 +01:00
Joe Farebrother
2fc142f41f
Add security severity
2022-06-14 14:56:23 +01:00
Joe Farebrother
8e2e8cc77f
Add qhelp
2022-06-14 14:56:22 +01:00
Joe Farebrother
4aed1a1e23
Add test cases; fix handling of recievers declared through xml
2022-06-14 14:56:22 +01:00
Joe Farebrother
87f26bf033
Fix typos
2022-06-14 14:56:22 +01:00
Joe Farebrother
1959f49165
Add Improper Intent Verification query
2022-06-14 14:56:21 +01:00
Ian Lynagh
b524fb4f3a
Java: Add a test for cycles in the type hierarchy
2022-06-14 14:08:19 +01:00
Ian Lynagh
304e2926c9
Java: Fix RefType.getAStrictAncestor() in the presence of type hierarchy cycles
2022-06-14 14:08:19 +01:00
Rasmus Lerchedahl Petersen
7b5d9ec7df
python: Straight port of tarslip
2022-06-14 15:01:13 +02:00
Erik Krogh Kristensen
cb0a6936ad
add support for the "exports" property in a package.json
2022-06-14 13:31:47 +02:00
Erik Krogh Kristensen
92d1c84f05
bind the result in JsonValue::getBooleanValue
2022-06-14 13:22:09 +02:00
thiggy1342
6bef71ea2c
tweaks to tests
2022-06-14 02:17:12 +00:00
thiggy1342
7bdec98e6f
draft tests
2022-06-14 02:13:15 +00:00
thiggy1342
c012c235c6
rough draft of check request verb query
2022-06-14 01:45:02 +00:00
ihsinme
9d12f1be53
Update DangerousUseMbtowc.ql
2022-06-02 14:34:38 +03:00
ihsinme
77e4d05ea3
Update test.cpp
2022-06-02 14:33:59 +03:00
ihsinme
872dd0d59f
Update DangerousUseMbtowc.expected
2022-06-02 14:33:06 +03:00
Mathias Vorreiter Pedersen
7c25063f7f
Merge branch 'main' into swift-decls-in-cfg
2022-05-27 17:56:58 +01:00
Mathias Vorreiter Pedersen
df2c1972e9
Swift: Add CFG trees for local declarations and accept test changes.
2022-05-26 09:09:17 +01:00
Mathias Vorreiter Pedersen
b715a6b63b
Swift: Add test containing local declarations.
2022-05-26 09:06:13 +01:00
Tony Torralba
9c941dc7ab
Add Kotlin test for UnsafeAndroidAccess
2022-05-25 10:56:18 +02:00
Tony Torralba
f0b90b391f
Add Kotlin test for CleartextStorageSharedPrefs
2022-05-25 10:56:18 +02:00
Tony Torralba
85fab20086
Add Expr::getUnderlyingExpr predicate
2022-05-25 10:56:18 +02:00
ihsinme
57127a5343
Update cpp/ql/src/experimental/Security/CWE/CWE-125/DangerousUseMbtowc.qhelp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2022-05-25 09:38:02 +03:00
ihsinme
a7c69ba6ab
create new branchihsinme-patch-87 in fork
2022-05-09 13:15:27 +00:00
Erik Krogh Kristensen
4b50c68934
exclude annotation names
2022-03-16 22:59:01 +01:00
Erik Krogh Kristensen
2a196611af
add not as a keyword
2022-03-16 22:59:01 +01:00
Erik Krogh Kristensen
86c8737250
remove string constants from mentioned non-params
2022-03-16 22:59:01 +01:00
Erik Krogh Kristensen
35c3c62f9e
apply suggestions from code review
2022-03-16 22:59:01 +01:00
Erik Krogh Kristensen
daed33f5af
JS: fix more instances of ql/missing-parameter-qldoc
2022-03-16 22:58:28 +01:00
Erik Krogh Kristensen
3762ce2c72
QL: also report missing QLDoc for parameters when no parameters are documented
2022-03-16 22:56:54 +01:00
Erik Krogh Kristensen
f204a41122
QL: fix ql/missing-parameter-qldoc error in QL-for-QL
2022-03-16 22:56:53 +01:00
Erik Krogh Kristensen
53760799fc
sync files
2022-03-16 22:56:53 +01:00
Erik Krogh Kristensen
efba220b45
JS: fix most ql/missing-parameter-qldoc issues
2022-03-16 22:56:52 +01:00
Erik Krogh Kristensen
ecd3aceb07
QL: add test for ql/missing-parameter-qldoc
2022-03-16 22:54:35 +01:00
Erik Krogh Kristensen
af112a011a
QL: Add query detecting suspiciously missing parameters from the QLDoc of a predicate
2022-03-16 22:54:35 +01:00
Erik Krogh Kristensen
8c6022b78a
QL: add query detecting inconsistent deprecations
2022-03-16 22:37:34 +01:00