mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Add check for disabled CSRF protection in Spring
Fix help and correct formatting.
This commit is contained in:
@@ -10,7 +10,7 @@ result in exposure of data or unintended code execution.</p>
|
||||
</overview>
|
||||
|
||||
<recommendation>
|
||||
<p>Cross-Site Request Forgery (CSRF) protection is enabled by default. Spring's recommendation
|
||||
<p>When you use Spring, Cross-Site Request Forgery (CSRF) protection is enabled by default. Spring's recommendation
|
||||
is to use CSRF protection for any request that could be processed by a browser client by normal
|
||||
users.</p>
|
||||
</recommendation>
|
||||
|
||||
@@ -15,8 +15,8 @@ import java
|
||||
from MethodAccess call
|
||||
where
|
||||
call.getMethod().hasName("disable") and
|
||||
call.getReceiverType().hasQualifiedName(
|
||||
"org.springframework.security.config.annotation.web.configurers",
|
||||
"CsrfConfigurer<HttpSecurity>"
|
||||
)
|
||||
call
|
||||
.getReceiverType()
|
||||
.hasQualifiedName("org.springframework.security.config.annotation.web.configurers",
|
||||
"CsrfConfigurer<HttpSecurity>")
|
||||
select call, "CSRF vulnerability due to protection being disabled."
|
||||
|
||||
Reference in New Issue
Block a user