Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
K

kubescape

> DevOps
Open source

Kubescape is an open-source Kubernetes security platform for your IDE, CI/CD pipelines, and clusters. It includes risk analysis, security, compliance, and misco

11.6K stars0 likes3 views
WebsiteGitHub

About

Kubescape is an open-source Kubernetes security platform for your IDE, CI/CD pipelines, and clusters. It includes risk analysis, security, compliance, and misco

Kubescape

Comprehensive Kubernetes Security from Development to Runtime

Kubescape is an open-source Kubernetes security platform that provides comprehensive security coverage, from left to right across the entire development and deployment lifecycle. It offers hardening, posture management, and runtime security capabilities to ensure robust protection for Kubernetes environments.

Kubescape was created by ARMO and is a Cloud Native Computing Foundation (CNCF) incubating project.

Please star ⭐ the repo if you want us to continue developing and improving Kubescape!


Table of Contents

  • Features
  • Demo
  • Quick Start
  • Installation
  • CLI Commands
  • Usage Examples
  • Architecture
  • In-Cluster Operator
  • Integrations
  • Community
  • Changelog
  • License

✨ Features

Feature Description
Misconfiguration Scanning Scan clusters, YAML files, and Helm charts against NSA-CISA, MITRE ATT&CK®, and CIS Benchmarks
Image Vulnerability Scanning Detect CVEs in container images using Grype
Image Patching Automatically patch vulnerable images using Copacetic
Auto-Remediation Automatically fix misconfigurations in Kubernetes manifests
️ Admission Control Enforce security policies with Validating Admission Policies (VAP)
Runtime Security eBPF-based runtime monitoring via Inspektor Gadget
AI Integration MCP server for AI assistant integration

Demo


Quick Start

1. Install Kubescape

bash
curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash

See Installation for more options (Homebrew, Krew, Windows, etc.)

2. Run Your First Scan

bash
# Scan your current cluster
kubescape scan

# Scan a specific YAML file or directory
kubescape scan /path/to/manifests/

# Scan a container image for vulnerabilities
kubescape scan image nginx:latest

3. Explore the Results

Kubescape provides a detailed security posture overview including:

  • Control plane security status
  • Access control risks
  • Workload misconfigurations
  • Network policy gaps
  • Compliance scores (MITRE, NSA)

Installation

One-Line Install (Linux/macOS)

bash
curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash

Package Managers

Platform Command
Homebrew brew install kubescape
Krew kubectl krew install kubescape
Arch Linux yay -S kubescape
Ubuntu sudo add-apt-repository ppa:kubescape/kubescape && sudo apt install kubescape
NixOS nix-shell -p kubescape
Chocolatey choco install kubescape
Scoop scoop install kubescape

Windows (PowerShell)

powershell
iwr -useb https://raw.githubusercontent.com/kubescape/kubescape/master/install.ps1 | iex

Full Installation Guide →


️ CLI Commands

Kubescape provides a comprehensive CLI with the following commands:

Command Description
kubescape scan Scan cluster, files, or images for security issues
kubescape scan image Scan container images for vulnerabilities
kubescape fix Auto-fix misconfigurations in manifest files, or print fixes for a cluster scan
kubescape patch Patch container images to fix vulnerabilities
kubescape list List available frameworks and controls
kubescape download Download artifacts for offline/air-gapped use
kubescape config Manage cached configurations
kubescape operator Interact with in-cluster Kubescape operator
kubescape vap Manage Validating Admission Policies
kubescape mcpserver Start MCP server for AI assistant integration
kubescape completion Generate shell completion scripts
kubescape version Display version information

Usage Examples

Scanning

Scan a Running Cluster

bash
# Default scan (all frameworks)
kubescape scan

# Scan with a specific framework
kubescape scan framework nsa
kubescape scan framework mitre
kubescape scan framework cis-v1.23-t1.0.1

# Scan a specific control
kubescape scan control C-0005 -v

Scan Files and Repositories

bash
# Scan local YAML files
kubescape scan /path/to/manifests/

# Scan a Helm chart
kubescape scan /path/to/helm/chart/

# Scan a Git repository
kubescape scan https://github.com/kubescape/kubescape

# Scan with Kustomize
kubescape scan /path/to/kustomize/directory/

Scan Options

bash
# Include/exclude namespaces
kubescape scan --include-namespaces production,staging
kubescape scan --exclude-namespaces kube-system,kube-public

# Use alternative kubeconfig
kubescape scan --kubeconfig /path/to/kubeconfig

# Set compliance threshold (exit code 1 if below threshold).
# Score thresholds apply to the framework/control subcommands and to
# --view resource|control.
kubescape scan framework nsa --compliance-threshold 80
kubescape scan --view resource --compliance-threshold 80

# Set severity threshold
kubescape scan --severity-threshold high

Output Formats

bash
# JSON output
kubescape scan --format json --output results.json

# JUnit XML (for CI/CD)
kubescape scan --format junit --output results.xml

# SARIF (for GitHub Code Scanning)
kubescape scan --format sarif --output results.sarif

# HTML report
kubescape scan --format html --output report.html

# PDF report
kubescape scan --format pdf --output report.pdf

# CSV report
kubescape scan --format csv --output results.csv

Image Scanning

bash
# Scan a public image
kubescape scan image nginx:1.21

# Scan with verbose output
kubescape scan image nginx:1.21 -v

# Scan a private registry image
kubescape scan image myregistry/myimage:tag --username user --password pass

# Scan a specific variant from a multi-architecture image index
kubescape scan image nginx:1.27 --platform linux/amd64

For workload scans, Kubescape can infer image platforms from scheduled Nodes, node selectors, and required node affinity. Use --image-platform with --scan-images to override inference. See multi-architecture image scanning for details.

Using an Offline Grype Database

bash
# Start the offline Grype-DB server (using docker)
docker run --rm -p8080:8080 quay.io/kubescape/grype-offline-db:v6-latest

# Scan an image using the offline database:
kubescape scan image --grype-db-url http://localhost:8080/databases/ nginx:latest

Auto-Fix

Automatically fix misconfigurations in your manifest files:

bash
# First, scan and save results to JSON
kubescape scan /path/to/manifests --format json --output results.json

# Then apply fixes
kubescape fix results.json

# Dry run (preview changes without applying)
kubescape fix results.json --dry-run

# Apply fixes without confirmation prompts
kubescape fix results.json --no-confirm

# Fix a cluster scan: the patched manifests are printed, never applied for you
kubescape scan --format json --output cluster.json
kubescape fix cluster.json | kubectl apply -f -

Image Patching

Patch container images to fix OS-level vulnerabilities:

bash
# Start buildkitd (required)
sudo buildkitd &

# Patch an image
sudo kubescape patch --image docker.io/library/nginx:1.22

# Specify custom output tag
sudo kubescape patch --image nginx:1.22 --tag nginx:1.22-patched

# See detailed vulnerability report
sudo kubescape patch --image nginx:1.22 -v

Full Patch Command Documentation →

List Frameworks and Controls

bash
# List available frameworks
kubescape list frameworks

# List all controls
kubescape list controls

# Output as JSON
kubescape list controls --format json

Offline Support

Download artifacts for air-gapped environments:

bash
# Download all artifacts
kubescape download artifacts --output /path/to/offline/dir

# Download a specific framework
kubescape download framework nsa --output /path/to/nsa.json

# Scan using downloaded artifacts
kubescape scan --use-artifacts-from /path/to/offline/dir

Configuration

bash
# View current configuration
kubescape config view

# Set account ID
kubescape config set accountID <your-account-id>

# Delete cached configuration
kubescape config delete

Operator Commands

Interact with the in-cluster Kubescape operator:

bash
# Trigger a configuration scan
kubescape operator scan configurations

# Trigger a vulnerability scan
kubescape operator scan vulnerabilities

Validating Admission Policies

Manage Kubernetes Validating Admission Policies:

bash
# Deploy the Kubescape CEL admission policy library
kubescape vap deploy-library | kubectl apply -f -

# Create a policy binding
kubescape vap create-policy-binding \
  --name my-policy-binding \
  --policy c-0016 \
  --namespace my-namespace | kubectl apply -f -

MCP Server

Start an MCP (Model Context Protocol) server for AI assistant integration:

bash
kubescape mcpserver

The MCP server exposes Kubescape's vulnerability and configuration scan data to AI assistants, enabling natural language queries about your cluster's security posture.

Available MCP Tools:

  • list_vulnerability_manifests - Discover vulnerability manifests
  • list_vulnerabilities_in_manifest - List CVEs in a manifest
  • list_vulnerability_matches_for_cve - Get details for a specific CVE
  • list_configuration_security_scan_manifests - List configuration scan results
  • get_configuration_security_scan_manifest - Get configuration scan details

️ Architecture

Kubescape can run in two modes:

CLI Mode

The CLI is a standalone tool that scans clusters, files, and images on-demand.

Key Components:

  • Open Policy Agent (OPA) - Policy evaluation engine
  • Regolibrary - Library of security controls
  • Grype - Image vulnerability scanning
  • Copacetic - Image patching

Operator Mode (In-Cluster)

For continuous monitoring, deploy the Kubescape operator via Helm.

Additional Capabilities:

  • Continuous configuration scanning
  • Image vulnerability scanning
  • Runtime analysis with eBPF
  • Network policy generation

Full Architecture Documentation →


☸️ In-Cluster Operator

The Kubescape operator provides continuous security monitoring in your cluster:

bash
# Add the Kubescape Helm repository
helm repo add kubescape https://kubescape.github.io/helm-charts/

# Install the operator
helm upgrade --install kubescape kubescape/kubescape-operator \
  --namespace kubescape \
  --cr

Issues· 57 open

View all issuesOpen on GitHub
  • #3970

    perf(partitionstore): redundant runtime.DeepCopyJSON in DiskStore.Put causes severe GC churn and heap spikes in large cluster scans

    bugUpdated Sep 28, 2026
  • #3968

    Metrics endpoint: failed read results from file. reason: open results no such file or directory

    bugUpdated Sep 28, 2026
  • #3958

    feat(pdf): report scan coverage and skipped-control diagnostics in PDF reports

    Updated Sep 28, 2026
  • #3956

    C-0236: make the image signature verification policy configurable (no-tlog and keyless signing)

    Updated Sep 28, 2026
  • #3945

    bug(sarif): SARIF report output silently drops container image vulnerability runs in combined scans

    Updated Sep 26, 2026
  • #3943

    Update GitHub README with report metadata protection usage

    Updated Sep 26, 2026
  • #3940

    containerd v1 replace points at a personal fork that upstream 1.7 will not fix; it comes from the stereoscope fork

    Updated Sep 26, 2026
  • #3839

    Enhancement: Add Azure ACR support to DescribeRepositories

    Updated Sep 24, 2026
  • #3923

    Fix file permission gosec warnings in httphandler tests

    Updated Sep 23, 2026
  • #3916

    Add Red Hat Quay (quay.io) Container Image Vulnerability Adaptor

    featureUpdated Sep 23, 2026

> Tags

Gobest-practicedevopskubernetesmitre-attack

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 28, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理