openaudit architecture

What a run touches, from entry point to report, and which aspects each target kind is audited for. Generated from the auditor registry on 2026-10-13.

Pipeline

Every entry point drives the same engine. Each auditor runs in isolation: a missing tool becomes skipped, a crash or timeout becomes error, and the rest of the run carries on.

Entry points

apps/cli · packages/mcp · apps/server + packages/api · apps/web
  • CLI openaudit: audit, list, doctor, init, mcp, schema
  • MCP server (stdio) for Claude Code, Cursor, Codex
  • HTTP API (Hono + oRPC) with SSRF guard
  • Web app (TanStack Start)
  • GitHub Action (action.yml): PR diff mode, SARIF, report artifact

Target detection

core/target.ts
  • Directory, file, http(s):// URL, image:<ref> or cloud:<provider>
  • Resolves to one or more of 7 kinds: codebase, url, webapp, container, iac, mobile, cloud
  • Config: --config is trusted; a target's own config is read with restrictions

Engine

core/engine.ts
  • Selection: --only, --exclude, --category; untrusted config can only narrow
  • Concurrency (default 4), per-auditor timeouts
  • Correlation: one issue reported by several tools is kept once and lists who confirmed it
  • Fingerprints, baseline, suppressions and --diff <ref> (changed files only)

Scoring

core/scoring.ts
  • 0–100 score and A–F grade overall and per category
  • Severity: critical, high, medium, low, info
  • --fail-on gate → exit 0 ok, 1 findings, 2 usage error
  • Optional --ai insights: prioritised summary

Reports

core/reporters
  • Terminal
  • JSON (versioned schema, openaudit schema)
  • SARIF for code scanning
  • Markdown
  • Interactive HTML: overview, a tab per area, OWASP/CWE view
WorkspaceReads confined to the target root; symlinks skipped.
HttpUser headers sent only to the target origin; credentials stripped on cross-origin redirects; URL auditors send low-volume GET/HEAD.
ExecWrapped tools run from temp dirs with hardening flags; no installs or builds; 15-minute cap.

Auditors by target

Hover a chip for its title and the tool it wraps. Click a chip or a matrix cell to highlight related auditors. An auditor that serves several target kinds appears in each column.

built-in wraps a scanner agentic (LLM) dashed = opt-in (--only)

Coverage: category × target kind

Each cell counts auditors that report that category for that kind; the small line splits them into built-in / external / agentic. Red cells have no auditor; grey dashes mark combinations that don't apply.

Running with AI agents

The playbooks cover work that static rules can't do: following data flows, walking authenticated journeys, judging architecture. They run two ways.

In-process: --agentic

openaudit drives the Claude Agent SDK itself. Needs ANTHROPIC_API_KEY or Claude Code auth. Agents can read and search the code but not write, edit, run shell commands or browse the web. Browser playbooks go through a guard.

  1. Engine selects the agentic auditors for the target kind
  2. Each of the 10 playbooks runs as its own agent session
  3. The agent records each confirmed issue with report_finding; HTTP requests are limited to the target origin
  4. agent.deepsec (Vercel deepsec) is opt-in only, with $5 / 30 min / 25-file caps by default

Agent-in-the-loop: MCP

Your own agent (Claude Code, Cursor, Codex) calls openaudit as a tool, runs the deterministic audit, then investigates with a playbook and submits what it found.

  1. detect_target → run_audit
  2. list_playbooks → get_playbook
  3. Agent investigates with its own tools
  4. submit_findings merges results into the report; compare_reports diffs runs

Trust boundary

The target is treated as hostile input. These rules come from issues reproduced during development.

Still open

Red = worth doing next. Grey = larger scope or blocked upstream.

Quality

Run the AI paths for real

--agentic and --ai have never run against the live API. Doing so costs money, so it waits for a go-ahead.

Quality

Reconstructed fixtures

ZAP active scan, Prowler, golangci-lint v2, cargo-audit and the deepsec export are still parsed from documented formats rather than real recordings.

Engine

Merge IaC and container findings

Checkov, KICS, Kubescape, kube-linter and the built-in checks report the same misconfiguration under different rule ids with no shared tag, so they are not merged yet. Needs a rule-equivalence map.

Scoring

CVSS v4 scores

v4 vectors fall back to the advisory database's own label, which is usually present. Scoring them directly needs the MacroVector tables.

URL

DNSSEC

Node's resolver can't validate signatures, so DNSSEC is skipped rather than guessed.

Mobile

iOS accessibility

Compiled storyboards and nibs aren't analysed; iOS gets Info.plist hints only.

Compliance

ASVS, SOC 2 and CIS views

The report maps findings to OWASP Top 10 and the CWE Top 25. Mapping to ASVS, SOC 2 or CIS controls needs curated data.