# abc2lab/abcdef2lab architecture

> Architecture diagram of the GitHub repository abc2lab/abcdef2lab, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abc2lab/abcdef2lab
- Repository: https://github.com/abc2lab/abcdef2lab

## Overview

ABC2LAB is a developing, locally oriented web-security diagnosis product, initially focused on horizontal IDOR checks. The intended flow is operator setup and candidate review, controlled HTTP execution, comparison of normal and cross-account reads, evidence-backed judgment, then stored results shown in the UI. The README explicitly cautions that these stages are not yet fully connected end to end; the graph preserves that distinction. Source excerpts show the worker/engine runtime and selected supporting modules, while several other connections below are documented capabilities rather than inspected call paths.

Main entry points: [`agent/worker.go`](https://github.com/abc2lab/abcdef2lab/blob/main/agent/worker.go) (Planner and worker), [`server/engine.go`](https://github.com/abc2lab/abcdef2lab/blob/main/server/engine.go) (Exploration engine), [`server/manager.go`](https://github.com/abc2lab/abcdef2lab/blob/main/server/manager.go) (Task manager), [`report/diagnostic.go`](https://github.com/abc2lab/abcdef2lab/blob/main/report/diagnostic.go) (Diagnostic reports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Task runtime"]
  node_app["Backend startup<br/>[main.go]"]
  node_api["Task API<br/>[server.go]"]
  node_engine["Exploration engine<br/>[engine.go]"]
  node_manager["Task manager<br/>[manager.go]"]
  node_agent["Planner and worker<br/>[worker.go]"]
end

subgraph group_control["Execution controls"]
  node_guard["Request guard<br/>[guard.go]"]
  node_transmit["HTTP transmission<br/>[http.go]"]
  node_proxy["Controlled proxy<br/>[execution.go]"]
end

subgraph group_judgment["Evidence and results"]
  node_idor["IDOR comparison<br/>[verifier.go]"]
  node_oracle["Judgment oracle<br/>[oracle.go]"]
  node_evidence["Evidence binding<br/>[check.go]"]
  node_report["Diagnostic reports<br/>[diagnostic.go]"]
  node_remediation["Remediation guidance<br/>[remediation.go]"]
  node_traffic[("Traffic evidence<br/>[traffic.go]")]
end

subgraph group_support["Model and persistence"]
  node_db[("PostgreSQL data<br/>[db.go]")]
  node_llmpolicy["Model policy<br/>[policy.go]"]
  node_llmrec["Model-call recording<br/>[llmrec.go]"]
end

subgraph group_ui["User interface"]
  node_web["Diagnosis UI<br/>[engine.ts]"]
end

node_operator(("Operator"))

node_operator -.->|"reviews and steers"| node_web
node_web -->|"calls task API"| node_api
node_app -->|"starts backend"| node_api
node_api -.->|"controls tasks"| node_engine
node_engine -->|"manages tasks"| node_manager
node_engine -->|"runs work"| node_agent
node_manager -->|"persists task state"| node_db
node_manager -->|"starts recorder"| node_traffic
node_agent -->|"gates tool calls"| node_guard
node_guard -.->|"authorizes requests"| node_transmit
node_transmit -.->|"executes HTTP"| node_proxy
node_proxy -.->|"supplies observations"| node_idor
node_idor -.->|"compares reads"| node_oracle
node_oracle -.->|"checks evidence"| node_evidence
node_evidence -.->|"supports findings"| node_report
node_report -.->|"shows results"| node_web
node_report -.->|"offers guidance"| node_remediation
node_traffic -->|"stores observations"| node_db
node_llmpolicy -.->|"configures model access"| node_agent
node_agent -.->|"records model calls"| node_llmrec
node_llmrec -->|"writes usage records"| node_db

click node_app "https://github.com/abc2lab/abcdef2lab/blob/main/cmd/artex/main.go"
click node_api "https://github.com/abc2lab/abcdef2lab/blob/main/server/server.go"
click node_engine "https://github.com/abc2lab/abcdef2lab/blob/main/server/engine.go"
click node_manager "https://github.com/abc2lab/abcdef2lab/blob/main/server/manager.go"
click node_agent "https://github.com/abc2lab/abcdef2lab/blob/main/agent/worker.go"
click node_guard "https://github.com/abc2lab/abcdef2lab/blob/main/guard/guard.go"
click node_transmit "https://github.com/abc2lab/abcdef2lab/blob/main/transmit/http.go"
click node_proxy "https://github.com/abc2lab/abcdef2lab/blob/main/e2proxy/execution.go"
click node_idor "https://github.com/abc2lab/abcdef2lab/blob/main/idor/verifier.go"
click node_oracle "https://github.com/abc2lab/abcdef2lab/blob/main/oracle/oracle.go"
click node_evidence "https://github.com/abc2lab/abcdef2lab/blob/main/evidencebind/check.go"
click node_report "https://github.com/abc2lab/abcdef2lab/blob/main/report/diagnostic.go"
click node_remediation "https://github.com/abc2lab/abcdef2lab/blob/main/remediation/remediation.go"
click node_traffic "https://github.com/abc2lab/abcdef2lab/blob/main/traffic/traffic.go"
click node_db "https://github.com/abc2lab/abcdef2lab/blob/main/db/db.go"
click node_llmpolicy "https://github.com/abc2lab/abcdef2lab/blob/main/llmpolicy/policy.go"
click node_llmrec "https://github.com/abc2lab/abcdef2lab/blob/main/llmrec/llmrec.go"
click node_web "https://github.com/abc2lab/abcdef2lab/blob/main/web/src/abc2lab-ui/lib/engine.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_api,node_engine,node_manager,node_agent toneBlue
class node_guard,node_transmit,node_proxy toneAmber
class node_idor,node_oracle,node_evidence,node_report,node_remediation,node_traffic toneMint
class node_db,node_llmpolicy,node_llmrec toneRose
class node_web,node_operator toneIndigo
```

## Components

### Task runtime

- [Backend startup](https://github.com/abc2lab/abcdef2lab/blob/main/cmd/artex/main.go): `cmd/artex/main.go`
- [Task API](https://github.com/abc2lab/abcdef2lab/blob/main/server/server.go): `server/server.go`
- [Exploration engine](https://github.com/abc2lab/abcdef2lab/blob/main/server/engine.go): `server/engine.go`
- [Task manager](https://github.com/abc2lab/abcdef2lab/blob/main/server/manager.go): `server/manager.go`
- [Planner and worker](https://github.com/abc2lab/abcdef2lab/blob/main/agent/worker.go): `agent/worker.go`

### Execution controls

- [Request guard](https://github.com/abc2lab/abcdef2lab/blob/main/guard/guard.go): `guard/guard.go`
- [HTTP transmission](https://github.com/abc2lab/abcdef2lab/blob/main/transmit/http.go): `transmit/http.go`
- [Controlled proxy](https://github.com/abc2lab/abcdef2lab/blob/main/e2proxy/execution.go): `e2proxy/execution.go`

### Evidence and results

- [IDOR comparison](https://github.com/abc2lab/abcdef2lab/blob/main/idor/verifier.go): `idor/verifier.go`
- [Judgment oracle](https://github.com/abc2lab/abcdef2lab/blob/main/oracle/oracle.go): `oracle/oracle.go`
- [Evidence binding](https://github.com/abc2lab/abcdef2lab/blob/main/evidencebind/check.go): `evidencebind/check.go`
- [Diagnostic reports](https://github.com/abc2lab/abcdef2lab/blob/main/report/diagnostic.go): `report/diagnostic.go`
- [Remediation guidance](https://github.com/abc2lab/abcdef2lab/blob/main/remediation/remediation.go): `remediation/remediation.go`
- [Traffic evidence](https://github.com/abc2lab/abcdef2lab/blob/main/traffic/traffic.go): `traffic/traffic.go`

### Model and persistence

- [PostgreSQL data](https://github.com/abc2lab/abcdef2lab/blob/main/db/db.go): `db/db.go`
- [Model policy](https://github.com/abc2lab/abcdef2lab/blob/main/llmpolicy/policy.go): `llmpolicy/policy.go`
- [Model-call recording](https://github.com/abc2lab/abcdef2lab/blob/main/llmrec/llmrec.go): `llmrec/llmrec.go`

### User interface

- [Diagnosis UI](https://github.com/abc2lab/abcdef2lab/blob/main/web/src/abc2lab-ui/lib/engine.ts): `web/src/abc2lab-ui/lib/engine.ts`

### Other components

- **Operator**

## Connections

- Operator → Diagnosis UI: reviews and steers
- Diagnosis UI → Task API: calls task API
- Backend startup → Task API: starts backend (evidence: `cmd/artex/main.go`)
- Task API → Exploration engine: controls tasks
- Exploration engine → Task manager: manages tasks (evidence: `server/engine.go`)
- Exploration engine → Planner and worker: runs work (evidence: `server/engine.go`)
- Task manager → PostgreSQL data: persists task state (evidence: `server/manager.go`)
- Task manager → Traffic evidence: starts recorder (evidence: `server/manager.go`)
- Planner and worker → Request guard: gates tool calls (evidence: `agent/worker.go`)
- Request guard → HTTP transmission: authorizes requests
- HTTP transmission → Controlled proxy: executes HTTP
- Controlled proxy → IDOR comparison: supplies observations
- IDOR comparison → Judgment oracle: compares reads
- Judgment oracle → Evidence binding: checks evidence
- Evidence binding → Diagnostic reports: supports findings
- Diagnostic reports → Diagnosis UI: shows results
- Diagnostic reports → Remediation guidance: offers guidance
- Traffic evidence → PostgreSQL data: stores observations (evidence: `traffic/traffic.go`)
- Model policy → Planner and worker: configures model access
- Planner and worker → Model-call recording: records model calls
- Model-call recording → PostgreSQL data: writes usage records (evidence: `llmrec/llmrec.go`)
