Search in sources :

Example 1 with ScanBatch

use of com.synopsys.integration.blackduck.codelocation.signaturescanner.ScanBatch in project hub-detect by blackducksoftware.

the class BlackDuckSignatureScanner method scanPaths.

private ScanBatchOutput scanPaths(final NameVersion projectNameVersion, File installDirectory, File dockerTarFile) throws IntegrationException, InterruptedException, IOException {
    List<SignatureScanPath> signatureScanPaths = determinePathsAndExclusions(projectNameVersion, signatureScannerOptions.getMaxDepth(), dockerTarFile);
    final ScanBatch scanJob = createScanBatch(projectNameVersion, installDirectory, signatureScanPaths, dockerTarFile);
    List<ScanCommandOutput> scanCommandOutputs = new ArrayList<>();
    final ScanBatchOutput scanJobOutput = scanJobManager.executeScans(scanJob);
    if (scanJobOutput.getOutputs() != null) {
        for (ScanCommandOutput scanCommandOutput : scanJobOutput.getOutputs()) {
            scanCommandOutputs.add(scanCommandOutput);
        }
    }
    reportResults(signatureScanPaths, scanCommandOutputs);
    return scanJobOutput;
}
Also used : ScanBatch(com.synopsys.integration.blackduck.codelocation.signaturescanner.ScanBatch) ArrayList(java.util.ArrayList) ScanCommandOutput(com.synopsys.integration.blackduck.codelocation.signaturescanner.command.ScanCommandOutput) ScanBatchOutput(com.synopsys.integration.blackduck.codelocation.signaturescanner.ScanBatchOutput)

Aggregations

ScanBatch (com.synopsys.integration.blackduck.codelocation.signaturescanner.ScanBatch)1 ScanBatchOutput (com.synopsys.integration.blackduck.codelocation.signaturescanner.ScanBatchOutput)1 ScanCommandOutput (com.synopsys.integration.blackduck.codelocation.signaturescanner.command.ScanCommandOutput)1 ArrayList (java.util.ArrayList)1