# seqra/opentaint architecture

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

- Interactive diagram: https://gitdiagram.com/seqra/opentaint
- Repository: https://github.com/seqra/opentaint

## Overview

OpenTaint is a taint-analysis engine exposed through a CLI: a user scans a project, rules describe sources and sinks, and findings can be emitted as SARIF. The documented engine tracks taint inter-procedurally; the tree also shows JVM rule matching, Semgrep-style pattern parsing, IR/storage interfaces, and analysis internals. Edges are limited to relationships explicit in the README or visible in indexed source references; many runtime connections cannot be verified from the partial excerpts.

Main entry points: [`core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/AnalysisRunner.kt`](https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/AnalysisRunner.kt) (Dataflow engine), [`core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/MethodSummariesUnitStorage.kt`](https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/MethodSummariesUnitStorage.kt) (Method summaries), [`core/opentaint-configuration-rules/configuration-rules-jvm/src/main/kotlin/org/opentaint/dataflow/configuration/jvm/serialized/SerializedCondition.kt`](https://github.com/seqra/opentaint/blob/main/core/opentaint-configuration-rules/configuration-rules-jvm/src/main/kotlin/org/opentaint/dataflow/configuration/jvm/serialized/SerializedCondition.kt) (Rule configuration), [`cli/main.go`](https://github.com/seqra/opentaint/blob/main/cli/main.go) (OpenTaint CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI workflow"]
  node_cli["OpenTaint CLI<br/>[main.go]"]
  node_scan["Scan command<br/>[scan.go]"]
end

subgraph group_rules["Rules and languages"]
  node_ruleconfig["Rule configuration"]
  node_patternparser["Java pattern parser"]
  node_rulematching["JVM rule matching"]
end

subgraph group_analysis["Taint analysis"]
  node_analysisengine["Dataflow engine<br/>[AnalysisRunner.kt]"]
  node_edgefacts["Taint edges<br/>[Edge.kt]"]
  node_language["Language manager<br/>[LanguageManager.kt]"]
  node_exclusions["Fact exclusions<br/>[ExclusionSet.kt]"]
  node_apmanager["Access-path manager<br/>[ApManager.kt]"]
  node_automata["Access graphs<br/>[AccessGraph.kt]"]
  node_cactus["Cactus access paths<br/>[AccessCactus.kt]"]
  node_treeaccess["Tree access paths<br/>[AccessTree.kt]"]
  node_summaries[("Method summaries")]
end

subgraph group_ir["IR and storage"]
  node_irinst["Common instructions<br/>[CommonInst.kt]"]
  node_ers[("Entity relationship storage")]
  node_kv[("Key-value storage")]
  node_storagecontext["Storage context<br/>[StorageContext.kt]"]
end

subgraph group_results["Findings and integrations"]
  node_sarif["SARIF output<br/>[sarif.go]"]
  node_ci["CI integrations"]
end

node_user(("Engineer"))

node_user -->|"runs scan"| node_cli
node_cli -.->|"dispatches"| node_scan
node_scan -.->|"writes findings"| node_sarif
node_user -->|"defines rules"| node_ruleconfig
node_ruleconfig -.->|"supports Semgrep patterns"| node_patternparser
node_rulematching -->|"matches serialized rules"| node_ruleconfig
node_analysisengine -.->|"stores summaries"| node_summaries
node_summaries -->|"stores edges"| node_edgefacts
node_summaries -->|"uses access manager"| node_apmanager
node_apmanager -->|"manages access paths"| node_automata
node_automata -->|"filters facts"| node_exclusions
node_analysisengine -.->|"uses language manager"| node_language
node_analysisengine -.->|"analyzes instructions"| node_irinst
node_storagecontext -->|"carries transaction context"| node_ers
node_user -.->|"integrates scans"| node_ci

click node_cli "https://github.com/seqra/opentaint/blob/main/cli/main.go"
click node_scan "https://github.com/seqra/opentaint/blob/main/cli/cmd/scan.go"
click node_sarif "https://github.com/seqra/opentaint/blob/main/cli/internal/sarif/sarif.go"
click node_ruleconfig "https://github.com/seqra/opentaint/blob/main/core/opentaint-configuration-rules/configuration-rules-jvm/src/main/kotlin/org/opentaint/dataflow/configuration/jvm/serialized/SerializedCondition.kt"
click node_patternparser "https://github.com/seqra/opentaint/blob/main/core/opentaint-java-querylang/src/main/kotlin/org/opentaint/semgrep/pattern/SemgrepJavaPatternParser.kt"
click node_rulematching "https://github.com/seqra/opentaint/blob/main/core/opentaint-jvm-sast-dataflow/src/main/kotlin/org/opentaint/jvm/sast/dataflow/rules/MethodClassTaintRulesStorage.kt"
click node_analysisengine "https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/AnalysisRunner.kt"
click node_edgefacts "https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/Edge.kt"
click node_language "https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/LanguageManager.kt"
click node_exclusions "https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/ExclusionSet.kt"
click node_apmanager "https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/access/ApManager.kt"
click node_automata "https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/access/automata/AccessGraph.kt"
click node_cactus "https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/access/cactus/AccessCactus.kt"
click node_treeaccess "https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/access/tree/AccessTree.kt"
click node_summaries "https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/MethodSummariesUnitStorage.kt"
click node_irinst "https://github.com/seqra/opentaint/blob/main/core/opentaint-ir/opentaint-ir-api-common/src/main/kotlin/org/opentaint/ir/api/common/cfg/CommonInst.kt"
click node_ers "https://github.com/seqra/opentaint/blob/main/core/opentaint-ir/opentaint-ir-api-storage/src/main/kotlin/org/opentaint/ir/api/storage/ers/EntityRelationshipStorage.kt"
click node_kv "https://github.com/seqra/opentaint/blob/main/core/opentaint-ir/opentaint-ir-api-storage/src/main/kotlin/org/opentaint/ir/api/storage/kv/PluggableKeyValueStorage.kt"
click node_storagecontext "https://github.com/seqra/opentaint/blob/main/core/opentaint-ir/opentaint-ir-api-storage/src/main/kotlin/org/opentaint/ir/api/storage/StorageContext.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_scan toneBlue
class node_ruleconfig,node_patternparser,node_rulematching toneAmber
class node_analysisengine,node_edgefacts,node_language,node_exclusions,node_apmanager,node_automata,node_cactus,node_treeaccess,node_summaries toneMint
class node_irinst,node_ers,node_kv,node_storagecontext toneRose
class node_sarif,node_ci,node_user toneIndigo
```

## Components

### CLI workflow

- [OpenTaint CLI](https://github.com/seqra/opentaint/blob/main/cli/main.go): `cli/main.go`
- [Scan command](https://github.com/seqra/opentaint/blob/main/cli/cmd/scan.go): `cli/cmd/scan.go`

### Rules and languages

- [Rule configuration](https://github.com/seqra/opentaint/blob/main/core/opentaint-configuration-rules/configuration-rules-jvm/src/main/kotlin/org/opentaint/dataflow/configuration/jvm/serialized/SerializedCondition.kt): `core/opentaint-configuration-rules/configuration-rules-jvm/src/main/kotlin/org/opentaint/dataflow/configuration/jvm/serialized/SerializedCondition.kt`
- [Java pattern parser](https://github.com/seqra/opentaint/blob/main/core/opentaint-java-querylang/src/main/kotlin/org/opentaint/semgrep/pattern/SemgrepJavaPatternParser.kt): `core/opentaint-java-querylang/src/main/kotlin/org/opentaint/semgrep/pattern/SemgrepJavaPatternParser.kt`
- [JVM rule matching](https://github.com/seqra/opentaint/blob/main/core/opentaint-jvm-sast-dataflow/src/main/kotlin/org/opentaint/jvm/sast/dataflow/rules/MethodClassTaintRulesStorage.kt): `core/opentaint-jvm-sast-dataflow/src/main/kotlin/org/opentaint/jvm/sast/dataflow/rules/MethodClassTaintRulesStorage.kt`

### Taint analysis

- [Dataflow engine](https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/AnalysisRunner.kt): `core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/AnalysisRunner.kt`
- [Taint edges](https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/Edge.kt): `core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/Edge.kt`
- [Language manager](https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/LanguageManager.kt): `core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/LanguageManager.kt`
- [Fact exclusions](https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/ExclusionSet.kt): `core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/ExclusionSet.kt`
- [Access-path manager](https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/access/ApManager.kt): `core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/access/ApManager.kt`
- [Access graphs](https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/access/automata/AccessGraph.kt): `core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/access/automata/AccessGraph.kt`
- [Cactus access paths](https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/access/cactus/AccessCactus.kt): `core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/access/cactus/AccessCactus.kt`
- [Tree access paths](https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/access/tree/AccessTree.kt): `core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/access/tree/AccessTree.kt`
- [Method summaries](https://github.com/seqra/opentaint/blob/main/core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/MethodSummariesUnitStorage.kt): `core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/MethodSummariesUnitStorage.kt`

### IR and storage

- [Common instructions](https://github.com/seqra/opentaint/blob/main/core/opentaint-ir/opentaint-ir-api-common/src/main/kotlin/org/opentaint/ir/api/common/cfg/CommonInst.kt): `core/opentaint-ir/opentaint-ir-api-common/src/main/kotlin/org/opentaint/ir/api/common/cfg/CommonInst.kt`
- [Entity relationship storage](https://github.com/seqra/opentaint/blob/main/core/opentaint-ir/opentaint-ir-api-storage/src/main/kotlin/org/opentaint/ir/api/storage/ers/EntityRelationshipStorage.kt): `core/opentaint-ir/opentaint-ir-api-storage/src/main/kotlin/org/opentaint/ir/api/storage/ers/EntityRelationshipStorage.kt`
- [Key-value storage](https://github.com/seqra/opentaint/blob/main/core/opentaint-ir/opentaint-ir-api-storage/src/main/kotlin/org/opentaint/ir/api/storage/kv/PluggableKeyValueStorage.kt): `core/opentaint-ir/opentaint-ir-api-storage/src/main/kotlin/org/opentaint/ir/api/storage/kv/PluggableKeyValueStorage.kt`
- [Storage context](https://github.com/seqra/opentaint/blob/main/core/opentaint-ir/opentaint-ir-api-storage/src/main/kotlin/org/opentaint/ir/api/storage/StorageContext.kt): `core/opentaint-ir/opentaint-ir-api-storage/src/main/kotlin/org/opentaint/ir/api/storage/StorageContext.kt`

### Findings and integrations

- [SARIF output](https://github.com/seqra/opentaint/blob/main/cli/internal/sarif/sarif.go): `cli/internal/sarif/sarif.go`
- **CI integrations**

### Other components

- **Engineer**

## Connections

- Engineer → OpenTaint CLI: runs scan (evidence: `README.md`)
- OpenTaint CLI → Scan command: dispatches
- Scan command → SARIF output: writes findings
- Engineer → Rule configuration: defines rules (evidence: `README.md`)
- Rule configuration → Java pattern parser: supports Semgrep patterns
- JVM rule matching → Rule configuration: matches serialized rules (evidence: `core/opentaint-jvm-sast-dataflow/src/main/kotlin/org/opentaint/jvm/sast/dataflow/rules/MethodClassTaintRulesStorage.kt`)
- Dataflow engine → Method summaries: stores summaries
- Method summaries → Taint edges: stores edges (evidence: `core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/MethodSummariesUnitStorage.kt`)
- Method summaries → Access-path manager: uses access manager (evidence: `core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/MethodSummariesUnitStorage.kt`)
- Access-path manager → Access graphs: manages access paths
- Access graphs → Fact exclusions: filters facts (evidence: `core/opentaint-dataflow-core/opentaint-dataflow/src/main/kotlin/org/opentaint/dataflow/ap/ifds/access/automata/SideEffectRequirementAutomataApStorage.kt`)
- Dataflow engine → Language manager: uses language manager
- Dataflow engine → Common instructions: analyzes instructions
- Storage context → Entity relationship storage: carries transaction context (evidence: `core/opentaint-ir/opentaint-ir-api-storage/src/main/kotlin/org/opentaint/ir/api/storage/StorageContext.kt`)
- Engineer → CI integrations: integrates scans (evidence: `README.md`)
