Tito0015/cpg-nuclei-compiler

Deterministic Joern CPG-to-Nuclei YAML compiler & Docker verification harness

1

stars

2

commits

Rust

primary language

Sep 11, 2026

updated

medium.com/@mhiritarek/cpg-compilation-vs-llm-ai-generation-empirical-analysis-of-cve-2025-62593-rule-accuracy-6ea0b27583da
appsec
cpg
joern
nuclei
nuclei-templates
projectdiscovery
rust
sast
security-tools
static-analysis
vulnerability-scanner

README

CPG → Nuclei Closed Loop

Open-source Code Property Graph (CPG) compiler and ProjectDiscovery Nuclei exporter with a Docker verification harness.

Source (C/C++, Java, Go, Python, …) → Joern CPG → DataFlowSlice → Nuclei YAML → nuclei (Docker) → TP/TN report

What's included

ComponentPath
Joern CPG bridgecpg_nuclei_core/src/joern_cpg_bridge.rs
CPG schema / deserializercpg_nuclei_core/src/cpg_schema.rs, cpg_deserializer.rs
DFG / taint analysiscpg_nuclei_core/src/cross_tx_dfg.rs, parser.rs, taint.rs
Nuclei YAML exportercpg_nuclei_core/src/exporters/nuclei_exporter.rs
Pipeline CLIcpg_nuclei_core/examples/run_cpg_pipeline.rs
Docker closed-loop runnerharness/docker_runner.py
Architecture docsdocs/cpg/, docs/nuclei/

Quick start

Prerequisites

Install Joern and point JOERN_HOME at your distribution. See docs/cpg/JOERN_CLI_PROVISIONING.md.

Supported ingestion paths: C/C++, Java, Go, Python, and other Joern frontends.

Usage

# Rust compiler tests
cargo test -p cpg_nuclei_core

# Python integration (compiler + harness)
pytest tests/test_cpg_nuclei_compiler.py

# Export Nuclei YAML from source via Joern
cargo run --example run_cpg_pipeline -- --target path/to/main.c

# Closed-loop Nuclei scan (Docker required)
python -m harness.docker_runner --template templates/CVE-2024-51483.yaml --target http://127.0.0.1:5000

Non-destructive Nuclei SOP

Some community templates (including CVE-2024-51483) mutate application settings during execution. Against a live Changedetection.io instance:

  1. Snapshot /settings (GET) before scanning.
  2. Run Nuclei in an isolated environment.
  3. Restore settings from the snapshot after the scan.

The local fixture server on :5000 is a non-production stub for harness tests only.

License

MIT — see LICENSE. The vendored Nuclei template under templates/ is from projectdiscovery/nuclei-templates (MIT).

Contributors

Tito0015

2 commits

Tito0015/cpg-nuclei-compiler

Deterministic Joern CPG-to-Nuclei YAML compiler & Docker verification harness

1

stars

2

commits

Rust

primary language

Sep 11, 2026

updated

medium.com/@mhiritarek/cpg-compilation-vs-llm-ai-generation-empirical-analysis-of-cve-2025-62593-rule-accuracy-6ea0b27583da
appsec
cpg
joern
nuclei
nuclei-templates
projectdiscovery
rust
sast
security-tools
static-analysis
vulnerability-scanner

README

CPG → Nuclei Closed Loop

Open-source Code Property Graph (CPG) compiler and ProjectDiscovery Nuclei exporter with a Docker verification harness.

Source (C/C++, Java, Go, Python, …) → Joern CPG → DataFlowSlice → Nuclei YAML → nuclei (Docker) → TP/TN report

What's included

ComponentPath
Joern CPG bridgecpg_nuclei_core/src/joern_cpg_bridge.rs
CPG schema / deserializercpg_nuclei_core/src/cpg_schema.rs, cpg_deserializer.rs
DFG / taint analysiscpg_nuclei_core/src/cross_tx_dfg.rs, parser.rs, taint.rs
Nuclei YAML exportercpg_nuclei_core/src/exporters/nuclei_exporter.rs
Pipeline CLIcpg_nuclei_core/examples/run_cpg_pipeline.rs
Docker closed-loop runnerharness/docker_runner.py
Architecture docsdocs/cpg/, docs/nuclei/

Quick start

Prerequisites

Install Joern and point JOERN_HOME at your distribution. See docs/cpg/JOERN_CLI_PROVISIONING.md.

Supported ingestion paths: C/C++, Java, Go, Python, and other Joern frontends.

Usage

# Rust compiler tests
cargo test -p cpg_nuclei_core

# Python integration (compiler + harness)
pytest tests/test_cpg_nuclei_compiler.py

# Export Nuclei YAML from source via Joern
cargo run --example run_cpg_pipeline -- --target path/to/main.c

# Closed-loop Nuclei scan (Docker required)
python -m harness.docker_runner --template templates/CVE-2024-51483.yaml --target http://127.0.0.1:5000

Non-destructive Nuclei SOP

Some community templates (including CVE-2024-51483) mutate application settings during execution. Against a live Changedetection.io instance:

  1. Snapshot /settings (GET) before scanning.
  2. Run Nuclei in an isolated environment.
  3. Restore settings from the snapshot after the scan.

The local fixture server on :5000 is a non-production stub for harness tests only.

License

MIT — see LICENSE. The vendored Nuclei template under templates/ is from projectdiscovery/nuclei-templates (MIT).

Contributors

Tito0015

2 commits

Languages

Rust

94.0%

Python

5.9%