Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
EyalDelarea committed Sep 13, 2023
1 parent afc4d6f commit 1088594
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xray/commands/audit/scarunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ func runScaScanOnWorkingDir(params *AuditParams, results *Results, workingDir, r
}
techResults = sca.BuildImpactPathsForScanResponse(techResults, fullDependencyTrees)
var directDependencies []string
if tech == coreutils.Pip || params.thirdPartyApplicabilityScan {
if tech == coreutils.Pip || (params.thirdPartyApplicabilityScan && tech == coreutils.Npm) {
// When building pip dependency tree using pipdeptree, some of the direct dependencies are recognized as transitive and missed by the CA scanner.
// Our solution for this case is to send all dependencies to the CA scanner.
// When thirdPartyApplicabilityScan is true, use flatten graph to include all the dependencies in applicability scanning.
// Only npm is supported for this flag.
directDependencies = getDirectDependenciesFromTree([]*xrayCmdUtils.GraphNode{flattenTree})
} else {
directDependencies = getDirectDependenciesFromTree(fullDependencyTrees)
Expand Down

0 comments on commit 1088594

Please sign in to comment.