Risk scanning helps teams catch misconfiguration patterns before they become outages.
# Build locally
go build ./cmd/cub-scout
# Scan current cluster context
./cub-scout scanCommon variants:
# State-only checks
./cub-scout scan --state
# Kyverno-only checks
./cub-scout scan --kyverno
# JSON output for CI pipelines
./cub-scout scan --jsonThe scanner evaluates live cluster state against a maintained risk-pattern catalog. Typical findings include:
- stuck GitOps reconciliation
- invalid or missing dependencies
- drift and ownership gaps
- fragile lifecycle sequencing patterns
- common configuration anti-patterns learned from incidents
CONFIG RISK SCAN: prod-east
════════════════════════════════════════════════════════════════════
CRITICAL (1)
────────────────────────────────────────────────────────────────────
[RISK-2025-0027] Grafana sidecar namespace whitespace error
Resource: monitoring/ConfigMap/grafana-sidecar
Message: NAMESPACE has whitespace after commas
Fix: Use NAMESPACE="monitoring,grafana"
WARNING (2)
────────────────────────────────────────────────────────────────────
[RISK-2025-0014] Unit pending changes
Resource: payments/Deployment/payment-api
Message: Desired revision is ahead of live revision
Fix: Apply pending changes or rollback
════════════════════════════════════════════════════════════════════
Summary: 1 critical, 2 warning, 0 info
# Scope
./cub-scout scan --namespace production
./cub-scout scan --exclude-ns kube-system,flux-system
# Severity filter
./cub-scout scan --severity critical,warning
# Catalog and machine output
./cub-scout scan --list
./cub-scout scan --json
# Optional packs
./cub-scout scan --timing-bombs
./cub-scout scan --include-unresolved
./cub-scout scan --lifecycle-hazardsThe catalog spans categories such as:
SOURCE(fetch/auth/source readiness)RENDER(template/render failures)APPLY(apply/sync failures)DRIFT(live differs from desired)DEPEND(missing service/secret/issuer/target)STATE(stuck or unhealthy runtime state)ORPHAN(unmanaged resources)TIMING(future-failure signals)
- Run
./cub-scout scanon the affected cluster. - Triage
criticalfindings first. - Use the specific resource path from each finding to inspect root cause.
- Apply the suggested fix.
- Re-run the scan and verify the summary is clean.
| Capability | Standalone | Connected |
|---|---|---|
| Single-cluster risk scan | yes | yes |
| Fleet-wide risk visibility | no | yes |
| Trend/history across environments | no | yes |
| Shared governance context | no | yes |
- Run demos:
./cub-scout demo --help - Explore command details:
./CLI-GUIDE.md - Review testing coverage:
docs/testing/README.md