2023-11-30 20:01:50 +00:00
|
|
|
# Vulnerability Data Seeder
|
|
|
|
|
|
2025-10-01 18:11:27 +00:00
|
|
|
The purpose of `seed_vuln_data.go` is to provide developers an easy way to insert hosts and software
|
|
|
|
|
into your local development Fleet server without needing a real host or osquery-perf
|
2023-11-30 20:01:50 +00:00
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
2025-10-01 18:11:27 +00:00
|
|
|
1. Ensure your local development environment is running using `docker-compose up` and `fleet serve`
|
2023-11-30 20:01:50 +00:00
|
|
|
|
2025-10-01 18:11:27 +00:00
|
|
|
2. Optional: Review and modify the software titles in the following files in this folder:
|
2023-11-30 20:01:50 +00:00
|
|
|
|
|
|
|
|
- software_macos.csv
|
|
|
|
|
- software_ubuntu.csv
|
|
|
|
|
- software_win.csv
|
|
|
|
|
|
|
|
|
|
Comma seperated values align directly with the columns in the `software` table in MySQL
|
|
|
|
|
|
|
|
|
|
3. Run the data seeder
|
|
|
|
|
|
|
|
|
|
```bash
|
2025-10-27 21:48:29 +00:00
|
|
|
go run ./tools/software/vulnerabilities/seed_vuln_data.go --ubuntu 1 --macos 1 --windows 1 --linux-kernels 1
|
2023-11-30 20:01:50 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
You should now see new hosts with the configured software attached in the UI and database. This
|
|
|
|
|
tool is idempotent as it will not create duplicate hosts or software titles if run multiple times,
|
|
|
|
|
however it will not delete software if removed from the CSV files.
|