Skip to content

Commit

Permalink
PATCH: MS Edge cpe translation (#17793)
Browse files Browse the repository at this point in the history
  • Loading branch information
mostlikelee committed Mar 22, 2024
1 parent 39f0fd2 commit fd71574
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions changes/16817-ms-edge-vuln
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fixed issue where microsoft edge was not reporting vulnerabilities
13 changes: 10 additions & 3 deletions server/vulnerabilities/nvd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,24 @@ To test these changes locally, you can:
2. host this file on a local web server

```bash
./tools/file-server 8082 ./server/vulnerabilities/nvd/cpe_translations.json
go run ./tools/file-server 8082 ./server/vulnerabilities/nvd
```

3. (re)launch your local fleet server with the following `--config`
3. (re)launch your local fleet server with one of the following

Config method
```yaml
vulnerabilities:
cpe_translations_url: "http://localhost:8082/cpe_translations.json"
```

4. trigger the vulnerabilities scan

Environment method
```bash
FLEET_VULNERABILITIES_CPE_TRANSLATIONS_URL="http://localhost:8082/cpe_translations.json" ./build/fleet serve --dev --dev_license --logging_debug
```

4. trigger a vulnerabilities scan

```bash
fleetctl trigger --name vulnerabilities
Expand Down
2 changes: 1 addition & 1 deletion server/vulnerabilities/nvd/cpe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ func TestCPEFromSoftwareIntegration(t *testing.T) {
Version: "105.0.1343.50",
Vendor: "Microsoft Corporation",
BundleIdentifier: "",
}, cpe: "cpe:2.3:a:microsoft:edge:105.0.1343.50:*:*:*:*:windows:*:*",
}, cpe: "cpe:2.3:a:microsoft:edge_chromium:105.0.1343.50:*:*:*:*:windows:*:*",
},
{
software: fleet.Software{
Expand Down
10 changes: 10 additions & 0 deletions server/vulnerabilities/nvd/cpe_translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,15 @@
"product": ["pycharm"],
"vendor": ["jetbrains"]
}
},
{
"software": {
"name": ["Microsoft Edge"],
"source": ["programs", "apps"]
},
"filter": {
"product": ["edge_chromium"],
"vendor": ["microsoft"]
}
}
]

0 comments on commit fd71574

Please sign in to comment.