Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions documentation/src/main/markdown/currentreleasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@
* The Ephemeral Scan Mode, that was deprecated in [solution_name] 8.x, has been removed in favor of Stateless Scan Mode. See the [Stateless Scans page](runningdetect/statelessscan.md) for further details.
* npm 6, which was deprecated in [solution_name] 8.x, is no longer supported.
* [solution_name] 7.x has entered end of support. See the [Product Maintenance, Support, and Service Schedule page](https://sig-product-docs.synopsys.com/bundle/blackduck-compatibility/page/topics/Support-and-Service-Schedule.html) for further details.

### Resolved issues

* (IDETECT-3821) Detect will now capture and record failures of the Signature Scanner due to command lengths exceeding Windows limits. This can happen with certain folder structures when using the `detect.excluded.directories` property.
2 changes: 1 addition & 1 deletion shared-version.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// ALSO CHANGE integration-common version in src/main/resources/create-gradle-airgap-script.ft
gradle.ext.blackDuckCommonVersion='66.2.5'
gradle.ext.blackDuckCommonVersion='66.2.6'
gradle.ext.springBootVersion='2.7.12'
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ private DetectProperties() {
StringListProperty.newBuilder("detect.excluded.directories", emptyList())
.setInfo("Detect Excluded Directories", DetectPropertyFromVersion.VERSION_7_0_0)
.setHelp(
"A comma-separated list of names, name patterns, relative paths, or path patterns of directories that Detect should exclude.",
"A comma-separated list of names, name patterns, relative paths, or path patterns of directories that Detect should exclude. Caution should be exercised when including this parameter on Windows, as the command length generated may exceed OS limitations.",
"Subdirectories whose name or path is resolved from the patterns in this list will not be searched when determining which detectors to run, will not be searched to find files for binary scanning when property detect.binary.scan.file.name.patterns is set, and will be excluded from signature scan using the Scan CLI '--exclude' flag. Refer to the <i>Downloading and Running Synopsys Detect</i> > <i>Including and Excluding Tools, Detectors, Directories, etc.</i> page for more details."
)
.setGroups(DetectGroup.PATHS, DetectGroup.DETECTOR, DetectGroup.GLOBAL, DetectGroup.SOURCE_SCAN)
Expand All @@ -906,7 +906,7 @@ private DetectProperties() {
BooleanProperty.newBuilder("detect.excluded.directories.defaults.disabled", false)
.setInfo("Detect Excluded Directories Defaults Disabled", DetectPropertyFromVersion.VERSION_7_0_0)
.setHelp(
"If false, Detect will exclude the default directory names. See the detailed help for more information.",
"If false, Detect will exclude the default directory names. See the detailed help for more information. Caution should be exercised when including this parameter on Windows, as the commmand length generated may exceed OS limitations.",
"If false, the following directories will be excluded by Detect when searching for detectors: __MACOX, bin, build, .git, .gradle, .yarn, node_modules, out, packages, target, .synopsys, and the following directories will be excluded from signature scan using the Scan CLI '--exclude' flag: .git, .gradle, node_modules, .synopsys."
)
.setGroups(DetectGroup.PATHS, DetectGroup.DETECTOR, DetectGroup.GLOBAL, DetectGroup.SOURCE_SCAN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
Expand All @@ -17,6 +18,8 @@

import com.google.gson.Gson;
import com.synopsys.integration.blackduck.api.generated.view.DeveloperScansScanView;
import com.synopsys.integration.blackduck.codelocation.Result;
import com.synopsys.integration.blackduck.codelocation.signaturescanner.ScanBatchOutput;
import com.synopsys.integration.blackduck.codelocation.signaturescanner.command.ScanCommandOutput;
import com.synopsys.integration.detect.configuration.DetectUserFriendlyException;
import com.synopsys.integration.detect.configuration.enumeration.BlackduckScanMode;
Expand Down Expand Up @@ -168,6 +171,11 @@ private List<HttpUrl> parseScanUrls(String scanMode, SignatureScanOuputResult si
List<HttpUrl> parsedUrls = new ArrayList<>(outputs.size());

for (ScanCommandOutput output : outputs) {
// Don't bother further processing scans that have failed. We have already reported errors on them.
if (output.getResult().equals(Result.FAILURE)) {
continue;
}

try {
File specificRunOutputDirectory = output.getSpecificRunOutputDirectory();
String scanOutputLocation = specificRunOutputDirectory.toString() + SignatureScanResult.OUTPUT_FILE_PATH;
Expand Down