aquasecurity / trivy

Find vulnerabilities, misconfigurations, secrets, SBOM in containers, Kubernetes, code repositories, clouds and more
https://aquasecurity.github.io/trivy
Apache License 2.0
23.82k stars 2.34k forks source link

feat(go): construct dependencies in the parser #7973

Closed knqyf263 closed 4 days ago

knqyf263 commented 5 days ago

Description

The construction of the relationship between the root package and direct dependencies is now done by the SBOM package, etc. https://github.com/aquasecurity/trivy/blob/542a3808239e08a41087f8af531efe8762958f29/pkg/sbom/io/encode.go#L420-L462

However, since the logic has become complicated, it should be changed to be done on the analyzer side (strictly speaking, on the parser side) for the sake of simplification.

Related PRs

Checklist