Open source · Self-hosted · AWS-first, GCP supported

Cloud security you can run yourself.

NightWatch brings cloud scanning, findings triage, framework compliance, uptime monitoring, and audit-ready operations into one self-hosted codebase you can read, run, and extend.

Tenant-safe via PostgreSQL RLSOrdered scan pipelineBun + Turborepo monorepo
scan #1284 · acme-production
Simulated replay
scan-orchestratequeuedrunning…scan plan created
scan-collectqueuedrunning…3 scan tasks · 128 resources
rule-evaluatequeuedrunning…573 rules evaluated
notify-deliverqueuedrunning…2 channels notified
Failed checks · streaming from rule-evaluate5 findings
s3_bucket_public_access
Crit
iam_root_mfa_enabled
Crit
ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22
High
cloudtrail_multi_region_enabled
High
rds_instance_storage_encrypted
High
finalize gate · reconcile findings + refresh aggregatescompleted
570+
rules in the catalog
synced from Prowler v5.20.0
43
compliance frameworks
CIS, SOC 2, HIPAA, PCI DSS & more
83
AWS services covered
every rule maps to a service
9
worker queues
scans, health, SLOs, reports, sync

What it does

One codebase, the whole operator surface.

Security posture, uptime, compliance, and access control ship together — the same product areas you get in the app, without a per-seat bill.

From raw scans to reviewed findings.

Connect AWS and GCP accounts, run manual or scheduled scans, and triage everything in one faceted explorer — no exporting scanner output to another tool.

  • Faceted findings explorer — severity, service, rule, and resource filters in one place.
  • Resource inventory — every scanned asset accounted for, with service coverage views.
  • Excel / PDF export — reports generated asynchronously by the report-generate queue.
/dashboard/findings/resources/services
severity: critical ×service: s3 ×sample data
s3_bucket_public_accessCrit
iam_root_mfa_enabledCrit
ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22High
rds_instance_storage_encryptedHigh
128 resources scannedexport → .xlsx · .pdf

Uptime probes, SLOs, and infra health.

NightWatch is not scan-only: endpoint monitors probe your services, alert policies track down-streaks, and SLOs recalculate after every run.

  • Endpoint monitors — HTTP probes with alert policies that follow contiguous down-streaks.
  • SLO tracking — targets recalculated by the slo-recalculate queue after each monitor run.
  • Infrastructure health — AWS collectors feed a live infrastructure view.
/health/monitors/health/slo/health/infrastructure
Endpoint monitors · 60s intervalsample data
api.acme.io/health84ms99.98%
app.acme.io121ms99.95%
payments.acme.ioDownstreak 3 → alert
SLO · availability · 30dtarget 99.9% · current 99.96%

43 frameworks, down to the failing check.

Findings reconcile into framework scorecards on the dashboard, and every framework opens into per-control detail linked back to the exact rule.

  • 43 frameworks mapped — CIS, SOC 2, HIPAA, PCI DSS 4.0, ISO 27001 and more.
  • Per-control detail — from scorecard to the specific check and resource that failed.
  • Dashboard rollups — compliance posture surfaces on the overview, not a separate silo.
/rules/rules/frameworks
Framework pass ratesample data
cis_4.0_aws
82%
soc2_aws
88%
hipaa_aws
79%
pci_4.0_aws
81%
iam_root_mfa_enabledin 38 frameworks
cloudtrail_multi_region_enabledin 36 frameworks

Tenant-safe teams, RBAC, and a real audit trail.

Organizations stay isolated with tenant-scoped services and PostgreSQL row-level security, while every sensitive action lands in an auditable trail.

  • Teams & members — org-scoped roles with a visible RBAC permission matrix.
  • Audit trail — sensitive actions recorded with actor, tenant, and context.
  • Access reports — review who can reach what, exportable for compliance evidence.
/teams/members/audit
Audit trail · live event typessample data
tenant.org.member.role.updated2m
tenant.credential.created1h
monitor.down3h
auth.login.success5h
RBAC matrix · per-permission grantstenant_id scoped · RLS enforced

Scan pipeline

Four queues. One finalize gate. No hidden background magic.

Every scan flows through the same ordered BullMQ pipeline. A scan only completes when the finalize gate confirms every evaluation job has terminally resolved — then findings reconcile and daily aggregates refresh.

scan-orchestrate
plans the scan and fans out scan tasks
scan-collect
collects resource state from provider APIs
rule-evaluate
evaluates the rule catalog per scan task
notify-deliver
delivers findings to your channels
finalize gate
reconciles current findings and refreshes daily aggregates — not a queue, a completion check inside the worker
Plus five queues doing background work:prowler-rule-syncreport-generatehealth-collecthealth-checkslo-recalculate

Rules

570+ real checks, stored as data you can query.

The catalog is synced from Prowler and stored as versioned rows in Postgres — stable check IDs, per-service coverage, and framework mappings in their own table. Findings inherit structure instead of bleeding raw scanner output.

  • Stable check IDs — the same identifier from catalog to finding to framework detail.
  • Framework mappings — a single check can back dozens of framework controls via mapping rows.
  • No opaque engine — rule metadata lives in your database, not behind a vendor API.
rules · one row per check
s3_bucket_public_accesscritical

S3 bucket is not publicly accessible to Everyone or Authenticated Users

target_service
s3
target_resource_type
AwsS3Bucket
rule_type
config_match
source
built_in
status
published
tenant_id
null · shared
framework_mappings
soc2_awshipaa_awspci_4.0_aws+26 more
iam_root_mfa_enabledcritical

Root account has MFA enabled

target_service
iam
target_resource_type
AwsIamUser
rule_type
config_match
source
built_in
status
published
tenant_id
null · shared
framework_mappings
cis_4.0_awshipaa_awspci_4.0_aws+35 more
rds_instance_storage_encryptedhigh

RDS DB instance storage is encrypted at rest

target_service
rds
target_resource_type
AwsRdsDbInstance
rule_type
config_match
source
built_in
status
published
tenant_id
null · shared
framework_mappings
cis_4.0_awssoc2_awshipaa_aws+34 more
criticality across the catalog573 checks · Prowler v5.20.0
critical 58high 169medium 286low 60

Setup

Clone it. Bootstrap it. Run the stack locally.

The strongest proof NightWatch offers is the setup path the repo already supports. Install dependencies, start infra, migrate, seed, and run — no hosted SaaS required.

  • Bun + Turborepo — one install, one dev command for the whole monorepo.
  • Docker-backed infra — PostgreSQL, Redis, and Mailpit via Compose.
  • Two bootstrap pathsdb:seed for a demo in minutes, bun run setup for production.
~ acme/nightwatchready
# 1. clone + install
$ git clone https://github.com/nixbpe/nightwatch.git
$ cd nightwatch && bun install
# 2. infra + database (demo seed)
$ docker compose up -d
$ bun run db:migrate && bun run db:seed
# 3. run the stack
$ bun run dev
 
→ web http://localhost:3000
→ api http://localhost:4000/health
→ mail http://localhost:8025
 
# going to production? bootstrap with: bun run setup

Self-host NightWatch

Clone it. Run it. Own the control plane.

NightWatch is open source and self-hosted. Start with the repository, then follow the setup guide to bring the full stack up locally.