Skip to content

Commit e54708a

Browse files
authored
Remove 'Root' from license violation when Unknown enabled (#239)
1 parent 714e273 commit e54708a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

utils/results/common.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ func PrepareScaViolations(target ScanTarget, violations []services.Violation, en
161161
continue
162162
}
163163
for compIndex := 0; compIndex < len(impactedPackagesNames); compIndex++ {
164+
if impactedPackagesNames[compIndex] == "root" {
165+
// No Need to output 'root' as impacted package for license since we add this as the root node for the scan
166+
continue
167+
}
164168
if e := licenseHandler(
165169
violation, cves, applicabilityStatus, severity,
166170
impactedPackagesNames[compIndex], impactedPackagesVersions[compIndex], impactedPackagesTypes[compIndex],

0 commit comments

Comments
 (0)