private final OptionalInt vulnerabiliyRating;
private final long inReviewSecurityHotspots;
private final long toReviewSecurityHotspots;
- private final long wontFixSecurityHotspots;
+ private final long reviewedSecurityHotspots;
private final List<SecurityStandardCategoryStatistics> children;
private long activeRules;
private long totalRules;
public SecurityStandardCategoryStatistics(String category, long vulnerabilities, OptionalInt vulnerabiliyRating, long inReviewSecurityHotspots, long toReviewSecurityHotspots,
- long wontFixSecurityHotspots, @Nullable List<SecurityStandardCategoryStatistics> children) {
+ long reviewedSecurityHotspots, @Nullable List<SecurityStandardCategoryStatistics> children) {
this.category = category;
this.vulnerabilities = vulnerabilities;
this.vulnerabiliyRating = vulnerabiliyRating;
this.inReviewSecurityHotspots = inReviewSecurityHotspots;
this.toReviewSecurityHotspots = toReviewSecurityHotspots;
- this.wontFixSecurityHotspots = wontFixSecurityHotspots;
+ this.reviewedSecurityHotspots = reviewedSecurityHotspots;
this.children = children;
}
return toReviewSecurityHotspots;
}
- public long getWontFixSecurityHotspots() {
- return wontFixSecurityHotspots;
+ public long getReviewedSecurityHotspots() {
+ return reviewedSecurityHotspots;
}
public List<SecurityStandardCategoryStatistics> getChildren() {
return activeRules;
}
- public long getTotalRules() {
- return totalRules;
- }
-
public SecurityStandardCategoryStatistics setActiveRules(long activeRules) {
this.activeRules = activeRules;
return this;
}
+ public long getTotalRules() {
+ return totalRules;
+ }
+
public SecurityStandardCategoryStatistics setTotalRules(long totalRules) {
this.totalRules = totalRules;
return this;
import static org.sonar.api.issue.Issue.STATUS_OPEN;
import static org.sonar.api.issue.Issue.STATUS_REOPENED;
import static org.sonar.api.issue.Issue.STATUS_RESOLVED;
+import static org.sonar.api.issue.Issue.STATUS_REVIEWED;
import static org.sonar.api.issue.Issue.STATUS_TO_REVIEW;
@ServerSide
@Override
public void start() {
StateMachine.Builder builder = StateMachine.builder()
- .states(STATUS_OPEN, STATUS_CONFIRMED, STATUS_REOPENED, STATUS_RESOLVED, STATUS_CLOSED, STATUS_TO_REVIEW, STATUS_IN_REVIEW);
+ .states(STATUS_OPEN, STATUS_CONFIRMED, STATUS_REOPENED, STATUS_RESOLVED, STATUS_CLOSED,
+ STATUS_TO_REVIEW, STATUS_IN_REVIEW, STATUS_REVIEWED);
buildManualTransitions(builder);
buildAutomaticTransitions(builder);
buildSecurityHotspotTransitions(builder);
.conditions(new HasType(RuleType.SECURITY_HOTSPOT))
.requiredProjectPermission(UserRole.SECURITYHOTSPOT_ADMIN)
.build())
+ .transition(Transition.builder(DefaultTransitions.RESOLVE_AS_REVIEWED)
+ .from(STATUS_TO_REVIEW).to(STATUS_REVIEWED)
+ .conditions(new HasType(RuleType.SECURITY_HOTSPOT))
+ .functions(new SetResolution(RESOLUTION_FIXED))
+ .requiredProjectPermission(UserRole.SECURITYHOTSPOT_ADMIN)
+ .build())
+ .transition(Transition.builder(DefaultTransitions.RESOLVE_AS_REVIEWED)
+ .from(STATUS_IN_REVIEW).to(STATUS_REVIEWED)
+ .conditions(new HasType(RuleType.SECURITY_HOTSPOT))
+ .functions(new SetResolution(RESOLUTION_FIXED))
+ .requiredProjectPermission(UserRole.SECURITYHOTSPOT_ADMIN)
+ .build())
+ // all transitions below have to be removed by the end of the MMF-1635
.transition(Transition.builder(DefaultTransitions.DETECT)
.from(STATUS_TO_REVIEW).to(STATUS_OPEN)
.conditions(new HasType(RuleType.SECURITY_HOTSPOT))
.functions(SetClosed.INSTANCE, SetCloseDate.INSTANCE)
.automatic()
.build())
+ .transition(Transition.builder(AUTOMATIC_CLOSE_TRANSITION)
+ .from(STATUS_REVIEWED).to(STATUS_CLOSED)
+ .conditions(IsBeingClosed.INSTANCE, new HasType(RuleType.SECURITY_HOTSPOT))
+ .functions(SetClosed.INSTANCE, SetCloseDate.INSTANCE)
+ .automatic()
+ .build())
// Reopen issues that are marked as resolved but that are still alive.
.transition(Transition.builder("automaticreopen")
import org.junit.Test;
import org.junit.runner.RunWith;
import org.sonar.api.issue.DefaultTransitions;
+import org.sonar.api.issue.Issue;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rules.RuleType;
import org.sonar.core.issue.DefaultIssue;
import static org.sonar.api.issue.Issue.STATUS_CLOSED;
import static org.sonar.api.issue.Issue.STATUS_IN_REVIEW;
import static org.sonar.api.issue.Issue.STATUS_RESOLVED;
+import static org.sonar.api.issue.Issue.STATUS_REVIEWED;
import static org.sonar.api.issue.Issue.STATUS_TO_REVIEW;
import static org.sonar.db.rule.RuleTesting.XOO_X1;
List<Transition> transitions = underTest.outTransitions(issue);
- assertThat(keys(transitions)).containsOnly("setinreview", "detect", "clear");
+ assertThat(keys(transitions)).containsOnly("setinreview", "detect", "clear", "resolveasreviewed");
}
@Test
List<Transition> transitions = underTest.outTransitions(issue);
- assertThat(keys(transitions)).isEmpty();
+ assertThat(keys(transitions)).containsOnly("resolveasreviewed");
}
@Test
assertThat(issue.resolution()).isNull();
}
+ @Test
+ public void resolve_as_reviewed_from_to_review() {
+ underTest.start();
+ DefaultIssue issue = new DefaultIssue()
+ .setType(RuleType.SECURITY_HOTSPOT)
+ .setIsFromHotspot(true)
+ .setStatus(STATUS_TO_REVIEW);
+
+ boolean result = underTest.doManualTransition(issue, DefaultTransitions.RESOLVE_AS_REVIEWED, IssueChangeContext.createUser(new Date(), "USER1"));
+
+ assertThat(result).isTrue();
+ assertThat(issue.getStatus()).isEqualTo(STATUS_REVIEWED);
+ assertThat(issue.resolution()).isEqualTo(RESOLUTION_FIXED);
+ }
+
+ @Test
+ public void resolve_as_reviewed_from_in_review() {
+ underTest.start();
+ DefaultIssue issue = new DefaultIssue()
+ .setType(RuleType.SECURITY_HOTSPOT)
+ .setIsFromHotspot(true)
+ .setStatus(STATUS_IN_REVIEW);
+
+ boolean result = underTest.doManualTransition(issue, DefaultTransitions.RESOLVE_AS_REVIEWED, IssueChangeContext.createUser(new Date(), "USER1"));
+
+ assertThat(result).isTrue();
+ assertThat(issue.getStatus()).isEqualTo(STATUS_REVIEWED);
+ assertThat(issue.resolution()).isEqualTo(RESOLUTION_FIXED);
+
+ }
+
@Test
public void automatically_close_resolved_security_hotspots_in_status_to_review() {
underTest.start();
assertThat(issue.updateDate()).isEqualTo(DateUtils.truncate(now, Calendar.SECOND));
}
+ @Test
+ public void automatically_close_resolved_security_hotspots_in_status_reviewed() {
+ underTest.start();
+ DefaultIssue issue = new DefaultIssue()
+ .setType(RuleType.SECURITY_HOTSPOT)
+ .setResolution(RESOLUTION_FIXED)
+ .setStatus(STATUS_REVIEWED)
+ .setNew(false)
+ .setBeingClosed(true);
+ Date now = new Date();
+
+ underTest.doAutomaticTransition(issue, IssueChangeContext.createScan(now));
+
+ assertThat(issue.resolution()).isEqualTo(RESOLUTION_FIXED);
+ assertThat(issue.status()).isEqualTo(STATUS_CLOSED);
+ assertThat(issue.closeDate()).isNotNull();
+ assertThat(issue.updateDate()).isEqualTo(DateUtils.truncate(now, Calendar.SECOND));
+ }
+
@Test
@UseDataProvider("allStatusesLeadingToClosed")
public void do_not_automatically_reopen_closed_issues_of_security_hotspots(String previousStatus) {
import static org.sonar.api.issue.Issue.STATUS_OPEN;
import static org.sonar.api.issue.Issue.STATUS_REOPENED;
import static org.sonar.api.issue.Issue.STATUS_RESOLVED;
+import static org.sonar.api.issue.Issue.STATUS_REVIEWED;
import static org.sonar.api.issue.Issue.STATUS_TO_REVIEW;
@RunWith(DataProviderRunner.class)
// issues statuses
expectedStatus.addAll(Arrays.asList(STATUS_OPEN, STATUS_CONFIRMED, STATUS_REOPENED, STATUS_RESOLVED, STATUS_CLOSED));
// hostpots statuses
- expectedStatus.addAll(Arrays.asList(STATUS_TO_REVIEW, STATUS_IN_REVIEW));
+ expectedStatus.addAll(Arrays.asList(STATUS_TO_REVIEW, STATUS_IN_REVIEW, STATUS_REVIEWED));
assertThat(underTest.statusKeys()).containsExactlyInAnyOrder(expectedStatus.toArray(new String[]{}));
}
private static final String AGG_SEVERITIES = "severities";
private static final String AGG_TO_REVIEW_SECURITY_HOTSPOTS = "toReviewSecurityHotspots";
private static final String AGG_IN_REVIEW_SECURITY_HOTSPOTS = "inReviewSecurityHotspots";
- private static final String AGG_WONT_FIX_SECURITY_HOTSPOTS = "wontFixSecurityHotspots";
+ private static final String AGG_REVIEWED_SECURITY_HOTSPOTS = "reviewedSecurityHotspots";
private static final String AGG_CWES = "cwes";
private static final BoolQueryBuilder NON_RESOLVED_VULNERABILITIES_FILTER = boolQuery()
.filter(termQuery(FIELD_ISSUE_TYPE, VULNERABILITY.name()))
.filter(termQuery(FIELD_ISSUE_TYPE, SECURITY_HOTSPOT.name()))
.filter(termQuery(FIELD_ISSUE_STATUS, Issue.STATUS_TO_REVIEW))
.mustNot(existsQuery(FIELD_ISSUE_RESOLUTION));
- private static final BoolQueryBuilder WONT_FIX_HOTSPOTS_FILTER = boolQuery()
+ private static final BoolQueryBuilder REVIEWED_HOTSPOTS_FILTER = boolQuery()
.filter(termQuery(FIELD_ISSUE_TYPE, SECURITY_HOTSPOT.name()))
- .filter(termQuery(FIELD_ISSUE_STATUS, Issue.STATUS_RESOLVED))
- .filter(termQuery(FIELD_ISSUE_RESOLUTION, Issue.RESOLUTION_WONT_FIX));
+ .filter(termQuery(FIELD_ISSUE_STATUS, Issue.STATUS_REVIEWED))
+ .filter(termQuery(FIELD_ISSUE_RESOLUTION, Issue.RESOLUTION_FIXED));
public enum Facet {
SEVERITIES(PARAM_SEVERITIES, FIELD_ISSUE_SEVERITY, Severity.ALL.size()),
.getValue();
long inReviewSecurityHotspots = ((InternalValueCount) ((InternalFilter) categoryBucket.getAggregations().get(AGG_IN_REVIEW_SECURITY_HOTSPOTS)).getAggregations().get(AGG_COUNT))
.getValue();
- long wontFixSecurityHotspots = ((InternalValueCount) ((InternalFilter) categoryBucket.getAggregations().get(AGG_WONT_FIX_SECURITY_HOTSPOTS)).getAggregations().get(AGG_COUNT))
+ long reviewedSecurityHotspots = ((InternalValueCount) ((InternalFilter) categoryBucket.getAggregations().get(AGG_REVIEWED_SECURITY_HOTSPOTS)).getAggregations().get(AGG_COUNT))
.getValue();
return new SecurityStandardCategoryStatistics(categoryName, vulnerabilities, severityRating, inReviewSecurityHotspots, toReviewSecurityHotspots,
- wontFixSecurityHotspots, children);
+ reviewedSecurityHotspots, children);
}
private static AggregationBuilder addSecurityReportSubAggregations(AggregationBuilder categoriesAggs, boolean includeCwe, Optional<Set<String>> cwesInCategory) {
.subAggregation(AggregationBuilders.filter(AGG_IN_REVIEW_SECURITY_HOTSPOTS, IN_REVIEW_HOTSPOTS_FILTER)
.subAggregation(
AggregationBuilders.count(AGG_COUNT).field(FIELD_ISSUE_KEY)))
- .subAggregation(AggregationBuilders.filter(AGG_WONT_FIX_SECURITY_HOTSPOTS, WONT_FIX_HOTSPOTS_FILTER)
+ .subAggregation(AggregationBuilders.filter(AGG_REVIEWED_SECURITY_HOTSPOTS, REVIEWED_HOTSPOTS_FILTER)
.subAggregation(
AggregationBuilders.count(AGG_COUNT).field(FIELD_ISSUE_KEY)));
}
.should(NON_RESOLVED_VULNERABILITIES_FILTER)
.should(TO_REVIEW_HOTSPOTS_FILTER)
.should(IN_REVIEW_HOTSPOTS_FILTER)
- .should(WONT_FIX_HOTSPOTS_FILTER)
+ .should(REVIEWED_HOTSPOTS_FILTER)
.minimumShouldMatch(1))
.setSize(0);
}
import org.sonar.server.user.UserSession;
import static java.lang.String.format;
+import static org.sonar.api.issue.DefaultTransitions.RESOLVE_AS_REVIEWED;
import static org.sonar.api.issue.DefaultTransitions.SET_AS_IN_REVIEW;
import static org.sonarqube.ws.client.issue.IssuesWsParameters.ACTION_DO_TRANSITION;
import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_ISSUE;
"The transitions involving security hotspots require the permission 'Administer Security Hotspot'.")
.setSince("3.6")
.setChangelog(
- new Change("7.8", format("added transition '%s' for security hotspots ", SET_AS_IN_REVIEW)),
+ new Change("7.8", format("added transitions '%s' and %s for security hotspots ", SET_AS_IN_REVIEW, RESOLVE_AS_REVIEWED)),
new Change("7.3", "added transitions for security hotspots"),
new Change("6.5", "the database ids of the components are removed from the response"),
new Change("6.5", "the response field components.uuid is deprecated. Use components.key instead."))
RESOLVED_WF,
RESOLVED_FIXED,
TO_REVIEW,
- IN_REVIEW;
+ IN_REVIEW,
+ REVIEWED;
protected static final Set<Status> CLOSED_STATUSES = EnumSet.of(CONFIRMED, RESOLVED_FIXED, RESOLVED_FP, RESOLVED_WF);
}
return QGChangeEventListener.Status.TO_REVIEW;
case Issue.STATUS_IN_REVIEW:
return QGChangeEventListener.Status.IN_REVIEW;
+ case Issue.STATUS_REVIEWED:
+ return QGChangeEventListener.Status.REVIEWED;
case Issue.STATUS_RESOLVED:
return statusOfResolved(issue);
default:
assertThat(cweByOwasp.get("a1")).extracting(SecurityStandardCategoryStatistics::getCategory, SecurityStandardCategoryStatistics::getVulnerabilities,
SecurityStandardCategoryStatistics::getVulnerabiliyRating, SecurityStandardCategoryStatistics::getToReviewSecurityHotspots,
- SecurityStandardCategoryStatistics::getInReviewSecurityHotspots, SecurityStandardCategoryStatistics::getWontFixSecurityHotspots)
+ SecurityStandardCategoryStatistics::getInReviewSecurityHotspots, SecurityStandardCategoryStatistics::getReviewedSecurityHotspots)
.containsExactlyInAnyOrder(
tuple("123", 1L /* openvul1 */, OptionalInt.of(3)/* MAJOR = C */, 0L, 0L, 0L),
tuple("456", 1L /* openvul1 */, OptionalInt.of(3)/* MAJOR = C */, 0L, 0L, 0L),
tuple("unknown", 0L, OptionalInt.empty(), 1L /* openhotspot1 */, 0L, 0L));
assertThat(cweByOwasp.get("a3")).extracting(SecurityStandardCategoryStatistics::getCategory, SecurityStandardCategoryStatistics::getVulnerabilities,
SecurityStandardCategoryStatistics::getVulnerabiliyRating, SecurityStandardCategoryStatistics::getToReviewSecurityHotspots,
- SecurityStandardCategoryStatistics::getInReviewSecurityHotspots, SecurityStandardCategoryStatistics::getWontFixSecurityHotspots)
+ SecurityStandardCategoryStatistics::getInReviewSecurityHotspots, SecurityStandardCategoryStatistics::getReviewedSecurityHotspots)
.containsExactlyInAnyOrder(
tuple("123", 2L /* openvul1, openvul2 */, OptionalInt.of(3)/* MAJOR = C */, 0L, 0L, 0L),
tuple("456", 1L /* openvul1 */, OptionalInt.of(3)/* MAJOR = C */, 0L, 1L /* toReviewHotspot */, 0L),
newDoc("toreviewhotspot1", project).setOwaspTop10(asList("a1", "a3")).setCwe(singletonList(UNKNOWN_STANDARD)).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_TO_REVIEW),
newDoc("toreviewhotspot2", project).setOwaspTop10(asList("a3", "a6")).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_TO_REVIEW),
newDoc("inreviewhotspot", project).setOwaspTop10(asList("a5", "a3")).setCwe(asList("456")).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_IN_REVIEW),
- newDoc("WFHotspot", project).setOwaspTop10(asList("a3", "a8")).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_RESOLVED).setResolution(Issue.RESOLUTION_WONT_FIX),
+ newDoc("reviewedHotspot", project).setOwaspTop10(asList("a3", "a8")).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_REVIEWED).setResolution(Issue.RESOLUTION_FIXED),
newDoc("notowasphotspot", project).setOwaspTop10(singletonList(UNKNOWN_STANDARD)).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_TO_REVIEW));
List<SecurityStandardCategoryStatistics> owaspTop10Report = underTest.getOwaspTop10Report(project.uuid(), false, includeCwe);
assertThat(owaspTop10Report)
.extracting(SecurityStandardCategoryStatistics::getCategory, SecurityStandardCategoryStatistics::getVulnerabilities,
SecurityStandardCategoryStatistics::getVulnerabiliyRating, SecurityStandardCategoryStatistics::getToReviewSecurityHotspots,
- SecurityStandardCategoryStatistics::getInReviewSecurityHotspots, SecurityStandardCategoryStatistics::getWontFixSecurityHotspots)
+ SecurityStandardCategoryStatistics::getInReviewSecurityHotspots, SecurityStandardCategoryStatistics::getReviewedSecurityHotspots)
.containsExactlyInAnyOrder(
tuple("a1", 1L /* openvul1 */, OptionalInt.of(3)/* MAJOR = C */, 1L /* toreviewhotspot1 */, 0L, 0L),
tuple("a2", 0L, OptionalInt.empty(), 0L, 0L, 0L),
- tuple("a3", 2L /* openvul1,openvul2 */, OptionalInt.of(3)/* MAJOR = C */, 2L/* toreviewhotspot1,toreviewhotspot2 */, 1L /* inReviewHotspot */, 1L /* WFHotspot */),
+ tuple("a3", 2L /* openvul1,openvul2 */, OptionalInt.of(3)/* MAJOR = C */, 2L/* toreviewhotspot1,toreviewhotspot2 */, 1L /* inReviewHotspot */, 1L /* reviewedHotspot */),
tuple("a4", 0L, OptionalInt.empty(), 0L, 0L, 0L),
tuple("a5", 0L, OptionalInt.empty(), 0L, 1L/* inReviewHotspot */, 0L),
tuple("a6", 1L /* openvul2 */, OptionalInt.of(2) /* MINOR = B */, 1L /* toreviewhotspot2 */, 0L, 0L),
tuple("a7", 0L, OptionalInt.empty(), 0L, 0L, 0L),
- tuple("a8", 0L, OptionalInt.empty(), 0L, 0L, 1L /* WFHotspot */),
+ tuple("a8", 0L, OptionalInt.empty(), 0L, 0L, 1L /* reviewedHotspot */),
tuple("a9", 0L, OptionalInt.empty(), 0L, 0L, 0L),
tuple("a10", 0L, OptionalInt.empty(), 0L, 0L, 0L),
tuple("unknown", 1L /* notowaspvul */, OptionalInt.of(4) /* CRITICAL = D */, 1L /* notowasphotspot */, 0L, 0L));
newDoc("toreviewhotspot1", project).setSansTop25(asList(SANS_TOP_25_INSECURE_INTERACTION, SANS_TOP_25_RISKY_RESOURCE)).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_TO_REVIEW),
newDoc("toreviewhotspot2", project).setSansTop25(asList(SANS_TOP_25_RISKY_RESOURCE, SANS_TOP_25_POROUS_DEFENSES)).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_TO_REVIEW),
newDoc("inReviewHotspot", project).setSansTop25(asList(SANS_TOP_25_RISKY_RESOURCE)).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_IN_REVIEW),
- newDoc("WFHotspot", project).setSansTop25(asList(SANS_TOP_25_RISKY_RESOURCE)).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_RESOLVED).setResolution(Issue.RESOLUTION_WONT_FIX),
+ newDoc("reviewedHotspot", project).setSansTop25(asList(SANS_TOP_25_RISKY_RESOURCE)).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_REVIEWED).setResolution(Issue.RESOLUTION_FIXED),
newDoc("notowasphotspot", project).setSansTop25(singletonList(UNKNOWN_STANDARD)).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_TO_REVIEW));
List<SecurityStandardCategoryStatistics> sansTop25Report = underTest.getSansTop25Report(project.uuid(), false, false);
assertThat(sansTop25Report)
.extracting(SecurityStandardCategoryStatistics::getCategory, SecurityStandardCategoryStatistics::getVulnerabilities,
SecurityStandardCategoryStatistics::getVulnerabiliyRating, SecurityStandardCategoryStatistics::getToReviewSecurityHotspots,
- SecurityStandardCategoryStatistics::getInReviewSecurityHotspots, SecurityStandardCategoryStatistics::getWontFixSecurityHotspots)
+ SecurityStandardCategoryStatistics::getInReviewSecurityHotspots, SecurityStandardCategoryStatistics::getReviewedSecurityHotspots)
.containsExactlyInAnyOrder(
tuple(SANS_TOP_25_INSECURE_INTERACTION, 1L /* openvul1 */, OptionalInt.of(3)/* MAJOR = C */, 1L /* toreviewhotspot1 */, 0L, 0L),
- tuple(SANS_TOP_25_RISKY_RESOURCE, 2L /* openvul1,openvul2 */, OptionalInt.of(3)/* MAJOR = C */, 2L/* toreviewhotspot1,toreviewhotspot2 */, 1L /* inReviewHotspot */,1L /* WFHotspot */),
+ tuple(SANS_TOP_25_RISKY_RESOURCE, 2L /* openvul1,openvul2 */, OptionalInt.of(3)/* MAJOR = C */, 2L/* toreviewhotspot1,toreviewhotspot2 */, 1L /* inReviewHotspot */,1L /* reviewedHotspot */),
tuple(SANS_TOP_25_POROUS_DEFENSES, 1L /* openvul2 */, OptionalInt.of(2)/* MINOR = B */, 1L/* openhotspot2 */, 0L, 0L));
assertThat(sansTop25Report).allMatch(category -> category.getChildren().isEmpty());
newDoc("toreviewhotspot1", project1).setSansTop25(asList(SANS_TOP_25_INSECURE_INTERACTION, SANS_TOP_25_RISKY_RESOURCE)).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_TO_REVIEW),
newDoc("toreviewhotspot2", project2).setSansTop25(asList(SANS_TOP_25_RISKY_RESOURCE, SANS_TOP_25_POROUS_DEFENSES)).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_TO_REVIEW),
newDoc("inReviewHotspot", project1).setSansTop25(asList(SANS_TOP_25_RISKY_RESOURCE)).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_IN_REVIEW),
- newDoc("WFHotspot", project2).setSansTop25(asList(SANS_TOP_25_RISKY_RESOURCE)).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_RESOLVED).setResolution(Issue.RESOLUTION_WONT_FIX),
+ newDoc("reviewedHotspot", project2).setSansTop25(asList(SANS_TOP_25_RISKY_RESOURCE)).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_REVIEWED).setResolution(Issue.RESOLUTION_FIXED),
newDoc("notowasphotspot", project1).setSansTop25(singletonList(UNKNOWN_STANDARD)).setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_TO_REVIEW));
indexView(portfolio1.uuid(), singletonList(project1.uuid()));
assertThat(sansTop25Report)
.extracting(SecurityStandardCategoryStatistics::getCategory, SecurityStandardCategoryStatistics::getVulnerabilities,
SecurityStandardCategoryStatistics::getVulnerabiliyRating, SecurityStandardCategoryStatistics::getToReviewSecurityHotspots,
- SecurityStandardCategoryStatistics::getInReviewSecurityHotspots, SecurityStandardCategoryStatistics::getWontFixSecurityHotspots)
+ SecurityStandardCategoryStatistics::getInReviewSecurityHotspots, SecurityStandardCategoryStatistics::getReviewedSecurityHotspots)
.containsExactlyInAnyOrder(
tuple(SANS_TOP_25_INSECURE_INTERACTION, 1L /* openvul1 */, OptionalInt.of(3)/* MAJOR = C */, 1L /* toreviewhotspot1 */, 0L, 0L),
tuple(SANS_TOP_25_RISKY_RESOURCE, 1L /* openvul1 */, OptionalInt.of(3)/* MAJOR = C */, 1L/* toreviewhotspot1 */, 1L /* inReviewHotspot */, 0L),
.isEqualTo(QGChangeEventListener.Status.TO_REVIEW);
assertThat(ChangedIssueImpl.statusOf(new DefaultIssue().setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_IN_REVIEW)))
.isEqualTo(QGChangeEventListener.Status.IN_REVIEW);
+ assertThat(ChangedIssueImpl.statusOf(new DefaultIssue().setType(RuleType.SECURITY_HOTSPOT).setStatus(Issue.STATUS_REVIEWED)))
+ .isEqualTo(QGChangeEventListener.Status.REVIEWED);
}
private void verifyListenerCalled(QGChangeEventListener listener, QGChangeEvent changeEvent, DefaultIssue... issues) {
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 1,
"totalRules": 1
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 1,
"totalRules": 1
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 1
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 1,
"totalRules": 2
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 1,
"totalRules": 1
"vulnerabilityRating": 3,
"inReviewSecurityHotspots": 1,
"toReviewSecurityHotspots": 1,
- "wontFixSecurityHotspots": 1,
+ "resolvedSecurityHotspots": 1,
"distribution": [],
"activeRules": 1,
"totalRules": 1
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 1
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 1,
"totalRules": 2
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 1
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 1,
"totalRules": 1
"vulnerabilityRating": 3,
"inReviewSecurityHotspots": 1,
"toReviewSecurityHotspots": 1,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [
{
"cwe": "89",
"vulnerabilityRating": 3,
"inReviewSecurityHotspots": 1,
"toReviewSecurityHotspots": 1,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"activeRules": 1,
"totalRules": 1
}
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilityRating": 3,
"inReviewSecurityHotspots": 1,
"toReviewSecurityHotspots": 1,
- "wontFixSecurityHotspots": 1,
+ "resolvedSecurityHotspots": 1,
"distribution": [],
"activeRules": 1,
"totalRules": 1
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 1,
"totalRules": 1
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 1,
"totalRules": 1
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilityRating": 3,
"inReviewSecurityHotspots": 1,
"toReviewSecurityHotspots": 1,
- "wontFixSecurityHotspots": 1,
+ "resolvedSecurityHotspots": 1,
"distribution": [
{
"cwe": "89",
"vulnerabilityRating": 3,
"inReviewSecurityHotspots": 1,
"toReviewSecurityHotspots": 1,
- "wontFixSecurityHotspots": 1
+ "resolvedSecurityHotspots": 1
}
]
},
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
},
{
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": []
}
]
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilityRating": 3,
"inReviewSecurityHotspots": 1,
"toReviewSecurityHotspots": 1,
- "wontFixSecurityHotspots": 1,
+ "resolvedSecurityHotspots": 1,
"distribution": [
{
"cwe": "89",
"vulnerabilityRating": 3,
"inReviewSecurityHotspots": 1,
"toReviewSecurityHotspots": 1,
- "wontFixSecurityHotspots": 1,
+ "resolvedSecurityHotspots": 1,
"activeRules": 1,
"totalRules": 1
}
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 1,
"totalRules": 1
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 1,
"totalRules": 1
"vulnerabilities": 0,
"inReviewSecurityHotspots": 0,
"toReviewSecurityHotspots": 0,
- "wontFixSecurityHotspots": 0,
+ "resolvedSecurityHotspots": 0,
"distribution": [],
"activeRules": 0,
"totalRules": 0
*/
String SET_AS_IN_REVIEW = "setinreview";
+ /**
+ * @since 7.8
+ */
+ String RESOLVE_AS_REVIEWED = "resolveasreviewed";
+
/**
* @since 4.4
*/
List<String> ALL = unmodifiableList(asList(CONFIRM, UNCONFIRM, REOPEN, RESOLVE, FALSE_POSITIVE, WONT_FIX, CLOSE,
- DETECT, DISMISS, REJECT, SET_AS_IN_REVIEW, ACCEPT, CLEAR, REOPEN_HOTSPOT));
+ DETECT, DISMISS, REJECT, SET_AS_IN_REVIEW, ACCEPT, CLEAR, REOPEN_HOTSPOT, RESOLVE_AS_REVIEWED));
}
*/
String STATUS_IN_REVIEW = "INREVIEW";
+ /**
+ * @since 7.8
+ */
+ String STATUS_REVIEWED = "REVIEWED";
+
/**
* Return all available statuses
*
optional int64 vulnerabilityRating = 3;
optional int64 inReviewSecurityHotspots = 4;
optional int64 toReviewSecurityHotspots = 5;
- optional int64 wontFixSecurityHotspots = 6;
+ optional int64 resolvedSecurityHotspots = 6;
repeated CweStatistics distribution = 7;
optional int64 activeRules = 8;
optional int64 totalRules = 9;
optional int64 vulnerabilityRating = 3;
optional int64 inReviewSecurityHotspots = 4;
optional int64 toReviewSecurityHotspots = 5;
- optional int64 wontFixSecurityHotspots = 6;
+ optional int64 resolvedSecurityHotspots = 6;
optional int64 activeRules = 7;
optional int64 totalRules = 8;
}