From 34fe977c3fb083ef1f1ae0fd077b6c75b7cc89f8 Mon Sep 17 00:00:00 2001 From: Matteo Mara Date: Fri, 18 Mar 2022 17:18:08 +0100 Subject: SONAR-16129 Handle Owasp Top 10 2021 facet in issue search --- .../src/main/java/org/sonar/server/issue/index/IssueIndex.java | 1 + .../src/main/java/org/sonar/server/issue/index/IssueQueryFactory.java | 1 + 2 files changed, 2 insertions(+) (limited to 'server/sonar-webserver-es') 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()) -- cgit v1.2.3