使用 SonarLint 插件和 SonarQube 服务器未检测到 HTTP 请求重定向漏洞

Lah*_*ara 5 java sonarqube sonarqube-scan

一旦我们使用 sonarCube 和 SonarLint eclipse 插件进行静态代码分析,它们都无法检测到以下代码段中的漏洞。但这已被定义为声纳源网站规则下的漏洞。

protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
  String location = req.getParameter("url");
  resp.sendRedirect(location); // Noncompliant
}
Run Code Online (Sandbox Code Playgroud)

参考 https://rules.sonarsource.com/java/RSPEC-5146