mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-12 15:50:15 -08:00
fix(sbom): don't overwrite srcEpoch when decoding SBOM files (#6866)
This commit is contained in:
@@ -271,6 +271,11 @@ func (m *Decoder) fillSrcPkg(c *core.Component, pkg *ftypes.Package) {
|
||||
}
|
||||
m.parseSrcVersion(pkg, c.SrcVersion)
|
||||
|
||||
// Source info was added from component or properties
|
||||
if pkg.SrcName != "" && pkg.SrcVersion != "" {
|
||||
return
|
||||
}
|
||||
|
||||
// Fill source package information for components in third-party SBOMs .
|
||||
if pkg.SrcName == "" {
|
||||
pkg.SrcName = pkg.Name
|
||||
|
||||
Reference in New Issue
Block a user