Nick Rolfe
ea2814c03d
fix import
2022-07-25 12:00:24 +01:00
Nick Rolfe
2f1ba20165
Revert "Ruby: separate trap-writer into its own module"
...
This reverts commit 388c9ffb74 .
2022-07-25 08:54:30 +01:00
Nick Rolfe
8eddf62b22
Revert "Ruby: compute path string only once"
...
This reverts commit 0a8ecd3cf7 .
2022-07-25 08:52:53 +01:00
Nick Rolfe
81954c3a8d
Revert "Ruby: avoid repeated construction of table name strings"
...
This reverts commit 8dae85e1b1 .
2022-07-25 08:52:42 +01:00
Nick Rolfe
ced07b52a5
Revert "Ruby/QL: speed up trap writing by putting BufWriter in front of GzEncoder"
...
This reverts commit 4767d5a1ba .
2022-07-25 08:52:12 +01: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
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
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
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
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
Paolo Tranquilli
e1bd4a78ff
Merge branch 'main' into redsun82/swift-type-repr-collapse
2022-07-18 14:05:43 +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
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
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
github-actions[bot]
0ee476129a
Post-release preparation for codeql-cli-2.10.1
2022-07-14 14:38:49 +00: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
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
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
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
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
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
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
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
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
Asger F
56786790fc
Merge pull request #9682 from github/release-prep/2.10.0
...
Release preparation for version 2.10.0
2022-06-23 16:09:48 +02: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
Asger F
d94010c244
Grammar: report -> reports
2022-06-23 14:17:52 +02:00
Asger F
d3df2033f0
Update cpp/ql/lib/change-notes/released/0.3.0.md
2022-06-23 14:11:11 +02:00
Asger F
bef38a64c3
Update cpp/ql/lib/CHANGELOG.md
2022-06-23 14:10:09 +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
github-actions[bot]
a74051c658
Release preparation for version 2.10.0
2022-06-23 11:17:46 +00: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
Asger F
298f4ab899
Merge pull request #9679 from asgerf/js/fix-downgrade-script
...
JS: Downgrade ast_node_symbol relation
2022-06-23 11:08:06 +02: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
Asger F
90c2b6e47f
JS: Downgrade ast_node_symbol relation
2022-06-23 10:17:28 +02:00
Geoffrey White
20c3182437
Merge pull request #9087 from ihsinme/ihsinme-patch-88
...
CPP: Add query for CWE-670: Always-Incorrect Control Flow Implementation when use SSL_shutdown
2022-06-23 09:16:55 +01:00
Tamas Vajk
e65a046235
Fix test file after rebase
2022-06-23 09:51:48 +02:00
Mathias Vorreiter Pedersen
5dfa5fb877
Merge pull request #9678 from jketema/ql-fixes
...
C++: Two small QL fixes
2022-06-23 08:23:54 +01:00
Erik Krogh Kristensen
08e4c8b195
Merge pull request #9634 from erik-krogh/jqueryParam
...
JS: add all jquery plugin parameters as source to js/html-constructed-from-input
2022-06-23 08:57:20 +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
Jeroen Ketema
b3ac7bda35
C++: Remove redundant parentheses
2022-06-23 07:25:53 +02:00
Jeroen Ketema
9cfd1a84b6
C++: Remove out-of-date comment, as we use mangled names in ResolveClass.qll
2022-06-23 07:24:04 +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
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
b609f1ea52
Merge pull request #9668 from MathiasVP/expr-nodes-for-properties
...
Swift: Make sure property setters and getters also have `ExprNodes`
2022-06-22 14:09:46 -04:00
Robert Marsh
42929a70e8
Swift: implement LambdaCall in dataflow library
2022-06-22 17:30:54 +00:00
Andrew Eisenberg
5432be7b3a
Merge pull request #9667 from github/nickrolfe/js_downgrades
...
JS: create downgrades pack
2022-06-22 10:30:41 -07:00
Mathias Vorreiter Pedersen
77b8ceb976
Swift: Make sure property setters and getters also have ExprNodes.
2022-06-22 17:53:41 +01:00
Nick Rolfe
d91e8a6309
JS: create downgrades pack
2022-06-22 17:31:49 +01:00
AlexDenisov
19bc9cf301
Merge pull request #9666 from github/redsun82/swift-code-reorg
...
Swift: reorganize code
2022-06-22 18:28:08 +02:00
Paolo Tranquilli
cfde68023d
Swift: fix includes jumbled by IDE
2022-06-22 18:17:40 +02:00
Paolo Tranquilli
22321aa124
Swift: reorganize code
...
Visitor code has been split between header and sources to speed up
incremental build. Moreover the code was reorganized using a new `infra`
bazel package (and `visitors` got promoted to a bazel package as well).
2022-06-22 18:11:58 +02:00
Paolo Tranquilli
7c958dfbb9
Merge pull request #9639 from github/redsun82/swift-extraction
...
Swift: some expression extractions
2022-06-22 17:19:20 +02:00
Paolo Tranquilli
e25f22da26
Merge main into redsun82/swift-extraction
2022-06-22 16:54:52 +02:00
Chris Smowton
46e6203493
Merge pull request #9626 from smowton/smowton/fix/dont-emit-synthetic-parameter-names
...
Kotlin: don't emit synthetic parameter names
2022-06-22 15:30:54 +01:00
Paolo Tranquilli
1fc2bc4938
Swift: really fix tests
2022-06-22 16:15:02 +02:00
Jeroen Ketema
f9e09da604
Merge pull request #9643 from jketema/namespace-variable-test
...
C++: Add variable in namespace test
2022-06-22 15:58:26 +02:00
Mathias Vorreiter Pedersen
43bfa2af55
Merge pull request #9635 from MathiasVP/swift-add-remote-flow-sources
...
Swift: Add `RemoteFlowSource`
2022-06-22 14:41:19 +01:00
Mathias Vorreiter Pedersen
a293fd1f3e
Merge pull request #9638 from geoffw0/stringlengthconflation
...
Swift: String length conflation tests (for CVE-2022-23625)
2022-06-22 14:39:34 +01:00
Chris Smowton
00b4070866
Merge pull request #9659 from smowton/smowton/admin/invert-java-log-injection-query
...
Java: Report log-injection at the source rather than the sink
2022-06-22 14:27:50 +01:00
Mathias Vorreiter Pedersen
07c4308a32
Merge branch 'main' into swift-add-remote-flow-sources
2022-06-22 14:27:44 +01:00
Robert Marsh
d13d4c6cd1
Merge pull request #9623 from MathiasVP/swift-interpretElement0
...
Swift: Interpret MaD strings
2022-06-22 09:27:13 -04:00
Geoffrey White
e07df0d0c8
Swift: make setters private in test.
2022-06-22 14:13:30 +01:00
Mathias Vorreiter Pedersen
1febe87356
Merge pull request #9644 from jketema/class-entry-fix
...
C++: Ensure we can round trip between (forward) class declarations
2022-06-22 14:12:11 +01:00
Chris Smowton
44cf260762
Merge pull request #9571 from smowton/smowton/fix/array-variance-lowering
...
Kotlin: Implement array type variance lowering
2022-06-22 13:38:21 +01:00
Chris Smowton
1f9f6d7c33
Java: Report log-injection at the source rather than the sink
...
This should remove the problem of excessive grouping of different alerts that share a sink location, often due to wrapper functions that form the ultimate sink of all logging calls in a given codebase.
2022-06-22 13:05:20 +01:00
Tony Torralba
cc354caa1f
Merge pull request #9319 from atorralba/atorralba/add-editable-valueof-step
...
Kotlin: Add taint step for String.valueOf(Editable)
2022-06-22 13:50:30 +02:00
Geoffrey White
f9e1e630f7
Swift: more accurate NSObject / NSString hierarchy in test.
2022-06-22 12:36:40 +01:00
Tamás Vajk
c0e115700d
Merge pull request #9647 from tamasvajk/kotlin-when-branch-encl-stmt
...
Kotlin: Fix enclosing statement of `when` branches
2022-06-22 13:18:56 +02:00
Jeroen Ketema
b1dd8da587
C++: Fix query formatting
2022-06-22 12:59:49 +02:00
Ian Lynagh
c7a6b1e9a7
Merge pull request #9640 from igfoo/igfoo/vis
...
Kotlin/Java: Add the beginnings of a "visibility" consistency query
2022-06-22 11:34:15 +01:00
Paolo Tranquilli
3ed783df7f
Swift: fix tests
2022-06-22 12:14:47 +02:00
Paolo Tranquilli
aea4910be4
Merge pull request #9620 from github/redsun82/swift-codespace
...
Swift: add devcontainer setup
2022-06-22 11:52:08 +02:00
Rasmus Wriedt Larsen
876ba71d9b
Python/JS/Ruby: Add change-note
2022-06-22 11:14:05 +02:00
Paolo Tranquilli
ee5c30ebda
Merge main into redsun82/swift-extraction
2022-06-22 11:11:20 +02:00
Paolo Tranquilli
e0784e0680
Swift: fix update-codeql
...
Also require sudo at the start of the script if updating.
2022-06-22 11:05:30 +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
Paolo Tranquilli
4377fb0552
Swift: auto-install codeql on codespace
2022-06-22 10:51:30 +02:00
Anders Schack-Mulligen
df6d68b215
Merge pull request #9618 from aschackmull/dataflow/deprecate-barrierguard-class
...
Dataflow: Deprecate BarrierGuard class
2022-06-22 10:44:08 +02:00
Michael Nebel
24ba5cc06e
Merge pull request #9025 from michaelnebel/csharp/generatedrefactor
...
C#: Provenance column in Models as Data CSV format.
2022-06-22 10:34:31 +02:00
Rasmus Wriedt Larsen
abdcfd55c3
Python: uncertainty is treated as a certificate :O
2022-06-22 10:16:28 +02:00
Paolo Tranquilli
400d7afc94
Swift: tweaks to codespace setup
2022-06-22 09:59:12 +02:00
Tamas Vajk
a50e062b3c
Kotlin: Fix enclosing statement of when branches
2022-06-22 09:10:27 +02:00
Tamas Vajk
640026d387
Kotlin: add enclosing statement test
2022-06-22 09:09:57 +02:00
Jeroen Ketema
4a78c9b06d
C++: Add change note
2022-06-22 08:11:24 +02:00
Jeroen Ketema
880c785efe
C++: Ensure we can round trip between (forward) class declarations
...
This was already possible when the forward class declaration and the class
definition occurred in the same scope. However, there is a common C++ usage
pattern in which this is not the case (when only a pointer to the class is
needed). In this latter scenario we could not round trip between the (forward)
`DeclarationEntry` and the `Declaration`.
Effectively this changes the code to:
```
if exists(TypeDeclarationEntry e | e.getType() = this)
then result.getType() = this
else ...
```
We use `type_decls` instead to stay close to the original code.
2022-06-22 07:58:45 +02:00
Jeroen Ketema
0f37e4e7b2
C++: Add variable in namespace test
2022-06-22 07:56:27 +02:00
Jeroen Ketema
a8833a0c70
C++: Test showing going from a forward class declaration to a class but not back
2022-06-22 07:53:50 +02:00
Jeroen Ketema
40e0356177
C++: Test that we can go from a DeclarationEntry to a Declaration and back
2022-06-22 07:53:50 +02:00
Michael Nebel
2b892bc000
Merge pull request #9553 from michaelnebel/csharp/narrowtelemetry
...
C#/Java: Only display 1k most relevant results for ExternalApi telemetry queries.
2022-06-22 07:35:56 +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
Ian Lynagh
52b229052d
Kotlin/Java: Add the beginnings of a "visibility" consistency query
2022-06-21 17:24:37 +01: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
Paolo Tranquilli
1e4ac44362
Swift: some expression extractions
2022-06-21 17:31:40 +02:00
Mathias Vorreiter Pedersen
9fe238f20c
Merge pull request #9637 from github/redsun82/swift-callable-extractor
...
Swift: Callable abstraction
2022-06-21 16:04:23 +01:00
Dave Bartolomeo
39d77d8f20
Merge pull request #9633 from github/edoardo/rc3.6-mergeback
...
Merge `rc/3.6` into `main`
2022-06-21 10:44:05 -04:00
Paolo Tranquilli
c77fc26c69
Swift: Callable abstraction
...
This new class encompasses both `AbstractFunctionDecl` and
`AbstractClosureExpr`, together with their common parts (namely
parameters and the body).
`ClosureExpr` and `AutoClosureExpr` got ported to structured C++
generated translation in the process.
2022-06-21 15:50:35 +02:00
Geoffrey White
8989210995
Swift: Fix some details so that the test works.
2022-06-21 14:22:35 +01:00
Mathias Vorreiter Pedersen
415e9742a7
Swift: Add a 'RemoteFlowSource' class.
2022-06-21 14:09:56 +01:00
Anders Schack-Mulligen
f8f9b7d3b4
Apply suggestions from code review
2022-06-21 14:11:36 +02:00
Erik Krogh Kristensen
e1c34c11ed
add all jquery plugin parameters as source to js/html-constructed-from-input
2022-06-21 13:22:56 +02:00
Erik Krogh Kristensen
dde7e9e2e8
add test for jquery plugin parameters in js/html-constructed-from-input
2022-06-21 13:21:57 +02:00
Chris Smowton
7bb0d62863
Update comparisonBarrierGuard qldoc
2022-06-21 12:12:17 +01:00
Chris Smowton
8ae4c21a3e
Update doc for divideByZeroSanitizerGuard
2022-06-21 12:11:19 +01: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
Edoardo Pirovano
70dbd92e25
Bump minor version of all regularly released packs
2022-06-21 11:22:58 +01:00
Edoardo Pirovano
ad02b85efa
Merge branch main into rc/3.6
2022-06-21 11:15:25 +01:00
Anders Schack-Mulligen
d7d409f125
Merge pull request #9565 from github/post-release-prep/codeql-cli-2.9.4
...
Post-release preparation for codeql-cli-2.9.4
2022-06-21 11:51:29 +02:00
Cornelius Riemenschneider
091299668a
Merge pull request #9617 from github/criemen/fix-go-pattern-lua-config
...
Go: Properly escape dash in tracing-config.lua
2022-06-21 11:45:14 +02:00
Mathias Vorreiter Pedersen
916cf6eb41
Merge pull request #9631 from jketema/global-variable-test
...
C++: Add global variable tests
2022-06-21 10:44:47 +01:00
Mathias Vorreiter Pedersen
f9c8926fcc
Swift: Fill in some easy TODOs in 'FlowSummaryImplSpecific' and implement a source model for 'String(contentsOf:)'.
2022-06-21 10:27:46 +01:00
Mathias Vorreiter Pedersen
184371f3ce
Swift: Implement 'interpretElement0'.
2022-06-21 10:22:02 +01:00
Anders Schack-Mulligen
736372ffd6
Ruby: Remove test.
2022-06-21 11:18:36 +02:00
Anders Schack-Mulligen
a4796e1542
Add change notes.
2022-06-21 11:17:47 +02:00
Mathias Vorreiter Pedersen
ace00c3d09
Swift: Add a 'getName' predicate to types that forwards to the 'getName' from the declaration.
2022-06-21 10:06:01 +01:00
Mathias Vorreiter Pedersen
cf08644b92
Swift: Add an AST class for possible method declarations.
2022-06-21 10:06:01 +01:00
Jeroen Ketema
1f97f1d931
C++: Add global variable tests
2022-06-21 10:43:40 +02:00
Mathias Vorreiter Pedersen
e2478d1106
Swift: 'getStaticCallTarget' should also return things like 'ConstructorDecl's.
2022-06-21 09:35:56 +01:00
Anders Schack-Mulligen
a6c0a9e480
Python: one more fix
2022-06-21 09:19:45 +02:00
Asger F
b46ba896dd
Merge pull request #9616 from asgerf/js/without-prop-step-await
...
JS: Add withoutPropStep and model raw 'await' step with it
2022-06-21 09:06:01 +02:00
Erik Krogh Kristensen
79696c6c5f
Merge pull request #9572 from erik-krogh/heuristicSteps
...
JS: add heuristic taint-step for potentially unmodelled libraries
2022-06-21 09:00:58 +02:00
Michael Nebel
dc02a6e1a7
C#: Apply autoformatting.
2022-06-21 08:34:43 +02:00
AlexDenisov
7010dffed7
Merge pull request #9622 from github/redsun82/swift-quiet-codegen
...
Swift: add --quiet to codegen
2022-06-21 07:43:33 +02:00
AlexDenisov
687b9aff92
Merge pull request #9230 from github/redsun82/swift-use-generated-classes
...
Swift: use structured generated C++ classes in `DeclVisitor`
2022-06-21 07:43:10 +02: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
Arthur Baars
adc1a3076c
Merge pull request #9432 from thiggy1342/experimental-decompression-api
...
RB: Adding decompression-api to experimental ruleset
2022-06-20 20:54:09 +02:00
Chris Smowton
4b825df60c
Kotlin: don't emit synthetic parameter names
...
The QL library already expects these to be missing in some cases and generates its own names when they are absent. Writing synthetic names to the database can produce inconsistencies if the true name is seen later.
2022-06-20 19:19:35 +01:00
Asger F
835c9bb0b9
JS: Add test
2022-06-20 20:16:07 +02:00
Asger F
a0d3a6b5b1
JS: Add withoutPropStep and model 'await' steps with it
2022-06-20 20:16:07 +02:00
thiggy1342
c5bf1b8aab
update test expectation
2022-06-20 17:27:33 +00: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
Ian Lynagh
875776d91d
Merge pull request #9581 from igfoo/igfoo/redundant_cast
...
Kotlin: Remove a redundant cast
2022-06-20 17:28:49 +01:00
Ian Lynagh
f22de1ac81
Merge pull request #9583 from igfoo/igfoo/locationdocs
...
Fix broken links to information about Locations
2022-06-20 17:28:24 +01:00
Paolo Tranquilli
c9f48da569
Swift: add --quiet to codegen
2022-06-20 18:03:59 +02:00
Paolo Tranquilli
3d222a7377
Merge main into redsun82/swift-use-generated-classes
2022-06-20 18:02:13 +02:00
Paolo Tranquilli
48584a6c2e
Merge main into redsun82/swift-use-generated-classes
2022-06-20 17:53:21 +02:00
Mathias Vorreiter Pedersen
35c8ca15f5
Merge pull request #8912 from rdmarsh2/rdmarsh2/fix-ir-globals
...
C++: Fix IR variable reuse for global var inits
2022-06-20 16:45:39 +01:00
thiggy1342
973013ff9c
Merge branch 'main' into experimental-decompression-api
2022-06-20 11:37:38 -04:00
Arthur Baars
a87ea4a75a
Merge pull request #9589 from aibaars/update-tree-sitter-embeded-template
...
Update tree-sitter-embeded-template
2022-06-20 17:34:43 +02:00
Paolo Tranquilli
7223fedb58
Swift: fix user.sh pre-commit insallation
2022-06-20 15:28:54 +00:00
thiggy1342
a298029dff
Merge branch 'main' into experimental-decompression-api
2022-06-20 11:06:24 -04:00
thiggy1342
7932d3e4ab
Update ruby/ql/test/query-tests/security/decompression-api/DecompressionApi.expected
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-06-20 11:05:56 -04:00
thiggy1342
db46a1d807
Update ruby/ql/src/experimental/decompression-api/DecompressionApi.ql
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-06-20 11:05:16 -04:00
Paolo Tranquilli
15c4ac248d
Swift: add pip to codespace
2022-06-20 15:05:11 +00:00
Arthur Baars
c5d3df087d
Update tree-sitter-embeded-template
2022-06-20 17:04:27 +02:00
Mathias Vorreiter Pedersen
f4363e3aba
Merge pull request #9619 from MathiasVP/swift-better-function-names
...
Swift: Generate better declaration names
2022-06-20 16:01:18 +01:00
Paolo Tranquilli
81ce511071
Swift: add pre-commit to codespace
2022-06-20 15:00:24 +00:00
Michael Nebel
b4cb1e58d3
Swift: Sync FlowSummaryImpl to swift.
2022-06-20 16:30:12 +02:00
Mathias Vorreiter Pedersen
a1bf448e56
Swift: Accept more test changes.
2022-06-20 15:28:06 +01:00
Michael Nebel
b4457de58c
C#/Java: Fix typo in the QL doc comment.
2022-06-20 16:26:07 +02:00
Michael Nebel
c9c981d03a
C#: Add release note for the CSV DSL change.
2022-06-20 16:20:02 +02:00
Michael Nebel
b6ccaf14f6
Java: Update Log4J models with provenance information.
2022-06-20 16:20:02 +02:00
Michael Nebel
733fc16902
Java: Update ThreadResourceAbuse specific models with provenance information.
2022-06-20 16:20:02 +02:00
Michael Nebel
0d4321666a
Java: Update fragment injection sinkmodels.
2022-06-20 16:20:02 +02:00
Michael Nebel
2cfeffcc17
Java: Update model generator tests with provenance column.
2022-06-20 16:20:02 +02:00
Michael Nebel
e851b03c6f
Java: Add source and sink kind model validation.
2022-06-20 16:20:02 +02:00
Michael Nebel
8e7e6c4c6f
Java: Update FlowTestCase generator with provenance wildcard.
2022-06-20 16:20:02 +02:00
Michael Nebel
2e46e93f36
Java: Update java models with provenance column information.
2022-06-20 16:20:02 +02:00
Michael Nebel
4622b69c5d
Java: Update flow summary impl and external flow to support provenance and include testing in Csv model validation.
2022-06-20 16:20:02 +02:00
Michael Nebel
649757c27f
Java/Ruby: Sync files.
2022-06-20 16:20:01 +02:00
Michael Nebel
38c6bf55b9
C#: Make CSV model validation of the provenance column.
2022-06-20 16:20:01 +02:00
Michael Nebel
5e3bb8297a
C#: Make the model predicates emmit the provenance directly to enable testing.
2022-06-20 16:20:01 +02:00
Michael Nebel
cf3cb292b7
C#: Update the model generator to use provenance column printing.
2022-06-20 16:20:01 +02:00
Michael Nebel
e0a96e16c3
C#: Update entity framework flow summaries test.
2022-06-20 16:20:01 +02:00
Michael Nebel
da0b9db57f
C#: Update flow summary printing in test cases to reflect provenance.
2022-06-20 16:20:01 +02:00
Michael Nebel
2975e51652
C#: Update existing production models with provenance information.
2022-06-20 16:20:01 +02:00
Michael Nebel
32b69d3e0c
C#: Update external models tests.
2022-06-20 16:20:01 +02:00
Michael Nebel
d6fa7db9f2
C#: Update CSV validation to the new format and improve test failure printing.
2022-06-20 16:20:01 +02:00
Michael Nebel
e3a5f7b8a3
C#: Introduce provenance column in CSV format for Models as data summaries, sources and sinks.
2022-06-20 16:20:01 +02:00
Michael Nebel
d219ac385b
Update java/ql/src/Telemetry/ExternalLibraryUsage.ql
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-06-20 16:15:06 +02:00
Michael Nebel
169ef55890
Update csharp/ql/src/Telemetry/ExternalLibraryUsage.ql
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2022-06-20 16:14:44 +02:00
Paolo Tranquilli
52ee4d4057
Swift: add devcontainer setup
2022-06-20 14:11:28 +00:00
Mathias Vorreiter Pedersen
c049988116
Swift: Accept test changes.
2022-06-20 14:57:16 +01:00
Mathias Vorreiter Pedersen
850a90d9a8
Swift: Change the declaration names generated by the extractor to match the output of the Swift compiler.
2022-06-20 14:57:16 +01:00
thiggy1342
633ddf46fb
fix comments
2022-06-20 13:53:56 +00:00
thiggy1342
b4c893d857
Update ruby/ql/test/query-tests/security/decompression-api/decompression_api.rb
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-06-20 09:50:12 -04:00
thiggy1342
9c9ac919b7
Update ruby/ql/src/experimental/decompression-api/DecompressionApi.ql
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-06-20 09:49:52 -04:00
thiggy1342
3949e04797
Update ruby/ql/src/experimental/decompression-api/DecompressionApi.ql
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-06-20 09:49:11 -04:00
thiggy1342
2f505c527b
Merge branch 'main' into experimental-decompression-api
2022-06-20 09:48:21 -04:00
Anders Schack-Mulligen
730871cc74
Swift: Deprecate BarrierGuard.
2022-06-20 15:46:38 +02:00
Anders Schack-Mulligen
a7c268f804
Python: adjust test.
2022-06-20 15:46:38 +02:00
Anders Schack-Mulligen
1b13790a36
Ruby: Deprecate and replace BarrierGuard class.
2022-06-20 15:46:38 +02:00
Anders Schack-Mulligen
f473a0a961
Python: Deprecate and replace BarrierGuard class.
2022-06-20 15:46:38 +02:00
Anders Schack-Mulligen
87d5305f5b
Go: Ad-hoc patch the shared libs.
2022-06-20 15:46:38 +02:00
Anders Schack-Mulligen
406f5b525b
Go: Deprecate and replace BarrierGuard class
2022-06-20 15:46:27 +02:00
Geoffrey White
30557ebe55
Swift: Test for string length conflation query.
2022-06-20 14:38:52 +01:00
Cornelius Riemenschneider
d3c7395fa2
Go: Properly escape dash in tracing-config.lua
...
Previously, the pattern didn't match what it was intended to match.
2022-06-20 14:29:50 +02:00
Alex Denisov
42dc6814f0
Swift: extract all output-producing source files, not only primary files
2022-06-20 14:06:54 +02:00
AlexDenisov
fc7e0ec193
Merge pull request #9615 from github/redsun82/swift-fix-synthesized-entities
...
Swift: fix emission of synthesized entities
2022-06-20 13:29:32 +02:00
Asger F
2936e1ada8
Merge pull request #9457 from asgerf/js/madman-prep2
...
JS: Some more improvements to d.ts file analysis
2022-06-20 13:25:07 +02:00
Tony Torralba
b373c435f6
Fix test expectations
2022-06-20 13:16:45 +02:00
Paolo Tranquilli
90f0e3ee72
Swift: remove forgotten resolved TODO
2022-06-20 13:08:28 +02:00
Tamás Vajk
b16fcb72eb
Merge pull request #9559 from tamasvajk/kotlin-fix-parcelize-symbols-3
...
Kotlin: substitute fake Parcelize functions with their real equivalent ones
2022-06-20 13:05:23 +02:00
Paolo Tranquilli
95a6c5d4e5
Swift: fix emission of synthesized entities
...
This was temporarily broken as we were skipping full emission of all
entities without any valid location.
We now rely on `decl->getDeclContext()->getParentSourceFile()` which is
more robust.
2022-06-20 13:00:05 +02:00
Tamás Vajk
f737804035
Merge pull request #9610 from tamasvajk/fix/global-statements
...
C#: Fix global statement extraction
2022-06-20 12:54:36 +02:00
Paolo Tranquilli
c9eef0c6f1
Merge pull request #9592 from github/alexdenisov/extend-lua-tracer-config
...
Swift: extend tracer config to handle -resource-dir and drop unsupported CLI args
2022-06-20 12:53:17 +02:00
Erik Krogh Kristensen
7d62b9e131
move the pruning for module resolution of TypeExprs
2022-06-20 12:12:57 +02:00
Michael Nebel
70203633a1
Merge pull request #9393 from michaelnebel/csharp/asptaintedmember
...
C#: ASP.NET Core like members are tainted
2022-06-20 12:11:16 +02:00
Tony Torralba
78fcdd22db
Change test class name
2022-06-20 12:07:32 +02:00
Tony Torralba
3b60a1c3bc
Add change note
2022-06-20 12:07:31 +02:00
Tony Torralba
2b2fa6e15b
Add taint step for String.valueOf(Editable)
...
Kotlin inlines expr.toString() as String.valueOf(expr) when expr is nullable
2022-06-20 12:07:31 +02:00
Mathias Vorreiter Pedersen
edf0be0854
Merge pull request #9611 from MathiasVP/swift-nomagic-get-location
...
Swift: Add `nomagic` to `getLocation`
2022-06-20 10:42:45 +01:00
AlexDenisov
304f58b12c
Update swift/tools/tracing-config.lua
...
Co-authored-by: Paolo Tranquilli <redsun82@github.com >
2022-06-20 11:22:13 +02:00
Mathias Vorreiter Pedersen
57abd4af89
Merge pull request #9612 from MathiasVP/fix-other-constructor-decl-ref-expr-to-string
...
Swift: Fix 'toString' on 'OtherConstructorDeclRefExpr'
2022-06-20 10:17:15 +01:00
Mathias Vorreiter Pedersen
12d27ec580
Swift: Modify 'toString' in 'OtherConstructorDeclRefExpr' to properly reflect that it's a reference and not a call.
2022-06-20 09:59:23 +01:00
AlexDenisov
af379da7e6
Merge pull request #9321 from github/alexdenisov/xref-decls
...
Swift: do not duplicate 'external' declarations
2022-06-20 10:43:05 +02:00
Mathias Vorreiter Pedersen
068ac2b80e
Swift: Add 'nomagic' to 'getLocation'.
2022-06-20 09:41:06 +01:00
Paolo Tranquilli
a91c94c38b
Swift: temporarily disable failing test
2022-06-20 10:32:19 +02:00
Paolo Tranquilli
1f53b7fbe8
Merge main into alexdenisov/xref-decls
2022-06-20 10:25:29 +02:00
yoff
94145e9e74
Update python/ql/lib/semmle/python/security/dataflow/TarSlipCustomizations.qll
2022-06-20 10:14:52 +02:00
Tamas Vajk
51f0a928dc
C#: Fix global statement extraction by extracting statements inside the implicit main method context
2022-06-20 10:09:11 +02:00
Rasmus Wriedt Larsen
ae44a941f9
Merge pull request #9421 from RasmusWL/inline-brackets
...
Inline Expectation Tests: Allow `tag[foo bar]`
2022-06-20 10:01:19 +02:00
Tamas Vajk
c460e5757b
C#: Add extractor error test for global statement extraction
2022-06-20 09:42:18 +02:00
Tamás Vajk
be2dfffb76
Merge pull request #9564 from tamasvajk/fix/diagnostic-query-metadata
...
C#: Change `kind` query metadata to `diagnostic` for compiler/extractor errors and messages
2022-06-20 09:02:35 +02:00
Jeroen Ketema
a4ecb7b4e9
Merge pull request #9473 from ton31337/fix/missing_closing
...
doc: Add missing closing bracket in basic-query-for-cpp-code
2022-06-20 08:38:35 +02:00
AlexDenisov
f1786f4d6b
Apply suggestions from code review
...
Co-authored-by: Cornelius Riemenschneider <cornelius@github.com >
2022-06-20 07:29:10 +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
Erik Krogh Kristensen
a5e789c72b
Merge pull request #9537 from github/dependabot/cargo/ql/crossbeam-utils-0.8.8
...
Bump crossbeam-utils from 0.8.5 to 0.8.8 in /ql
2022-06-18 15:44:34 +02:00
Erik Krogh Kristensen
02b9745eb6
Merge pull request #9538 from github/dependabot/cargo/ql/regex-1.5.5
...
Bump regex from 1.5.4 to 1.5.5 in /ql
2022-06-18 15:44:10 +02:00
thiggy1342
8aa2602d9e
trying to hone in on eq comparison and include?
2022-06-18 03:09:04 +00:00
thiggy1342
78f5186e6a
remove barrierguards import
2022-06-18 00:43:01 +00:00
thiggy1342
ba1818fc60
Merge branch 'main' into experimental-decompression-api
2022-06-17 20:21:23 -04:00
Taus
3a328f6a3f
Merge pull request #6570 from yoff/python/broaden-noqa-regex
...
Python: Broaden noqa regex to allow comments
2022-06-17 23:56:39 +02:00
Geoffrey White
ca3d7220e7
Swift: placeholder query for string length conflation.
2022-06-17 21:32:52 +01:00
thiggy1342
b171883cd0
Merge branch 'main' into experimental-decompression-api
2022-06-17 12:30:38 -04:00
thiggy1342
4163ae1ca3
Update ruby/ql/src/experimental/decompression-api/DecompressionApi.qhelp
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-06-17 12:30:22 -04:00
thiggy1342
3b87c1d040
add qlhelp file and example
2022-06-17 16:03:40 +00:00
Rasmus Wriedt Larsen
b65a10d1ef
Inline Expectation Tests: sync
2022-06-17 17:38:19 +02:00
Rasmus Wriedt Larsen
5fb41e4894
Inline Expectation Tests: Disallow tag[[[foo bar]
2022-06-17 17:36:04 +02:00
Paolo Tranquilli
be210aa3af
Merge alexdenisov/xref-decls into redsun82/swift-use-generated-classes
2022-06-17 17:03:30 +02:00
Chris Smowton
a7993fb455
Merge pull request #9577 from smowton/smowton/fix/go-mod-tidy-vendoring
...
Go autobuilder: don't attempt a go mod tidy when there's a vendor directory present
2022-06-17 15:26:59 +01:00
Chris Smowton
91ec8a3447
Merge pull request #9591 from smowton/smowton/admin/cherry-pick-kotlin-1.7-ci-fixes
...
Cherry-pick: Fix Kotlin single-version build when the best candidate has trailing version info
2022-06-17 14:14:28 +01:00
Erik Krogh Kristensen
84556fb93b
Merge pull request #9575 from erik-krogh/paramModules
...
QL: support for parameterized modules
2022-06-17 15:07:48 +02:00
Asger F
15278fe94f
JS: Remove debug println
2022-06-17 14:57:03 +02:00
Asger F
6a4b3a190d
JS: Bump extractor version
2022-06-17 14:40:22 +02:00
Asger F
ed4c39bbb4
JS: Upgrade script
2022-06-17 14:40:22 +02:00
Asger F
5610f654e9
JS: Add PackageJson.getTypingsModule
2022-06-17 14:40:22 +02:00
Asger F
a3204f6d74
JS: Trim whitespace in dbscheme
2022-06-17 14:40:22 +02:00
Asger F
608de70568
JS: Associate symbols with external module decls
2022-06-17 14:40:22 +02:00
Asger F
5faff5609d
JS: Map symbol base types to their actual type
2022-06-17 14:40:22 +02:00
Asger F
fb40d9bc78
Ignore .model-temp
2022-06-17 14:40:22 +02:00
Anders Schack-Mulligen
bbb8d29442
C/C++: Deprecate BarrierGuard class.
2022-06-17 14:29:05 +02:00
Alex Denisov
97c38d9d2d
Swift: extend tracer config to handle -resource-dir and drop unsupported CLI args
2022-06-17 14:19:12 +02:00
Chris Smowton
95982d2587
Fix Kotlin single-version build when the best candidate has trailing version info
...
For example, 1.7.0-RC would previously be truncated to 1.7.0 resulting in failure to build the single-version distro as all candidate alternate-version kotlin files would be ignored.
2022-06-17 12:36:26 +01:00
Chris Smowton
92b8c0f864
Merge pull request #9563 from smowton/smowton/fix/name-trap-files-after-jvmnames
...
Kotlin: Name trap files after jvmnames
2022-06-17 12:32:28 +01:00
Erik Krogh Kristensen
80f66779fb
fixup Definitions.qll
2022-06-17 11:27:07 +02:00
Erik Krogh Kristensen
13b743643e
everything is a TypeRef, some TypeRefs just resolve to a module
2022-06-17 11:22:04 +02:00
Alex Ford
5923eb4962
Merge pull request #9566 from alexrford/ruby/activerecord-findby-dynamic
...
Ruby: recognize ActiveRecord `find_by_x` methods
2022-06-17 09:39:46 +01:00
Nick Rolfe
cac53b5163
Merge pull request #9588 from github/dependabot/cargo/ruby/thread_local-1.1.4
...
Bump thread_local from 1.1.3 to 1.1.4 in /ruby
2022-06-17 09:28:24 +01:00
Nick Rolfe
5f61c0c0b3
Merge pull request #9587 from github/dependabot/cargo/ql/thread_local-1.1.4
...
Bump thread_local from 1.1.3 to 1.1.4 in /ql
2022-06-17 09:27:51 +01:00
Erik Krogh Kristensen
2b5af15d80
comments about what we resolve, and remove a debug comment
2022-06-17 09:09:58 +02:00
thiggy1342
7c2b19baad
tweaks and add Zip::File.open_buffer to query
2022-06-17 02:43:54 +00:00
dependabot[bot]
583ab492f9
Bump thread_local from 1.1.3 to 1.1.4 in /ruby
...
Bumps [thread_local](https://github.com/Amanieu/thread_local-rs ) from 1.1.3 to 1.1.4.
- [Release notes](https://github.com/Amanieu/thread_local-rs/releases )
- [Commits](https://github.com/Amanieu/thread_local-rs/compare/v1.1.3...1.1.4 )
---
updated-dependencies:
- dependency-name: thread_local
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-06-17 01:44:43 +00:00
dependabot[bot]
e456cdb5dc
Bump thread_local from 1.1.3 to 1.1.4 in /ql
...
Bumps [thread_local](https://github.com/Amanieu/thread_local-rs ) from 1.1.3 to 1.1.4.
- [Release notes](https://github.com/Amanieu/thread_local-rs/releases )
- [Commits](https://github.com/Amanieu/thread_local-rs/compare/v1.1.3...1.1.4 )
---
updated-dependencies:
- dependency-name: thread_local
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-06-17 01:42:18 +00: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
thiggy1342
01cb408393
Merge branch 'main' into experimental-decompression-api
2022-06-16 17:23:55 -04:00
Erik Krogh Kristensen
96eacd0ea6
disable consistency checks in QL tests that does not hold with the current parameterized modules implementation
2022-06-16 23:10:09 +02:00
Erik Krogh Kristensen
e557f233d7
mark the implements of a module as being alive
2022-06-16 23:03:06 +02:00
Erik Krogh Kristensen
cf89faead0
just use TypeExpr to resolve modules
2022-06-16 22:55:11 +02:00
Erik Krogh Kristensen
dce817ec4b
resolve calls to all instantiations of a signature predicate
2022-06-16 22:55:11 +02:00
Erik Krogh Kristensen
2a7a0f398a
add support for signature modules (warning: ugly commit)
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
98690c8a2e
add support for class signatures in parameterized modules
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
e5d3a8fe90
add callgraph test for signature predicates
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
20c9222e23
use explicit this
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
744e2db152
fix the parser to allow lower-case module names
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
55b6f073c2
resolve calls to signature predicates
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
f25c4c5fdf
add consistency test that parents are unique (and fix non-unique parents)
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
14b5f8410f
move the consistency predicates where they should be
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
4be969ca3b
a bit of cleanup on SignatureExpr
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
6e7db2d37c
hook up the pretty AST of a parameterized module
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
1caafb87f7
add type arguments of ModuleInstation to the pretty AST
2022-06-16 22:55:10 +02:00
Erik Krogh Kristensen
adc1466cab
save the name of an instantiated module
2022-06-16 22:55:10 +02:00
Ian Lynagh
b80e6421b6
Fix broken links to information about Locations
2022-06-16 16:57:59 +01:00
thiggy1342
6416b8ddb9
Update ruby/ql/src/experimental/decompression-api/DecompressionApi.ql
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2022-06-16 10:20:17 -04:00
Ian Lynagh
9a7ff4bcdf
Kotlin: Remove a redundant cast
2022-06-16 14:08:12 +01:00
Alex Ford
c44a68613a
Ruby: add a test case for ActiveRecord dynamic finder methods
2022-06-16 11:29:56 +01:00
Alex Ford
56bf977498
Ruby: trim some SQLi related comments from ActiveRecord.rb
2022-06-16 11:29:56 +01:00
Alex Ford
de486baf4a
Ruby: rename ActiveRecord.rb test case file
2022-06-16 11:29:56 +01:00
Anders Schack-Mulligen
1b374e262f
C#: Replace deprecated barrier guards.
2022-06-16 11:25:29 +02:00
Anders Schack-Mulligen
456f02fd82
C#: Add BarrierGuard parameterised module.
2022-06-16 11:25:29 +02:00
Anders Schack-Mulligen
6518a01ded
Dataflow: Sync.
2022-06-16 11:25:28 +02:00
Anders Schack-Mulligen
33deff9bae
Java: Deprecate BarrierGuard class.
2022-06-16 11:25:28 +02:00
Taus
9bf2eb55ca
Python: Allow whitespace before colon
...
As suggested by @DimitriPapadopolous.
Also fixes the test output to account for the `noqa` annotation (with
added comment) that we're now detecting.
2022-06-16 11:16:58 +02:00
Rasmus Lerchedahl Petersen
98301332bd
Python: Broaden noqa regex
2022-06-16 11:16:58 +02:00
Chris Smowton
16a2107f89
Go autobuilder: don't attempt a go mod tidy when there's a vendor directory present
...
This is likely to spuriously remove dependencies leading to a later build failure due to missing requirements.
2022-06-16 10:12:39 +01:00
Michael Nebel
9211d75b3d
C#: Add change note.
2022-06-16 08:43:06 +02:00
Michael Nebel
1f2f2fff7f
C#: Update testcases with examples.
2022-06-16 08:43:06 +02:00
Michael Nebel
e1c7003cde
C#: Only consider directly public auto implemented properties with public getters and setters as being tainted.
2022-06-16 08:43:06 +02:00
Michael Nebel
ef0a3d0a79
C#: Add testcase for controller parameter types tainted members.
2022-06-16 08:38:31 +02:00
Michael Nebel
93007f89c8
C#: Move ASP Net Core stubs into stubs folder.
2022-06-16 08:38:31 +02:00
thiggy1342
0281dbd532
remove Zip::Entry.extract from query
2022-06-16 00:04:31 +00:00
Erik Krogh Kristensen
ce323e215b
add heuristic taint-step for potentially unmodelled libraries, and meta query for counting potential unmodelled steps
2022-06-15 20:27:49 +02:00
thiggy1342
540c51022d
Merge branch 'main' into experimental-decompression-api
2022-06-15 13:40:27 -04:00
Chris Smowton
2d57d3aa78
Implement array type variance lowering
...
Kotlin permits introducing a `? extends ...` wildcard against an Array even though the class is final, so long as its argument itself can be extended (i.e. isn't final or is another array type satisfying this condition).
Contravariant arrays get lowered to Object[], and are subject to automatic `extends` wildcard introduction, unless their element type was already Any.
2022-06-15 18:36:56 +01: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
Alex Ford
34065f9e93
Ruby: recognize ActiveRecord find_by_x methods
2022-06-15 14:33:09 +01:00
github-actions[bot]
1ed70d51d7
Post-release preparation for codeql-cli-2.9.4
2022-06-15 13:25:20 +00:00
Michael Nebel
9639dca33f
C#: Consider all properties of ASP.NET Core like objects to also be sources of tainted data.
2022-06-15 15:13:37 +02:00
Alex Denisov
08ad95b769
Swift: switch to references instead of pointers
2022-06-15 14:19:31 +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
AlexDenisov
343ba5ffa8
Update swift/extractor/SwiftDispatcher.h
...
Co-authored-by: Paolo Tranquilli <redsun82@github.com >
2022-06-15 14:13:50 +02:00
Rasmus Lerchedahl Petersen
40b61fa85f
python: fix qldocs and clean-up dead code
2022-06-15 14:07:35 +02:00
Tamas Vajk
aedf43f14a
C#: Change kind query metadata to diagnostic for compiler/extractor errors and messages
2022-06-15 13:50:27 +02:00
Chris Smowton
90e8d4e1de
Name trap files after jvmnames
...
This should lead to better Java/Kotlin correspondence since the Java extractor will naturally name trap files for JVM names, and avoids a specific bug (tested) where MapsKt.iterator's two overloads (one taking `Map` and one `MutableMap`) are JvmName'd differently since their Java-lowered signatures would be identical. Without this change only
one of the iterator overloads would get extracted leaving the other one a dangling reference.
2022-06-15 11:55:58 +01:00
Rasmus Lerchedahl Petersen
f4ce382b7d
python: update test expectations
2022-06-15 12:40:14 +02:00
Anders Schack-Mulligen
28fe7a7660
Merge pull request #9558 from github/release-prep/2.9.4
...
Release preparation for version 2.9.4
2022-06-15 12:27:34 +02:00
Michael Nebel
9175421fa2
C#/Java: Update some QL Doc comments to comply with the standard and remove some redundant imports.
2022-06-15 11:32:54 +02:00
Michael Nebel
f810858ae4
Java: Manual rewrite of the ExternalLibraryUsage query to limit the number of returned results.
2022-06-15 11:10:05 +02:00
Michael Nebel
b9b4aedd03
Java: Rewrite most telemetry queries to restrict the number of produced results.
2022-06-15 10:59:12 +02:00
Michael Nebel
e6e2427154
Java: Add parameterized module for restricting the number of returned results in telemetry queries.
2022-06-15 10:48:44 +02:00
Michael Nebel
e3ecc5a66b
C#: Add qlDoc to the restrict predicate.
2022-06-15 10:45:32 +02:00
Tamas Vajk
c722921276
Kotlin: substitute fake Parcelize functions with their real equivalent ones
2022-06-15 10:35:48 +02:00
github-actions[bot]
104ac05f49
Release preparation for version 2.9.4
2022-06-15 08:22:38 +00:00
Alex Denisov
1c9a684ac6
Swift: Introduce SwiftExtractionMode
2022-06-15 09:25:01 +02:00
Alex Denisov
6d67ea267c
Swift: add cross-referencing test
2022-06-15 08:44:38 +02:00
thiggy1342
0fce620536
Merge branch 'main' into experimental-decompression-api
2022-06-14 21:54:08 -04:00
Robert Marsh
1a94ffb726
C++: autoformat
2022-06-14 15:59:47 -04:00
Robert Marsh
e7e517bd6f
C++: Accept more updated test output
2022-06-14 15:54:50 -04:00
Robert Marsh
d508826b0f
Merge branch 'main' into rdmarsh2/fix-ir-globals
2022-06-14 13:22:04 -04:00
Robert Marsh
07a0b4df84
C++: update test expaectations
2022-06-14 11:43:05 -04:00
Michael Nebel
d288b3d35d
C#: Refactor and narrow number of displayed results of the External library usage query.
2022-06-14 16:41:48 +02:00
Jeroen Ketema
5abb0338b9
Merge pull request #9552 from jketema/rc/3.6/braced
...
C++: Introduce relation for tracking braced initializers
2022-06-14 16:41:45 +02:00
Michael Nebel
51d2eb621b
C#: Refactor queries to use Results module and thus narrowing the number of returned results.
2022-06-14 16:40:53 +02:00
Michael Nebel
d5eebc8405
C#: Add a parameterized module for a telemetry result ordering predicate (will be needed to narrow the number of produced results).
2022-06-14 16:39:45 +02:00
Joe Farebrother
f46dd8cc85
Fix misspellings
2022-06-14 15:34:08 +01:00
dependabot[bot]
d210cd4a87
Bump crossbeam-utils from 0.8.5 to 0.8.8 in /ql
...
Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam ) from 0.8.5 to 0.8.8.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases )
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md )
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.5...crossbeam-utils-0.8.8 )
---
updated-dependencies:
- dependency-name: crossbeam-utils
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-06-14 14:07:41 +00: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
Jeroen Ketema
f71807c968
Update cpp/ql/lib/change-notes/2022-05-30-braced-initializers.md
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2022-06-14 15:39:24 +02:00
Jeroen Ketema
2052494eee
C++: Fix typo in upgrade script
2022-06-14 15:39:14 +02:00
Jeroen Ketema
f020fdbda3
C++: Update DB scheme stats
2022-06-14 15:38:55 +02:00
Jeroen Ketema
34cbc6678f
C++: Introduce relation for tracking braced initializers
2022-06-14 15:38:45 +02: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
dependabot[bot]
5fe3ebd1d2
Bump regex from 1.5.4 to 1.5.5 in /ql
...
Bumps [regex](https://github.com/rust-lang/regex ) from 1.5.4 to 1.5.5.
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.5.4...1.5.5 )
---
updated-dependencies:
- dependency-name: regex
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-06-14 10:35:37 +00: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
Robert Marsh
5f77552c37
Merge branch 'main' into rdmarsh2/fix-ir-globals
2022-06-13 12:43:08 -04:00
Donatas Abraitis
3174c4fa9b
doc: Add missing closing bracket in basic-query-for-cpp-code
...
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org >
2022-06-10 09:49:52 +03:00
Dave Bartolomeo
5780f156d1
Merge pull request #9456 from dbartol/dbartol/go-suite-helpers/work
...
Fix `codeql/suite-helpers` dependency for Go
2022-06-09 12:04:15 -04:00
Dave Bartolomeo
5e5e2646e2
Fix codeql/suite-helpers dependency for Go
2022-06-07 10:55:49 -04:00
thiggy1342
62291124ff
remove constraint for Zip::File.open
2022-06-06 21:20:44 +00:00
thiggy1342
3c62271dba
fix casing of Api
2022-06-06 21:18:08 +00:00
thiggy1342
c5db11ee2e
use select placeholder correctly
2022-06-06 14:01:02 +00:00
thiggy1342
6cb0717a07
Fix test syntax for sanitizer tests
2022-06-04 16:33:18 +00:00
thiggy1342
5ada3b76ed
Merge branch 'main' into experimental-decompression-api
2022-06-03 16:45:53 -04:00
thiggy1342
54fd7809fe
tweak metadata
2022-06-03 18:22:50 +00:00
thiggy1342
c5dc8779d1
Increased query robustness and test coverage
2022-06-03 18:05:56 +00:00
Rasmus Wriedt Larsen
50196d099b
Inline Expectation Tests: sync
2022-06-03 11:39:57 +02:00
Rasmus Wriedt Larsen
c1e6996e99
Inline Expectation Tests: Allow tag[foo bar]
...
This is partly motivated by the MaD tests which looks much better now in
my opinion.
I also wanted this for testing argument passing. In Python we're
adopting the same argument positions as Ruby has
[here](4f3751dfea/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowDispatch.qll (L508-L540) )
So it would be nice if `arg[keyword foo]=...` was allowed, without
having to transform the `toString()` result of an argument position into
something without a space.
2022-06-03 11:39:57 +02:00
Paolo Tranquilli
4d6c8da74b
Swift: no perfect forwarding for label fetchers
...
While we need universal references to catch different value categories,
we don't need perfect forwarding as `fetchLabel` does not behave
differently on lvalue and rvalues.
2022-06-01 11:26:21 +02:00
Paolo Tranquilli
6e44a12a67
Swift: make enable_if_t a non-type parameter
...
This disallows completely calling the disabled function (which could
be done by explicitly providing `void` otherwise).
2022-06-01 08:47:53 +02:00
Paolo Tranquilli
905cc23719
Swift: update comment
2022-06-01 08:41:43 +02:00
Paolo Tranquilli
19f16678ac
Swift: change translation signature and detection
...
Translation now takes const references to swift entities and return
trap entries (instead of taking apointer as an out parameter).
2022-06-01 08:41:43 +02:00
Paolo Tranquilli
c3cb0d6ad7
Swift: fix name extraction in VarDecl
2022-06-01 08:41:43 +02:00
Paolo Tranquilli
86b4f16b3a
Swift: remove Binding<> class
...
That class was meant to allow aggregate initialization of generated
C++ entries having the label `id` as first argument.
As aggregate initialization turned out to be undesirable (names of
fields are not explicit, and `{}` must be inserted for empty
superclasses), this commit removes it and disallows aggregate
initialization altogether by defining empty constructors for generated
classes.
2022-06-01 08:41:43 +02:00
Paolo Tranquilli
9231013401
Swift: use C++ entry style visitor in DeclVisitor
2022-06-01 08:41:43 +02:00
thiggy1342
09f082081f
Simple tests passing
2022-05-28 23:29:58 +00:00
thiggy1342
39baadbdd2
test ql packs must be in the security directory
2022-05-28 23:19:32 +00:00
Adam Thigpen
52ac93b82e
adding skeleton for experimental unit tests
2022-05-28 15:14:42 -04:00
Adam Thigpen
a37443106b
reduce false positives with some sanitizers
2022-05-28 15:14:42 -04:00
Adam Thigpen
2bf160c008
initial draft of decompression-api query
2022-05-28 15:14:32 -04: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
Robert Marsh
6d267be1a1
C++: merge main and accept test changes
2022-05-20 14:37:09 -04:00
ihsinme
1a375ec653
Update cpp/ql/src/experimental/Security/CWE/CWE-670/DangerousUseSSL_shutdown.ql
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2022-05-16 19:55:33 +03:00
ihsinme
f6ab338a16
Update DangerousUseSSL_shutdown.qhelp
2022-05-15 12:26:05 +03:00
ihsinme
09cd168197
create new branchihsinme-patch-88 in fork
2022-05-09 13:05:06 +00:00
Robert Marsh
de68107a0e
C++: restrict global variable IR generation
2022-05-03 16:50:53 -04:00
Robert Marsh
ffd2cd7f40
C++: cleanup some implicit this usage
2022-05-02 12:38:04 -04:00
Robert Marsh
7993cba457
C++: fix global vars accesses in global vars
2022-05-02 12:27:10 -04:00
Robert Marsh
b5a2a2e8c2
C++: test for global var access in a global var
2022-05-02 12:07:01 -04:00
Robert Marsh
fe52dd93ef
C++: sync and accept new consistency test
2022-04-29 15:29:07 -04:00
Robert Marsh
d1c6022efc
C++: fix inconsistencies from IR global vars
2022-04-29 14:56:13 -04:00
Jeroen Ketema
5b80fd1432
C++: Update tests for frontend update
2022-04-29 11:46:01 -04:00
Robert Marsh
abdfd2297b
C++: Fix IR variable reuse for global var inits
2022-04-29 11:46:00 -04:00
Robert Marsh
259580aeeb
Revert "Merge pull request #8933 from MathiasVP/revert-globals"
...
This reverts commit 2517371a37 , reversing
changes made to db856798b9 .
2022-04-29 11:45:10 -04: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