# greenbone/openvas-scanner architecture

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

- Interactive diagram: https://gitdiagram.com/greenbone/openvas-scanner
- Repository: https://github.com/greenbone/openvas-scanner

## Overview

OpenVAS Scanner is a vulnerability-scanning engine with a legacy C implementation and a newer Rust stack intended to consolidate scanner services. The principal workflow is a scan request entering openvasd, being scheduled and executed against targets using Vulnerability Tests (VTs), and exposing scan results through the API. The Rust runtime setup explicitly wires scan, VT, Notus, and container-image handlers; the tree and README document additional feed and protocol capabilities. Some internal C-to-Rust runtime wiring is not established by the sampled excerpts, so it is not inferred here.

Main entry points: [`rust/src/openvasd/main.rs`](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/openvasd/main.rs) (openvasd runtime), [`rust/src/openvasd/scans/mod.rs`](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/openvasd/scans/mod.rs) (Scan endpoints), [`rust/src/scanner/scanner.rs`](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/scanner/scanner.rs) (Rust scanner), [`rust/src/nasl/interpreter/mod.rs`](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/nasl/interpreter/mod.rs) (NASL interpreter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and orchestration"]
  node_openvasd["openvasd runtime<br/>[main.rs]"]
  node_httpapi["Scanner API"]
  node_scanapi["Scan endpoints<br/>[mod.rs]"]
  node_scheduler["Scan scheduling<br/>[scan_runner.rs]"]
  node_scanmodel["Scan models<br/>[scan.rs]"]
end

subgraph group_engine["Scan execution"]
  node_scanner["Rust scanner<br/>[scanner.rs]"]
  node_vtrunner["VT runner<br/>[vt_runner.rs]"]
  node_nasl["NASL interpreter<br/>[mod.rs]"]
  node_syntax["NASL parser<br/>[mod.rs]"]
  node_naslbuiltins["NASL built-ins<br/>[mod.rs]"]
  node_network["Network probes<br/>[mod.rs]"]
  node_cengine["C scan engine<br/>[openvas.c]"]
  node_plugins["Plugin scheduling<br/>[pluginscheduler.c]"]
  node_cplugins["C NASL plugins<br/>[nasl_plugins.c]"]
end

subgraph group_feeds["Feeds and assessment"]
  node_feedruntime["Feed verification<br/>[orchestrator.rs]"]
  node_vts["VT service<br/>[mod.rs]"]
  node_notus["Notus assessment<br/>[notus.rs]"]
  node_container["Image scanning<br/>[mod.rs]"]
end

subgraph group_state["Scan state"]
  node_storage[("Scan storage<br/>[scan_storage.rs]")]
  node_results[("Result collection<br/>[results.rs]")]
end

node_client(("Scan client"))
node_target(("Scan targets"))
node_feedsource["VT feed"]

node_client -->|"submits requests"| node_httpapi
node_httpapi -->|"dispatches scans"| node_scanapi
node_scanapi -->|"starts scans"| node_scheduler
node_scanapi -->|"uses scan data"| node_scanmodel
node_scheduler -->|"runs scan"| node_scanner
node_scanner -->|"executes VTs"| node_vtrunner
node_vtrunner -->|"interprets scripts"| node_nasl
node_nasl -->|"parses scripts"| node_syntax
node_nasl -->|"invokes functions"| node_naslbuiltins
node_naslbuiltins -->|"performs probes"| node_network
node_target -->|"receives probes"| node_network
node_feedsource -->|"provides feed"| node_feedruntime
node_feedruntime -->|"synchronizes VTs"| node_vts
node_openvasd -->|"builds runtime"| node_httpapi
node_openvasd -->|"registers service"| node_vts
node_openvasd -->|"registers handlers"| node_notus
node_openvasd -->|"registers endpoints"| node_container
node_scanner -->|"dispatches scan state"| node_storage
node_storage -->|"stores results"| node_results
node_cengine -->|"schedules plugins"| node_plugins
node_plugins -->|"launches plugins"| node_cplugins

click node_openvasd "https://github.com/greenbone/openvas-scanner/blob/main/rust/src/openvasd/main.rs"
click node_httpapi "https://github.com/greenbone/openvas-scanner/tree/main/rust/src/openvasd/greenbone_scanner_framework"
click node_scanapi "https://github.com/greenbone/openvas-scanner/blob/main/rust/src/openvasd/scans/mod.rs"
click node_scheduler "https://github.com/greenbone/openvas-scanner/blob/main/rust/src/scanner/scan_runner.rs"
click node_scanmodel "https://github.com/greenbone/openvas-scanner/blob/main/rust/src/models/scan.rs"
click node_scanner "https://github.com/greenbone/openvas-scanner/blob/main/rust/src/scanner/scanner.rs"
click node_vtrunner "https://github.com/greenbone/openvas-scanner/blob/main/rust/src/scanner/vt_runner.rs"
click node_nasl "https://github.com/greenbone/openvas-scanner/blob/main/rust/src/nasl/interpreter/mod.rs"
click node_syntax "https://github.com/greenbone/openvas-scanner/blob/main/rust/src/nasl/syntax/parser/mod.rs"
click node_naslbuiltins "https://github.com/greenbone/openvas-scanner/blob/main/rust/src/nasl/builtin/mod.rs"
click node_network "https://github.com/greenbone/openvas-scanner/blob/main/rust/src/nasl/builtin/network/mod.rs"
click node_cengine "https://github.com/greenbone/openvas-scanner/blob/main/src/openvas.c"
click node_plugins "https://github.com/greenbone/openvas-scanner/blob/main/src/pluginscheduler.c"
click node_cplugins "https://github.com/greenbone/openvas-scanner/blob/main/src/nasl_plugins.c"
click node_feedruntime "https://github.com/greenbone/openvas-scanner/blob/main/rust/src/openvasd/vts/orchestrator.rs"
click node_vts "https://github.com/greenbone/openvas-scanner/blob/main/rust/src/openvasd/vts/mod.rs"
click node_notus "https://github.com/greenbone/openvas-scanner/blob/main/rust/src/notus/notus.rs"
click node_container "https://github.com/greenbone/openvas-scanner/blob/main/rust/src/openvasd/container_image_scanner/mod.rs"
click node_storage "https://github.com/greenbone/openvas-scanner/blob/main/rust/src/openvasd/database/sqlite/scan_storage.rs"
click node_results "https://github.com/greenbone/openvas-scanner/blob/main/rust/src/openvasd/database/sqlite/results.rs"

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_openvasd,node_httpapi,node_scanapi,node_scheduler,node_scanmodel,node_client toneBlue
class node_scanner,node_vtrunner,node_nasl,node_syntax,node_naslbuiltins,node_network,node_cengine,node_plugins,node_cplugins toneAmber
class node_feedruntime,node_vts,node_notus,node_container toneMint
class node_storage,node_results toneRose
class node_target,node_feedsource toneIndigo
```

## Components

### API and orchestration

- [openvasd runtime](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/openvasd/main.rs): `rust/src/openvasd/main.rs`
- [Scanner API](https://github.com/greenbone/openvas-scanner/tree/main/rust/src/openvasd/greenbone_scanner_framework): `rust/src/openvasd/greenbone_scanner_framework`
- [Scan endpoints](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/openvasd/scans/mod.rs): `rust/src/openvasd/scans/mod.rs`
- [Scan scheduling](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/scanner/scan_runner.rs): `rust/src/scanner/scan_runner.rs`
- [Scan models](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/models/scan.rs): `rust/src/models/scan.rs`

### Scan execution

- [Rust scanner](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/scanner/scanner.rs): `rust/src/scanner/scanner.rs`
- [VT runner](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/scanner/vt_runner.rs): `rust/src/scanner/vt_runner.rs`
- [NASL interpreter](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/nasl/interpreter/mod.rs): `rust/src/nasl/interpreter/mod.rs`
- [NASL parser](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/nasl/syntax/parser/mod.rs): `rust/src/nasl/syntax/parser/mod.rs`
- [NASL built-ins](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/nasl/builtin/mod.rs): `rust/src/nasl/builtin/mod.rs`
- [Network probes](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/nasl/builtin/network/mod.rs): `rust/src/nasl/builtin/network/mod.rs`
- [C scan engine](https://github.com/greenbone/openvas-scanner/blob/main/src/openvas.c): `src/openvas.c`
- [Plugin scheduling](https://github.com/greenbone/openvas-scanner/blob/main/src/pluginscheduler.c): `src/pluginscheduler.c`
- [C NASL plugins](https://github.com/greenbone/openvas-scanner/blob/main/src/nasl_plugins.c): `src/nasl_plugins.c`

### Feeds and assessment

- [Feed verification](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/openvasd/vts/orchestrator.rs): `rust/src/openvasd/vts/orchestrator.rs`
- [VT service](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/openvasd/vts/mod.rs): `rust/src/openvasd/vts/mod.rs`
- [Notus assessment](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/notus/notus.rs): `rust/src/notus/notus.rs`
- [Image scanning](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/openvasd/container_image_scanner/mod.rs): `rust/src/openvasd/container_image_scanner/mod.rs`

### Scan state

- [Scan storage](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/openvasd/database/sqlite/scan_storage.rs): `rust/src/openvasd/database/sqlite/scan_storage.rs`
- [Result collection](https://github.com/greenbone/openvas-scanner/blob/main/rust/src/openvasd/database/sqlite/results.rs): `rust/src/openvasd/database/sqlite/results.rs`

### Other components

- **Scan client**
- **Scan targets**
- **VT feed**

## Connections

- Scan client → Scanner API: submits requests
- Scanner API → Scan endpoints: dispatches scans
- Scan endpoints → Scan scheduling: starts scans
- Scan endpoints → Scan models: uses scan data
- Scan scheduling → Rust scanner: runs scan
- Rust scanner → VT runner: executes VTs
- VT runner → NASL interpreter: interprets scripts
- NASL interpreter → NASL parser: parses scripts
- NASL interpreter → NASL built-ins: invokes functions
- NASL built-ins → Network probes: performs probes
- Scan targets → Network probes: receives probes
- VT feed → Feed verification: provides feed
- Feed verification → VT service: synchronizes VTs
- openvasd runtime → Scanner API: builds runtime
- openvasd runtime → VT service: registers service
- openvasd runtime → Notus assessment: registers handlers
- openvasd runtime → Image scanning: registers endpoints
- Rust scanner → Scan storage: dispatches scan state
- Scan storage → Result collection: stores results
- C scan engine → Plugin scheduling: schedules plugins
- Plugin scheduling → C NASL plugins: launches plugins
