Adding initial tool - dibble the tapir for seeding data (#46122)

## Overview

`dibble` is a one-stop CLI for seeding a Fleet server with test data —
users, teams, policies, reports, labels, scripts, MDM profiles,
software, secrets, CAs, and vulns — replacing ~8 ad-hoc seeding tools
with a single binary.

It makes it easy to:
- **Spin up a populated dev/test server in one command** — `dibble all`
plants everything with sensible, idempotent defaults.
- **Skip the flag-memorization** — running `dibble` with no args
launches an interactive wizard that prompts for Fleet URL, API token,
theme, and which entities to seed, and offers to save the config to
`~/.dibble.yaml`.
- **Seed individual entity types** — `dibble users`, `dibble teams`,
`dibble policies`, etc., when you only need one slice.
- **Get themed, recognizable test data** — pick a theme (hitchhikers,
tng, lotr, ghibli, parksrec, …) so seeded names are easy to eyeball in
the UI.

Hosts are intentionally out of scope — `cmd/osquery-perf` still owns
that. `dibble hosts` is a thin convenience wrapper that picks a fleet,
fetches its enroll secret, and prints/runs the osquery-perf invocation
for you.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Dibble: a CLI tool to seed realistic test data, including an
interactive wizard and subcommands for
teams/users/software/policies/scripts/reports/profiles/labels/activities/enroll-secrets/hosts/vulns,
plus theme-driven “cas” and “ping”.
* Theme system: multiple curated themes to generate consistent seeded
identities, policies, software, labels, and scripts.
* **Chores**
* Ignored the built dibble binary and added a Makefile build target to
compile the dibble tool.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
George Karr
2026-06-17 11:07:05 -05:00
committed by GitHub
parent 745ad98e94
commit a25ae3ddfc
82 changed files with 6025 additions and 8 deletions
+8
View File
@@ -1,3 +1,11 @@
> [!NOTE]
> **Prefer [`dibble`](../../dibble/README.md) for seeding vulnerable software.** The equivalent is:
> ```bash
> ./tools/dibble/dibble vulns --macos 100 --ubuntu 100 --windows 100
> ```
> dibble embeds the same CSVs and writes to MySQL directly, just like this tool.
> This script is kept for backwards compatibility.
# Vulnerability Data Seeder
The purpose of `seed_vuln_data.go` is to provide developers an easy way to insert hosts and software
@@ -0,0 +1,23 @@
> [!NOTE]
> **Prefer [`dibble`](../../../../dibble/README.md) for seeding vulnerable
> software at volume.** The equivalent is:
> ```bash
> ./tools/dibble/dibble vulns --macos 100000 --ubuntu 100000 --windows 100000
> ```
> This script is kept for backwards compatibility. It's a higher-volume
> sibling of `tools/software/vulnerabilities/seed_data/seed_vuln_data.go`
> with deadlock-retry logic specific to vuln performance testing.
# Vulnerability performance-test seeder
Bulk MySQL seeder used by the vulnerability performance test harness
(`tools/software/vulnerabilities/performance_test/tester/`). Writes very large
numbers of software rows directly to MySQL with deadlock retries.
## Usage
```bash
go run ./tools/software/vulnerabilities/performance_test/seeder
```
See `volume_vuln_seeder.go` for configuration constants.