Skip to content

Commit

Permalink
chore: update a comment
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <[email protected]>
  • Loading branch information
knqyf263 committed Apr 27, 2024
1 parent 8575199 commit 4ea19d1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/report/table/vulnerability.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,8 @@ func findAncestor(pkgID string, parentMap map[string]ftypes.Packages, seen map[s
case parent.Relationship == ftypes.RelationshipDirect:
ancestors[parent.ID] = struct{}{}
case len(parentMap[parent.ID]) == 0:
// Direct dependencies cannot be identified in some package managers like "package-lock.json" v1,
// then the "Indirect" field can be always true. We try to guess direct dependencies in this case.
// A dependency with no parents must be a direct dependency.
// Some package managers, such as "package-lock.json" v1, can retrieve package dependencies but not relationships.
// We try to guess direct dependencies in this case. A dependency with no parents must be a direct dependency.
//
// e.g.
// -> styled-components
Expand Down

0 comments on commit 4ea19d1

Please sign in to comment.