File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
java/ql/lib/semmle/code/java/frameworks Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -28,16 +28,16 @@ class Yaml extends RefType {
28
28
Yaml ( ) { this .getAnAncestor ( ) .hasQualifiedName ( "org.yaml.snakeyaml" , "Yaml" ) }
29
29
}
30
30
31
+ private DataFlow:: ExprNode yamlClassInstanceExprArgument ( ClassInstanceExpr cie ) {
32
+ cie .getConstructedType ( ) instanceof Yaml and
33
+ result .getExpr ( ) = cie .getArgument ( 0 )
34
+ }
35
+
31
36
private module SafeYamlConstructionFlowConfig implements DataFlow:: ConfigSig {
32
37
predicate isSource ( DataFlow:: Node src ) { src .asExpr ( ) instanceof SafeSnakeYamlConstruction }
33
38
34
39
predicate isSink ( DataFlow:: Node sink ) { sink = yamlClassInstanceExprArgument ( _) }
35
40
36
- additional DataFlow:: ExprNode yamlClassInstanceExprArgument ( ClassInstanceExpr cie ) {
37
- cie .getConstructedType ( ) instanceof Yaml and
38
- result .getExpr ( ) = cie .getArgument ( 0 )
39
- }
40
-
41
41
additional ClassInstanceExpr getSafeYaml ( ) {
42
42
SafeYamlConstructionFlow:: flowTo ( yamlClassInstanceExprArgument ( result ) )
43
43
}
You can’t perform that action at this time.
0 commit comments