How fraunhofer-aisec/cpg works
This repository is primarily a Kotlin code-property-graph library: users provide source code, language frontends translate it into a graph, and configurable passes enrich that graph for analysis and querying. The README also documents a Neo4j visualization application. The tree and sampled references reveal adjacent Codyze console and AI-agent capabilities, which are included as distinct product branches. Evidence is limited: many runtime modules are listed but not sampled, so uncertain connections are omitted.
Main entry points: TranslationManager.kt Translation Manager · ConsoleService.kt Codyze Console · Node.kt Graph Model · ChatService.kt AI Chat Service
Components 18
Code Translation
- Translation Manager
cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/TranslationManager.kt - Language Frontends
cpg-language-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python - Graph Model
cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/Node.kt - Symbol Resolution
cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/passes/SymbolResolver.kt
Graph Analysis
- Evaluation Order
cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/passes/EvaluationOrderGraphPass.kt - Analysis Passes
cpg-analysis/src/main/kotlin/de/fraunhofer/aisec/cpg/passes - Graph Queries
cpg-analysis/src/main/kotlin/de/fraunhofer/aisec/cpg/query/Query.kt - Security Concepts
cpg-concepts/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/concepts
User Applications
- Codyze Console
codyze-console/src/main/kotlin/de/fraunhofer/aisec/codyze/console/ConsoleService.kt - Console Web UI
codyze-console/src/main/webapp/src/routes - Neo4j Visualization
cpg-neo4j/src/main/kotlin/de/fraunhofer/aisec/cpg_vis_neo4j/Application.kt
AI Assistance
- AI Chat Service
cpg-ai/src/main/kotlin/de/fraunhofer/aisec/cpg/ai/ChatService.kt - LLM Providers
cpg-ai/src/main/kotlin/de/fraunhofer/aisec/cpg/ai/clients - AI Skills
cpg-ai/src/main/kotlin/de/fraunhofer/aisec/cpg/ai/skills - MCP Tools
cpg-ai/src/main/kotlin/de/fraunhofer/aisec/cpg/ai/mcp/mcpserver
Other components
- Developer
- Source Code
- Neo4j
Connections 18
- Developer → Translation Manager: configures translation
README.md - Source Code → Language Frontends: provides code
README.md - Language Frontends → Translation Manager: translates code
- Translation Manager → Graph Model: builds graph
README.md - Translation Manager → Symbol Resolution: runs passes
- Translation Manager → Evaluation Order: runs passes
README.md - Translation Manager → Analysis Passes: extends graph
README.md - Graph Model → Graph Queries: supports queries
README.md - Graph Model → Security Concepts: enriches analysis
cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/Node.kt - Developer → Codyze Console: uses console
- Codyze Console → Graph Queries: uses queries
codyze-console/src/main/kotlin/de/fraunhofer/aisec/codyze/console/ConsoleService.kt - Codyze Console → Security Concepts: loads concepts
codyze-console/src/main/kotlin/de/fraunhofer/aisec/codyze/console/ConsoleService.kt - Console Web UI → Codyze Console: calls service
- Developer → Neo4j Visualization: visualizes graph
README.md - Neo4j Visualization → Neo4j: persists graph
README.md - AI Chat Service → AI Skills: loads skills
cpg-ai/src/main/kotlin/de/fraunhofer/aisec/cpg/ai/ChatService.kt - AI Chat Service → LLM Providers: uses provider config
cpg-ai/src/main/kotlin/de/fraunhofer/aisec/cpg/ai/ChatService.kt - Developer → MCP Tools: connects tools