Skip to content

Commit

Permalink
fix(fedora): support modular package
Browse files Browse the repository at this point in the history
  • Loading branch information
MaineK00n committed Jan 21, 2022
1 parent f4041d2 commit 9800c32
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/vulnsrc/fedora/fedora.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,13 @@ func (vs VulnSrc) commit(tx *bolt.Tx, platformName string, errata []FSA) error {
advisory := types.Advisory{
FixedVersion: constructVersion(pkg.Epoch, pkg.Version, pkg.Release),
}
if err := vs.dbc.PutAdvisoryDetail(tx, cveID, platformName, pkg.Name, advisory); err != nil {

pkgName := pkg.Name
if erratum.Module.Name != "" && erratum.Module.Stream != "" {
pkgName = fmt.Sprintf("%s:%s::%s", erratum.Module.Name, erratum.Module.Stream, pkg.Name)
}

if err := vs.dbc.PutAdvisoryDetail(tx, cveID, platformName, pkgName, advisory); err != nil {
return xerrors.Errorf("failed to save Fedora/EPEL advisory: %w", err)
}

Expand Down

0 comments on commit 9800c32

Please sign in to comment.