Skip to content

feat: Interactive TUI dashboard for secret access monitoring#3

Merged
pizzabits merged 10 commits intomainfrom
feat/tui
Feb 28, 2026
Merged

feat: Interactive TUI dashboard for secret access monitoring#3
pizzabits merged 10 commits intomainfrom
feat/tui

Conversation

@pizzabits
Copy link
Copy Markdown
Owner

@pizzabits pizzabits commented Feb 28, 2026

Summary

Live terminal dashboard for monitoring Kubernetes secret access detected by the eBPF probe. Built with Go + Bubble Tea.

TUI Demo

What's included

  • Live-updating dashboard - polls the secrets-snitcher API at configurable intervals with auto-reconnect
  • Anomaly detection banner - red alert when pods read secrets at high frequency without caching (reads/sec > 5, not cached)
  • NEW pod badges - 30-second highlight when pods first appear in the observation window
  • Color-coded read rates - red for anomalies, green for cached, white for normal, yellow for open
  • Vim-style navigation - j/k, g/G, arrow keys, / search, s sort, </> column resize
  • Raccoon splash & goodbye screens - because every good CLI tool needs a mascot
  • Terminal background detection - saves/restores terminal colors via OSC 11
  • Mock API - demo/mock-api.py serves realistic cluster data for testing without a live cluster

New files

File Role
cmd/tui/*.go TUI source - model, update, view, client, termbg
cmd/tui/*_test.go 39 tests, 75% coverage
cmd/tui/README.md Usage docs, keyboard shortcuts
cmd/tui/DEVGUIDE.md Architecture walkthrough for C/C++ developers
demo/tui-demo.gif Demo recording

Test plan

  • go test ./cmd/tui/ - 39 tests pass (view, update, client, termbg)
  • Run with mock API: make mock-api + curl localhost:9100/toggle + ./secrets-snitcher-tui
  • Run against live cluster with port-forward
  • Verify splash screen appears on launch, goodbye on quit
  • Verify NEW tags appear after toggle and fade after 30s
  • Verify anomaly banner shows for pid-31337 and payment-service

Acknowledgments

Inspired by kostyay/netmon. No code was taken, but the idea of a live Bubble Tea dashboard for infrastructure monitoring came directly from seeing Kostya's work.

Go terminal UI that polls the secrets-snitcher API and displays
a live-updating table of secret access events with anomaly detection.

Inspired by kostyay/netmon (with permission).
- Add raccoon ASCII art splash screen and goodbye screen with phase system
- Add 30s NEW pod detection with podFirstSeen timestamps
- Add termbg.go for terminal background color detection/restore via OSC 11
- Add DEVGUIDE.md - architecture walkthrough for C/C++ developers
- Add cmd/tui/README.md with usage docs and keyboard shortcuts
- Add update_test.go (26 tests) and client_test.go (6 tests) - 75% coverage
- Add view_test.go for rendering correctness (height, width, no OSC leaks)
- Clean up mock-api.py signal handling for graceful Ctrl+C
- Update main README.md with TUI section and Makefile targets
- Credit Kostya/netmon as inspiration in acknowledgments
- Add GitHub Actions CI: lint (golangci-lint), test (race + coverage), build
- Remove changelog section (using GitHub releases instead)
- Remove em dashes from README
- Split TIOCGETA/TIOCSETA (macOS) vs TCGETS/TCSETS (Linux) into build-tagged files
- Bump golangci-lint from v2.0.2 to v2.1.0 (minimum supported)
@pizzabits pizzabits merged commit 47396d1 into main Feb 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant