use of com.mercedesbenz.sechub.domain.scan.project.FalsePositiveMetaData in project sechub by mercedes-benz.
the class SerecoFalsePositiveMarkerTest method a_codescan_triggers_falsePositiveFinder_for_fp_setting_for_codescan.
@Test
public void a_codescan_triggers_falsePositiveFinder_for_fp_setting_for_codescan() {
/* prepare */
FalsePositiveMetaData metaData = addEntryAndReturnMetaData(projectConfig, ScanType.CODE_SCAN);
config.setData(projectConfig.toJSON());
List<SerecoVulnerability> all = new ArrayList<>();
SerecoVulnerability v1 = addVulnerability(all, ScanType.CODE_SCAN);
/* execute */
markerToTest.markFalsePositives(PROJECT_ID, all);
/* test */
verify(falsePositiveFinder).isFound(v1, metaData);
}
use of com.mercedesbenz.sechub.domain.scan.project.FalsePositiveMetaData in project sechub by mercedes-benz.
the class SerecoFalsePositiveMarkerTest method a_webscan_triggers_falsePositiveFinder_for_fp_setting_for_webscan.
@Test
public void a_webscan_triggers_falsePositiveFinder_for_fp_setting_for_webscan() {
/* prepare */
FalsePositiveMetaData metaData = addEntryAndReturnMetaData(projectConfig, ScanType.WEB_SCAN);
config.setData(projectConfig.toJSON());
List<SerecoVulnerability> all = new ArrayList<>();
SerecoVulnerability v1 = addVulnerability(all, ScanType.WEB_SCAN);
/* execute */
markerToTest.markFalsePositives(PROJECT_ID, all);
/* test */
verify(falsePositiveFinder).isFound(v1, metaData);
}
use of com.mercedesbenz.sechub.domain.scan.project.FalsePositiveMetaData in project sechub by mercedes-benz.
the class SerecoFalsePositiveWebScanStrategyTest method createValidTestFalsePositiveMetaData.
private FalsePositiveMetaData createValidTestFalsePositiveMetaData() {
FalsePositiveMetaData metaData = new FalsePositiveMetaData();
metaData.setCweId(4711);
metaData.setScanType(ScanType.WEB_SCAN);
FalsePositiveWebMetaData web = new FalsePositiveWebMetaData();
metaData.setWeb(web);
FalsePositiveWebRequestMetaData metaDataWebRequest = web.getRequest();
metaDataWebRequest.setAttackVector(ATTACK_VECTOR1);
metaDataWebRequest.setMethod(METHOD1);
metaDataWebRequest.setProtocol("protocol1");
metaDataWebRequest.setTarget(TARGET1);
metaDataWebRequest.setVersion("version1");
FalsePositiveWebResponseMetaData metaDataWebResponse = web.getResponse();
metaDataWebResponse.setEvidence(EVIDENCE1);
return metaData;
}
Aggregations