Differentiate between imp and Integrative Modeling Platform (#38396)

**Related issue:** Resolves #35192

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.
## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually
This commit is contained in:
Konstantin Sykulev
2026-01-20 16:39:50 -06:00
committed by GitHub
parent 64ed89c41d
commit 793f845e4a
3 changed files with 51 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
* Differentiated IMP and Integrative Modeling Platform (IMP) while running vulnerability scanning.
+11
View File
@@ -395,6 +395,17 @@ var (
s.Version = newVersion
},
},
{
// Homebrew's "imp" (Integrative Modeling Platform) is incorrectly matched against
// Horde IMP CPEs. Rename the Homebrew package to prevent incorrect CPE
// matching with horde:imp.
matches: func(s *fleet.Software) bool {
return s.Name == "imp" && s.Source == "homebrew_packages"
},
mutate: func(s *fleet.Software, logger log.Logger) {
s.Name = "integrative-modeling-platform"
},
},
}
)
+39
View File
@@ -2316,6 +2316,45 @@ func TestMutateSoftware(t *testing.T) {
Source: "programs",
},
},
{
name: "Homebrew imp (Integrative Modeling Platform)",
s: &fleet.Software{
Name: "imp",
Version: "2.23.0_13",
Source: "homebrew_packages",
},
sanitized: &fleet.Software{
Name: "integrative-modeling-platform",
Version: "2.23.0_13",
Source: "homebrew_packages",
},
},
{
name: "imp from non-Homebrew source (should not be renamed)",
s: &fleet.Software{
Name: "imp",
Version: "5.0.22",
Source: "programs",
},
sanitized: &fleet.Software{
Name: "imp",
Version: "5.0.22",
Source: "programs",
},
},
{
name: "Homebrew imp with different version",
s: &fleet.Software{
Name: "imp",
Version: "2.20.0",
Source: "homebrew_packages",
},
sanitized: &fleet.Software{
Name: "integrative-modeling-platform",
Version: "2.20.0",
Source: "homebrew_packages",
},
},
} {
t.Run(tc.name, func(t *testing.T) {
require.NotPanics(t, func() { mutateSoftware(tc.s, log.NewNopLogger()) })