A full-stack security analysis engine that models Kubernetes RBAC as a graph and detects attack paths, privilege escalation, and vulnerabilities using graph algorithms.
The Kubernetes Attack Path Visualizer is designed to help security engineers understand how an attacker can move inside a Kubernetes cluster.
It converts Kubernetes resources into a graph structure, enriches it with vulnerability data (CVEs), and applies graph algorithms to detect potential attack paths from entry points to critical assets like secrets and databases.
- Identifies all possible paths from entry points β crown jewels
- Helps visualize how an attacker can compromise sensitive resources
-
Assigns a risk score (0β10) to nodes and paths
-
Based on:
- CVEs
- RBAC permissions
- Access to sensitive resources
- Finds the most efficient attack route
- Simulates attacker behavior (least resistance path)
- Explores all possible attack routes
- Ensures no hidden vulnerabilities are missed
- Shows how far an attacker can spread from a compromised node
- Helps measure impact of a breach
-
Detects loops where attacker gains increasing privileges
-
Example:
Pod β ServiceAccount β Role β Pod (higher privilege)
- Identifies chokepoints in the graph
- Securing these nodes blocks multiple attack paths
-
Simulates removing or securing a node
-
Shows:
- Attack paths eliminated
- Security improvement %
-
Lists risky nodes with:
- CVEs
- Risk score
- Explanation of risk
-
Converts technical graph paths into simple attack stories
-
Example:
Attacker enters via service β accesses pod β uses service account β reads secret
-
Generates a complete security report including:
- Attack paths
- Shortest paths
- Blast radius
- Cycles
- Critical nodes
Kubernetes Cluster / Mock Data
β
Fetch (kubectl / JSON)
β
Transform β Graph (Nodes + Edges)
β
CVE Enrichment
β
Validation (Zod Schema)
β
cluster-graph.json
β
Neo4j Database
β
GDS Graph Projection
β
Graph Algorithms (BFS, DFS, Dijkstra)
β
API / CLI / Reports
src/
β
βββ cli/ # CLI commands (scan, ingest, report)
βββ core/ # Core logic (fetch, transform, CVE, attack-path)
βββ db/ # Neo4j + GDS integration
βββ services/ # Business logic (ingestion, reporting)
βββ server/ # Express API
βββ schemas/ # Validation schemas
βββ data/ # Mock dataset
- TypeScript / Node.js
- Neo4j (Graph Database)
- Neo4j Graph Data Science (GDS)
- Express.js
- Zod
- Axios
git clone <your-repo-url>
cd projectnpm installcd docker
docker-compose up -dnpx ts-node src/cli/index.ts scan --mocknpx ts-node src/cli/index.ts ingest --source mocknpx ts-node src/cli/index.ts reportnpx ts-node src/server/server.ts| Endpoint | Description |
|---|---|
| POST /api/ingest | Run full pipeline |
| GET /api/graph | Retrieve graph |
| GET /api/paths | Attack paths |
| GET /api/vulnerabilities | Vulnerable nodes |
| GET /api/blast-radius | Reachability |
| GET /api/cycles | Privilege cycles |
| GET /api/critical-node | Critical nodes |
| POST /api/simulate | What-if simulation |
| GET /api/report | Full report |
- Kubernetes security auditing
- DevSecOps pipelines
- Threat modeling
- Penetration testing
- Cloud security analysis
This project converts Kubernetes RBAC into a graph and uses graph algorithms like BFS, DFS, and Dijkstra to detect attack paths, privilege escalation, and vulnerabilities. It enriches data with CVEs and generates human-readable security reports.
- Frontend graph visualization
- Real-time monitoring
- AI-based risk prediction
- Multi-cluster support
Vardan Singhal
This project demonstrates:
- Graph theory
- System design
- Security analysis
- Backend engineering
A strong real-world project combining DevOps + Security + Algorithms.