diff --git a/changes/37111-ninxsoft-mist-cve b/changes/37111-ninxsoft-mist-cve new file mode 100644 index 0000000000..9923a352c2 --- /dev/null +++ b/changes/37111-ninxsoft-mist-cve @@ -0,0 +1 @@ +Fixed CVE false positive on ninxsoft/Mist. diff --git a/server/vulnerabilities/nvd/cpe.go b/server/vulnerabilities/nvd/cpe.go index 480287a246..d3612e4854 100644 --- a/server/vulnerabilities/nvd/cpe.go +++ b/server/vulnerabilities/nvd/cpe.go @@ -444,6 +444,17 @@ var ( s.Name = "integrative-modeling-platform" }, }, + { + // ninxsoft/Mist (macOS installer download tool) is incorrectly matched against + // mist.io/Mist CPEs. Rename the app to prevent incorrect CPE matching with mist:mist. + // See https://github.com/fleetdm/fleet/issues/37111 + matches: func(s *fleet.Software) bool { + return s.BundleIdentifier == "com.ninxsoft.mist" && s.Source == "apps" + }, + mutate: func(s *fleet.Software, logger log.Logger) { + s.Name = "ninxsoft-mist" + }, + }, } ) diff --git a/server/vulnerabilities/nvd/cpe_test.go b/server/vulnerabilities/nvd/cpe_test.go index 911df1afb2..0b84026481 100644 --- a/server/vulnerabilities/nvd/cpe_test.go +++ b/server/vulnerabilities/nvd/cpe_test.go @@ -2428,6 +2428,21 @@ func TestMutateSoftware(t *testing.T) { Source: "homebrew_packages", }, }, + { + name: "ninxsoft Mist (macOS installer download tool)", + s: &fleet.Software{ + Name: "Mist", + Version: "0.30", + Source: "apps", + BundleIdentifier: "com.ninxsoft.mist", + }, + sanitized: &fleet.Software{ + Name: "ninxsoft-mist", + Version: "0.30", + Source: "apps", + BundleIdentifier: "com.ninxsoft.mist", + }, + }, } { t.Run(tc.name, func(t *testing.T) { require.NotPanics(t, func() { mutateSoftware(tc.s, log.NewNopLogger()) })