Skip to content

Commit

Permalink
fix(suse): use package name to get advisories (aquasecurity#3199)
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen authored Nov 20, 2022
1 parent 4a5d643 commit 6ab9380
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions integration/testdata/fixtures/db/opensuse.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
- bucket: "openSUSE Leap 15.1"
pairs:
- bucket: openssl-1_1
- bucket: libopenssl1_1
pairs:
- key: "openSUSE-SU-2019:2158-1"
- key: "openSUSE-SU-2020:0062-1"
value:
FixedVersion: 1.1.0i-lp151.8.3.1
FixedVersion: 1.1.0i-lp151.8.6.1
- bucket: openssl-1_1
pairs:
- key: "openSUSE-SU-2020:0062-1"
value:
FixedVersion: 1.1.0i-lp151.8.6.1
2 changes: 1 addition & 1 deletion pkg/detector/ospkg/suse/suse.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (s *Scanner) Detect(osVer string, _ *ftypes.Repository, pkgs []ftypes.Packa

var vulns []types.DetectedVulnerability
for _, pkg := range pkgs {
advisories, err := s.vs.Get(osVer, pkg.SrcName)
advisories, err := s.vs.Get(osVer, pkg.Name)
if err != nil {
return nil, xerrors.Errorf("failed to get SUSE advisory: %w", err)
}
Expand Down

0 comments on commit 6ab9380

Please sign in to comment.