@@ -86,16 +86,12 @@ class PermitAllCall extends MethodAccess {
86
86
87
87
/** Holds if `permitAll` is called on request(s) mapped to actuator endpoint(s). */
88
88
predicate permitsSpringBootActuators ( ) {
89
- exists (
90
- RequestMatcherCall requestMatcherCall , RequestMatchersCall requestMatchersCall ,
91
- RegistryRequestMatchersCall registryRequestMatchersCall ,
92
- AuthorizeRequestsCall authorizeRequestsCall , AnyRequestCall anyRequestCall
93
- |
89
+ exists ( AuthorizeRequestsCall authorizeRequestsCall |
94
90
// .requestMatcher(EndpointRequest).authorizeRequests([...]).[...]
95
- authorizeRequestsCall .getQualifier ( ) = requestMatcherCall
91
+ authorizeRequestsCall .getQualifier ( ) instanceof RequestMatcherCall
96
92
or
97
93
// .requestMatchers(matcher -> EndpointRequest).authorizeRequests([...]).[...]
98
- authorizeRequestsCall .getQualifier ( ) = requestMatchersCall
94
+ authorizeRequestsCall .getQualifier ( ) instanceof RequestMatchersCall
99
95
or
100
96
// http.authorizeRequests([...]).[...]
101
97
authorizeRequestsCall .getQualifier ( ) instanceof VarAccess
@@ -104,20 +100,22 @@ class PermitAllCall extends MethodAccess {
104
100
// [...].authorizeRequests(r -> r.requestMatchers(EndpointRequest).permitAll())
105
101
authorizeRequestsCall .getArgument ( 0 ) .( LambdaExpr ) .getExprBody ( ) = this and
106
102
(
107
- this .getQualifier ( ) = anyRequestCall or
108
- this .getQualifier ( ) = registryRequestMatchersCall
103
+ this .getQualifier ( ) instanceof AnyRequestCall or
104
+ this .getQualifier ( ) instanceof RegistryRequestMatchersCall
109
105
)
110
106
or
111
107
// [...].authorizeRequests().requestMatchers(EndpointRequest).permitAll() or
112
108
// [...].authorizeRequests().anyRequest().permitAll()
113
109
authorizeRequestsCall .getNumArgument ( ) = 0 and
114
- (
110
+ exists ( RegistryRequestMatchersCall registryRequestMatchersCall |
115
111
registryRequestMatchersCall .getQualifier ( ) = authorizeRequestsCall and
116
112
this .getQualifier ( ) = registryRequestMatchersCall
117
113
)
118
114
or
119
- anyRequestCall .getQualifier ( ) = authorizeRequestsCall and
120
- this .getQualifier ( ) = anyRequestCall
115
+ exists ( AnyRequestCall anyRequestCall |
116
+ anyRequestCall .getQualifier ( ) = authorizeRequestsCall and
117
+ this .getQualifier ( ) = anyRequestCall
118
+ )
121
119
)
122
120
}
123
121
}
0 commit comments