我编写了一个非常简单的JSP来测试sonarqube。它包含以下几行:
<jsp:include page="header.jsp">
<input type="text" name="foo" value="<%= request.getParameter("foo") %>" />正如在下面的链接中提到的,sonarqube应该识别这两个漏洞-->使用JSP表达式和动态包含。但是我没有在这个来自sonarqube的JSP文件中得到任何错误。
https://sonarqube.com/coding_rules#rule_key=Web%3AJspScriptletCheck
https://sonarqube.com/coding_rules#rule_key=Web%3ADynamicJspIncludeCheck
我用的是sonarqube-6.0和sonar-scanner-2.7。此外,我还在我的声纳项目中添加了以下行。project.properties: sonar.web.file.suffixes=.html,.xhtml,.rhtml,.shtml,.jsp
发布于 2016-09-05 22:13:53
您应该小心,因为您正在讨论的两个规则是SonarQube Web plugin (http://docs.sonarqube.org/display/PLUG/Web+Plugin)的一部分,而不是默认的SonarQube发行版的一部分。您需要显式安装此插件并激活这两个规则才能获得预期的问题。
https://stackoverflow.com/questions/39315759
复制相似问题