use of com.synopsys.integration.detect.tool.signaturescanner.SignatureScannerCodeLocationResult in project synopsys-detect by blackducksoftware.
the class CalculateWaitableSignatureScanCodeLocations method calculateWaitableCodeLocations.
public SignatureScannerCodeLocationResult calculateWaitableCodeLocations(NotificationTaskRange notificationTaskRange, List<SignatureScannerReport> reports) {
WaitableCodeLocationData waitableCodeLocationData = calculateWaitable(notificationTaskRange, reports);
Set<String> nonWaitableNames = calculateNonWaitable(reports);
return new SignatureScannerCodeLocationResult(waitableCodeLocationData, nonWaitableNames);
}
use of com.synopsys.integration.detect.tool.signaturescanner.SignatureScannerCodeLocationResult in project synopsys-detect by blackducksoftware.
the class IntelligentModeStepRunner method runOnline.
// TODO: Change black duck post options to a decision and stick it in Run Data somewhere.
// TODO: Change detect tool filter to a decision and stick it in Run Data somewhere
public void runOnline(BlackDuckRunData blackDuckRunData, BdioResult bdioResult, NameVersion projectNameVersion, DetectToolFilter detectToolFilter, DockerTargetData dockerTargetData) throws OperationException {
ProjectVersionWrapper projectVersion = stepHelper.runAsGroup("Create or Locate Project", OperationType.INTERNAL, () -> new BlackDuckProjectVersionStepRunner(operationFactory).runAll(projectNameVersion, blackDuckRunData));
logger.debug("Completed project and version actions.");
logger.debug("Processing Detect Code Locations.");
CodeLocationAccumulator codeLocationAccumulator = new CodeLocationAccumulator();
stepHelper.runAsGroup("Upload Bdio", OperationType.INTERNAL, () -> uploadBdio(blackDuckRunData, bdioResult, codeLocationAccumulator, operationFactory.calculateDetectTimeout()));
logger.debug("Completed Detect Code Location processing.");
stepHelper.runToolIfIncluded(DetectTool.SIGNATURE_SCAN, "Signature Scanner", () -> {
SignatureScanStepRunner signatureScanStepRunner = new SignatureScanStepRunner(operationFactory);
SignatureScannerCodeLocationResult signatureScannerCodeLocationResult = signatureScanStepRunner.runSignatureScannerOnline(blackDuckRunData, projectNameVersion, dockerTargetData);
codeLocationAccumulator.addWaitableCodeLocations(signatureScannerCodeLocationResult.getWaitableCodeLocationData());
codeLocationAccumulator.addNonWaitableCodeLocation(signatureScannerCodeLocationResult.getNonWaitableCodeLocationData());
});
stepHelper.runToolIfIncluded(DetectTool.BINARY_SCAN, "Binary Scanner", () -> {
BinaryScanStepRunner binaryScanStepRunner = new BinaryScanStepRunner(operationFactory);
binaryScanStepRunner.runBinaryScan(dockerTargetData, projectNameVersion, blackDuckRunData).ifPresent(codeLocationAccumulator::addWaitableCodeLocations);
});
stepHelper.runToolIfIncludedWithCallbacks(DetectTool.IMPACT_ANALYSIS, "Vulnerability Impact Analysis", () -> runImpactAnalysisOnline(projectNameVersion, projectVersion, codeLocationAccumulator, blackDuckRunData.getBlackDuckServicesFactory()), operationFactory::publishImpactSuccess, operationFactory::publishImpactFailure);
stepHelper.runAsGroup("Wait for Results", OperationType.INTERNAL, () -> {
CodeLocationResults codeLocationResults = calculateCodeLocations(codeLocationAccumulator);
waitForCodeLocations(codeLocationResults.getCodeLocationWaitData(), projectNameVersion, blackDuckRunData);
});
stepHelper.runAsGroup("Black Duck Post Actions", OperationType.INTERNAL, () -> {
checkPolicy(projectVersion.getProjectVersionView(), blackDuckRunData);
riskReport(blackDuckRunData, projectVersion);
noticesReport(blackDuckRunData, projectVersion);
publishPostResults(bdioResult, projectVersion, detectToolFilter);
});
}
Aggregations