fleet/server
Victor Lyuboslavsky eada583ff1
Updating CPE generator to use new NVD API. (#15018)
Loom explaining changes (hit 5 min limit):
https://www.loom.com/share/e59b63bf638e4d9cad7984ef589b878d?sid=111fff75-115a-4a44-ae4f-6f25fede0d51

#14887

- [x] Need to merge fleetdm/nvd PR
https://github.com/fleetdm/nvd/pull/25 before this one.

# Checklist for submitter

- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
- Manually tested (with corresponding fleetdm/fleet changes) in my
personal fork: https://github.com/getvictor/nvd/releases

# QA Plan (must be done before merging this PR, and after merging the
nvd PR)
- [ ] Fork https://github.com/fleetdm/nvd and point `generate.yml` to
this branch.
[example](9d8e54930b/.github/workflows/generate.yml (L26))
- [ ] Add NVD_API_KEY to nvd secrets, and run the the nvd generate
GitHub action. Get key:
https://nvd.nist.gov/developers/request-an-api-key
- [ ] Compare the generated `cpe-###.sqlite.gz` to the previous one. One
way is to open it up with sqlite3 and `select * from cpe_2 order by
cpe23;` and dump results to a CSV file. Known differences are:
   - New file has ~2,500 more records
- Backslashes are handled differently for `Backpack\CRUD` and `Philips
In.Sight B120\37` products -- not a new issue since we do not support
those products right now
- `cpe:2.3🅰️moodle:moodle:4.2.0:*:*:*:*:*:*:*` -- this appears OK.
Also, it is a PHP plugin, and we don't support these currently.
- [ ] Record the existing vulnerabilities of current hosts.
- [ ] Stop any running fleet server. Delete `/tmp/vulndbs/cpe.sqlite`.
Can also delete other files there, or not delete this file -- it should
be overwritten by the new file. Also delete all rows in software_cpe and
software_cve DB tables. (Or can just spin up a fresh fleet server with
fresh DB, and re-enroll hosts (after setting the new env variable
below))
- [ ] Find the path to the generated `cpe-###.sqlite.gz` file
- [ ] Set `FLEET_VULNERABILITIES_CPE_DATABASE_URL` environment variable
to the above path, and start fleet server.
- [ ] After server's vulnerabilities cron job runs, the new
vulnerabilities should match the previous vulnerabilities
2023-11-20 16:10:00 -06:00
..
authz Update authorization for MDM profiles to be platform-independent (#15023) 2023-11-08 11:36:57 -05:00
bindata Allow users to be readded if they were ever removed (#1945) 2021-09-07 13:33:40 -03:00
config Validate that WSTEP is configured before enabling Windows MDM (#14858) 2023-11-09 10:08:54 -03:00
contexts allow clients to report errors back to the server (#13478) 2023-08-24 13:04:27 -03:00
datastore Add Windows MDM profiles to host details API response (#15210) 2023-11-20 14:34:57 -06:00
errorstore Enable errcheck linter for golangci-lint (#8899) 2022-12-05 16:50:49 -06:00
fleet Add Windows MDM profiles to host details API response (#15210) 2023-11-20 14:34:57 -06:00
health Separate health checks for MySQL and Redis (#6468) 2022-07-01 08:08:03 -03:00
launcher Ingest pending MDM hosts (#9065) 2022-12-26 15:32:39 -06:00
live_query Bump go to 1.19.1 (#7690) 2022-09-12 20:32:43 -03:00
logging chore: remove refs to deprecated io/ioutil (#14485) 2023-10-27 15:28:54 -03:00
mail Feat UI windows automatic enrollment (#12988) 2023-08-08 15:57:55 +01:00
mdm implement endpoint to batch set windows profiles (#15127) 2023-11-15 09:37:19 -03:00
mock Add Windows MDM profiles to host details API response (#15210) 2023-11-20 14:34:57 -06:00
policies Refactor webhooks cron to new schedule package (#7840) 2022-09-20 14:26:36 -05:00
ptr Add Description text to CVE Metadata (#13856) 2023-09-15 11:24:10 -06:00
pubsub Provide more feedback to the user when there's a Redis connection issue when running live queries (#11947) 2023-06-01 16:11:55 -03:00
service Add Windows MDM profiles to host details API response (#15210) 2023-11-20 14:34:57 -06:00
sso chore: remove refs to deprecated io/ioutil (#14485) 2023-10-27 15:28:54 -03:00
test Prevent empty logging_type when creating and editing queries (#14575) 2023-10-16 19:33:39 -03:00
vulnerabilities Updating CPE generator to use new NVD API. (#15018) 2023-11-20 16:10:00 -06:00
webhooks chore: remove refs to deprecated io/ioutil (#14485) 2023-10-27 15:28:54 -03:00
websocket Enable errcheck linter for golangci-lint (#8899) 2022-12-05 16:50:49 -06:00
worker chore: remove refs to deprecated io/ioutil (#14485) 2023-10-27 15:28:54 -03:00
utils_test.go allow to set mdm.windows_settings.custom_settings in configs (#15145) 2023-11-15 13:58:46 -03:00
utils.go allow to set mdm.windows_settings.custom_settings in configs (#15145) 2023-11-15 13:58:46 -03:00