mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
11 lines
523 B
Java
11 lines
523 B
Java
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
|
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
|
|
|
|
public class SpringCsrfProtectionTest {
|
|
protected void test(HttpSecurity http) throws Exception {
|
|
http.csrf(csrf -> csrf.disable()); // $ hasSpringCsrfProtectionDisabled
|
|
http.csrf().disable(); // $ hasSpringCsrfProtectionDisabled
|
|
http.csrf(AbstractHttpConfigurer::disable); // $ hasSpringCsrfProtectionDisabled
|
|
}
|
|
}
|