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 {
2828 Yaml ( ) { this .getAnAncestor ( ) .hasQualifiedName ( "org.yaml.snakeyaml" , "Yaml" ) }
2929}
3030
31+ private DataFlow:: ExprNode yamlClassInstanceExprArgument ( ClassInstanceExpr cie ) {
32+ cie .getConstructedType ( ) instanceof Yaml and
33+ result .getExpr ( ) = cie .getArgument ( 0 )
34+ }
35+
3136private module SafeYamlConstructionFlowConfig implements DataFlow:: ConfigSig {
3237 predicate isSource ( DataFlow:: Node src ) { src .asExpr ( ) instanceof SafeSnakeYamlConstruction }
3338
3439 predicate isSink ( DataFlow:: Node sink ) { sink = yamlClassInstanceExprArgument ( _) }
3540
36- additional DataFlow:: ExprNode yamlClassInstanceExprArgument ( ClassInstanceExpr cie ) {
37- cie .getConstructedType ( ) instanceof Yaml and
38- result .getExpr ( ) = cie .getArgument ( 0 )
39- }
40-
4141 additional ClassInstanceExpr getSafeYaml ( ) {
4242 SafeYamlConstructionFlow:: flowTo ( yamlClassInstanceExprArgument ( result ) )
4343 }
You can’t perform that action at this time.
0 commit comments