Fixing Homebrew intellij/pycharm CE false negative. (#20461)

#19853
Fixing Homebrew intellij/pycharm CE false negative.

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
This commit is contained in:
Victor Lyuboslavsky 2024-07-15 12:47:10 -05:00 committed by GitHub
parent 60c45c3d7d
commit 5cc5e527e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31 additions and 0 deletions

View file

@ -0,0 +1 @@
Fixed false negative vulnerabilities with IntelliJ IDEA CE and PyCharm CE installed via Homebrew.

View file

@ -1334,6 +1334,16 @@ func TestCPEFromSoftwareIntegration(t *testing.T) {
},
cpe: "cpe:2.3:a:jetbrains:intellij_idea:2022.3.3:*:*:*:*:macos:*:*",
},
{
software: fleet.Software{
Name: "intellij-idea-ce",
Source: "homebrew_packages",
Version: "2023.3.2,233.13135.103",
Vendor: "",
BundleIdentifier: "",
},
cpe: "cpe:2.3:a:jetbrains:intellij_idea:2023.3.2.233.13135.103:*:*:*:*:*:*:*",
},
{
software: fleet.Software{
Name: "User PyCharm Custom Name.app", // 2023/10/31: The actual product name must be part of the app name per our code in CPEFromSoftware

View file

@ -130,6 +130,16 @@
"vendor": ["jetbrains"]
}
},
{
"software": {
"name": ["/^intellij-idea(-ce)?$/"],
"source": ["homebrew_packages"]
},
"filter": {
"product": ["intellij_idea"],
"vendor": ["jetbrains"]
}
},
{
"software": {
"bundle_identifier": ["/^com\\.jetbrains\\.pycharm/"],
@ -140,6 +150,16 @@
"vendor": ["jetbrains"]
}
},
{
"software": {
"name": ["/^pycharm(-ce)?$/"],
"source": ["homebrew_packages"]
},
"filter": {
"product": ["pycharm"],
"vendor": ["jetbrains"]
}
},
{
"software": {
"name": ["ms-python.python"],