All projects
Featured case study

Megatron: Software Supply-Chain Security Platform

A multi-tenant platform, built solo in Go and Next.js, that scans client repositories for vulnerable dependencies, produces signed CISA-ready SBOMs, and syncs findings with Veracode, SonarQube, ServiceNow, and Cortex.

Role
Sole engineer: Go API and worker, Next.js web app, CI/CD and deployment
System
Megatron by RegistryAIQ (built at Dubtel)
Repositories flowing through a scanner into a signed SBOM and security tool integrations

Results at a glance

  • Scans GitLab, GitHub, Subversion, and CVS repositories, on demand, on a schedule, or on every push via signed webhooks.
  • Matches every package against OSV, CISA KEV, FIRST EPSS, the CVE List, and NVD, which sync continuously in the background.
  • Produces CycloneDX 1.6 and SPDX 2.3 SBOMs with CISA's 2026 minimum elements, signed with Ed25519, plus OpenVEX and CycloneDX VEX documents.
  • Imports findings from Veracode and SonarQube, and forwards them to ServiceNow, Cortex XSOAR, and XSIAM without ever ticketing the same finding twice.
  • About 25,000 lines of Go with 97 tests, a CI pipeline that scans Megatron's own dependencies on every push, and ~20 MB distroless API images.

Overview

Megatron answers one question for an organization: which of our dependencies are vulnerable, where, and how bad is it? It connects to the organization's source control, catalogues every package in every repository, matches them against public vulnerability data, and keeps the answer current as new advisories appear, even when the code doesn't change.

I built it alone, from the first commit to production, in two weeks: a Go API and worker, a Next.js web app, CI, and deployment.

Architecture

  • API (Go, chi + Huma). A typed HTTP API with generated OpenAPI docs, JWT sessions with refresh-token rotation and reuse detection, Google sign-in, a four-level role model (platform, tenant, business client, read-only user), and an audit log.
  • Database (PostgreSQL, sqlc, goose). Queries are written in SQL and compiled to type-safe Go with sqlc. Migrations are embedded in the binary and serialized with an advisory lock, so any number of instances can start at once.
  • Worker (River). Repository scans, feed syncs, imports, and forwarding all run as jobs on River, a Postgres-backed queue that spreads work across any number of workers with no separate broker.
  • Web app (Next.js). TanStack Query, Zustand, and nuqs for state, an OpenAPI-typed client, charts, bulk triage, and live updates.

Scanning without trusting the code

Client repositories are untrusted input. A scan:

  1. Fetches the default branch into a temporary folder. For git, the token travels as an HTTP header through environment variables, and hooks, submodules, LFS, symlinks, and redirects are all off. The address must be on the integration's own server.
  2. Lists packages with syft, reading lockfiles and manifests only. Nothing from the repository is ever executed.
  3. Matches packages against the local vulnerability data using each ecosystem's own version rules, merges duplicate advisories, and enriches them with exploit data.
  4. Stores components, the dependency graph, and findings, then deletes the checkout.

Integration secrets are encrypted with AES-256-GCM, and every outbound request goes through an SSRF-safe HTTP client.

Vulnerability intelligence

Five feeds sync in the background:

FeedWhat it adds
OSVPackage advisories across ecosystems, and malicious-package reports
CISA KEVVulnerabilities known to be exploited
FIRST EPSSThe probability that a CVE gets exploited
CVE ListOfficial records: CWE, CVSS, CISA SSVC
NVDNIST's own CVSS analysis, for advisories that come without a severity

The CVE List starts from a ~620 MB snapshot and then applies only the changes, so feeds stay current without re-downloading everything.

SBOMs and VEX

Every finished scan produces CycloneDX 1.6 and SPDX 2.3 SBOMs with CISA's 2026 minimum elements, stating anything unknown explicitly rather than leaving it out. Each SBOM gets a detached Ed25519 signature that anyone can verify against a public key endpoint. Triage decisions ("not affected", "accepted risk") export as OpenVEX and CycloneDX VEX documents.

Enterprise integrations

  • In: Veracode findings (every request signed with Veracode's HMAC scheme) and SonarQube vulnerabilities and security hotspots, upserted in a single statement so findings keep their identity across syncs.
  • Out: ServiceNow incidents, Cortex XSOAR incidents, and Cortex XSIAM events. A new finding opens exactly one ticket, and a fixed or ignored finding resolves it. Each delivery is keyed by a stable finding key, a per-tenant lock keeps runs apart, and failures retry and back off without stalling the whole run.

Live, without polling

A Postgres trigger fires on every scan status change, and LISTEN/NOTIFY fans it out to a Server-Sent Events stream. The web app refreshes exactly what changed, and it works across any number of API and worker processes.

Shipping

GitLab CI runs formatting, vetting, and the test suite against a throwaway Postgres on every push. It also runs riq-scan, Megatron's own scanner as a command-line tool, against Megatron itself, and fails the build on any high or critical finding. Production runs as distroless, non-root Docker images behind Caddy.

What I took from it

  • Don't run what you scan. Read lockfiles and manifests only, and fetch code with hooks, submodules, and symlinks turned off.
  • Key every external delivery by a stable identity, and duplicates become impossible instead of unlikely.
  • Postgres can be the queue and the event bus. River for jobs and LISTEN/NOTIFY for live updates removed a whole class of infrastructure.
  • A security tool should scan itself first.
Henry Iddirisu

Henry Iddirisu

AI product engineer · Accra, Ghana · Remote

More projects

PythonFastAPISQLAlchemy (async)

DUBTEL AI Platform Backend

Role: Backend engineer (built solo); led the Next.js portal

The multi-tenant FastAPI backend for an AI voice-agent platform, built solo: tenants, role hierarchy, SAML SSO, pricing, recurring…

Next.jsReactTypeScript

DUBTEL AI Portal

Role: Lead frontend engineer

The white-label Next.js portal where businesses manage AI voice agents, phone numbers, billing, and users, with role-aware navigat…