How manmathbh/kubescape works
Kubescape is a Kubernetes security platform: users invoke the CLI to scan clusters, manifests, repositories, or images, then inspect or export posture and vulnerability findings. The scan engine gathers resources, evaluates policies, prioritizes results, and supports remediation, image patching, admission-policy management, runtime monitoring, and MCP-based AI integration. The graph follows relationships visible in the excerpts, SOURCE INDEX, or README; several documented capabilities have no sampled implementation links, so those links are marked unverified.
Main entry points: core/scan.go Scan orchestration · scan/scan.go Scan command · image_scan.go Image vulnerability scan · root.go Kubescape CLI
Components 23
CLI and API
- Kubescape CLI
cmd/root.go - Scan command
cmd/scan/scan.go - HTTP scan API
httphandler/handlerequests/v1/requestshandler.go
Scan inputs
- Scan orchestration
core/core/scan.go - Resource collection
core/pkg/resourcehandler - Cluster scanning
cmd/scan/scan.go - Manifest and repo scans
cmd/scan/local_input.go - Image vulnerability scan
core/core/image_scan.go
Security analysis
- OPA policy evaluation
core/pkg/opaprocessor/processorhandler.go - Finding prioritization
core/pkg/resourcesprioritization/prioritizationhandler.go - Network exposure analysis
core/pkg/networkpolicy/reachability.go - RBAC escalation analysis
core/pkg/rbacgraph/escalation.go - Vulnerability exposure
core/pkg/vulnexposure/correlate.go
Results and remediation
- Result handling
core/pkg/resultshandling/results.go - Report exporters
core/pkg/resultshandling/printer/v2/printresults.go - Manifest remediation
core/pkg/fixhandler/fixhandler.go - Image patching
cmd/patch/patch.go
Platform integrations
- Admission policies
cmd/vap/vap.go - Runtime monitoring
core/pkg/hostsensorutils/ebpf/tracer.go - AI MCP server
cmd/mcpserver/mcpserver.go
Other components
- User
- Kubernetes cluster
- Image registry
Connections 24
- User → Kubescape CLI: invokes
cmd/root.go - Kubescape CLI → Scan command: dispatches
cmd/root.go - Scan command → Scan orchestration: starts scan
cmd/scan/scan.go - Scan orchestration → Resource collection: collects resources
core/core/scan.go - Scan orchestration → OPA policy evaluation: evaluates policies
core/core/scan.go - Scan orchestration → Finding prioritization: prioritizes findings
core/core/scan.go - Scan orchestration → Image vulnerability scan: scans images
core/core/scan.go - OPA policy evaluation → Result handling: produces findings
- Result handling → Report exporters: formats reports
- Scan command → Cluster scanning: supports cluster
README.md - Scan command → Manifest and repo scans: supports files
README.md - Scan command → Image vulnerability scan: supports images
README.md - User → HTTP scan API: submits scans
- HTTP scan API → Scan orchestration: runs scan
- Kubernetes cluster → Resource collection: provides resources
- Image registry → Image vulnerability scan: provides images
- User → Manifest remediation: requests fixes
README.md - User → Image patching: requests patches
README.md - User → Admission policies: manages policies
README.md - User → Runtime monitoring: uses runtime security
README.md - User → AI MCP server: uses AI integration
README.md - Scan orchestration → Network exposure analysis: assesses exposure
- Scan orchestration → RBAC escalation analysis: assesses escalation
- Scan orchestration → Vulnerability exposure: correlates exposure