# oss-review-toolkit/ort architecture

> Architecture diagram of the GitHub repository oss-review-toolkit/ort, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/oss-review-toolkit/ort
- Repository: https://github.com/oss-review-toolkit/ort

## Overview

ORT is a FOSS policy automation toolkit for analyzing software dependencies, gathering source and scan data, assessing risk and policy, and producing reports or notifications. The documented workflow is modular: Analyzer resolves dependency metadata; Downloader retrieves source; Scanner finds license and copyright evidence; Advisor gathers vulnerability information; Evaluator applies policy; Reporter and Notifier present or distribute results. README statements support the stage relationships; the sampled sources chiefly establish domain-model and selected integration responsibilities, so unsampled implementation links are not asserted.

Main entry points: [`analyzer/src/main/kotlin/Analyzer.kt`](https://github.com/oss-review-toolkit/ort/blob/main/analyzer/src/main/kotlin/Analyzer.kt) (Analyzer), [`downloader/src/main/kotlin/Downloader.kt`](https://github.com/oss-review-toolkit/ort/blob/main/downloader/src/main/kotlin/Downloader.kt) (Downloader), [`scanner/src/main/kotlin`](https://github.com/oss-review-toolkit/ort/tree/main/scanner/src/main/kotlin) (Scanner), [`evaluator/src/main/kotlin/Evaluator.kt`](https://github.com/oss-review-toolkit/ort/blob/main/evaluator/src/main/kotlin/Evaluator.kt) (Evaluator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and utilities"]
  node_cli["ORT CLI<br/>[OrtMain.kt]"]
  node_helper["ORT helper<br/>[HelperMain.kt]"]
end

subgraph group_analysis["Dependency and source analysis"]
  node_analyzer["Analyzer<br/>[Analyzer.kt]"]
  node_package_managers["Package managers"]
  node_registry["Bazel registries"]
  node_downloader["Downloader<br/>[Downloader.kt]"]
  node_vcs["VCS support"]
end

subgraph group_assessment["Findings and policy"]
  node_scanner["Scanner"]
  node_scan_storage[("Scan storage<br/>[ScanStorages.kt]")]
  node_clearly_defined["ClearlyDefined"]
  node_advisor["Advisor<br/>[Advisor.kt]"]
  node_vulnerability_services["Vulnerability services<br/>[OsvService.kt]"]
  node_evaluator["Evaluator<br/>[Evaluator.kt]"]
  node_policy_rules["Policy rules<br/>[Rule.kt]"]
end

subgraph group_outputs["Results and delivery"]
  node_reporter["Reporter<br/>[App.tsx]"]
  node_notifier["Notifier<br/>[Notifier.kt]"]
end

subgraph group_domain["Shared domain data"]
  node_model_id["Component identifiers<br/>[Identifier.kt]"]
  node_model_package["Package metadata<br/>[Package.kt]"]
  node_model_project["Analysis results"]
  node_model_scan["Scan results<br/>[ScanResult.kt]"]
  node_model_vcs["VCS metadata<br/>[VcsInfo.kt]"]
  node_model_artifact["Artifact provenance<br/>[RemoteArtifact.kt]"]
  node_model_hash["Artifact hashes<br/>[Hash.kt]"]
end

node_user(("ORT user"))

node_user -->|"invokes"| node_cli
node_user -->|"invokes"| node_helper
node_cli -.->|"runs analysis"| node_analyzer
node_analyzer -->|"resolves dependencies"| node_package_managers
node_analyzer -.->|"produces results"| node_model_project
node_analyzer -->|"uses identifiers"| node_model_id
node_analyzer -.->|"uses package data"| node_model_package
node_package_managers -.->|"queries registry"| node_registry
node_downloader -->|"selects VCS"| node_vcs
node_downloader -->|"uses VCS metadata"| node_model_vcs
node_downloader -.->|"records provenance"| node_model_artifact
node_model_artifact -->|"contains hash"| node_model_hash
node_scanner -.->|"stores findings"| node_scan_storage
node_scanner -.->|"uses service"| node_clearly_defined
node_scanner -.->|"produces scan results"| node_model_scan
node_advisor -.->|"queries advisories"| node_vulnerability_services
node_advisor -.->|"uses identifiers"| node_model_id
node_evaluator -->|"evaluates rules"| node_policy_rules
node_evaluator -->|"evaluates gathered data"| node_model_project
node_cli -->|"runs retrieval"| node_downloader
node_downloader -->|"provides source"| node_scanner
node_scanner -->|"provides findings"| node_advisor
node_advisor -->|"provides advice"| node_evaluator
node_evaluator -->|"feeds reports"| node_reporter
node_evaluator -.->|"feeds notifications"| node_notifier

click node_cli "https://github.com/oss-review-toolkit/ort/blob/main/cli/src/main/kotlin/OrtMain.kt"
click node_helper "https://github.com/oss-review-toolkit/ort/blob/main/cli-helper/src/main/kotlin/HelperMain.kt"
click node_analyzer "https://github.com/oss-review-toolkit/ort/blob/main/analyzer/src/main/kotlin/Analyzer.kt"
click node_package_managers "https://github.com/oss-review-toolkit/ort/tree/main/plugins/package-managers"
click node_registry "https://github.com/oss-review-toolkit/ort/blob/main/clients/bazel-module-registry/src/main/kotlin/BazelModuleRegistryService.kt"
click node_downloader "https://github.com/oss-review-toolkit/ort/blob/main/downloader/src/main/kotlin/Downloader.kt"
click node_vcs "https://github.com/oss-review-toolkit/ort/blob/main/downloader/src/main/kotlin/VersionControlSystem.kt"
click node_scanner "https://github.com/oss-review-toolkit/ort/tree/main/scanner/src/main/kotlin"
click node_scan_storage "https://github.com/oss-review-toolkit/ort/blob/main/scanner/src/main/kotlin/ScanStorages.kt"
click node_clearly_defined "https://github.com/oss-review-toolkit/ort/blob/main/clients/clearly-defined/src/main/kotlin/ClearlyDefinedService.kt"
click node_advisor "https://github.com/oss-review-toolkit/ort/blob/main/advisor/src/main/kotlin/Advisor.kt"
click node_vulnerability_services "https://github.com/oss-review-toolkit/ort/blob/main/clients/osv/src/main/kotlin/OsvService.kt"
click node_evaluator "https://github.com/oss-review-toolkit/ort/blob/main/evaluator/src/main/kotlin/Evaluator.kt"
click node_policy_rules "https://github.com/oss-review-toolkit/ort/blob/main/evaluator/src/main/kotlin/Rule.kt"
click node_reporter "https://github.com/oss-review-toolkit/ort/blob/main/plugins/reporters/web-app-template/src/App.tsx"
click node_notifier "https://github.com/oss-review-toolkit/ort/blob/main/notifier/src/main/kotlin/Notifier.kt"
click node_model_id "https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/kotlin/Identifier.kt"
click node_model_package "https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/kotlin/Package.kt"
click node_model_project "https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/kotlin/ProjectAnalyzerResult.kt"
click node_model_scan "https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/kotlin/ScanResult.kt"
click node_model_vcs "https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/kotlin/VcsInfo.kt"
click node_model_artifact "https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/kotlin/RemoteArtifact.kt"
click node_model_hash "https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/kotlin/Hash.kt"

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_helper,node_user toneBlue
class node_analyzer,node_package_managers,node_registry,node_downloader,node_vcs toneAmber
class node_scanner,node_scan_storage,node_clearly_defined,node_advisor,node_vulnerability_services,node_evaluator,node_policy_rules toneMint
class node_reporter,node_notifier toneRose
class node_model_id,node_model_package,node_model_project,node_model_scan,node_model_vcs,node_model_artifact,node_model_hash toneIndigo
```

## Components

### Entry and utilities

- [ORT CLI](https://github.com/oss-review-toolkit/ort/blob/main/cli/src/main/kotlin/OrtMain.kt): `cli/src/main/kotlin/OrtMain.kt`
- [ORT helper](https://github.com/oss-review-toolkit/ort/blob/main/cli-helper/src/main/kotlin/HelperMain.kt): `cli-helper/src/main/kotlin/HelperMain.kt`

### Dependency and source analysis

- [Analyzer](https://github.com/oss-review-toolkit/ort/blob/main/analyzer/src/main/kotlin/Analyzer.kt): `analyzer/src/main/kotlin/Analyzer.kt`
- [Package managers](https://github.com/oss-review-toolkit/ort/tree/main/plugins/package-managers): `plugins/package-managers`
- [Bazel registries](https://github.com/oss-review-toolkit/ort/blob/main/clients/bazel-module-registry/src/main/kotlin/BazelModuleRegistryService.kt): `clients/bazel-module-registry/src/main/kotlin/BazelModuleRegistryService.kt`
- [Downloader](https://github.com/oss-review-toolkit/ort/blob/main/downloader/src/main/kotlin/Downloader.kt): `downloader/src/main/kotlin/Downloader.kt`
- [VCS support](https://github.com/oss-review-toolkit/ort/blob/main/downloader/src/main/kotlin/VersionControlSystem.kt): `downloader/src/main/kotlin/VersionControlSystem.kt`

### Findings and policy

- [Scanner](https://github.com/oss-review-toolkit/ort/tree/main/scanner/src/main/kotlin): `scanner/src/main/kotlin`
- [Scan storage](https://github.com/oss-review-toolkit/ort/blob/main/scanner/src/main/kotlin/ScanStorages.kt): `scanner/src/main/kotlin/ScanStorages.kt`
- [ClearlyDefined](https://github.com/oss-review-toolkit/ort/blob/main/clients/clearly-defined/src/main/kotlin/ClearlyDefinedService.kt): `clients/clearly-defined/src/main/kotlin/ClearlyDefinedService.kt`
- [Advisor](https://github.com/oss-review-toolkit/ort/blob/main/advisor/src/main/kotlin/Advisor.kt): `advisor/src/main/kotlin/Advisor.kt`
- [Vulnerability services](https://github.com/oss-review-toolkit/ort/blob/main/clients/osv/src/main/kotlin/OsvService.kt): `clients/osv/src/main/kotlin/OsvService.kt`
- [Evaluator](https://github.com/oss-review-toolkit/ort/blob/main/evaluator/src/main/kotlin/Evaluator.kt): `evaluator/src/main/kotlin/Evaluator.kt`
- [Policy rules](https://github.com/oss-review-toolkit/ort/blob/main/evaluator/src/main/kotlin/Rule.kt): `evaluator/src/main/kotlin/Rule.kt`

### Results and delivery

- [Reporter](https://github.com/oss-review-toolkit/ort/blob/main/plugins/reporters/web-app-template/src/App.tsx): `plugins/reporters/web-app-template/src/App.tsx`
- [Notifier](https://github.com/oss-review-toolkit/ort/blob/main/notifier/src/main/kotlin/Notifier.kt): `notifier/src/main/kotlin/Notifier.kt`

### Shared domain data

- [Component identifiers](https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/kotlin/Identifier.kt): `model/src/main/kotlin/Identifier.kt`
- [Package metadata](https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/kotlin/Package.kt): `model/src/main/kotlin/Package.kt`
- [Analysis results](https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/kotlin/ProjectAnalyzerResult.kt): `model/src/main/kotlin/ProjectAnalyzerResult.kt`
- [Scan results](https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/kotlin/ScanResult.kt): `model/src/main/kotlin/ScanResult.kt`
- [VCS metadata](https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/kotlin/VcsInfo.kt): `model/src/main/kotlin/VcsInfo.kt`
- [Artifact provenance](https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/kotlin/RemoteArtifact.kt): `model/src/main/kotlin/RemoteArtifact.kt`
- [Artifact hashes](https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/kotlin/Hash.kt): `model/src/main/kotlin/Hash.kt`

### Other components

- **ORT user**

## Connections

- ORT user → ORT CLI: invokes (evidence: `README.md`)
- ORT user → ORT helper: invokes (evidence: `README.md`)
- ORT CLI → Analyzer: runs analysis
- Analyzer → Package managers: resolves dependencies (evidence: `README.md`)
- Analyzer → Analysis results: produces results
- Analyzer → Component identifiers: uses identifiers
- Analyzer → Package metadata: uses package data
- Package managers → Bazel registries: queries registry (evidence: `plugins/package-managers/bazel/src/main/kotlin/MultiBazelModuleRegistryService.kt`)
- Downloader → VCS support: selects VCS (evidence: `downloader/src/main/kotlin/VersionControlSystem.kt`)
- Downloader → VCS metadata: uses VCS metadata
- Downloader → Artifact provenance: records provenance
- Artifact provenance → Artifact hashes: contains hash (evidence: `model/src/main/kotlin/RemoteArtifact.kt`)
- Scanner → Scan storage: stores findings (evidence: `scanner/src/main/kotlin/ScanStorages.kt`)
- Scanner → ClearlyDefined: uses service (evidence: `scanner/src/main/kotlin/storages/ClearlyDefinedStorage.kt`)
- Scanner → Scan results: produces scan results (evidence: `scanner/src/main/kotlin/ScanStorages.kt`)
- Advisor → Vulnerability services: queries advisories
- Advisor → Component identifiers: uses identifiers
- Evaluator → Policy rules: evaluates rules (evidence: `README.md`)
- Evaluator → Analysis results: evaluates gathered data (evidence: `README.md`)
- ORT CLI → Downloader: runs retrieval (evidence: `README.md`)
- Downloader → Scanner: provides source (evidence: `README.md`)
- Scanner → Advisor: provides findings (evidence: `README.md`)
- Advisor → Evaluator: provides advice (evidence: `README.md`)
- Evaluator → Reporter: feeds reports (evidence: `README.md`)
- Evaluator → Notifier: feeds notifications (evidence: `README.md`)
