fix(sbom): don't overwrite srcEpoch when decoding SBOM files (#6866)

This commit is contained in:
DmitriyLewen
2024-06-07 14:44:07 +06:00
committed by GitHub
parent bb26445e3d
commit 04af59c290

View File

@@ -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