{"id":51703711,"url":"https://github.com/zafrem/bastion-tracker","last_synced_at":"2026-07-16T13:34:01.336Z","repository":{"id":363080805,"uuid":"1243003943","full_name":"zafrem/bastion-tracker","owner":"zafrem","description":"Bastion-RAG observability \u0026 governance: real-time event tracing, HMAC-signed audit logs, honey-token intrusion detection, incidents/alerts, and an embedded operations dashboard.","archived":false,"fork":false,"pushed_at":"2026-06-07T09:55:01.000Z","size":12466,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-07T11:22:40.416Z","etag":null,"topics":["audit-log","dashboard","golang","grpc","honeytoken","incident-management","intrusion-detection","llm-security","observability","rag","security-monitoring","tracing","websocket"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zafrem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-19T00:57:01.000Z","updated_at":"2026-06-07T10:22:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zafrem/bastion-tracker","commit_stats":null,"previous_names":["zafrem/bastion-tracker"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zafrem/bastion-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zafrem%2Fbastion-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zafrem%2Fbastion-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zafrem%2Fbastion-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zafrem%2Fbastion-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zafrem","download_url":"https://codeload.github.com/zafrem/bastion-tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zafrem%2Fbastion-tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35546266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-16T02:00:06.687Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audit-log","dashboard","golang","grpc","honeytoken","incident-management","intrusion-detection","llm-security","observability","rag","security-monitoring","tracing","websocket"],"created_at":"2026-07-16T13:34:00.556Z","updated_at":"2026-07-16T13:34:01.327Z","avatar_url":"https://github.com/zafrem.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bastion-Tracker (Module D)\n\n## Overview\n**Bastion-Tracker** is the central observability and governance module for the Bastion-RAG framework. It provides real-time visualization of request flows, immutable audit logging, and honey-token intrusion detection.\n\nTracker acts as the \"control center\" for the entire RAG pipeline, allowing operators to monitor system health and security events across all modules (Sentinel, Vault, Navigator, Anchor).\n\n## Key Features\n- **Real-time Flow Visualization:** Live streaming of requests moving through the Bastion-RAG modules via WebSocket.\n- **System Topology:** Module health and connectivity derived from recent event windows.\n- **Audit Logging:** Structured storage of all security-relevant events with configurable retention.\n- **Data Lineage Tracking:** Trace how data flows through the pipeline, queryable by `trace_id`, `user_id`, or audit scope.\n- **Honey-token Detection:** Monitoring of decoy data; access triggers high-severity alerts.\n- **Pipeline Variation Tracking:** Visualizes different pipeline paths (Full, Lite, Minimal) based on configuration.\n- **Alerting \u0026 Incidents:** Rule-based alerts (honey-token, prompt injection, cross-tenant, module degradation) with incident management.\n- **Operations Dashboard:** Centralized view for SRE/Ops teams with metrics and incident alerts.\n\n## Architecture\n- **Event Collector:** Receives events from all modules via NATS (primary) or gRPC/REST (fallback).\n- **Trace Aggregator:** Correlates spans into end-to-end request traces.\n- **WebSocket Hub:** Pushes live events to connected clients for real-time monitoring.\n- **Storage Engine:** In-memory ring buffer for PoC; PostgreSQL is the production target.\n- **Metrics:** Prometheus-compatible metrics endpoint.\n- **Web UI (\"Control Center\"):** A single self-contained `index.html` (Vanilla JS/CSS/SVG, zero dependencies) embedded into the Go binary via `go:embed` and served directly by the REST server — no separate Node/React build step.\n\n```\n  [Bastion-RAG Modules (A, B, C, E)]\n             |\n             v  (NATS / gRPC / REST)\n      [Event Collector]\n             |\n      [Trace Aggregator] ----\u003e [In-memory Ring Buffer / PostgreSQL*]\n             |\n      [WebSocket Hub]    ----\u003e [Prometheus / Metrics]\n             |\n             v\n      [Web UI (Vanilla JS / React*)]\n```\n*\\* PostgreSQL and React are production targets; the PoC uses an in-memory store and a zero-dependency Vanilla JS UI.*\n\n## Getting Started\n### Prerequisites\n- Go 1.21+\n- NATS Server (optional; gRPC/REST fallback available)\n\n### Build\n```bash\n# Build the CLI/server binary to bin/tracker-cli\nmake build\n# or directly:\ngo build -o bin/tracker-cli ./cmd/tracker-cli\n```\n\n### Run\n```bash\nmake run            # start the REST + gRPC + WebSocket server\nmake demo           # start the server and run all demo scenarios\nmake stream         # tail live events from the WebSocket\nmake generate       # generate synthetic event traffic\n```\n\n### CLI Commands\nThe `tracker-cli` binary exposes the following commands:\n\n| Command | Description |\n|---------|-------------|\n| `server` | Start the Tracker REST + gRPC server |\n| `demo-server` | Start the server and immediately run all demo scenarios |\n| `stream` | Stream live events from the Tracker WebSocket |\n| `traces` | List recent request traces |\n| `trace \u003ctrace_id\u003e` | Show detail for a single trace |\n| `lineage \u003ctrace_id\\|user:\u003cuser_id\u003e\\|audit\u003e` | Query data lineage (SRS doc 22) |\n| `security incidents` | List open incidents |\n| `security alerts` | List firing alerts |\n| `demo list` | List available demo scenarios |\n| `demo replay \u003cscenario-name\u003e` | Replay a demo scenario |\n| `inject` | Inject a synthetic event |\n| `generate` | Generate synthetic event traffic |\n\n### Configuration\nDefault ports (see [`config/config.yaml`](config/config.yaml)):\n\n| Service | Port |\n|---------|------|\n| REST API + Web UI | 8080 |\n| gRPC | 9090 |\n| WebSocket | 8081 |\n| Metrics (Prometheus) | 9091 |\n\nThe embedded dashboard is served by the REST server at http://localhost:8080/.\n(`config.yaml` also defines `ui_port: 3000`, but it is currently unused — the UI\nruns on `server.rest_port`.)\n\nStorage defaults to in-memory (PoC mode); set `storage.postgresql_url` to enable PostgreSQL.\n\n## Documentation\n- [Design Document](DESIGN.md)\n- [SRS Document (v3)](docs/14_module_tracker_srs_v3.md)\n\n**Technical deep-dives (code-based):**\n- [Lineage Tracking](docs/lineage-tracking.md)\n- [Honey-Token Injection](docs/honey-token-injection.md)\n- [Management Features](docs/management-features.md)\n\n## License\nApache License 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzafrem%2Fbastion-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzafrem%2Fbastion-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzafrem%2Fbastion-tracker/lists"}