aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-es
diff options
context:
space:
mode:
authorMatteo Mara <matteo.mara@sonarsource.com>2022-03-18 17:18:08 +0100
committersonartech <sonartech@sonarsource.com>2022-03-21 20:02:53 +0000
commit34fe977c3fb083ef1f1ae0fd077b6c75b7cc89f8 (patch)
tree0bd4add39cf491f2d19c7d6b775a828b57122d59 /server/sonar-webserver-es
parenta5703420825b091bc72864144546ee1761e3e1bf (diff)
downloadsonarqube-34fe977c3fb083ef1f1ae0fd077b6c75b7cc89f8.tar.gz
sonarqube-34fe977c3fb083ef1f1ae0fd077b6c75b7cc89f8.zip
SONAR-16129 Handle Owasp Top 10 2021 facet in issue search
Diffstat (limited to 'server/sonar-webserver-es')
-rw-r--r--server/sonar-webserver-es/src/main/java/org/sonar/server/issue/index/IssueIndex.java1
-rw-r--r--server/sonar-webserver-es/src/main/java/org/sonar/server/issue/index/IssueQueryFactory.java1
2 files changed, 2 insertions, 0 deletions
diff --git a/server/sonar-webserver-es/src/main/java/org/sonar/server/issue/index/IssueIndex.java b/server/sonar-webserver-es/src/main/java/org/sonar/server/issue/index/IssueIndex.java
index a108ea40c0e..dd06323c3ac 100644
--- a/server/sonar-webserver-es/src/main/java/org/sonar/server/issue/index/IssueIndex.java
+++ b/server/sonar-webserver-es/src/main/java/org/sonar/server/issue/index/IssueIndex.java
@@ -709,6 +709,7 @@ public class IssueIndex {
addFacetIfNeeded(options, aggregationHelper, esRequest, TYPES, query.types().toArray());
addSecurityCategoryFacetIfNeeded(PARAM_OWASP_TOP_10, OWASP_TOP_10, options, aggregationHelper, esRequest, query.owaspTop10().toArray());
+ addSecurityCategoryFacetIfNeeded(PARAM_OWASP_TOP_10_2021, OWASP_TOP_10_2021, options, aggregationHelper, esRequest, query.owaspTop10For2021().toArray());
addSecurityCategoryFacetIfNeeded(PARAM_SANS_TOP_25, SANS_TOP_25, options, aggregationHelper, esRequest, query.sansTop25().toArray());
addSecurityCategoryFacetIfNeeded(PARAM_CWE, CWE, options, aggregationHelper, esRequest, query.cwe().toArray());
addSecurityCategoryFacetIfNeeded(PARAM_SONARSOURCE_SECURITY, SONARSOURCE_SECURITY, options, aggregationHelper, esRequest, query.sonarsourceSecurity().toArray());
diff --git a/server/sonar-webserver-es/src/main/java/org/sonar/server/issue/index/IssueQueryFactory.java b/server/sonar-webserver-es/src/main/java/org/sonar/server/issue/index/IssueQueryFactory.java
index 9d5ec45406d..e54f7026ae1 100644
--- a/server/sonar-webserver-es/src/main/java/org/sonar/server/issue/index/IssueQueryFactory.java
+++ b/server/sonar-webserver-es/src/main/java/org/sonar/server/issue/index/IssueQueryFactory.java
@@ -133,6 +133,7 @@ public class IssueQueryFactory {
.tags(request.getTags())
.types(request.getTypes())
.owaspTop10(request.getOwaspTop10())
+ .owaspTop10For2021(request.getOwaspTop10For2021())
.sansTop25(request.getSansTop25())
.cwe(request.getCwe())
.sonarsourceSecurity(request.getSonarsourceSecurity())