Open source by default
The code is public and inspectable. Review how scans, workers, queues, and tenant boundaries are implemented before you run anything.
NightWatch is an open-source stack for cloud security operations. It combines a Hono API, a React operator dashboard, BullMQ workers, and PostgreSQL so you can run scans, evaluate rules, and inspect results in your own environment.
What it is
The code is public and inspectable. Review how scans, workers, queues, and tenant boundaries are implemented before you run anything.
NightWatch runs as a small set of explicit services: API, web UI, workers, PostgreSQL, and Redis. No hosted account is required.
The project focuses on scan orchestration, findings review, framework rollups, and operational visibility — not a generic security platform pitch.
Architecture
NightWatch is a Bun monorepo with a Hono API, a React operator dashboard, BullMQ workers, and PostgreSQL with row-level security. The goal is a system you can understand, run locally, and extend without guessing where work happens.
apps/api
Hono API
Authentication, organization/project flows, and tenant-aware REST endpoints.
apps/web
React operator dashboard
React SPA for operators: scans, findings, reporting, account onboarding, and settings.
apps/worker
BullMQ workers
Consumers for scan collection, rule evaluation, notifications, reports, and health jobs.
packages/db
Drizzle schema
PostgreSQL tables, migrations, and row-level security based on tenant context.
packages/queue
Queue definitions
Queue names, payload contracts, and producer/consumer boundaries.
packages/shared
Shared utilities
Permissions, constants, and small cross-cutting helpers used across services.
Async pipeline
BullMQ + Redisscan-orchestrate scan-collect rule-evaluate notify-deliver reconcile finding_current refresh finding_daily_aggregates Each stage depends on the output of the previous one. Reordering is not supported.
Tenant safety
Tenant isolation is enforced with tenant-scoped services plus PostgreSQL
row-level security via app.tenant_id.
Stack
Operator UI
NightWatch includes a React operator interface for projects, scans, findings, framework coverage, and platform workflows. What you see in the UI is part of the same open-source system described above.
project-alpha
Findings · Frameworks · Trends
Recent findings
severity / serviceec2_instance_public_ip
EC2
s3_bucket_public_access
S3
iam_root_mfa_disabled
IAM
Framework score
84%
Review enabled frameworks and rule mappings by project.
Findings trend
30 days
Latest failures, trend delta, and severity movement are available in analytics.
Coverage
NightWatch keeps rule and framework metadata in the platform so scan results can be rolled up into coverage views instead of staying as raw scanner output. The numbers below reflect the current seeded catalog in the repo.
573
seeded rules
current shipped Prowler catalog snapshot
43
frameworks
including CIS, SOC 2, PCI DSS, HIPAA, ISO 27001, and NIST variants
83
AWS services in catalog
counted from unique target services in the shipped snapshot
5
severity levels
critical, high, medium, low, informational
Capabilities
Connect AWS accounts, validate access, and organize scan scope inside the platform.
Run scans on demand or on a schedule and keep the execution path explicit through queues and workers.
Review normalized findings by severity, service, resource, rule, or project instead of digging through raw scanner output.
Track how findings affect framework coverage and pass rates across the environment you manage.
Findings workflow
NightWatch does more than store scan results. It normalizes findings, evaluates rules, reconciles current state, and rolls the result into searchable views and framework summaries.
Filter findings by severity, service, rule, and resource to cut noise quickly. Normalized data means you are not re-parsing scanner output every time.
Reconciliation keeps active findings and historical results from collapsing into one undifferentiated list. You always know what is live.
Framework views make it clear which findings affect coverage and where posture is improving or regressing over time.
Quick start
NightWatch ships as a Bun monorepo with local PostgreSQL, Redis, and Mailpit support. The path from checkout to first scan is short and visible.
Pull the source, install dependencies, and review the architecture before changing anything.
Bring up PostgreSQL, Redis, and Mailpit with Docker Compose, then run migrations and seed data for a working local stack.
Start the API, web app, and workers from the monorepo and verify the operator UI loads cleanly.
Create a project, validate account access, run a scan, and inspect findings plus framework coverage in the UI.
Terminal
$ git clone https://github.com/nixbpe/nightwatch.git$ cd nightwatch$ bun install$ docker compose up -d$ bun run db:migrate$ bun run db:setup$ bun run dev
Requires Bun 1.3+ and Docker Compose V2. See docs/setup.md in the repo
for the full environment reference.
If you want to evaluate NightWatch, start with the repository, read the setup docs, and inspect the architecture. The project is designed to be understandable before it is impressive.