@Test public void a_codescan_triggers_NOT_falsePositiveCodeFinder_for_fp_setting_for_webscan() { FalsePositiveMetaData metaData = addEntryAndReturnMetaData(projectConfig, ScanType.WEB_SCAN); config.setData(projectConfig.toJSON()); List<SerecoVulnerability> all = new ArrayList<>(); SerecoVulnerability v1 = addVulnerability(all,ScanType.CODE_SCAN); markerToTest.markFalsePositives(PROJECT_ID, all); verify(falsePositiveCodeFinder,never()).isFound(v1, metaData); }
public void markFalsePositives(String projectId, List<SerecoVulnerability> all){ notEmpty(projectId, "project id may not be null or empty!"); if (all==null || all.isEmpty()) { return; } ScanProjectConfig config = scanProjectConfigService.get(projectId, ScanProjectConfigID.FALSE_POSITIVE_CONFIGURATION,false); if (config==null) { return; } String data = config.getData(); FalsePositiveProjectConfiguration falsePositiveConfig = FalsePositiveProjectConfiguration.fromJSONString(data); List<FalsePositiveEntry> falsePositives = falsePositiveConfig.getFalsePositives(); for (SerecoVulnerability vulnerability: all) { handleVulnereability(falsePositives, vulnerability); } }
SerecoFalsePositiveMarker { public void markFalsePositives(String projectId, List<SerecoVulnerability> all){ notEmpty(projectId, "project id may not be null or empty!"); if (all==null || all.isEmpty()) { return; } ScanProjectConfig config = scanProjectConfigService.get(projectId, ScanProjectConfigID.FALSE_POSITIVE_CONFIGURATION,false); if (config==null) { return; } String data = config.getData(); FalsePositiveProjectConfiguration falsePositiveConfig = FalsePositiveProjectConfiguration.fromJSONString(data); List<FalsePositiveEntry> falsePositives = falsePositiveConfig.getFalsePositives(); for (SerecoVulnerability vulnerability: all) { handleVulnereability(falsePositives, vulnerability); } } }
SerecoFalsePositiveMarker { public void markFalsePositives(String projectId, List<SerecoVulnerability> all){ notEmpty(projectId, "project id may not be null or empty!"); if (all==null || all.isEmpty()) { return; } ScanProjectConfig config = scanProjectConfigService.get(projectId, ScanProjectConfigID.FALSE_POSITIVE_CONFIGURATION,false); if (config==null) { return; } String data = config.getData(); FalsePositiveProjectConfiguration falsePositiveConfig = FalsePositiveProjectConfiguration.fromJSONString(data); List<FalsePositiveEntry> falsePositives = falsePositiveConfig.getFalsePositives(); for (SerecoVulnerability vulnerability: all) { handleVulnereability(falsePositives, vulnerability); } }  }
SerecoFalsePositiveMarker { public void markFalsePositives(String projectId, List<SerecoVulnerability> all){ notEmpty(projectId, "project id may not be null or empty!"); if (all==null || all.isEmpty()) { return; } ScanProjectConfig config = scanProjectConfigService.get(projectId, ScanProjectConfigID.FALSE_POSITIVE_CONFIGURATION,false); if (config==null) { return; } String data = config.getData(); FalsePositiveProjectConfiguration falsePositiveConfig = FalsePositiveProjectConfiguration.fromJSONString(data); List<FalsePositiveEntry> falsePositives = falsePositiveConfig.getFalsePositives(); for (SerecoVulnerability vulnerability: all) { handleVulnereability(falsePositives, vulnerability); } }  void markFalsePositives(String projectId, List<SerecoVulnerability> all); }
SerecoFalsePositiveMarker { public void markFalsePositives(String projectId, List<SerecoVulnerability> all){ notEmpty(projectId, "project id may not be null or empty!"); if (all==null || all.isEmpty()) { return; } ScanProjectConfig config = scanProjectConfigService.get(projectId, ScanProjectConfigID.FALSE_POSITIVE_CONFIGURATION,false); if (config==null) { return; } String data = config.getData(); FalsePositiveProjectConfiguration falsePositiveConfig = FalsePositiveProjectConfiguration.fromJSONString(data); List<FalsePositiveEntry> falsePositives = falsePositiveConfig.getFalsePositives(); for (SerecoVulnerability vulnerability: all) { handleVulnereability(falsePositives, vulnerability); } }  void markFalsePositives(String projectId, List<SerecoVulnerability> all);  }