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
Original file line number Diff line number Diff line change
Expand Up @@ -232,16 +232,14 @@ public DetectToolFilter createToolFilter(RunDecision runDecision, BlackDuckDecis
AllNoneEnumCollection<DetectTool> excludedTools = detectConfiguration.getValue(DetectProperties.DETECT_TOOLS_EXCLUDED);
ExcludeIncludeEnumFilter<DetectTool> filter = new ExcludeIncludeEnumFilter<>(excludedTools, includedTools, scanTypeEvidenceMap);

boolean iacEnabled = includedTools.containsValue(DetectTool.IAC_SCAN) || !detectConfiguration.getValue(DetectProperties.DETECT_IAC_SCAN_PATHS).isEmpty();
Copy link
Contributor

@andrian-sevastyanov andrian-sevastyanov Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at the help message for DETECT_IAC_SCAN_PATHS in DetectProperties and update as needed.
Right now it mentions something regarding detect.tools=ALL (it was added when the bug was discovered).


return new DetectToolFilter(filter, impactEnabled.orElse(false), iacEnabled, runDecision, blackDuckDecision);
return new DetectToolFilter(filter, impactEnabled.orElse(false), runDecision, blackDuckDecision);
}

public RapidScanOptions createRapidScanOptions() {
RapidCompareMode rapidCompareMode = detectConfiguration.getValue(DetectProperties.DETECT_BLACKDUCK_RAPID_COMPARE_MODE);
BlackduckScanMode scanMode= detectConfiguration.getValue(DetectProperties.DETECT_BLACKDUCK_SCAN_MODE);
List<PolicyRuleSeverityType> severitiesToFailPolicyCheck = getPoliciesToFailOn();

long detectTimeout = findTimeoutInSeconds();
return new RapidScanOptions(rapidCompareMode, scanMode, detectTimeout, severitiesToFailPolicyCheck);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
public class DetectToolFilter {
private final ExcludeIncludeEnumFilter<DetectTool> excludedIncludedFilter;
private final boolean impactEnabled;
private final boolean iacEnabled;
private final RunDecision runDecision;
private final BlackDuckDecision blackDuckDecision;

Expand All @@ -35,13 +34,11 @@ public class DetectToolFilter {
public DetectToolFilter(
ExcludeIncludeEnumFilter<DetectTool> excludedIncludedFilter,
boolean impactEnabled,
boolean iacEnabled,
RunDecision runDecision,
BlackDuckDecision blackDuckDecision
) {
this.excludedIncludedFilter = excludedIncludedFilter;
this.impactEnabled = impactEnabled;
this.iacEnabled = iacEnabled;
this.runDecision = runDecision;
this.blackDuckDecision = blackDuckDecision;
}
Expand All @@ -50,9 +47,6 @@ public boolean shouldInclude(DetectTool detectTool) { //Only turn tools OFF, tur
if (detectTool == DetectTool.IMPACT_ANALYSIS) {
return impactEnabled;
}
if (detectTool == DetectTool.IAC_SCAN) {
return iacEnabled;
}
if (detectTool == DetectTool.DETECTOR && runDecision.getDockerMode() == DetectTargetType.IMAGE) {
return false;
}
Expand Down