Преглед на файлове

SONAR-14443 Deprecate 'sansTop25' param in WS

tags/8.8.0.42792
Jacek преди 3 години
родител
ревизия
eea84c91e8

+ 9
- 0
server/sonar-server-common/src/main/java/org/sonar/server/security/SecurityStandards.java Целия файл

@@ -59,6 +59,11 @@ public final class SecurityStandards {
private static final Set<String> INSECURE_CWE = new HashSet<>(asList("89", "78", "79", "434", "352", "601"));
private static final Set<String> RISKY_CWE = new HashSet<>(asList("120", "22", "494", "829", "676", "131", "134", "190"));
private static final Set<String> POROUS_CWE = new HashSet<>(asList("306", "862", "798", "311", "807", "250", "863", "732", "327", "307", "759"));

/**
* @deprecated SansTop25 report is outdated and will be removed in future versions
*/
@Deprecated
public static final Map<String, Set<String>> CWES_BY_SANS_TOP_25 = ImmutableMap.of(
SANS_TOP_25_INSECURE_INTERACTION, INSECURE_CWE,
SANS_TOP_25_RISKY_RESOURCE, RISKY_CWE,
@@ -199,6 +204,10 @@ public final class SecurityStandards {
return toOwaspTop10(standards);
}

/**
* @deprecated SansTop25 report is outdated and will be removed in future versions
*/
@Deprecated
public Set<String> getSansTop25() {
return toSansTop25(cwe);
}

+ 4
- 0
server/sonar-webserver-es/src/main/java/org/sonar/server/issue/index/IssueIndex.java Целия файл

@@ -1006,6 +1006,10 @@ public class IssueIndex {
.collect(MoreCollectors.toList(branchUuids.size()));
}

/**
* @deprecated SansTop25 report is outdated and will be removed in future versions
*/
@Deprecated
public List<SecurityStandardCategoryStatistics> getSansTop25Report(String projectUuid, boolean isViewOrApp, boolean includeCwe) {
SearchSourceBuilder request = prepareNonClosedVulnerabilitiesAndHotspotSearch(projectUuid, isViewOrApp);
Stream.of(SANS_TOP_25_INSECURE_INTERACTION, SANS_TOP_25_RISKY_RESOURCE, SANS_TOP_25_POROUS_DEFENSES)

+ 1
- 0
sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java Целия файл

@@ -84,6 +84,7 @@ public class IssuesWsParameters {
public static final String PARAM_TAGS = "tags";
public static final String PARAM_TYPES = "types";
public static final String PARAM_OWASP_TOP_10 = "owaspTop10";
@Deprecated
public static final String PARAM_SANS_TOP_25 = "sansTop25";
public static final String PARAM_CWE_TOP_25 = "cweTop25";
public static final String PARAM_SONARSOURCE_SECURITY = "sonarsourceSecurity";

Loading…
Отказ
Запис