Java: Improve java/spring-disabled-csrf-protection

This commit is contained in:
Tony Torralba
2023-10-16 15:49:25 +02:00
parent 1297acf5b1
commit d08ee76b16
10 changed files with 78 additions and 6 deletions

View File

@@ -12,11 +12,8 @@
*/
import java
import semmle.code.java.security.SpringCsrfProtection
from MethodAccess call
where
call.getMethod().hasName("disable") and
call.getReceiverType()
.hasQualifiedName("org.springframework.security.config.annotation.web.configurers",
"CsrfConfigurer<HttpSecurity>")
where disablesSpringCsrfProtection(call)
select call, "CSRF vulnerability due to protection being disabled."

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* The query `java/spring-disabled-csrf-protection` has been improved to detect more ways of disabling CSRF in Spring.