mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-23 07:29:00 -08:00
feat: add relationships (#6563)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
This commit is contained in:
@@ -52,11 +52,11 @@ func (p *Parser) Parse(r xio.ReadSeekerAt) ([]types.Library, []types.Dependency,
|
||||
foundDeps := make(map[string][]string)
|
||||
for _, pkg := range lockFile.Packages {
|
||||
lib := types.Library{
|
||||
ID: dependency.ID(ftypes.Composer, pkg.Name, pkg.Version),
|
||||
Name: pkg.Name,
|
||||
Version: pkg.Version,
|
||||
Indirect: false, // composer.lock file doesn't have info about Direct/Indirect deps. Will think that all dependencies are Direct
|
||||
License: strings.Join(pkg.License, ", "),
|
||||
ID: dependency.ID(ftypes.Composer, pkg.Name, pkg.Version),
|
||||
Name: pkg.Name,
|
||||
Version: pkg.Version,
|
||||
Relationship: types.RelationshipUnknown, // composer.lock file doesn't have info about direct/indirect dependencies
|
||||
License: strings.Join(pkg.License, ", "),
|
||||
Locations: []types.Location{
|
||||
{
|
||||
StartLine: pkg.StartLine,
|
||||
|
||||
Reference in New Issue
Block a user