Skip to content

Commit

Permalink
fix(sbom): don't overwrite srcEpoch when decoding SBOM files (#6866)
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen authored Jun 7, 2024
1 parent bb26445 commit 04af59c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/sbom/io/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04af59c

Please sign in to comment.