How vinayediga/k8_security_analyzer_private works
This is a Kubernetes attack-path visualizer and analyzer. Its main workflow is to extract Kubernetes resources and risky relationships into a graph, expose graph snapshots and analyses through an authenticated backend, then let users explore findings, paths, risk, mitigations, and clusters in the frontend. The graph engine also supports a CLI. Some backend and extractor internals are unsampled, so their finer-grained control flow is not shown; optional or undocumented connections are omitted.
Main entry points: App.jsx Application Shell · api.py HTTP API · GraphContext.jsx Graph State · PathsPane.jsx Attack Paths
Components 25
Cluster Collection
- Graph Extractor
worker/extract_graph.py - Cluster Agent
worker/agent.py
Backend Services
- HTTP API
backend/api.py - Authentication
backend/auth.py - Data Repositories
backend/repositories.py - Database Connection
backend/database.py
Graph Analysis
- Graph Engine
analysis/graph_engine.py - Analysis CLI
analysis/main.py - Analysis Reports
analysis/report.py
Web Application
- Application Shell
frontend/src/App.jsx - Graph State
frontend/src/context/GraphContext.jsx - API Client
frontend/src/lib/api.js - Graph Normalization
frontend/src/lib/graph.js - Overview
frontend/src/components/OverviewPane.jsx - Graph Explorer
frontend/src/components/GraphPane.jsx - Findings
frontend/src/components/FindingsPane.jsx - Attack Paths
frontend/src/components/PathsPane.jsx - Risk Analysis
frontend/src/components/RiskPane.jsx - Mitigations
frontend/src/components/MitigationPane.jsx - Cluster Management
frontend/src/components/ClustersPane.jsx - Browser Analysis
frontend/src/lib/analysis.js
Other components
- Cluster Operator
- Kubernetes Cluster
- Web User
- MongoDB
Connections 25
- Cluster Operator → Graph Extractor: runs scan
- Graph Extractor → Kubernetes Cluster: reads resources
worker/extract_graph.py - Cluster Agent → Graph Extractor: uses extractor
worker/agent.py - Web User → Application Shell: uses
- Application Shell → Graph State: provides state
frontend/src/App.jsx - Application Shell → Overview: renders
frontend/src/App.jsx - Application Shell → Graph Explorer: renders
frontend/src/App.jsx - Application Shell → Findings: renders
frontend/src/App.jsx - Application Shell → Attack Paths: renders
frontend/src/App.jsx - Application Shell → Risk Analysis: renders
frontend/src/App.jsx - Application Shell → Mitigations: renders
frontend/src/App.jsx - Application Shell → Cluster Management: renders
frontend/src/App.jsx - Graph State → Graph Normalization: normalizes graph
frontend/src/context/GraphContext.jsx - Graph State → API Client: loads snapshots
frontend/src/context/GraphContext.jsx - Attack Paths → API Client: requests analyses
frontend/src/components/PathsPane.jsx - Attack Paths → Browser Analysis: runs local analysis
frontend/src/components/PathsPane.jsx - API Client → HTTP API: sends requests
frontend/src/lib/api.js - HTTP API → Authentication: authenticates users
backend/api.py - HTTP API → Data Repositories: uses repositories
backend/api.py - HTTP API → Database Connection: accesses database
backend/api.py - Database Connection → MongoDB: connects
backend/database.py - Data Repositories → Database Connection: gets database
backend/repositories.py - HTTP API → Graph Engine: analyzes snapshots
backend/api.py - Analysis CLI → Graph Engine: runs analyses
analysis/main.py - Analysis Reports → Graph Engine: uses graph engine
analysis/report.py