RedAmon How RedAmon is built · the whole architecture on one map Docs
RedAmon · Architecture

How RedAmon is built

RedAmon runs on one machine you control, as a set of containers that each do one job. Some hold your keys, some face the targets, and some run code other people wrote. Each one sits in a room with only the doors it needs. This page puts the whole design on one map: every box, the networks between them, the key every call carries, and the one door that faces the internet.

1 machine you control 25 kinds of container 12 kinds of network 1 public door on a server 0 master keys in the attack box 7 layers · 8 journeys
InteractiveLayers
Journeys
The map

Click any box for its story. Layers stack: turn on as many as you like. On a small screen, scroll the map sideways.

Rooms and walls ch 02

Twelve kinds of network, and why each box lives where it does.

Every call carries a key ch 03

Twelve keys: who holds them, and what they never open.

The front door ch 05

Your computer or a public server: what each one exposes.

Be the architect ch 10

Twelve situations. Where does the request go?

01

One machine, many rooms

Everything runs on one Docker host. What keeps it safe is not one big wall, but many small rooms.

In short

RedAmon is split by how much each part must be trusted, so the parts that face danger never hold the keys.

Why a pentest platform is hard to protect

It holds your most sensitive keys

Model providers, OSINT services, GitHub, and the logins of the apps you test.

It attacks systems that may fight back

Every probe and exploit lands on a machine someone else controls.

It reads text written by attackers

Page titles, headers, error messages, package code. Some of it is written to trick an AI.

The answer: four rules

  1. The parts that hold the keys never touch a target.The web app, the orchestrator and Docker itself stay away from the targets.
  2. The parts that touch the targets hold no master key.The Kali sandboxes and the scanners carry only narrow, short-lived credentials.
  3. The parts that open untrusted input get a network of their own.No other RedAmon service is on it, so there is nothing next door to reach.
  4. Code written by other people runs in a locked room with one door.Plugins reach RedAmon only through a gateway that checks every call.

The eight kinds of box on the map

02

Networks: walls between rooms

Docker networks are the walls between the rooms. RedAmon uses twelve kinds of them.

In short

A container can only reach containers on a network it shares. Each network is a wall around one kind of work.

What to notice on the map

  • The main room. The web app, the agent and the two databases share redamon-network.
  • The orchestrator's own room. It can start containers, so it sits apart, and only the web app holds the key to call it.
  • One small network per person. Each person's Kali sandbox gets its own, shared only with the agent that drives it and the capture proxy.
  • Boxes across a border are on both networks, on purpose. The web app is on three; the plugin gateway, the capture proxy and Neo4j are on two.
  • Scans use the host network. Some scanners need raw packets and the machine's own view of the network.
  • Untrusted input gets a network made for it. TruffleHog, the package analyzer and the CodeFix sandbox each run with no RedAmon neighbour.
!

The plugin networks are refused, not weakened. They are internal, with Docker's isolated gateway mode, so they have no internet and no address on the host. That needs Docker Engine 28 or newer; on an older engine redamon.sh refuses to install or start RedAmon rather than run plugins with weaker isolation.

03

Every call carries a key

Twelve keys, each carried by one kind of caller and checked by one receiver.

In short

Sharing a network only lets a box knock. The key it presents decides what it may do, and every key opens as little as possible.

Four families of key

People

A sign-in cookie in your browser, or a personal token for your own AI agent.

Live connections

A ticket that dies after 60 seconds and opens one socket.

Services

The master key and the orchestrator key, never given to anything that touches a target.

Jobs and runs

Credentials made for one scan or one terminal, bound to one project and its owner, with short lives.

Pick a key below to see who carries it, what it opens and what it never reaches.

ExploreThe key ring

Two identities on every request

The tenant

The project's owner: whose data, keys and budget the request touches.

The actor

The person acting: whose permissions are checked, and who is written to the audit log.

So a collaborator's scan spends the owner's keys only with the owner's consent, and the audit says who pressed the button.

04

Who trusts whom

Eight levels of trust, from the boxes that hold the keys to code nobody vouches for.

In short

The closer a box is to the targets, the less it is trusted, and the less it holds.

If a target took over a Kali sandbox

What it would not find

  • A database password
  • A model provider key
  • The master key or the orchestrator key
  • Anyone else's projects: every person has their own sandbox
  • Secrets in its shells: they start with every secret stripped

All it would find

  • Its own two tokens, made when it started
  • The folders of its own person's projects
  • A short-lived, read-only way to query the graph through the agent

The scanners follow the same rule: each carries only a credential for its own scan. The ladder below runs from the most trusted box to the least.

!

Honest about what is not yet split. The agent loads every secret of the install, so it is trusted more than its job strictly needs. That is recorded, with the reason, in RedAmon's threat model.

05

The front door

What can reach RedAmon depends on where it runs: your own computer, or a server on the internet.

In short

On your own computer RedAmon trusts your network. On a server, one HTTPS door faces the internet and everything else is closed.

On your computer

  • No proxy and no TLS.
  • The web app (3000) and the agent's live connection (8090) listen on your network.
  • Every other service listens on 127.0.0.1, the machine itself, or on no port.
  • Reverse shells reach your Kali sandbox through your own tunnel.
  • Right for a laptop, or a lab on a network you trust.

On a public server

  • nginx with TLS is the single public door.
  • It forwards only the web app and the agent's four live-connection paths.
  • It strips forged headers, allows five sign-ins a minute, and answers 404 for every internal route.
  • Ports 3000 and 8090 are re-bound to 127.0.0.1.
  • A firewall in the cloud and on the host stands in front of nginx.
CompareWho can reach each port
ServicePortYour computerPublic server

Three gates, and the firewall comes first

1 · Cloud firewall

Configured in your provider's console. A refusal looks like a timeout.

2 · Host firewall (ufw)

Filters by port and address; it cannot see a URL. Also a timeout.

3 · nginx

Sees the path: rate limits, the optional gate, and 403 or 404 for what is not allowed.

The MCP endpoint for outside AI agents is off on a server until you switch it on. Then it has its own address list, its own rate limit and a 64 KiB body cap, and it is refused outright on a server without TLS.

06

People and permissions

Root, admins, members and collaborators, and the AI agents and plugins that act for them.

In short

One policy, in one place, decides who may do what on which project, and every request is checked against it again.

  • Checked on every request. Your role, status and session version are read from the database each time, so a change counts from your next click.
  • Spending someone's keys needs their consent. A collaborator's scans and agent chats run on the project owner's keys, and only once the owner agrees.

Who can act

Root

One per install. Manages admins and the security policy; break-glass reads are Root-only, time-boxed, audited, and the owner is told.

Admins

Narrowed by an admin profile. Full admins and security auditors can open any project read-only, without raw data, files or anyone's conversations, and the owner sees it.

Members

Hold a permission set: default member, read-only analyst, recon operator, red-team operator, automation, or no access.

Collaborators

Reach someone else's project at a level, from Read to Owner. Pick a level below.

Your AI agent

A personal token, scoped, expiring, revocable, and never more powerful than you are right now.

Plugins

Act only through call tokens, on behalf of the person who started the action.

InteractiveA collaborator's level on one project
07

Where your data lives

Two databases and a set of Docker volumes, all on the machine you control.

In short

Everything is stored on your own machine. Six kinds of traffic leave it, each for a reason you chose.

Stays on your machine
  • PostgreSQL: accounts, permissions and the audit trail; projects and Rules of Engagement; your API and model keys (always masked when the browser reads them); conversations and the agent's memory; captured traffic (kept 14 days by default).
  • Neo4j: the attack-surface graph of every project, each node stamped with its project.
  • Docker volumes: workspace files, scan outputs and reports, plugin code, vulnerability feeds, model weights.
Leaves your machine, and why
  • Prompts, with target context, to the AI provider the project uses, on the owner's key. With Agent in the Loop, to your own MCP client instead.
  • Recon queries to the OSINT services you configured, with your keys.
  • Probes and attacks, only to the targets in scope.
  • Knowledge-site fetches for your Tradecraft library.
  • Target details for the Jev decision model, only if a project switches an AI hook to it.
  • Your stored keys, to each provider's own usage page, only when you run the API-usage check.
08

Born, run, removed

When each box starts, and when it goes away.

In short

A handful of boxes run all the time. Most are created for one job and removed when it ends.

  • Fresh containers for every scan. Whatever a target did to one scan's tools is gone before the next scan starts.
  • A Kali sandbox when you need one. Each person's sandbox starts with their first task and stops after 20 idle minutes.
  • A queue that protects the machine. At most four jobs run at once, and only while 10 GiB of disk is free.
  • Nothing left behind. Due scans are checked every minute, and a reaper removes leftover helpers.
Always on

Web app · AI agent · PostgreSQL · Neo4j · orchestrator · Docker broker · plugin runner and gateway

One per scan or job

Recon and partial recon · tool containers · vulnerability scan · GitHub hunt · TruffleHog · AI surface scan · supply-chain scan · BadDNS

While a switch is on

Capture proxy · traffic ingest, while traffic capture is switched on

Started on demand

Kali sandbox (one per person, stopped after 20 idle minutes) · AI judge (while an AI surface scan needs it) · package analyzer · CodeFix sandbox (one hour at most) · feed sync

Optional install

GVM / OpenVAS (--gvm) · knowledge base (--kbase) · nginx and the firewall, on a public server

09

Plugins: a locked room

How third-party code runs inside RedAmon without being trusted.

In short

Plugins are the first code in RedAmon that RedAmon did not write, so they run as if they were hostile.

With the permissions an admin granted, a plugin can

  • Read the transcript of the session it was started in, with credentials masked
  • Keep its own data, inside its own space and quotas
  • Ask an AI model, through the agent, on the owner's key
  • Propose new text for one of the agent's skills

A plugin cannot

  • Reach the internet or the machine
  • Hold a database password or a model key
  • Call anything but the Gateway, which checks every call
  • Change the agent until a person approves its proposal

Six rules that make it safe

1
Signed before it lands

A plugin installs only from a catalog with a valid signature and a matching checksum, and the catalog can never roll back.

2
Its own user, its own limits

One worker per plugin version, under its own user ID, with 512 MB of memory, 64 processes and at most 15 minutes per action.

3
No internet, no host

The plugin networks are internal: no route out, no address on the machine.

4
One door, checked every time

The gateway forwards two routes only, and the web app re-authorizes every call against the call token.

5
No keys

Model calls go through the agent, on the owner's key, under a daily cap per plugin and person.

6
A person approves

A plugin can propose new instructions for the agent; they do nothing until a person approves them, and can be reset at any time.

10

Be the architect

Twelve situations. You know the map now: where does the request go, and who says yes?

Quiz
11

Where to go next

Go inside one of the rooms, or put RedAmon on a server of your own.