
Prerequisites
- A Kubernetes cluster (v1.16+)
kubectlconfigured for your cluster- Docker CLI for building and pushing images
- Git for cloning the repository
1. Clone & Build
Since the official images might not be publicly pullable, clone the source and build both UI and server components:2. Configure Risk Scoring
Openkube-scan.yaml and locate the ConfigMap under the kube-scan namespace. Adjust thresholds or add rules to match your security policy:
You can extend
basic or create new rule sets for network, resource limits, or Pod security policies.3. Deploy KubeScan
Update the Deployment spec inkube-scan.yaml to use your built images:
4. Expose the UI Service
By default, the UI Service isClusterIP. To access it externally, switch to LoadBalancer or NodePort:
5. Access the Dashboard
Open your browser athttp://<HOST>:<PORT>. The K8S Risk Assessment dashboard displays all workloads with their risk scores.

6. Workload Risk Comparison
Compare two deployments of the sameDevSecOps application:
Default Deployment (Higher Risk)
Production Deployment (Lower Risk)

7. System Namespace Pods
Enable “Show system pods” to include core components (e.g.,grafana, prometheus) in the assessment.

8. Risky Nginx Pod Demo
Create a deliberately risky Pod and Service in bothdefault and prod namespaces:
- In default,
nginx-risky-podscores 7 (High) due tohostPath,ALLcapabilities, missing limits, and LoadBalancer exposure. - In prod with an Istio sidecar, the score drops to 6 (Medium) thanks to service-mesh encryption and identity features.

