JENITH47/secRAG-X
GitHub: JENITH47/secRAG-X
Stars: 1 | Forks: 0
# 🛡️ SecRAG-X
### AI-powered cybersecurity reasoning with knowledge graphs, vector search, and local LLMs






[](#-demo)
## 🏗️ Architecture & Data Flow
### High-Level System Architecture
graph TD
A[👤 User / Browser Dashboard] --> B[🌐 Flask API - server.py]
B --> C[🧠 Reasoning Engine - explane.py]
C --> D[(🗄️ Neo4j Knowledge Graph)]
C --> E[🔍 FAISS Vector Store]
C --> F[🤖 Ollama LLM + Embeddings]
D --> G[CVEs / CWEs / CPEs]
D --> H[Assets / Network Topology]
D --> I[MITRE ATT&CK Techniques]
### RAG Data Flow Pipeline
graph LR
UserQuery["👤 User Query"] --> LLM["🤖 Llama 3 (Ollama)"]
LLM --> KG[("🗄️ Neo4j Knowledge Graph")]
LLM --> VS[("🔍 FAISS Vector Store")]
KG --> RAG["🛡️ RAG Reasoning Response"]
VS --> RAG
## 🔐 Features
| Feature | Description |
|---------|-------------|
| 🗄️ Knowledge Graph | Neo4j graph of assets, software, CVEs, CWEs, network topology, and MITRE ATT&CK |
| 🔍 Hybrid Retrieval | FAISS vector search + graph traversal for accurate, contextual answers |
| 🤖 Local LLM | Ollama-backed reasoning — fully offline, no API keys needed |
| 🛡️ Intent Detection | Safe handling of vague, unsafe, or out-of-scope security queries |
| 📊 Live Dashboard | Browser UI with graph visualization, risk summaries, and asset drilldowns |
| 🧪 Test Suite | Tests for API, graph schema, alignment, reasoning, and no-graph fallback |
## 🆚 Why SecRAG-X?
| Feature | Traditional Tools | SecRAG-X |
|---------|-------------------|----------|
| Vulnerability Analysis | Isolated | Graph-based contextual |
| Attack Mapping | Limited | Integrated MITRE ATT&CK |
| Query Handling | Manual filtering | Natural language |
| Semantic Retrieval | ❌ | FAISS-based |
| AI Reasoning | ❌ | Ollama-powered |
| Visualization | Basic dashboards | Interactive graph |
## 🧰 Tech Stack
[](https://drive.google.com/file/d/1vLTG0lMg6HAn1Js3o_MlLf30cL28yMXT/view?usp=sharing)
## 🧪 Testing
Run the test suite after Neo4j is populated:
python test_api.py
python test_graph_schema.py
python test_alignment.py
python test_no_graph.py
For the full 11-section reliability test:
python test_full_system.py
## 🔮 Future Scope
- Real-time threat intelligence integration
- Live intrusion detection support
- Automated cybersecurity response mechanisms
- Large-scale distributed deployment
- Real-time network traffic analysis
## 📝 Notes
- Large/generated datasets and vector index files are excluded from git.
- Keep production credentials out of source control — use `.env` for local configuration.
- The `.env.example` file shows all required environment variables.
## 👤 Author
**Jenith**
[](https://github.com/JENITH47)
[](https://www.linkedin.com/in/jenith-golyan/)