File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
java/ql/src/experimental/Security/CWE/CWE-352 Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ class RequestResponseFlowConfig extends TaintTracking::Configuration {
52
52
53
53
override predicate isSink ( DataFlow:: Node sink ) {
54
54
sink instanceof XssSink and
55
- any ( RequestGetMethod m ) .polyCalls * ( source .getEnclosingCallable ( ) )
55
+ any ( RequestGetMethod m ) .polyCalls * ( sink .getEnclosingCallable ( ) )
56
56
}
57
57
58
58
override predicate isAdditionalTaintStep ( DataFlow:: Node pred , DataFlow:: Node succ ) {
Original file line number Diff line number Diff line change @@ -77,10 +77,13 @@ class SpringControllerRequestMappingGetMethod extends SpringControllerGetMethod
77
77
this .getAnAnnotation ( )
78
78
.getType ( )
79
79
.hasQualifiedName ( "org.springframework.web.bind.annotation" , "RequestMapping" ) and
80
- this .getAnAnnotation ( ) .getValue ( "method" ) .toString ( ) .regexpMatch ( "RequestMethod.GET|\\{...\\}" ) and
80
+ (
81
+ this .getAnAnnotation ( ) .getValue ( "method" ) .( VarAccess ) .getVariable ( ) .getName ( ) = "GET" or
82
+ this .getAnAnnotation ( ) .getValue ( "method" ) .( ArrayInit ) .getSize ( ) = 0 //Java code example: @RequestMapping(value = "test")
83
+ ) and
81
84
not exists ( MethodAccess ma |
82
85
ma .getMethod ( ) instanceof ServletRequestGetBodyMethod and
83
- this = getACallingCallableOrSelf ( ma .getEnclosingCallable ( ) )
86
+ any ( this ) . polyCalls * ( ma .getEnclosingCallable ( ) )
84
87
) and
85
88
not this .getAParamType ( ) .getName ( ) = "MultipartFile"
86
89
}
You can’t perform that action at this time.
0 commit comments