01 // CORE/dashboard & /dashboard/settings
Architecture, Auth & AI Keys
Watchmen v0.9.0 is a self-hosted cloud security posture, compliance, live request tracing, and runtime enforcement console for AWS, GCP, and Kubernetes.
- $Per-user OAuth & encrypted cloud credentials (AES-256-GCM using AUTH_SECRET).
- $Bring-your-own AI key: Google Gemini, Anthropic Claude, or OpenAI validated live and encrypted per user in PostgreSQL.
- $Three auth modes: Google OAuth (with ALLOWED_EMAILS / ALLOWED_DOMAIN allowlists), Local Auth, and one-click Demo Mode.
- $PostgreSQL persistence using @neondatabase/serverless (pooled) and pg (direct) with auto-migrated tables.
| Shortcut | Action | Route / Target |
|---|
| / | Focus Natural Language Brain | Query box on dashboard |
| ⌘K / Ctrl+K | Global Command Palette & Search | Any page or resource |
| G / A | Switch GCP / AWS Overview | /dashboard, /dashboard/aws |
| F / P / C | Findings / Attack Paths / Compliance | /dashboard/findings, /attack-paths, /compliance |
| R / T / S | Trace / Tasks / Settings | /dashboard/trace, /tasks, /settings |
| ? | Keyboard Shortcuts Help Modal | Global overlay |
02 // INVENTORY/dashboard & /dashboard/aws
Multi-Cloud Scanning & Natural Language Brain
Snapshot-based cloud scanning fetches your GCP and AWS inventory once, caches it in PostgreSQL JSONB, and powers instant queries without repeated cloud API calls.
- $GCP (12 services): IAM bindings, Service Accounts & keys, GKE clusters, Cloud SQL, Cloud Run, Storage Buckets, BigQuery, Pub/Sub, Secret Manager, VMs, Firewall Rules, Cloud Logging.
- $GCP Keyless ADC: Automatically uses Application Default Credentials (Workload Identity / Cloud Run SA) when no user OAuth token or JSON key is stored.
- $AWS (11 services): IAM Users & Roles, EC2 instances, Security Groups, S3 Buckets, RDS, Redshift, Lambda, EKS, Secrets Manager, SNS, ECR & CloudTrail.
- $Natural Language Brain: Ask plain-English questions (e.g. 'Which buckets are public?' or 'Who has roles/owner across projects?') and click returned resource chips.
- $Scan Coverage (/dashboard/scan-coverage) & Snapshot History (/dashboard/history) track partial permissions and historical posture changes.
03 // POSTURE/dashboard/findings
Security Findings, Agentic Workflows & Terraform PRs
Pure-function security rules rank misconfigurations by severity (Critical, High, Medium, Low) across GCP and AWS, backed by audited AI investigation, planning, fix verification, and GitHub PR automation.
- $12 GCP rules + 8 AWS rules covering public buckets, 0.0.0.0/0 firewall/SG rules, expired SA keys, overly permissive IAM roles, unencrypted databases, and exposed env-var secrets.
- $Watchlist & Filters: Pin priority findings, filter by cloud (GCP/AWS) or severity, search across resources, and export CSV/JSON.
- $Audited Agent Runs: Investigate Finding → Plan Remediation (approval-gated) → Create Terraform PR → Verify Fix against fresh snapshots.
- $Terraform GitHub PR Remediation: Scans your linked GitHub repository for matching .tf files, generates least-privilege patches, preserves originals, opens a PR, and notifies Slack.
- $CLI & MCP Handoff: Send individual findings (with their investigation & plan reports) or all filtered findings directly to OpenCode, Claude Code, or Codex.
04 // GRAPH/dashboard/attack-paths
Attack Path Analysis
Correlates standalone misconfigurations into multi-step exploit chains (Entry → Pivot → Target) across GCP and AWS so teams can break high-risk chains first.
- $Detects chains like Internet → Open Firewall → Compute VM → Privileged Service Account → Project/Data Access.
- $Interactive path cards with clickable resource nodes, AI remediation advice, direct Terraform PR generation for GCP paths, and Send to CLI handoff.
05 // AUDIT/dashboard/compliance
Compliance Engine (SOC 2 Type II & ISO 27001:2022)
Automated 18-control SOC 2 Type II and ISO 27001:2022 evaluations across GCP and AWS with score trending, risk acceptances, auditor exports, and CLI/MCP remediation handoff.
- $Multi-cloud scoring (pass = 1, suppressed = 1, warning = 0.5, fail = 0) with per-project violation breakdown and historical score trend SVG chart.
- $Risk Acceptance (Suppressions): Suppress individual controls with written audit justification and revoke at any time.
- $Auditor Exports: Download CSV evidence reports or print/save formatted PDF reports.
- $AI Control Advice & Send to CLI: Ask AI for per-control remediation guidance, or push failing/warning controls (along with AI advice) straight to OpenCode, Claude Code, or Codex.
06 // WORKLOADS/dashboard/container-scan & /dashboard/self-managed
Container Scanning, Self-Managed K8s & eBPF Agent
Scan container images across cloud and public registries and monitor any self-managed Kubernetes cluster alongside GKE and EKS.
- $Container Vulnerability Scanning: GCP Artifact Registry/GCR, AWS ECR, GitHub Container Registry (GHCR), and Docker Hub CVE inspection with AI upgrade recommendations.
- $Self-Managed Kubernetes: Upload single or merged kubeconfigs (k3s, kind, minikube, k0s, microk8s, RKE2, Talos, on-prem) — each context is scanned, traced, and queried independently.
- $eBPF DaemonSet & VM Agent: Captures kernel-level L4 socket tuples + HTTP request/response events without spoofable L7 headers, with automatic secret & query-param redaction.
07 // RUNTIME/dashboard/trace & /dashboard/runtime
Live Request Tracing & Runtime Enforcement (v0.9)
Stream real-time HTTP traffic onto an animated service topology and enforce detect-or-block runtime policies via inline proxy/trace gates and the v1 REST API.
- $Live Trace Topology: Ingests traffic from Cloud Logging Pub/Sub push (/api/ingest/gcp/pubsub), eBPF agents (/api/agents/events), /api/proxy, and /api/trace over SSE (/api/trace/live).
- $Global Source Map: Interactive MapLibre 3D globe + SVG fallback with resizable pane, time-window filters, and IP geolocation.
- $Runtime Policy Engine (Detect & Enforce): Rules support alert/block actions, mode: detect | enforce, HTTP 403 blocking in /api/proxy and /api/trace, and decisions allow | flagged | would_block | blocked.
- $Attack Vector Templates & Conditions: method, path_prefix, path_regex, content_type, body_contains, source_ip_class, status_code, plus 6 built-in known_attack_vector templates (admin_path_probe, path_traversal, sql_injection_probe, rce_probe, sensitive_file_probe, destructive_method).
Watchmen v1 Runtime REST API (Bearer wm_...) # Create an enforce-mode block rule for admin probes
curl -X POST https://your-watchmen-url/api/watchmen/v1/runtime/rules \
-H "Authorization: Bearer $WATCHMEN_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Block admin paths",
"action": "block",
"mode": "enforce",
"severity": "critical",
"condition": { "kind": "path_prefix", "value": "/admin" }
}'
# Query blocked requests & runtime summary
curl -H "Authorization: Bearer $WATCHMEN_API_TOKEN" \
"https://your-watchmen-url/api/watchmen/v1/runtime/requests?decision=blocked"
curl -H "Authorization: Bearer $WATCHMEN_API_TOKEN" \
"https://your-watchmen-url/api/watchmen/v1/runtime/summary"
08 // AGENTIC CLI/dashboard/tasks & /dashboard/settings
CLI & MCP Task Handoff (OpenCode, Claude Code, Codex)
Push findings, attack paths, and failing compliance controls from Watchmen into open tasks for local AI coding CLIs, complete with MCP integration, isolated git worktrees, and closed-loop verification.
- $Send to CLI Modal: Available on Findings, Attack Paths, and Compliance. Groups issues by category (IAM, Firewall, Storage, etc.), combines them, or splits 1-per-issue, with automatic secret redaction and deduplication.
- $Watchmen MCP Server: Remote Streamable HTTP endpoint at /api/mcp and zero-dependency local stdio bridge (node scripts/watchmen-mcp.mjs) exposing 8 tools for task handoff and runtime security queries.
- $Local Runner & Watcher (scripts/watchmen-cli.mjs): Poll or execute tasks via OpenCode, Claude Code, Codex, or custom commands inside isolated .watchmen-worktrees/<taskId> git branches.
- $Closed-Loop Verification: POST /api/handoff/tasks/:id/verify (or watchmen_verify_task MCP tool) re-checks findings, attack paths, and compliance controls against latest snapshots and auto-completes resolved tasks.
Connect OpenCode / Claude / Codex via MCP & Run Locally # 1. Export Personal API Token (generated in Settings -> Integrations)
export WATCHMEN_API_TOKEN="wm_your_token_here"
export WATCHMEN_URL="https://your-watchmen-url"
# 2. Claude Code HTTP MCP setup
claude mcp add --transport http watchmen \
"$WATCHMEN_URL/api/mcp" \
--header "Authorization: Bearer $WATCHMEN_API_TOKEN"
# 3. Or auto-run open Watchmen tasks in isolated git worktrees
node scripts/watchmen-cli.mjs watch --tool opencode --worktree --verify --once
09 // ALERTS/dashboard/settings
Alerting & Integrations
Configure Slack Bot or generic webhook notifications whenever cloud scans uncover new Critical or High findings, or when Terraform remediation PRs are opened.
- $Slack Bot & Webhook delivery with test and simulate endpoints (/api/alerts/test, /api/alerts/simulate).
- $Automatic evaluation on new scans (/api/alerts/evaluate) tracking previously seen finding IDs to prevent repeat alert fatigue.