Simplify the query

This commit is contained in:
Grzegorz Golawski
2020-01-05 22:05:00 +01:00
parent ab49397bb8
commit 4ce25c045d

View File

@@ -12,11 +12,11 @@
import java
from MethodAccess call, Method method
from MethodAccess call
where
call.getMethod() = method and
method.hasName("disable") and
method.getDeclaringType().getQualifiedName().regexpMatch(
"org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer<CsrfConfigurer<.*>,.*>"
call.getMethod().hasName("disable") and
call.getReceiverType().hasQualifiedName(
"org.springframework.security.config.annotation.web.configurers",
"CsrfConfigurer<HttpSecurity>"
)
select call, "CSRF vulnerability due to protection being disabled."