Documentation Index
Fetch the complete documentation index at: https://docs.vigolium.com/llms.txt
Use this file to discover all available pages before exploring further.
Architecture series: Overview · Native Scan · Agentic Scan · Data & Storage · Server & API
vigolium server, a Fiber REST API that ingests traffic, triggers native and agentic scans, and serves results, all sharing the same project-scoped persistence layer as the CLI. This document explains the service’s shape and request lifecycle. For curl-by-curl recipes see Server & Ingestion; for the full endpoint catalogue see API Overview and the API Reference.
1. Process model
pkg/server/ (Fiber). It owns no scan logic of its own, it wraps the same internal/runner native pipeline and the same pkg/agent orchestrators the CLI uses, so behavior is identical whichever entry point launches a scan. Three traffic sources feed the same RecordWriter → repository path: the /api/ingest-http endpoint, the optional transparent HTTP proxy, and the standalone vigolium-ingestor client.
Middleware chain
Every request (except/, /health, /metrics, /swagger/*) passes:
- CORS:
server.cors_allowed_origins,reflect-origin(default, credentialed echo),*(wildcard, no credentials), explicit comma-separated allowlist, or empty (disabled). - Auth:
Authorization: Bearer <key>; key resolvesVIGOLIUM_API_KEYenv >server.auth_api_keyconfig.vigolium server -Adisables auth (development only). - Project resolution:
X-Project-UUIDheader selects the tenant (default project if absent);X-User-Emaildrives optional per-project access control (403on denial). See Data & Storage.
2. Traffic ingestion
POST /api/ingest-http is the universal entry point. A single endpoint accepts many input_modes, normalizes them into HttpRequestResponse items, and hands them to the async RecordWriter:
input_mode | Payload field | Source |
|---|---|---|
url / url_file | content | One URL / newline-separated list |
curl | content or content_base64 | A curl command string |
burp_base64 | http_request_base64 (+ optional http_response_base64, url hint) | Raw HTTP request |
openapi / swagger | content or content_base64 | OpenAPI/Swagger spec |
postman_collection | content_base64 | Postman collection |
*_base64 fields to avoid JSON escaping. The same parsers back the vigolium ingest CLI, which runs in two modes: remote (-s http://server → POSTs to /api/ingest-http) or local (--server omitted → fetches and writes straight to the DB).
Transparent proxy
vigolium server --ingest-proxy-port 9003 opens a recording HTTP proxy. Plain HTTP traffic routed through it is captured into the DB; HTTPS CONNECT tunnels pass through without recording. This is the zero-instrumentation path for capturing traffic from arbitrary tools (curl -x, httpx -proxy, nuclei -proxy).
3. The REST surface
Endpoints group by concern; each group has a dedicated page under the API Reference.| Group | Representative endpoints | Purpose |
|---|---|---|
| Meta (no auth) | GET /, /health, /metrics, /swagger/*, /server-info | Liveness, Prometheus, OpenAPI UI |
| Auth/user | POST /api/auth/login, GET /api/user/info | Token issue, identity |
| Ingestion | POST /api/ingest-http | Traffic in (see §2) |
| HTTP records | GET/DELETE /api/http-records[/:uuid] | Query/inspect captured traffic |
| Findings | GET /api/findings, PATCH /api/findings/:id/status | Query/triage results |
| Scan control | POST /api/scan-url, /api/scan-request, /api/scans/run, /api/scans/:uuid/{stop,pause,resume} | Trigger & manage native scans |
| Scope / config | GET/POST /api/scope, /api/config | Live scope & config |
| Projects | GET/POST/PUT/DELETE /api/projects[/:uuid], /domain-map | Multi-tenancy management |
| Storage | /api/storage/{source,results,upload-source,presign} | Cloud bundles (storage enabled) |
| DB browse | /api/db/tables/... | Generic table inspection (admin) |
| Agent | POST /api/agent/run/{query,autopilot,swarm,vigolium-audit,audit}, sessions/status | AI runs (see §4) |
Asynchronous job pattern
Scan and agent runs are long-lived, so the API is launch-and-poll, not request/response:POST /api/scans/runor/api/agent/run/*→202 Acceptedwith a UUID (409 Conflictif one is already active, only one agent run at a time).- Poll
GET /api/scan/statusorGET /api/agent/status/:iduntil status leavesrunning. - Fetch artifacts:
GET /api/agent/sessions/:id/{logs,artifacts,artifacts/*}(logs SSE-capable; artifact reads support nested paths and a?max_bytes=cap).
"stream": true on a run endpoint switches to Server-Sent Events instead, data: lines carrying {"type":"chunk|phase|done|error", …}. Most consumers should prefer the async poll-and-tail flow to keep warm sessions and prompt caches stable.
4. Agent run API
pkg/server/handlers_agent.go mirrors the vigolium agent subcommands over HTTP. It does not re-implement agent logic, it invokes the same orchestrators documented in Agentic Scan, with one deliberate constraint:
- Provider is server-config only. The CLI’s per-invocation provider flags (
--provider,--model,--oauth-token, …) are not mirrored on the REST schemas. The server resolves the provider once fromagent.olium.*invigolium-configs.yamland reuses it, keeping warm sessions and prompt caches stable. Switching providers means editing YAML and reloading. - Backward-compatible source field. Request types expose
EffectiveSourcePath()to accept bothsourceand legacyrepo_pathJSON keys. - Audit driver dispatch.
POST /api/agent/run/audittakesdriver: "auto"|"both"|"vigolium-audit"|"piolium"; multi-driver modes run sequentially and multiplex SSE chunks with adriverfield when streaming.
Related
Server & Ingestion
Startup flags, curl recipes per input mode.
API Overview
Full endpoint catalogue and request/response schemas.
Agentic Scan
The orchestrators the agent endpoints invoke.
Data & Storage
Project scoping and the persistence layer the handlers share.
