Skip cpe generation for nested apps of iTerm2 (iTerm2ImportStatus) (#32733)

Fixes: #31501. Since there is no existing CPE for iTerm2ImportStatus,
skip it to prevent false negatives.
# Checklist for submitter
- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually
This commit is contained in:
Jonathan Katz 2025-10-09 12:13:13 -04:00 committed by GitHub
parent 9d21854cc6
commit 0eae33cb91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 30 additions and 2 deletions

View file

@ -1810,6 +1810,24 @@ func TestCPEFromSoftwareIntegration(t *testing.T) {
},
cpe: "cpe:2.3:a:minio:minio:2020-03-10T00-00-00Z:*:*:*:*:macos:*:*",
},
{
software: fleet.Software{
Name: "iTerm2",
Source: "apps",
Version: "3.5.14",
BundleIdentifier: "com.googlecode.iterm2",
},
cpe: "cpe:2.3:a:iterm2:iterm2:3.5.14:*:*:*:*:macos:*:*",
},
{
software: fleet.Software{
Name: "iTerm2ImportStatus",
Source: "apps",
Version: "1.0",
BundleIdentifier: "com.googlecode.iterm2.iTerm2ImportStatus",
},
cpe: "", // Skip iTerm2ImportStatus since it is part of iTerm2 and doesn't have its own cpe
},
{
software: fleet.Software{
Name: "Firefox.app",

View file

@ -607,12 +607,22 @@
},
{
"software": {
"bundle_identifier": ["/^com\\.googlecode\\.iterm2/"],
"bundle_identifier": ["com.googlecode.iterm2"],
"source": ["apps"]
},
"filter": {
"product": ["iterm2"],
"vendor": ["iterm2"]
"vendor": ["iterm2"],
"skip": false
}
},
{
"software": {
"bundle_identifier": ["/^com\\.googlecode\\.iterm2\\./"],
"source": ["apps"]
},
"filter": {
"skip": true
}
},
{