我有一个 Spring Boot 应用程序,在调用 AuthorizeRequests() 的行中,我的配置函数出现以下声纳严重缺陷。我应该如何修复它?谢谢。
Make sure that Permissions are controlled safely here. Controlling permissions is security-sensitive.
It has led in the past to the following vulnerabilities:
CVE-2018-12999
CVE-2018-10285
CVE-2017-7455
我的配置类:
@Configuration
@EnableWebSecurity
public class MyConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests() // Sonar complain this line here
.antMatchers("/v1/").permitAll()
.antMatchers("/**").authenticated()
.and().httpBasic()
.and().cors();
}
}
眼眸繁星
相关分类