use of com.synopsys.integration.blackduck.service.model.NotificationTaskRange in project hub-detect by blackducksoftware.
the class BlackDuckBinaryScannerTool method performBinaryScanActions.
public BinaryScanToolResult performBinaryScanActions(final NameVersion projectNameVersion) throws DetectUserFriendlyException {
if (StringUtils.isNotBlank(detectConfiguration.getProperty(DetectProperty.DETECT_BINARY_SCAN_FILE, PropertyAuthority.None))) {
final String prefix = detectConfiguration.getProperty(DetectProperty.DETECT_PROJECT_CODELOCATION_PREFIX, PropertyAuthority.None);
final String suffix = detectConfiguration.getProperty(DetectProperty.DETECT_PROJECT_CODELOCATION_SUFFIX, PropertyAuthority.None);
final File file = new File(detectConfiguration.getProperty(DetectProperty.DETECT_BINARY_SCAN_FILE, PropertyAuthority.None));
NotificationTaskRange taskRange = calculateTaskRange();
Set<String> codeLocationNames = uploadBinaryScanFile(blackDuckServicesFactory.createBinaryScannerService(), file, projectNameVersion.getName(), projectNameVersion.getVersion(), prefix, suffix);
return new BinaryScanToolResult(taskRange, codeLocationNames, true);
} else {
logger.debug("No binary scan path was provided, so binary scan will not occur.");
return new BinaryScanToolResult(null, null, false);
}
}
use of com.synopsys.integration.blackduck.service.model.NotificationTaskRange in project hub-detect by blackducksoftware.
the class OnlineBlackDuckSignatureScanner method performOnlineScan.
public CodeLocationCreationData<ScanBatchOutput> performOnlineScan(NameVersion projectNameVersion, File installDirectory, File dockerTarFile) throws InterruptedException, IntegrationException, DetectUserFriendlyException, IOException {
NotificationTaskRange notificationTaskRange = codeLocationCreationService.calculateCodeLocationRange();
ScanBatchOutput scanBatchOutput = performScanActions(projectNameVersion, installDirectory, dockerTarFile);
CodeLocationCreationData<ScanBatchOutput> creationData = new CodeLocationCreationData<>(notificationTaskRange, scanBatchOutput);
return creationData;
}
Aggregations