01 · Cybersecurity · PurpleTalk
Threat Intelligence & Attack Surface Management Platform
Tenant-isolated NestJS APIs, a batched CVE enrichment pipeline and a 45-component React asset store for a multi-tenant security platform.
Context
A multi-tenant threat-intelligence and external attack surface management (EASM) platform. Security teams use it to see what their organisation exposes to the internet (subdomains, IPs, DNS, SSL certificates and email security) and which known vulnerabilities affect those assets. Each customer organisation must only ever see its own data, and existing role-based visibility rules decide what each user can see within it. The project is ongoing, with the platform roadmap running through next year.
My role
Full stack. I build backend APIs and data models in NestJS and TypeORM, integrated a vulnerability-enrichment tool into a batched pipeline, wrote unit tests for the threat scoring service, and built two major frontend areas in React and TypeScript.
Architecture
Architecture, left to right. Client: Security analyst → Frontend: React 18 · TypeScript · MUI → API (NestJS): Role guard, Tenant-scoped controllers, TypeORM query builders → Data: SQL database, Asset discovery & scanning. Enrichment pipeline. Trigger: Batch job → Enrich: SploitScan → Produces: CVSS, EPSS and exploitability data → Stored: TypeORM entities.
Key decisions
- 01
Tenant isolation enforced in the query layer
Every endpoint takes the tenant from the authenticated request context and applies it inside the TypeORM query builder, never from a client-supplied parameter. In a security product, leaking one customer's data to another is the worst possible failure, so I made it impossible at the data-access layer and covered it with unit tests. The trade-off is more verbose queries, which I accepted.
- 02
Aggregate in SQL, not in Node
The Executive Dashboard numbers (counts, severity breakdowns, trends) are computed with SQL aggregation in the database instead of loading rows into the service and reducing them in JavaScript. Only small result sets cross the network, and the dashboard stays fast as tenants grow. The cost is more complex queries that depend on the right indexes.
- 03
Reuse a proven Python tool in Docker instead of rewriting it
Rather than port vulnerability enrichment to Node, I ran SploitScan, an existing Python tool, in a Docker container and fed it CVE IDs in batches. Docker isolates its Python dependencies from the Node services, and batching (tested with lookups of 1,000+ IDs) avoids one call per asset. The trade-off is a cross-language boundary, so the pipeline has to handle tool failures and timeouts explicitly.
- 04
Ship the Asset Store behind a per-tenant feature flag
The new EASM Asset Store (45+ components) was released behind a per-tenant flag, so existing users saw no change until their organisation was switched on. That allowed incremental rollout and an instant rollback without a deploy, at the cost of keeping two code paths alive for a while.
Results
- Building the backend for the platform's new Executive Dashboard in NestJS and TypeORM: SQL-aggregated APIs with strict per-customer data isolation and the existing role-based access preserved. Ongoing as the platform expands.
- Vulnerability records enriched with CVSS, EPSS and exploitability data through a batched pipeline, with new TypeORM entities and migrations to store it.
- Jest unit tests for the threat scoring service covering tenant isolation and batched lookups of 1,000+ IDs.
- EASM Asset Store (45+ React components covering subdomains, IPs, DNS, SSL and email security) released per tenant with no change for existing users.
- Global Threat Intel dashboard redesigned with date-filtered APIs and reusable SVG gauge and progress components, now used across the portal.
Stack
- NestJS
- TypeORM
- SQL
- Node.js
- Docker
- Python (SploitScan)
- Jest
- React 18
- TypeScript
- Material UI
- SVG