diff --git a/pkg/detector/ospkg/rocky/rocky.go b/pkg/detector/ospkg/rocky/rocky.go index 86a3cd10b695..34f4fcf0f4c4 100644 --- a/pkg/detector/ospkg/rocky/rocky.go +++ b/pkg/detector/ospkg/rocky/rocky.go @@ -66,12 +66,7 @@ func (s *Scanner) Detect(osVer string, pkgs []ftypes.Package) ([]types.DetectedV log.Logger.Debugf("Rocky Linux: the number of packages: %d", len(pkgs)) var vulns []types.DetectedVulnerability - var skipPkgs []string for _, pkg := range pkgs { - if pkg.Modularitylabel != "" { - skipPkgs = append(skipPkgs, pkg.Name) - continue - } pkgName := addModularNamespace(pkg.Name, pkg.Modularitylabel) advisories, err := s.vs.Get(osVer, pkgName) if err != nil { @@ -95,9 +90,6 @@ func (s *Scanner) Detect(osVer string, pkgs []ftypes.Package) ([]types.DetectedV } } } - if len(skipPkgs) > 0 { - log.Logger.Infof("Skipped detection of these packages: %q because modular packages cannot be detected correctly due to a bug in Rocky Linux Errata. See also: https://forums.rockylinux.org/t/some-errata-missing-in-comparison-with-rhel-and-almalinux/3843", skipPkgs) - } return vulns, nil } diff --git a/pkg/detector/ospkg/rocky/rocky_test.go b/pkg/detector/ospkg/rocky/rocky_test.go index 81fd207112bf..1ae03da312d5 100644 --- a/pkg/detector/ospkg/rocky/rocky_test.go +++ b/pkg/detector/ospkg/rocky/rocky_test.go @@ -60,7 +60,7 @@ func TestScanner_Detect(t *testing.T) { }, }, { - name: "skip modular package", + name: "modular package", fixtures: []string{"testdata/fixtures/modular.yaml"}, args: args{ osVer: "8.5", @@ -81,7 +81,15 @@ func TestScanner_Detect(t *testing.T) { }, }, }, - want: nil, + want: []types.DetectedVulnerability{ + { + PkgName: "nginx", + VulnerabilityID: "CVE-2021-23017", + InstalledVersion: "1:1.16.1-2.module+el8.4.0+543+efbf198b.0", + FixedVersion: "1:1.16.1-2.module+el8.4.0+543+efbf198b.1", + Layer: ftypes.Layer{}, + }, + }, }, { name: "Get returns an error",