A unified, multi-tenant, AI-assisted security-operations platform. It turns asset discovery, vulnerability scanning, AI-assisted penetration testing, OSINT/threat analysis, and compliance mapping into a single correlated view of organizational risk — with continuous retesting, across an organization's authorized attack surface.
Core problem → solution: fragmented security tooling → one workflow that discovers, assesses, validates, correlates, prioritizes, and retests.
AI-powered automated penetration test — multi-agent planner produces attack paths + evidence.
Asset discovery & vulnerability assessment across the authorized surface.
Threat & OSINT investigation — correlate indicators against assets and findings.
Compliance & security-posture assessment mapped to control frameworks.
Finding remediation & continuous retesting with a tamper-evident trail.
The platform runs authorized offensive tooling only. It ships real safe recon (DNS / HTTP-fingerprint / TLS) and a template-driven finding engine, and models exploit-validation as state — unvalidated → validating → validated | failed — gated behind verified authorization scope + human approval. It does not ship a live-exploitation module that fires payloads at arbitrary targets. Enforced by the authorization-scope, SSRF, rate/concurrency, and agent-sandbox invariants (§9).
Every mutation emits an audit_events row and — when it must reach a second system — an outbox_events row in the same transaction.
AI pentest (W1) consumes assets/findings and produces attack paths + evidence.
One folder per domain under apps/api/src/modules/*.
Register / login / logout, JWT httpOnly-cookie session, password reset, MFA-ready.
Orgs, memberships, RBAC roles, tenant-scope chokepoint, RLS context.
Targets, assets, hosts, services, technologies, authorization scope.
Scan runs, adapter orchestration, BullMQ, WS progress.
Findings, CVSS/CWE, severity, correlation, validation state, retest.
AI pentest engine (multi-agent planner), attack paths, evidence, approval gate.
Indicators, STIX/TAXII threat feeds, correlation.
Frameworks, controls, mappings, posture, evidence.
PDF / JSON / CSV export of findings / compliance / pentest.
Email outbox + outbound webhooks (guaranteed delivery).
Append-only, hash-chained audit log.
Transactional-outbox relay to second systems.
common/TargetResolver, CSRF/Origin guard, password verifier w/ HIBP k-anonymity.uuidv7() — timestamp-ordered, index-friendly at insert scale.jsonb; enums as Postgres enum.DataSource migrations (up/down); seed for roles, severities, frameworks, demo org.tenant_id.app.tenant_id GUC set per request/job.TenantScopedRepository is the single chokepoint that sets the GUC and filters.assertResourceAccess on every user-owned resource and its sub-resources.inbound_webhook_events UNIQUE (provider, event_id).pending_emails UNIQUE (to_address, template_key, business_ref_id).hash = sha256(prev_hash || canonical_json(payload)) — append-only, no update/delete path.findings, scan_results indexed on (tenant_id, severity, created_at).ScanOrchestrator (BullMQ worker) selects adapters by profile → streams RawFindings → normalizes to Finding (CVSS/CWE/severity) → persists → emits WS progress.
.git/.env probes.nuclei -jsonl, parses JSONL to findings.trivy … --format json for repo/IaC/SBOM findings.Used only when the binary is present; the platform stays fully functional on the built-in safe set alone.
{ id, kind, capabilities, isAvailable(): Promise<boolean>, run(target, opts, ctx): AsyncIterable<RawFinding> } — pluggable, testable, safe-by-construction.
PentestPlanner decomposes a run into phases following the VulnBot/AutoPentest/xOffense multi-agent pattern. Each phase is an agent role with an allowlisted tool set that calls only the safe scanner adapters.
LlmProvider interface — provider-abstracted; Claude Messages API default.AttackPath (MITRE ATT&CK + CWE), Evidence (encrypted at rest), risk-scored Findings.Socket.io gateway + @socket.io/redis-adapter for multi-instance fan-out. Auth: JWT on connection, Origin allowlist, per-connection message-rate budget, channel authorization (a client may only join rooms for its own tenant's scans).
BullMQ v5 on Redis (maxmemory-policy=noeviction, dedicated logical DB). Queues: scan outbox email webhook pentest. Idempotent jobs; DLQ after capped backoff.
Drains outbox_events → search index (Postgres FTS in-cluster; Algolia/OpenSearch documented swap), email, outbound webhooks (HMAC signed at insert, Idempotency-Key per send, ≤5 attempts).
Resend v6 via the email queue with rate limiting — never inline in a request handler. Sentry v10 (instrument.ts first), structured JSON logs (pino), Prometheus-style /metrics + /api/health.
DESIGN-TEMPLATE.html.HydrationBoundary + per-request QueryClient).packages/shared Zod schemas.:root into apps/web/app/globals.css.prefers-color-scheme.↳ A static mockup of every one of these screens ships alongside this document as index.html.
Machine-checkable form in invariants.json; enforced by npm run lint:invariants (exit-code). Amending one requires updating §9 + invariants.json + an ADR in the same commit.
| ID | Rule | Check type |
|---|---|---|
| INV-1 | All scoped DB access goes through TenantScopedRepository; no ad-hoc getRepository( outside the tenancy chokepoint. | forbidden-pattern |
| INV-2 | SSRF: the orchestrator calls resolveAndValidate before dispatching any adapter.run(. | boundary-order |
| INV-3 | Authorization scope re-validated before any network action of a scan/pentest job (deny-by-default). | manual |
| INV-4 | Inbound webhook receiver verifies signature before any DB read/write. | boundary-order |
| INV-5 | Audit log is append-only — no update/delete/remove on audit events. | forbidden-pattern |
| INV-6 | Rate-limit config (Redis-backed throttler) is present and wired. | required-file |
| INV-7 | No hardcoded secrets (AWS keys, sk_live_, private keys) in source. | forbidden-pattern |
| INV-8 | Inbound webhook idempotency: UNIQUE (provider, event_id). | required-unique |
| INV-9 | Email idempotency: UNIQUE (to_address, template_key, business_ref_id). | required-unique |
| INV-10 | Design token layer exists (apps/web/app/globals.css) with template tokens. | required-file |
| INV-11 | Health endpoint present. | required-file |
| INV-12 | UI coverage: every screen routes, every non-internal endpoint referenced by UI, every workflow has an e2e test. | ui-coverage |
| INV-13 | Object-level authorization (assertResourceAccess) on user-owned resources and sub-resources. | manual |
| INV-15 | assertResourceAccess invoked in every owner-bearing service (machine-checked call-site). | required-pattern |
| INV-14 | Header buffers sized for accumulated cookies (--max-http-header-size / proxy config). | manual |
@nestjs/*^11 · @nestjs/throttler^6 · websockets + platform-socket.io · @socket.io/redis-adapter · typeorm^0.3 · pg · bullmq^5 · ioredis · zod · bcrypt · @nestjs/jwt · resend^6 · @sentry/nestjs^10 · pino
next^15 · react^18 · @tanstack/react-query^5 · tailwindcss^3 · shadcn/ui (vendored) · socket.io-client · zod
zod (single contract source) · jest + supertest (API) · vitest / @playwright/test (web e2e) · typescript · eslint
RESEARCH verified the bleeding edge (Next 16 / Tailwind v4 / TypeORM 1.1). Where a bleeding-edge major introduced install/build instability in the sandbox, the build pins the nearest battle-tested major (Next 15, Tailwind v3, TypeORM 0.3) and logs the substitution as an ADR — the deliverable (stack, design system, workflows) is preserved; only the pin moves. A build-environment substitution, not a stack change.
| Decision | Over | Why |
|---|---|---|
| Monorepo (npm workspaces) | polyrepo | One contract source; atomic cross-cutting changes; dependency-light. |
| REST /v1 + NestJS | GraphQL / tRPC | Maps cleanly to the resource model and to PDF/JSON/CSV exports. |
| RLS + app-layer scope (both) | app-layer only | Defense in depth; RLS is the backstop if a query escapes the chokepoint. |
| Transactional outbox | direct dual-write | Only correct way to keep DB + search/email/webhooks consistent. |
| Scanner-adapter interface | hard-coded scanners | Pluggable, testable, degrades offline, safe-by-construction. |
| Deterministic fallback planner | LLM-only | Guarantees a functional pentest workflow with no external AI in the sandbox. |
| No live exploitation | payload firing | Legal/ethical requirement; validation modeled as gated state. |
Five trust boundaries, each with its own controls; top risks R1–R8 each map to an invariant and a mitigation.
JWT cookie · CSRF/Origin guard · Zod validation.
RLS · parameterized queries · least-privilege role.
SSRF guard · authorization scope · isolated egress.
Untrusted-data handling · prompt-injection mitigation.
HMAC verify-before-DB. Top risks R1–R8 — authorization scope, SSRF, secret handling, cross-tenant leakage, audit tampering, scan-proxy abuse, prompt injection, artifact handling — each map to an invariant (§9) and a mitigation (§5).