# abhi267266/nuclei architecture

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

- Interactive diagram: https://gitdiagram.com/abhi267266/nuclei
- Repository: https://github.com/abhi267266/nuclei

## Overview

Nuclei is a template-driven vulnerability scanner. A user supplies targets and YAML templates through the CLI; the runtime prepares inputs and templates, executes protocol checks concurrently, evaluates matches, and emits findings. The repository also supports workflows, request fuzzing, browser-based checks, and integrations for exporting or tracking results. The graph reflects the documented product and sampled entry-point and engine code; detailed wiring for several subsystems was not sampled, so their internal links are omitted.

Main entry points: [`internal/runner/runner.go`](https://github.com/abhi267266/nuclei/blob/dev/internal/runner/runner.go) (Scan Runner), [`pkg/tmplexec/exec.go`](https://github.com/abhi267266/nuclei/blob/dev/pkg/tmplexec/exec.go) (Template Execution), [`cmd/nuclei/main.go`](https://github.com/abhi267266/nuclei/blob/dev/cmd/nuclei/main.go) (Nuclei CLI), [`pkg/loader`](https://github.com/abhi267266/nuclei/tree/dev/pkg/loader) (Template Loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["CLI and Setup"]
  node_cli["Nuclei CLI<br/>[main.go]"]
  node_runner["Scan Runner<br/>[runner.go]"]
  node_configuration["Configuration<br/>[flags.go]"]
end

subgraph group_definitions["Inputs and Templates"]
  node_targets["Target Inputs"]
  node_inputformats["Input Formats"]
  node_catalog[("Template Catalog")]
  node_loader["Template Loader"]
  node_templates["Template Parser"]
  node_workflows["Workflow Definitions<br/>[workflows.go]"]
end

subgraph group_runtime["Scan Runtime"]
  node_engine["Execution Engine<br/>[engine.go]"]
  node_tmplexec["Template Execution<br/>[exec.go]"]
  node_protocols["Protocol Checks<br/>[protocols.go]"]
  node_http["HTTP Protocol<br/>[http.go]"]
  node_headless["Browser Checks<br/>[engine.go]"]
  node_fuzz["Request Fuzzing<br/>[fuzz.go]"]
  node_operators["Match and Extract<br/>[operators.go]"]
end

subgraph group_results["Findings and Integrations"]
  node_output["Finding Output<br/>[output.go]"]
  node_reporting["Exports and Trackers<br/>[reporting.go]"]
end

node_user(("Scanner User"))
node_external(("External Services"))

node_user -->|"starts scan"| node_cli
node_cli -->|"loads options"| node_configuration
node_cli -->|"runs enumeration"| node_runner
node_runner -->|"loads targets"| node_targets
node_inputformats -->|"generates inputs"| node_targets
node_runner -->|"loads definitions"| node_loader
node_loader -->|"reads templates"| node_catalog
node_loader -->|"parses templates"| node_templates
node_runner -->|"executes scan"| node_engine
node_engine -->|"dispatches templates"| node_tmplexec
node_tmplexec -->|"runs checks"| node_protocols
node_protocols -->|"dispatches HTTP"| node_http
node_protocols -->|"dispatches browser"| node_headless
node_tmplexec -->|"runs workflows"| node_workflows
node_http -->|"fuzzes requests"| node_fuzz
node_tmplexec -->|"evaluates responses"| node_operators
node_engine -->|"emits findings"| node_output
node_output -->|"forwards findings"| node_reporting
node_reporting -.->|"exports or tracks"| node_external

click node_cli "https://github.com/abhi267266/nuclei/blob/dev/cmd/nuclei/main.go"
click node_runner "https://github.com/abhi267266/nuclei/blob/dev/internal/runner/runner.go"
click node_configuration "https://github.com/abhi267266/nuclei/blob/dev/internal/configuration/flags.go"
click node_targets "https://github.com/abhi267266/nuclei/tree/dev/pkg/input"
click node_inputformats "https://github.com/abhi267266/nuclei/tree/dev/pkg/input/formats"
click node_catalog "https://github.com/abhi267266/nuclei/tree/dev/pkg/catalog"
click node_loader "https://github.com/abhi267266/nuclei/tree/dev/pkg/loader"
click node_templates "https://github.com/abhi267266/nuclei/tree/dev/pkg/templates"
click node_workflows "https://github.com/abhi267266/nuclei/blob/dev/pkg/workflows/workflows.go"
click node_engine "https://github.com/abhi267266/nuclei/blob/dev/pkg/core/engine.go"
click node_tmplexec "https://github.com/abhi267266/nuclei/blob/dev/pkg/tmplexec/exec.go"
click node_protocols "https://github.com/abhi267266/nuclei/blob/dev/pkg/protocols/protocols.go"
click node_http "https://github.com/abhi267266/nuclei/blob/dev/pkg/protocols/http/http.go"
click node_headless "https://github.com/abhi267266/nuclei/blob/dev/pkg/protocols/headless/engine/engine.go"
click node_fuzz "https://github.com/abhi267266/nuclei/blob/dev/pkg/fuzz/fuzz.go"
click node_operators "https://github.com/abhi267266/nuclei/blob/dev/pkg/operators/operators.go"
click node_output "https://github.com/abhi267266/nuclei/blob/dev/pkg/output/output.go"
click node_reporting "https://github.com/abhi267266/nuclei/blob/dev/pkg/reporting/reporting.go"

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_cli,node_runner,node_configuration,node_user toneBlue
class node_targets,node_inputformats,node_catalog,node_loader,node_templates,node_workflows toneAmber
class node_engine,node_tmplexec,node_protocols,node_http,node_headless,node_fuzz,node_operators toneMint
class node_output,node_reporting toneRose
class node_external toneIndigo
```

## Components

### CLI and Setup

- [Nuclei CLI](https://github.com/abhi267266/nuclei/blob/dev/cmd/nuclei/main.go): `cmd/nuclei/main.go`
- [Scan Runner](https://github.com/abhi267266/nuclei/blob/dev/internal/runner/runner.go): `internal/runner/runner.go`
- [Configuration](https://github.com/abhi267266/nuclei/blob/dev/internal/configuration/flags.go): `internal/configuration/flags.go`

### Inputs and Templates

- [Target Inputs](https://github.com/abhi267266/nuclei/tree/dev/pkg/input): `pkg/input`
- [Input Formats](https://github.com/abhi267266/nuclei/tree/dev/pkg/input/formats): `pkg/input/formats`
- [Template Catalog](https://github.com/abhi267266/nuclei/tree/dev/pkg/catalog): `pkg/catalog`
- [Template Loader](https://github.com/abhi267266/nuclei/tree/dev/pkg/loader): `pkg/loader`
- [Template Parser](https://github.com/abhi267266/nuclei/tree/dev/pkg/templates): `pkg/templates`
- [Workflow Definitions](https://github.com/abhi267266/nuclei/blob/dev/pkg/workflows/workflows.go): `pkg/workflows/workflows.go`

### Scan Runtime

- [Execution Engine](https://github.com/abhi267266/nuclei/blob/dev/pkg/core/engine.go): `pkg/core/engine.go`
- [Template Execution](https://github.com/abhi267266/nuclei/blob/dev/pkg/tmplexec/exec.go): `pkg/tmplexec/exec.go`
- [Protocol Checks](https://github.com/abhi267266/nuclei/blob/dev/pkg/protocols/protocols.go): `pkg/protocols/protocols.go`
- [HTTP Protocol](https://github.com/abhi267266/nuclei/blob/dev/pkg/protocols/http/http.go): `pkg/protocols/http/http.go`
- [Browser Checks](https://github.com/abhi267266/nuclei/blob/dev/pkg/protocols/headless/engine/engine.go): `pkg/protocols/headless/engine/engine.go`
- [Request Fuzzing](https://github.com/abhi267266/nuclei/blob/dev/pkg/fuzz/fuzz.go): `pkg/fuzz/fuzz.go`
- [Match and Extract](https://github.com/abhi267266/nuclei/blob/dev/pkg/operators/operators.go): `pkg/operators/operators.go`

### Findings and Integrations

- [Finding Output](https://github.com/abhi267266/nuclei/blob/dev/pkg/output/output.go): `pkg/output/output.go`
- [Exports and Trackers](https://github.com/abhi267266/nuclei/blob/dev/pkg/reporting/reporting.go): `pkg/reporting/reporting.go`

### Other components

- **Scanner User**
- **External Services**

## Connections

- Scanner User → Nuclei CLI: starts scan
- Nuclei CLI → Configuration: loads options
- Nuclei CLI → Scan Runner: runs enumeration
- Scan Runner → Target Inputs: loads targets
- Input Formats → Target Inputs: generates inputs
- Scan Runner → Template Loader: loads definitions
- Template Loader → Template Catalog: reads templates
- Template Loader → Template Parser: parses templates
- Scan Runner → Execution Engine: executes scan
- Execution Engine → Template Execution: dispatches templates
- Template Execution → Protocol Checks: runs checks
- Protocol Checks → HTTP Protocol: dispatches HTTP
- Protocol Checks → Browser Checks: dispatches browser
- Template Execution → Workflow Definitions: runs workflows
- HTTP Protocol → Request Fuzzing: fuzzes requests
- Template Execution → Match and Extract: evaluates responses
- Execution Engine → Finding Output: emits findings
- Finding Output → Exports and Trackers: forwards findings
- Exports and Trackers → External Services: exports or tracks
