mirror of
https://github.com/fleetdm/fleet
synced 2026-05-22 08:28:52 +00:00
Add cpe translation for macos vbox (#22082)
This commit is contained in:
parent
ab996dc57d
commit
1deccdb68d
3 changed files with 25 additions and 1 deletions
|
|
@ -1654,6 +1654,15 @@ func TestCPEFromSoftwareIntegration(t *testing.T) {
|
|||
},
|
||||
cpe: "cpe:2.3:o:linux:linux_kernel:5.4.0-105.118:*:*:*:*:*:*:*",
|
||||
},
|
||||
{
|
||||
software: fleet.Software{
|
||||
Name: "VirtualBox.app",
|
||||
Source: "apps",
|
||||
Version: "7.0.12",
|
||||
BundleIdentifier: "org.virtualbox.app.VirtualBox",
|
||||
},
|
||||
cpe: "cpe:2.3:a:oracle:virtualbox:7.0.12:*:*:*:*:macos:*:*",
|
||||
},
|
||||
}
|
||||
|
||||
// NVD_TEST_CPEDB_PATH can be used to speed up development (sync cpe.sqlite only once).
|
||||
|
|
|
|||
|
|
@ -417,5 +417,14 @@
|
|||
"product": ["git"],
|
||||
"vendor": ["git"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"software": {
|
||||
"bundle_identifier": ["org.virtualbox.app.VirtualBox"]
|
||||
},
|
||||
"filter": {
|
||||
"product": ["virtualbox"],
|
||||
"vendor": ["oracle"]
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
|
@ -69,6 +69,12 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
// All macOS apps are expected to have a bundle identifier, which influences CPE generation.
|
||||
if softwareSource != nil && *softwareSource == "apps" && softwareBundleIdentifier != nil && *softwareBundleIdentifier == "" {
|
||||
printf("Must set --software_bundle_identifier for macOS apps when specifying -software_source apps\n")
|
||||
return
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(*dbDir, os.ModePerm); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue