use of com.mercedesbenz.sechub.integrationtest.api.AsUser.ProjectFalsePositivesDefinition in project sechub by mercedes-benz.
the class FalsePositivesScenario3IntTest method with_sechubclient_fetch_fp_config_when_one_entry_added.
@Test
public void with_sechubclient_fetch_fp_config_when_one_entry_added() throws Exception {
/* @formatter:off */
/**
********
*/
/* prepare */
/**
********
*/
IntegrationTestJSONLocation location = IntegrationTestJSONLocation.CLIENT_JSON_SOURCESCAN_YELLOW_ZERO_WAIT;
ExecutionResult result = as(USER_1).withSecHubClient().startSynchronScanFor(project, location);
assertReportUnordered(result).finding().id(1).name("Absolute Path Traversal").isContained().hasTrafficLight(TrafficLight.YELLOW);
UUID jobUUID = result.getSechubJobUUID();
as(USER_1).startFalsePositiveDefinition(project).add(1, jobUUID).markAsFalsePositive();
/**
********
*/
/* execute */
/**
********
*/
ProjectFalsePositivesDefinition configuration = as(USER_1).withSecHubClient().getFalsePositiveConfigurationOfProject(project, location);
/**
*****
*/
/* test */
/**
*****
*/
assertTrue(configuration.isContaining(1, jobUUID));
/* @formatter:on */
}
use of com.mercedesbenz.sechub.integrationtest.api.AsUser.ProjectFalsePositivesDefinition in project sechub by mercedes-benz.
the class FalsePositivesScenario3IntTest method REST_API_direct_mark_20_false_positives_with_comments_is_accepted.
@Test
public void REST_API_direct_mark_20_false_positives_with_comments_is_accepted() throws Exception {
/* @formatter:off */
/**
********
*/
/* prepare */
/**
********
*/
IntegrationTestJSONLocation location = IntegrationTestJSONLocation.CLIENT_JSON_SOURCESCAN_YELLOW_ZERO_WAIT;
ExecutionResult result = as(USER_1).withSecHubClient().startSynchronScanFor(project, location);
UUID jobUUID = result.getSechubJobUUID();
/**
********
*/
/* execute */
/**
********
*/
ProjectFalsePositivesDefinition def = as(USER_1).startFalsePositiveDefinition(project);
int loops = 20;
for (int i = 1; i < loops; i++) {
def.add(i, jobUUID, "comment for loop:" + i);
}
def.markAsFalsePositive();
/**
*****
*/
/* test */
/**
*****
*/
ProjectFalsePositivesDefinition configuration = as(USER_1).getFalsePositiveConfigurationOfProject(project);
configuration.isContaining(loops - 1, jobUUID);
/* @formatter:on */
}
use of com.mercedesbenz.sechub.integrationtest.api.AsUser.ProjectFalsePositivesDefinition in project sechub by mercedes-benz.
the class FalsePositivesScenario3IntTest method REST_API_direct_fetch_fp_config_when_one_entry_added.
@Test
public void REST_API_direct_fetch_fp_config_when_one_entry_added() throws Exception {
/* @formatter:off */
/**
********
*/
/* prepare */
/**
********
*/
IntegrationTestJSONLocation location = IntegrationTestJSONLocation.CLIENT_JSON_SOURCESCAN_YELLOW_ZERO_WAIT;
ExecutionResult result = as(USER_1).withSecHubClient().startSynchronScanFor(project, location);
assertReportUnordered(result).finding().id(1).name("Absolute Path Traversal").isContained().hasTrafficLight(TrafficLight.YELLOW);
UUID jobUUID = result.getSechubJobUUID();
as(USER_1).startFalsePositiveDefinition(project).add(1, jobUUID).markAsFalsePositive();
/**
********
*/
/* execute */
/**
********
*/
ProjectFalsePositivesDefinition configuration = as(USER_1).getFalsePositiveConfigurationOfProject(project);
/**
*****
*/
/* test */
/**
*****
*/
assertTrue(configuration.isContaining(1, jobUUID));
/* @formatter:on */
}
Aggregations