mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Merge branch 'main' into change/adjust-extracted-files-diagnostics
This commit is contained in:
@@ -1275,6 +1275,19 @@ control/cases.rb:
|
||||
# 162| getKey: [SymbolLiteral] :y
|
||||
# 162| getComponent: [StringTextComponent] y
|
||||
# 162| getValue: [IntegerLiteral] 1
|
||||
# 164| getStmt: [CaseExpr] case ...
|
||||
# 165| getValue: [LocalVariableAccess] foo
|
||||
# 166| getBranch: [WhenClause] when ...
|
||||
# 166| getPattern: [IntegerLiteral] 1
|
||||
# 166| getBody: [StmtSequence] then ...
|
||||
# 166| getStmt: [IntegerLiteral] 2
|
||||
# 169| getStmt: [CaseExpr] case ...
|
||||
# 170| getValue: [LocalVariableAccess] foo
|
||||
# 171| getBranch: [InClause] in ... then ...
|
||||
# 171| getPattern: [IntegerLiteral] 3
|
||||
# 171| getBody: [StmtSequence] then ...
|
||||
# 171| getStmt: [StringLiteral] "three"
|
||||
# 171| getComponent: [StringTextComponent] three
|
||||
modules/classes.rb:
|
||||
# 2| [Toplevel] classes.rb
|
||||
# 3| getStmt: [ClassDeclaration] Foo
|
||||
@@ -2888,6 +2901,9 @@ operations/operations.rb:
|
||||
# 104| getElement: [IntegerLiteral] 1
|
||||
# 104| getElement: [IntegerLiteral] 2
|
||||
# 104| getElement: [IntegerLiteral] 3
|
||||
# 106| getStmt: [DivExpr] ... / ...
|
||||
# 106| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] foo
|
||||
# 107| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 5
|
||||
params/params.rb:
|
||||
# 1| [Toplevel] params.rb
|
||||
# 4| getStmt: [Method] identifier_method_params
|
||||
|
||||
@@ -2756,6 +2756,30 @@ control/cases.rb:
|
||||
# 162| 1: [ReservedWord] :
|
||||
# 162| 2: [Integer] 1
|
||||
# 162| 4: [ReservedWord] }
|
||||
# 164| 19: [Case] Case
|
||||
# 164| 0: [ReservedWord] case
|
||||
# 165| 1: [Identifier] foo
|
||||
# 166| 2: [When] When
|
||||
# 166| 0: [ReservedWord] when
|
||||
# 166| 1: [Pattern] Pattern
|
||||
# 166| 0: [Integer] 1
|
||||
# 166| 2: [Then] Then
|
||||
# 166| 0: [ReservedWord] then
|
||||
# 166| 1: [Integer] 2
|
||||
# 167| 3: [ReservedWord] end
|
||||
# 169| 20: [CaseMatch] CaseMatch
|
||||
# 169| 0: [ReservedWord] case
|
||||
# 170| 1: [Identifier] foo
|
||||
# 171| 2: [InClause] InClause
|
||||
# 171| 0: [ReservedWord] in
|
||||
# 171| 1: [Integer] 3
|
||||
# 171| 2: [Then] Then
|
||||
# 171| 0: [ReservedWord] then
|
||||
# 171| 1: [String] String
|
||||
# 171| 0: [ReservedWord] "
|
||||
# 171| 1: [StringContent] three
|
||||
# 171| 2: [ReservedWord] "
|
||||
# 172| 3: [ReservedWord] end
|
||||
# 1| [Comment] # Define some variables used below
|
||||
# 7| [Comment] # A case expr with a value and an else branch
|
||||
# 17| [Comment] # A case expr without a value or else branch
|
||||
@@ -5636,6 +5660,10 @@ operations/operations.rb:
|
||||
# 104| 4: [ReservedWord] ,
|
||||
# 104| 5: [Integer] 3
|
||||
# 104| 6: [ReservedWord] ]
|
||||
# 106| 73: [Binary] Binary
|
||||
# 106| 0: [Identifier] foo
|
||||
# 106| 1: [ReservedWord] /
|
||||
# 107| 2: [Integer] 5
|
||||
# 1| [Comment] # Start with assignments to all the identifiers used below, so that they are
|
||||
# 2| [Comment] # interpreted as variables.
|
||||
# 22| [Comment] # Unary operations
|
||||
|
||||
@@ -276,6 +276,12 @@ exprValue
|
||||
| control/cases.rb:162:10:162:10 | :x | :x | symbol |
|
||||
| control/cases.rb:162:16:162:16 | :y | :y | symbol |
|
||||
| control/cases.rb:162:19:162:19 | 1 | 1 | int |
|
||||
| control/cases.rb:165:3:165:5 | foo | 42 | int |
|
||||
| control/cases.rb:166:6:166:6 | 1 | 1 | int |
|
||||
| control/cases.rb:166:13:166:13 | 2 | 2 | int |
|
||||
| control/cases.rb:170:3:170:5 | foo | 42 | int |
|
||||
| control/cases.rb:171:4:171:4 | 3 | 3 | int |
|
||||
| control/cases.rb:171:11:171:17 | "three" | three | string |
|
||||
| control/conditionals.rb:2:5:2:5 | 0 | 0 | int |
|
||||
| control/conditionals.rb:3:5:3:5 | 0 | 0 | int |
|
||||
| control/conditionals.rb:4:5:4:5 | 0 | 0 | int |
|
||||
@@ -921,6 +927,7 @@ exprValue
|
||||
| operations/operations.rb:104:25:104:25 | 1 | 1 | int |
|
||||
| operations/operations.rb:104:28:104:28 | 2 | 2 | int |
|
||||
| operations/operations.rb:104:31:104:31 | 3 | 3 | int |
|
||||
| operations/operations.rb:107:1:107:1 | 5 | 5 | int |
|
||||
| params/params.rb:41:46:41:46 | 7 | 7 | int |
|
||||
| params/params.rb:47:19:47:21 | :bar | :bar | symbol |
|
||||
| params/params.rb:47:24:47:24 | 2 | 2 | int |
|
||||
@@ -1184,6 +1191,12 @@ exprCfgNodeValue
|
||||
| control/cases.rb:160:13:160:13 | 2 | 2 | int |
|
||||
| control/cases.rb:162:1:162:20 | nil | nil | nil |
|
||||
| control/cases.rb:162:19:162:19 | 1 | 1 | int |
|
||||
| control/cases.rb:165:3:165:5 | foo | 42 | int |
|
||||
| control/cases.rb:166:6:166:6 | 1 | 1 | int |
|
||||
| control/cases.rb:166:13:166:13 | 2 | 2 | int |
|
||||
| control/cases.rb:170:3:170:5 | foo | 42 | int |
|
||||
| control/cases.rb:171:4:171:4 | 3 | 3 | int |
|
||||
| control/cases.rb:171:11:171:17 | "three" | three | string |
|
||||
| control/conditionals.rb:2:5:2:5 | 0 | 0 | int |
|
||||
| control/conditionals.rb:3:5:3:5 | 0 | 0 | int |
|
||||
| control/conditionals.rb:4:5:4:5 | 0 | 0 | int |
|
||||
@@ -1828,6 +1841,7 @@ exprCfgNodeValue
|
||||
| operations/operations.rb:104:25:104:25 | 1 | 1 | int |
|
||||
| operations/operations.rb:104:28:104:28 | 2 | 2 | int |
|
||||
| operations/operations.rb:104:31:104:31 | 3 | 3 | int |
|
||||
| operations/operations.rb:107:1:107:1 | 5 | 5 | int |
|
||||
| params/params.rb:41:46:41:46 | 7 | 7 | int |
|
||||
| params/params.rb:47:19:47:21 | :bar | :bar | symbol |
|
||||
| params/params.rb:47:24:47:24 | 2 | 2 | int |
|
||||
|
||||
@@ -12,6 +12,8 @@ caseValues
|
||||
| cases.rb:154:1:158:3 | case ... | cases.rb:154:6:154:9 | call to expr |
|
||||
| cases.rb:160:1:160:14 | case ... | cases.rb:160:1:160:4 | call to expr |
|
||||
| cases.rb:162:1:162:20 | case ... | cases.rb:162:1:162:4 | call to expr |
|
||||
| cases.rb:164:1:167:3 | case ... | cases.rb:165:3:165:5 | foo |
|
||||
| cases.rb:169:1:172:3 | case ... | cases.rb:170:3:170:5 | foo |
|
||||
caseNoValues
|
||||
| cases.rb:18:1:22:3 | case ... |
|
||||
caseElseBranches
|
||||
@@ -30,6 +32,8 @@ caseNoElseBranches
|
||||
| cases.rb:147:1:152:3 | case ... |
|
||||
| cases.rb:154:1:158:3 | case ... |
|
||||
| cases.rb:162:1:162:20 | case ... |
|
||||
| cases.rb:164:1:167:3 | case ... |
|
||||
| cases.rb:169:1:172:3 | case ... |
|
||||
caseWhenBranches
|
||||
| cases.rb:8:1:15:3 | case ... | cases.rb:9:1:10:7 | when ... | 0 | cases.rb:9:6:9:6 | b | cases.rb:9:7:10:7 | then ... |
|
||||
| cases.rb:8:1:15:3 | case ... | cases.rb:11:1:12:7 | when ... | 0 | cases.rb:11:6:11:6 | c | cases.rb:11:10:12:7 | then ... |
|
||||
@@ -37,6 +41,7 @@ caseWhenBranches
|
||||
| cases.rb:18:1:22:3 | case ... | cases.rb:19:1:19:19 | when ... | 0 | cases.rb:19:6:19:10 | ... > ... | cases.rb:19:13:19:19 | then ... |
|
||||
| cases.rb:18:1:22:3 | case ... | cases.rb:20:1:20:19 | when ... | 0 | cases.rb:20:6:20:11 | ... == ... | cases.rb:20:13:20:19 | then ... |
|
||||
| cases.rb:18:1:22:3 | case ... | cases.rb:21:1:21:19 | when ... | 0 | cases.rb:21:6:21:10 | ... < ... | cases.rb:21:13:21:19 | then ... |
|
||||
| cases.rb:164:1:167:3 | case ... | cases.rb:166:1:166:13 | when ... | 0 | cases.rb:166:6:166:6 | 1 | cases.rb:166:8:166:13 | then ... |
|
||||
caseAllBranches
|
||||
| cases.rb:8:1:15:3 | case ... | 0 | cases.rb:9:1:10:7 | when ... |
|
||||
| cases.rb:8:1:15:3 | case ... | 1 | cases.rb:11:1:12:7 | when ... |
|
||||
@@ -139,3 +144,5 @@ caseAllBranches
|
||||
| cases.rb:160:1:160:14 | case ... | 0 | cases.rb:160:1:160:14 | in ... then ... |
|
||||
| cases.rb:160:1:160:14 | case ... | 1 | cases.rb:160:1:160:14 | else ... |
|
||||
| cases.rb:162:1:162:20 | case ... | 0 | cases.rb:162:1:162:20 | in ... then ... |
|
||||
| cases.rb:164:1:167:3 | case ... | 0 | cases.rb:166:1:166:13 | when ... |
|
||||
| cases.rb:169:1:172:3 | case ... | 0 | cases.rb:171:1:171:17 | in ... then ... |
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
| cases.rb:154:1:158:3 | case ... | CaseExpr |
|
||||
| cases.rb:160:1:160:14 | case ... | CaseExpr |
|
||||
| cases.rb:162:1:162:20 | case ... | CaseExpr |
|
||||
| cases.rb:164:1:167:3 | case ... | CaseExpr |
|
||||
| cases.rb:169:1:172:3 | case ... | CaseExpr |
|
||||
| conditionals.rb:10:1:12:3 | if ... | IfExpr |
|
||||
| conditionals.rb:15:1:19:3 | if ... | IfExpr |
|
||||
| conditionals.rb:22:1:30:3 | if ... | IfExpr |
|
||||
|
||||
@@ -159,4 +159,14 @@ end
|
||||
|
||||
expr in [1, 2]
|
||||
|
||||
expr => {x: v, y: 1}
|
||||
expr => {x: v, y: 1}
|
||||
|
||||
case
|
||||
foo
|
||||
when 1 then 2
|
||||
end
|
||||
|
||||
case
|
||||
foo
|
||||
in 3 then "three"
|
||||
end
|
||||
@@ -45,6 +45,7 @@ binaryOperations
|
||||
| operations.rb:101:21:101:23 | ... \|\| ... | \|\| | operations.rb:101:1:101:19 | MemberConstant | operations.rb:101:25:101:25 | 8 | LogicalOrExpr |
|
||||
| operations.rb:102:27:102:29 | ... \|\| ... | \|\| | operations.rb:102:1:102:25 | OtherConstant | operations.rb:102:31:102:31 | 7 | LogicalOrExpr |
|
||||
| operations.rb:103:13:103:15 | ... \|\| ... | \|\| | operations.rb:103:1:103:11 | CONSTANT4 | operations.rb:103:17:103:17 | 7 | LogicalOrExpr |
|
||||
| operations.rb:106:1:107:1 | ... / ... | / | operations.rb:106:1:106:3 | foo | operations.rb:107:1:107:1 | 5 | DivExpr |
|
||||
binaryArithmeticOperations
|
||||
| operations.rb:32:1:32:7 | ... + ... | + | operations.rb:32:1:32:1 | w | operations.rb:32:5:32:7 | 234 | AddExpr |
|
||||
| operations.rb:33:1:33:6 | ... - ... | - | operations.rb:33:1:33:1 | x | operations.rb:33:5:33:6 | 17 | SubExpr |
|
||||
@@ -62,6 +63,7 @@ binaryArithmeticOperations
|
||||
| operations.rb:92:7:92:8 | ... / ... | / | operations.rb:92:3:92:5 | @@y | operations.rb:92:10:92:10 | 4 | DivExpr |
|
||||
| operations.rb:96:13:96:14 | ... * ... | * | operations.rb:96:1:96:11 | $global_var | operations.rb:96:16:96:16 | 6 | MulExpr |
|
||||
| operations.rb:99:11:99:12 | ... + ... | + | operations.rb:99:1:99:9 | CONSTANT2 | operations.rb:99:14:99:14 | 6 | AddExpr |
|
||||
| operations.rb:106:1:107:1 | ... / ... | / | operations.rb:106:1:106:3 | foo | operations.rb:107:1:107:1 | 5 | DivExpr |
|
||||
binaryLogicalOperations
|
||||
| operations.rb:40:1:40:10 | ... && ... | && | operations.rb:40:1:40:3 | foo | operations.rb:40:8:40:10 | bar | LogicalAndExpr |
|
||||
| operations.rb:41:1:41:11 | ... and ... | and | operations.rb:41:1:41:3 | baz | operations.rb:41:9:41:11 | qux | LogicalAndExpr |
|
||||
|
||||
@@ -243,3 +243,5 @@
|
||||
| operations.rb:104:24:104:32 | * ... | * | operations.rb:104:24:104:32 | [...] | SplatExpr |
|
||||
| operations.rb:104:24:104:32 | ... = ... | = | operations.rb:104:24:104:32 | * ... | AssignExpr |
|
||||
| operations.rb:104:24:104:32 | ... = ... | = | operations.rb:104:24:104:32 | __synth__3 | AssignExpr |
|
||||
| operations.rb:106:1:107:1 | ... / ... | / | operations.rb:106:1:106:3 | foo | DivExpr |
|
||||
| operations.rb:106:1:107:1 | ... / ... | / | operations.rb:107:1:107:1 | 5 | DivExpr |
|
||||
|
||||
@@ -102,3 +102,6 @@ Foo::MemberConstant ||= 8
|
||||
foo(1).bar::OtherConstant ||= 7
|
||||
::CONSTANT4 ||= 7
|
||||
FOO, ::BAR, foo::FOO = [1, 2, 3]
|
||||
|
||||
foo /
|
||||
5
|
||||
@@ -81,6 +81,17 @@ edges
|
||||
| call_sensitivity.rb:178:11:178:19 | call to taint | call_sensitivity.rb:174:19:174:19 | x |
|
||||
| call_sensitivity.rb:187:11:187:20 | ( ... ) | call_sensitivity.rb:104:18:104:18 | x |
|
||||
| call_sensitivity.rb:187:12:187:19 | call to taint | call_sensitivity.rb:187:11:187:20 | ( ... ) |
|
||||
| call_sensitivity.rb:189:19:189:19 | x | call_sensitivity.rb:190:9:190:9 | x |
|
||||
| call_sensitivity.rb:190:9:190:9 | x | call_sensitivity.rb:194:23:194:23 | x |
|
||||
| call_sensitivity.rb:193:19:193:19 | x | call_sensitivity.rb:194:17:194:17 | x |
|
||||
| call_sensitivity.rb:194:17:194:17 | x | call_sensitivity.rb:189:19:189:19 | x |
|
||||
| call_sensitivity.rb:194:23:194:23 | x | call_sensitivity.rb:195:11:195:11 | x |
|
||||
| call_sensitivity.rb:195:11:195:11 | x | call_sensitivity.rb:199:30:199:30 | x |
|
||||
| call_sensitivity.rb:195:11:195:11 | x | call_sensitivity.rb:203:26:203:26 | x |
|
||||
| call_sensitivity.rb:199:15:199:24 | ( ... ) | call_sensitivity.rb:193:19:193:19 | x |
|
||||
| call_sensitivity.rb:199:16:199:23 | call to taint | call_sensitivity.rb:199:15:199:24 | ( ... ) |
|
||||
| call_sensitivity.rb:199:30:199:30 | x | call_sensitivity.rb:200:8:200:8 | x |
|
||||
| call_sensitivity.rb:203:26:203:26 | x | call_sensitivity.rb:204:8:204:8 | x |
|
||||
nodes
|
||||
| call_sensitivity.rb:9:6:9:14 | ( ... ) | semmle.label | ( ... ) |
|
||||
| call_sensitivity.rb:9:7:9:13 | call to taint | semmle.label | call to taint |
|
||||
@@ -168,6 +179,18 @@ nodes
|
||||
| call_sensitivity.rb:178:11:178:19 | call to taint | semmle.label | call to taint |
|
||||
| call_sensitivity.rb:187:11:187:20 | ( ... ) | semmle.label | ( ... ) |
|
||||
| call_sensitivity.rb:187:12:187:19 | call to taint | semmle.label | call to taint |
|
||||
| call_sensitivity.rb:189:19:189:19 | x | semmle.label | x |
|
||||
| call_sensitivity.rb:190:9:190:9 | x | semmle.label | x |
|
||||
| call_sensitivity.rb:193:19:193:19 | x | semmle.label | x |
|
||||
| call_sensitivity.rb:194:17:194:17 | x | semmle.label | x |
|
||||
| call_sensitivity.rb:194:23:194:23 | x | semmle.label | x |
|
||||
| call_sensitivity.rb:195:11:195:11 | x | semmle.label | x |
|
||||
| call_sensitivity.rb:199:15:199:24 | ( ... ) | semmle.label | ( ... ) |
|
||||
| call_sensitivity.rb:199:16:199:23 | call to taint | semmle.label | call to taint |
|
||||
| call_sensitivity.rb:199:30:199:30 | x | semmle.label | x |
|
||||
| call_sensitivity.rb:200:8:200:8 | x | semmle.label | x |
|
||||
| call_sensitivity.rb:203:26:203:26 | x | semmle.label | x |
|
||||
| call_sensitivity.rb:204:8:204:8 | x | semmle.label | x |
|
||||
subpaths
|
||||
#select
|
||||
| call_sensitivity.rb:9:6:9:14 | ( ... ) | call_sensitivity.rb:9:7:9:13 | call to taint | call_sensitivity.rb:9:6:9:14 | ( ... ) | $@ | call_sensitivity.rb:9:7:9:13 | call to taint | call to taint |
|
||||
@@ -193,25 +216,28 @@ subpaths
|
||||
| call_sensitivity.rb:105:10:105:10 | x | call_sensitivity.rb:125:12:125:19 | call to taint | call_sensitivity.rb:105:10:105:10 | x | $@ | call_sensitivity.rb:125:12:125:19 | call to taint | call to taint |
|
||||
| call_sensitivity.rb:105:10:105:10 | x | call_sensitivity.rb:178:11:178:19 | call to taint | call_sensitivity.rb:105:10:105:10 | x | $@ | call_sensitivity.rb:178:11:178:19 | call to taint | call to taint |
|
||||
| call_sensitivity.rb:105:10:105:10 | x | call_sensitivity.rb:187:12:187:19 | call to taint | call_sensitivity.rb:105:10:105:10 | x | $@ | call_sensitivity.rb:187:12:187:19 | call to taint | call to taint |
|
||||
| call_sensitivity.rb:200:8:200:8 | x | call_sensitivity.rb:199:16:199:23 | call to taint | call_sensitivity.rb:200:8:200:8 | x | $@ | call_sensitivity.rb:199:16:199:23 | call to taint | call to taint |
|
||||
| call_sensitivity.rb:204:8:204:8 | x | call_sensitivity.rb:199:16:199:23 | call to taint | call_sensitivity.rb:204:8:204:8 | x | $@ | call_sensitivity.rb:199:16:199:23 | call to taint | call to taint |
|
||||
mayBenefitFromCallContext
|
||||
| call_sensitivity.rb:51:5:51:10 | call to sink | call_sensitivity.rb:50:3:52:5 | method1 |
|
||||
| call_sensitivity.rb:55:5:55:13 | call to method1 | call_sensitivity.rb:54:3:56:5 | method2 |
|
||||
| call_sensitivity.rb:59:5:59:18 | call to method2 | call_sensitivity.rb:58:3:60:5 | call_method2 |
|
||||
| call_sensitivity.rb:63:5:63:16 | call to method1 | call_sensitivity.rb:62:3:64:5 | method3 |
|
||||
| call_sensitivity.rb:67:5:67:25 | call to method3 | call_sensitivity.rb:66:3:68:5 | call_method3 |
|
||||
| call_sensitivity.rb:81:5:81:18 | call to method1 | call_sensitivity.rb:80:3:82:5 | method5 |
|
||||
| call_sensitivity.rb:89:5:89:23 | call to singleton_method1 | call_sensitivity.rb:88:3:90:5 | singleton_method2 |
|
||||
| call_sensitivity.rb:93:5:93:28 | call to singleton_method2 | call_sensitivity.rb:92:3:94:5 | call_singleton_method2 |
|
||||
| call_sensitivity.rb:97:5:97:26 | call to singleton_method1 | call_sensitivity.rb:96:3:98:5 | singleton_method3 |
|
||||
| call_sensitivity.rb:101:5:101:35 | call to singleton_method3 | call_sensitivity.rb:100:3:102:5 | call_singleton_method3 |
|
||||
| call_sensitivity.rb:105:5:105:10 | call to sink | call_sensitivity.rb:104:3:107:5 | initialize |
|
||||
| call_sensitivity.rb:106:5:106:13 | call to method1 | call_sensitivity.rb:104:3:107:5 | initialize |
|
||||
| call_sensitivity.rb:110:5:110:9 | call to new | call_sensitivity.rb:109:3:111:5 | call_new |
|
||||
| call_sensitivity.rb:137:5:137:18 | call to method2 | call_sensitivity.rb:136:3:138:5 | call_method2 |
|
||||
| call_sensitivity.rb:141:5:141:25 | call to method3 | call_sensitivity.rb:140:3:142:5 | call_method3 |
|
||||
| call_sensitivity.rb:149:5:149:28 | call to singleton_method2 | call_sensitivity.rb:148:3:150:5 | call_singleton_method2 |
|
||||
| call_sensitivity.rb:153:5:153:35 | call to singleton_method3 | call_sensitivity.rb:152:3:154:5 | call_singleton_method3 |
|
||||
| call_sensitivity.rb:175:3:175:12 | call to new | call_sensitivity.rb:174:1:176:3 | create |
|
||||
| call_sensitivity.rb:51:5:51:10 | call to sink |
|
||||
| call_sensitivity.rb:55:5:55:13 | call to method1 |
|
||||
| call_sensitivity.rb:59:5:59:18 | call to method2 |
|
||||
| call_sensitivity.rb:63:5:63:16 | call to method1 |
|
||||
| call_sensitivity.rb:67:5:67:25 | call to method3 |
|
||||
| call_sensitivity.rb:81:5:81:18 | call to method1 |
|
||||
| call_sensitivity.rb:89:5:89:23 | call to singleton_method1 |
|
||||
| call_sensitivity.rb:93:5:93:28 | call to singleton_method2 |
|
||||
| call_sensitivity.rb:97:5:97:26 | call to singleton_method1 |
|
||||
| call_sensitivity.rb:101:5:101:35 | call to singleton_method3 |
|
||||
| call_sensitivity.rb:105:5:105:10 | call to sink |
|
||||
| call_sensitivity.rb:106:5:106:13 | call to method1 |
|
||||
| call_sensitivity.rb:110:5:110:9 | call to new |
|
||||
| call_sensitivity.rb:137:5:137:18 | call to method2 |
|
||||
| call_sensitivity.rb:141:5:141:25 | call to method3 |
|
||||
| call_sensitivity.rb:149:5:149:28 | call to singleton_method2 |
|
||||
| call_sensitivity.rb:153:5:153:35 | call to singleton_method3 |
|
||||
| call_sensitivity.rb:175:3:175:12 | call to new |
|
||||
| call_sensitivity.rb:194:3:196:5 | call to invoke_block1 |
|
||||
viableImplInCallContext
|
||||
| call_sensitivity.rb:51:5:51:10 | call to sink | call_sensitivity.rb:55:5:55:13 | call to method1 | call_sensitivity.rb:5:1:7:3 | sink |
|
||||
| call_sensitivity.rb:51:5:51:10 | call to sink | call_sensitivity.rb:63:5:63:16 | call to method1 | call_sensitivity.rb:5:1:7:3 | sink |
|
||||
@@ -267,3 +293,5 @@ viableImplInCallContext
|
||||
| call_sensitivity.rb:153:5:153:35 | call to singleton_method3 | call_sensitivity.rb:171:1:171:34 | call to call_singleton_method3 | call_sensitivity.rb:96:3:98:5 | singleton_method3 |
|
||||
| call_sensitivity.rb:175:3:175:12 | call to new | call_sensitivity.rb:178:1:178:20 | call to create | call_sensitivity.rb:104:3:107:5 | initialize |
|
||||
| call_sensitivity.rb:175:3:175:12 | call to new | call_sensitivity.rb:179:1:179:20 | call to create | call_sensitivity.rb:156:3:158:5 | initialize |
|
||||
| call_sensitivity.rb:194:3:196:5 | call to invoke_block1 | call_sensitivity.rb:199:1:201:3 | call to invoke_block2 | call_sensitivity.rb:189:1:191:3 | invoke_block1 |
|
||||
| call_sensitivity.rb:194:3:196:5 | call to invoke_block1 | call_sensitivity.rb:203:1:205:3 | call to invoke_block2 | call_sensitivity.rb:189:1:191:3 | invoke_block1 |
|
||||
|
||||
@@ -9,7 +9,7 @@ import DefaultFlowTest
|
||||
import TaintFlow::PathGraph
|
||||
import codeql.ruby.dataflow.internal.DataFlowDispatch as DataFlowDispatch
|
||||
|
||||
query predicate mayBenefitFromCallContext = DataFlowDispatch::mayBenefitFromCallContext/2;
|
||||
query predicate mayBenefitFromCallContext = DataFlowDispatch::mayBenefitFromCallContext/1;
|
||||
|
||||
query predicate viableImplInCallContext = DataFlowDispatch::viableImplInCallContext/2;
|
||||
|
||||
|
||||
@@ -185,3 +185,21 @@ class C < A
|
||||
end
|
||||
|
||||
c = C.new (taint 32)
|
||||
|
||||
def invoke_block1 x
|
||||
yield x
|
||||
end
|
||||
|
||||
def invoke_block2 x
|
||||
invoke_block1 x do |x|
|
||||
yield x
|
||||
end
|
||||
end
|
||||
|
||||
invoke_block2 (taint 37) do |x|
|
||||
sink x # $ hasValueFlow=37
|
||||
end
|
||||
|
||||
invoke_block2 "safe" do |x|
|
||||
sink x # $ SPURIOUS hasValueFlow=37
|
||||
end
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
testFailures
|
||||
| blocks.rb:4:10:4:10 | r | Fixed missing result:hasValueFlow=1 |
|
||||
| captured_variables.rb:50:10:50:10 | x | Fixed missing result:hasValueFlow=2 |
|
||||
| captured_variables.rb:68:25:68:68 | # $ hasValueFlow=3 $ MISSING: hasValueFlow=4 | Missing result:hasValueFlow=3 |
|
||||
| captured_variables.rb:72:21:72:66 | # $ hasValueFlow=4 $ SPURIOUS: hasValueFlow=3 | Fixed spurious result:hasValueFlow=3 |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class A
|
||||
def m1(&block)
|
||||
r = block.call() # $ MISSING: hasValueFlow=1
|
||||
sink r
|
||||
r = block.call()
|
||||
sink r # $ MISSING: hasValueFlow=1
|
||||
end
|
||||
|
||||
def m2
|
||||
|
||||
Reference in New Issue
Block a user