Asger F
056b1e8d63
Ruby: add some basic tests
2022-10-31 14:05:11 +01:00
Chris Smowton
d959630991
Merge pull request #11040 from smowton/smowton/fix/inherited-method-implementing-collection-interface
...
Kotlin: fix method types when an inherited method implements a collection type
2022-10-31 12:40:28 +00:00
Asger F
9be2512050
Ruby: rename one of the PostsController2 classes
...
These had the same name and ended up being unified
2022-10-31 13:33:41 +01:00
Asger F
b4b34cc994
Ruby: port part of ActionController model
2022-10-31 13:33:41 +01:00
Asger F
12ce46e4b1
Ruby: port part of Railties model
2022-10-31 13:33:41 +01:00
Asger F
38955d1761
Ruby: port part of the Rails model
2022-10-31 13:33:41 +01:00
Asger F
9f59b6b439
Update type-tracking test
2022-10-31 13:33:41 +01:00
Asger F
0a8f39fe96
Ruby: recover some incomplete capture flow
2022-10-31 13:33:41 +01:00
Asger F
ff02ba5965
Ruby: include SSA param input step for flowsTo
2022-10-31 13:33:41 +01:00
Asger F
017157820a
Ruby: make ParameterNode extend LocalSourceNode
2022-10-31 13:33:41 +01:00
Asger F
b29ac5249e
Ruby: add type-tracking inline test in global flow test
2022-10-31 13:33:41 +01:00
Asger F
4ed61c13f8
Ruby: add some captured-variable flow tests
2022-10-31 13:33:41 +01:00
Asger F
b632e21ba0
Ruby: add ConstRef
2022-10-31 13:33:41 +01:00
Karim Ali
3911f3b202
update query description following docs review
2022-10-31 13:54:35 +02:00
Karim Ali
76a330d4b9
update code example to be OWASP compliant
2022-10-31 13:52:49 +02:00
Karim Ali
723ca8ed88
update documentation following docs review
2022-10-31 13:50:30 +02:00
Ian Lynagh
a53c2104d1
Kotlin: Integration tests: Allow \ as a path separator in logs test
2022-10-31 11:24:39 +00:00
Nick Rolfe
5369ba1d83
ruby docs: remove distracting sentence
2022-10-31 11:24:30 +00:00
Tony Torralba
b62ede1544
Fix issue in JsExportedSource
...
Model the source as an access to the tainted field, instead of the field itself (which didn't work)
2022-10-31 12:08:03 +01:00
Chris Smowton
c11d63e4d2
Merge pull request #11015 from smowton/smowton/fix/go-cleartext-logging-exclude-protobuf-getters
...
Go: exclude protobuf read steps from cleartext-logging query
2022-10-31 10:43:52 +00:00
Geoffrey White
ca586b4f3d
Merge remote-tracking branch 'upstream/main' into global
2022-10-31 10:28:29 +00:00
Geoffrey White
0dd8f574a7
Swift: Redesign as a FreeFunctionDecl class + add some qldoc.
2022-10-31 10:24:12 +00:00
Geoffrey White
c161bb5e95
Merge pull request #11035 from geoffw0/simplify2
...
Swift: Simplify some more QL
2022-10-31 09:50:55 +00:00
Rasmus Wriedt Larsen
ead0844174
Merge pull request #10998 from RasmusWL/essa-use-use-test
...
Python: Add failing ESSA use-use test
2022-10-31 10:38:26 +01:00
Paolo Tranquilli
2b395985e6
Swift: remove unneeded trailing / in README.md
2022-10-31 09:55:03 +01:00
Paolo Tranquilli
e62acb1e8c
Swift: revert wrong paragraph edit in README.md
2022-10-31 09:54:15 +01:00
Paolo Tranquilli
7237362feb
Swift: add debug path mapping to README.md
...
This allows breakpoints to work more reliably, including on a bazel
project in CLion.
2022-10-31 09:51:41 +01:00
Paolo Tranquilli
46c7ee0e4f
Swift: refactor RUN_UNDER code
2022-10-31 09:51:20 +01:00
Paolo Tranquilli
80debe19e0
Swift: fix RUN_UNDER_FILTER check
2022-10-31 09:50:45 +01:00
Tamas Vajk
4cd0f1ca66
Apply code review findings
2022-10-31 08:43:53 +01:00
Harry Maclean
0dd63c007e
Ruby: Add change note
2022-10-31 11:53:22 +13:00
Harry Maclean
fd61a5253d
Ruby: Recognise try/try! as code executions
2022-10-31 11:53:22 +13:00
Harry Maclean
3f403f0f87
Merge pull request #10700 from hmac/activesupport
...
Ruby: Model some ActiveSupport methods
2022-10-31 11:50:44 +13:00
erik-krogh
fc2112831c
add second-order-command-injection query
2022-10-30 21:20:47 +01:00
Mathias Vorreiter Pedersen
1b50168d08
C++: Add an initial pruning stage to prevent this
...
large TC in 'localFlowToExpr':
```
Evaluated relational algebra for predicate Buffer#61e3d199::localFlowStepToExpr#2#ff@0a49913i with tuple counts:
4713946 ~0% {2} r1 = SCAN DataFlowUtil#47741e1f::simpleLocalFlowStep#2#ff OUTPUT In.1, In.0
40897385 ~46% {2} r2 = JOIN boundedFastTC:Buffer#61e3d199::localFlowToExprStep#2#ff_10#higher_order_body:DataFlowUtil#47741e1f::simpleLocalFlowStep#2#ff_0#higher_order_body WITH DataFlowUtil#47741e1f::simpleLocalFlowStep#2#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1
45611331 ~43% {2} r3 = r1 UNION r2
3376553 ~14% {2} r4 = JOIN r3 WITH DataFlowUtil#47741e1f::ExprNode::getExpr#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1
return r4
```
After this commit the tuple counts looks like:
```
Evaluated relational algebra for predicate Buffer#61e3d199::localFlowStepToExpr#2#ff@8cc38x5k on iteration 2 running pipeline standard with tuple counts:
51367 ~3% {2} r1 = JOIN Buffer#61e3d199::getBufferSize0#1#f#prev_delta WITH DataFlowUtil#47741e1f::ExprNode::getExpr#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.0
124933 ~18% {2} r2 = JOIN r1 WITH #Buffer#61e3d199::localFlowToExprStep#2Plus#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1
176300 ~17% {2} r3 = r1 UNION r2
184685 ~22% {2} r4 = JOIN r3 WITH DataFlowUtil#47741e1f::simpleLocalFlowStep#2#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1
56646 ~47% {2} r5 = JOIN r4 WITH DataFlowUtil#47741e1f::ExprNode::getExpr#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1
44635 ~16% {2} r6 = r5 AND NOT Buffer#61e3d199::localFlowStepToExpr#2#ff#prev(Lhs.0, Lhs.1)
return r6
```
2022-10-30 14:20:15 +01:00
Mathias Vorreiter Pedersen
aa8214addf
C++: Simplify 'Buffer.qll' by avoiding 'asIndirectExpr'. This removes the flow from 'x' to 'x++', which makes the whole library a lot simpler.
2022-10-30 12:58:53 +01:00
Chris Smowton
b370497f96
Avoid split overrides
2022-10-29 18:23:45 +01:00
Chris Smowton
3573e211cc
Correct test expectations
2022-10-29 11:40:58 +01:00
Chris Smowton
b6e4f472d1
Remove unnecessary import
2022-10-29 11:40:57 +01:00
Chris Smowton
6d321e0151
Add change note
2022-10-29 11:40:57 +01:00
Chris Smowton
5c66d87ed6
gofmt
2022-10-29 11:40:57 +01:00
Chris Smowton
0c6c135967
Go: exclude protobuf read steps from cleartext-logging query
...
This query already treats structs differently to usual: it includes field -> whole struct taint steps, but explicitly excludes struct -> field steps. This means that a logging framework sinking an entire struct with a tainted field yields an alert, but we don't get FPs caused by writing field `x` but then reading field `y`.
However, protobuf messages have a special treatment, with taint usually associated with the whole struct and getter methods propagating that taint out. Suppressing these getter method steps specifically for the cleartext-logging query mirrors its treatment of structs in general and avoids this sort of field-mismatch FP.
On the downside we will miss same-field propagation like `m.field = password; Log(m.GetField())` if we don't have source code for the implementation of `m`. However this is hopefully unusual since the typical use of protobufs is to serialize and deserialize, rather than using the struct as a general-purpose datastructure.
2022-10-29 11:40:57 +01:00
Chris Smowton
8266a22332
Kotlin: fix method types when an inherited method implements a collection type
...
In this circumstance the compiler seems to generate a specialised version of the implementing function with its argument type replaced by the interface-implementing child class' type parameter. However it stores a back-pointer to the real declared function, which we should use as the call target.
2022-10-29 11:29:04 +01:00
Dave Bartolomeo
85790fcade
Merge pull request #10964 from smowton/smowton/admin/modernise-qlpacks
...
qlpacks: libraryPathDependencies -> dependencies
2022-10-28 16:44:22 -04:00
Mathias Vorreiter Pedersen
18d3801c92
Merge pull request #11033 from MathiasVP/exclude-void-calls
...
C++: Don't create `DataFlow::Node`s for `void`-typed instructions
2022-10-28 20:46:33 +02:00
Chris Smowton
d9744c81b7
Merge pull request #11017 from smowton/smowton/fix/kotlin-wildcard-suppression-annotation
...
Kotlin: fix wildcard suppression where the annotation applies to a parent type/argument.
2022-10-28 18:33:07 +01:00
Ian Lynagh
84427e132e
Kotlin: Move the logs test to all-platforms
2022-10-28 17:56:41 +01:00
Geoffrey White
840b74dbb5
Swift: Add and use ApplyExpr.getArgumentByParamName.
2022-10-28 17:55:11 +01:00
Geoffrey White
f122005aaf
Swift: Simplify out some variables.
2022-10-28 17:26:17 +01:00
Tony Torralba
2402504a4c
Add missing SummaryPostUpdateNode
2022-10-28 18:24:17 +02:00