
AI-driven automated threat analysis pipeline that routes files, URLs, IPs, domains, or images through specialized security analyzers and generates professional PWNDoc reports with integrated YARA and Sigma rule.
Submit a file, URL, IP, domain, or image. SecFlow routes it to the right analyzer, lets an AI model decide what to investigate next, and produces a report with YARA rules, SIGMA rules, MITRE ATT&CK mappings, and a print-ready PDF export.
SecFlow is an open-source threat analysis pipeline for security analysts, SOC teams, and researchers. Instead of running separate tools by hand and correlating their output yourself, you hand SecFlow one input and it:
The orchestrator is a TypeScript service built on a single LangGraph.js state graph. The model never touches the network or filesystem directly. It can only choose from a catalog of targets the backend has already validated.
| Feature | Detail |
|---|---|
| AI-driven routing | An OpenRouter model (default nvidia/nemotron-3-ultra-550b-a55b:free, configurable) picks the next analyzer after each pass using structured output |
| Five specialized analyzers | Malware, Steganography, Reconnaissance, Web Vulnerability, Macro/Office |
| Deterministic first pass | File and target rules choose the first analyzer. The model is only consulted when the type is ambiguous |
| Download and analyze | Follows IOCs by downloading payloads found in analyzer output and routing them to the right analyzer |
| Evidence-grounded YARA | 2–5 rules per analysis, compiled with YARA-X, each citing the evidence that produced it |
| Evidence-grounded SIGMA | 2–4 rules covering different log sources, structurally validated, with indicators checked against the evidence |
| MITRE ATT&CK mapping | Findings are mapped to technique IDs with tactic names |
| Dual report formats | Self-contained HTML (print to PDF) plus structured JSON |
| SSRF protection | Private, loopback, link-local, and cloud-metadata targets are blocked before and during analysis |
| Bounded execution | Pass, model-cycle, tool-call, and wall-clock budgets with a recorded termination reason |
| React dashboard | Submit analyses, follow pipeline progress, and browse results per analyzer |
| Standalone analyzers | Each microservice exposes its own REST API and can be used on its own |
SecFlow is an orchestrator plus five independent analyzer containers on one Docker network. The orchestrator owns routing, state, budgets, and reporting. Analyzers know nothing about the pipeline.
flowchart TD
U["Input: file, URL, IP, domain, image"] --> C["Input Classifier<br/>magic bytes + routing rules"]
C -->|"rule matched (no AI)"| A1["First analyzer"]
C -->|"ambiguous"| M["Model decision"]
subgraph LOOP ["LangGraph loop (3, 4 or 5 passes, bounded)"]
A1 --> S[("Findings + raw-output store")]
S --> M
M -->|"analyze_* + targetId"| T["Analyzer tool<br/>HTTP to microservice"]
T --> S
M -->|"finish"| X(("exit loop"))
end
X --> F["Finalize"]
F --> Y["generate_yara<br/>YARA-X compile check"]
Y --> G["generate_sigma<br/>structural validation"]
G --> R["generate_report<br/>JSON + HTML"]
flowchart LR
O["Orchestrator<br/>:5000"] -->|HTTP| MW["Malware<br/>:5001"]
O -->|HTTP| ST["Steg<br/>:5002"]
O -->|HTTP| RC["Recon<br/>:5003"]
O -->|HTTP| WB["Web<br/>:5005"]
O -->|HTTP| MC["Macro<br/>:5006"]
O -->|"chat completions"| OR["OpenRouter"]
MW --> VT["VirusTotal"]
MC --> VT
sequenceDiagram
participant Client
participant Orch as Orchestrator
participant An as Analyzer
participant LLM as OpenRouter model
Client->>Orch: POST /api/smart-analyze
Orch->>Orch: Classify input + SSRF guard
Orch->>An: Pass 1 (deterministic, no model call)
An-->>Orch: findings + raw_output
loop until finish or a budget is reached
Orch->>LLM: bounded evidence summary + allowed tools
LLM-->>Orch: action + targetId + reasoning
Orch->>Orch: validate action and resolve targetId
Orch->>An: run selected analyzer
An-->>Orch: findings + raw_output
end
Orch->>Orch: YARA, SIGMA, report
Orch-->>Client: job id, risk score, report URLs
{ targetId }. The id must resolve in a trusted per-run catalog and match the tool's allowed target kinds. The model cannot supply URLs, paths, commands, or service addresses.<untrusted_evidence> boundaries. The model receives bounded summaries and references, never raw sample bytes or unbounded dumps. Prompts are guidance only. Schemas and code enforce the actual limits.500. Analyzer output is never fabricated.Every run ends with a recorded reason.