Strix — Data Flow
DFD Level 0 — Context
See ../../diagrams/03_context_dfd.html.
Strix, as one system, sits between the person/CI job invoking it, the target being
tested, the LLM provider powering its agents, the run artifacts it writes to disk, and
(optionally) the managed app.strix.ai cloud platform. Everything below decomposes
the "Strix" box in that diagram.
DFD Level 1 — One scan, start to finish
See ../../diagrams/02_dataflow_pipeline.html
for the sequence-diagram form. As a numbered flow, with the real function/class names:
- CLI entry:
interface/main.py:main()parsesstrix --target ./app-directoryviacli_args.py:parse_arguments(); validates Docker is installed and the sandbox image is present. - Run preparation:
_bootstrap_scan(args)->scan_setup.py:prepare_run(args)generates arun_name, resolves the local directory intolocal_sources, computes diff-scope (for CI PR-diff runs), persists an initial run record. - State init:
interface/cli.py:run_cli(args)buildsscan_config(targets, instructions,local_sources,scope_mode,scan_mode), instantiatesreport.state.ReportState(run_name)and registers it as the process-global. - Orchestration entry:
run_clicallscore.runner.run_strix_scan(scan_config=, scan_id=, image=, local_sources=, interactive=False, max_budget_usd=, max_turns=, status_sink=). - Sandbox creation:
runtime.session_manager.create_or_reuse()picks thedockerbackend, builds/starts one Kali-based container per scan with the local directory bind-mounted,NET_ADMIN/NET_RAWcapabilities, and Caido proxy env vars injected container-wide;caido_bootstrap.bootstrap_caido()logs into the in-container Caido sidecar and opens a temporary project. - Root agent construction:
agents.factory.build_strix_agent(is_root=True, ...)renders the system prompt (always-loaded skills + the root-only orchestration directive) and assembles the root's tool list, ending in thefinish_scanlifecycle tool. - Root registration + child factory:
runner.pybuildsReportUsageHooks(budget/turn tracking), anAgentCoordinator, registers the root agent, and builds achild_agent_builderclosure wired into the sharedcontextdict ascontext["spawn_child_agent"]. - Root loop starts:
core.execution.run_agent_loop(agent=root_agent, initial_input=build_root_task(scan_config), ...). - Root agent turn: the model (via the OpenAI Agents SDK's
Runner.run_streamed()) callsview_agent_graph, reads scope, and repeatedly callscreate_agent(name=, task=, skills=[...])to fan out specialists. - Child spawn:
create_agent->context["spawn_child_agent"]->execution.spawn_child_agent()-> builds a childSandboxAgent, registers it (parent_id=root_id), launches its ownrun_agent_loop()as a background task. The root's turn returns immediately — children run in parallel. - Parallel tool execution inside the shared sandbox: each child calls
exec_command(nmap/ffuf/sqlmap/nuclei/agent-browser/python3, via the SDK'sShellcapability),apply_patch/view_image(Filesystemcapability), and Strix-native tools likelist_requests/repeat_request(Caido). All outbound HTTP from any shell subprocess is transparently intercepted by the container-wide Caido proxy. - Finding a vulnerability: a child builds and validates a proof-of-concept, then
calls
create_vulnerability_report(title=, description=, cvss_breakdown=, poc_script_code=, evidence=, ...). - Validation, dedup, persistence:
tools/reporting/tool.py:_do_create()validates required fields, computes CVSS score/severity, callsreport.dedupe.check_duplicate()(LLM-judged) against existing findings for this run — if not a duplicate,report_state.add_vulnerability_report()assignsvuln-NNNNand fires thevulnerability_found_callback(live display). - Reporting back: the child calls
agent_finish(result_summary=, findings=[...], success=True), which posts a completion report to the root's mailbox and marks the childcompleted. - Root aggregation: the root, parked on
wait_for_agents, wakes on the mailbox message, may spawn further specialists, and eventually callsfinish_scan(executive_summary=, methodology=, technical_analysis=, recommendations=). - Scan completion:
finish_scan->report_state.update_scan_final_fields(); the SDK'stool_use_behaviorhook ends the root'sRunnercycle;run_agent_loop()returns torunner.py. - Artifact writing:
report/writer.py—write_run_record()->run.json;write_executive_report()->penetration_test_report.md;write_vulnerabilities()->vulnerabilities/vuln-NNNN.mdper finding +vulnerabilities.csv+vulnerabilities.json; separatelyreport/sarif.py:write_sarif_report()->findings.sarif. - Sandbox teardown:
session_manager.cleanup(scan_id)closes the Caido client and deletes the Docker container (best-effort). - CLI exit: the final report prints; process exits
2if any vulnerabilities were recorded (for CI gating), else0.
DFD Level 2 — Inside a validated finding (steps 12–14, expanded)
flowchart TD
A["Child agent observes a candidate issue\n(e.g. reflected payload via repeat_request)"] --> B["Build + run a PoC\n(exec_command, proxy tools)"]
B --> C{"PoC actually\ndemonstrates impact?"}
C -- "no" --> B
C -- "yes" --> D["create_vulnerability_report(...)\ntitle, description, cvss_breakdown,\npoc_script_code, evidence, code_locations"]
D --> E["tools/reporting/tool.py: _do_create()\nvalidate required narrative fields +\nCVSS metric-by-metric enums"]
E --> F["_calculate_cvss()\nscore + severity + vector"]
F --> G["report/dedupe.py: check_duplicate()\nLLM judges: same root cause, same asset?"]
G -- "duplicate" --> H["reject — return existing id to caller"]
G -- "new" --> I["report_state.add_vulnerability_report()\nassign vuln-NNNN, append to run's list"]
I --> J["vulnerability_found_callback\n(live CLI/TUI panel)"]
I --> K["agent_finish(findings=[...])\n-> parent mailbox"]
Related: STRIX — Pipeline Stages, STRIX — Architecture (HLD), HLD.md, LLD.md.