hub/README.md

30 lines
1.8 KiB
Markdown

# hub
Operator CLI for a Security Hub fleet: fleet status, drift and jobs over the read-only fleet API, read-only host
profiling over ssh, adoption suggestions, profile diffs, and `hub self-update` from signed releases. One static Go binary,
standard library only. License: GPL-3.0-or-later (see LICENSE).
```
make hub # bin/hub (needs Go 1.27)
hub version
hub self-update --check
```
| Command | What |
|---|---|
| `status`, `drift`, `jobs` | fleet snapshot (with intel feed age), module-hash drift, recent Salt jobs (need `fleet_url`) |
| `host <host> [--since 7d]`, `trend [--metric M]` | one host on one screen (kernel, reboot, app update, vulnerabilities, change events, sparklines); one sparkline per host for a metric (need a fleet with `/v1/telemetry`) |
| `profile <host>` | run the embedded read-only probe over ssh and store the profile |
| `suggest <host>` | groups, pillar snippet, blockers and candidates from the latest profile |
| `profile-diff <host>` | compare the two newest profiles |
| `self-update [--check] [--version vX.Y.Z]` | verify a signed release and replace this binary |
| `version` | `hub <version>` |
Config is `~/.config/security-hub/hub.json`; there is no default fleet address. Docs: `docs/cli.md` (commands, config),
`docs/adopting-a-host.md` (probe contract), `docs/releasing.md` (releases and the self-update trust chain).
This repository is public and must stay free of real site data. Fixtures use documentation addresses (192.0.2.0/24,
198.51.100.0/24, 100.64.0.x for the tailnet), `example.org`, hosts `alpha`/`beta` and user `admin`; the `real-*.json`
fixtures are captured probe output rewritten to those values. `internal/hygiene` fails the build when that is violated.
Checks: `make test` (go vet, go test, Python probe tests).