About Kubescape
Kubescape is an MCP server published by kubescape in the Cloud category: kubescape is an open-source Kubernetes security platform for your IDE, CI/CD pipelines, and clusters. It includes risk analysis, security, compliance, and misconfiguration scanning, saving Kubernetes users and administrators precious time, effort, and resources. Conduid read 39 tools from its source: analyze_mutating_admission_policy_impact, analyze_network_reachability, analyze_rbac_escalation_paths, analyze_secret_exposure, analyze_service_exposure, analyze_vulnerability_exposure and 33 more. No package is published for it, so it installs from a source checkout.
The repository has 12K stars and 1.1K forks, is licensed Apache-2.0, and its last commit was on 1 Dec 2026. The latest release is v4.0.21 (13 Nov 2026): Changelog ea6c91991b2439a05939db37fbb9e86092e3be4f Test/evidence rule shapes (#4710) 5f8ae6a3f7adb972ef64446bed050b9a49d74327 chore(examples): remove unused Prometheus v… It follows v4.0.20 (6 Nov 2026), and the 5 most recent releases go back to v4.0.16 (14 Oct 2026). It passes all 4 static checks Conduid ran on the repository. Its topics include best-practice, devops, kubernetes, mitre-attack, nsa and security.
Install
git clone https://github.com/kubescape/kubescapeTools (39)
analyze_mutating_admission_policy_impactDetermine which of the cluster's live MutatingAdmissionPolicy objects would mutate a specific resource on a given operation (default CREATE), and what each one's raw CEL mutation expression is. This surfaces implicit mutation that happens at admission time and never appears in the manifest a user applied -- it reports that a policy's mutation would run and what its expression is, it does not evaluate the expression to compute the resulting object. A match with determinable false is one that might apply rather than one that does: match_conditions lists the CEL gates the apiserver still evaluates on the request.| Parameter | Type | Description |
|---|---|---|
| api_group | string | API group of the resource (omit or empty for the core group, e.g. Pod/ConfigMap) |
| api_version * | string | API version of the resource, e.g. v1 |
| cluster_scoped | boolean | Set true for a cluster-scoped resource (namespace is ignored, and any namespaceSelector is treated as non-restricting, matching the Kubernetes API's own documented behavior) |
| name * | string | Name of the resource |
| namespace | string | Namespace of the resource (omit for a cluster-scoped resource) |
| operation | string | Admission operation to check: CREATE, UPDATE, or CONNECT (default CREATE) |
| resource * | string | Plural resource name, e.g. pods, deployments |
| subresource | string | Subresource the request targets, e.g. status or scale (omit for the resource itself). A policy scoped to the resource does not cover its subresources, and the reverse, so this changes which policies match. Scale analysis requires permission to get the scale subresource |
analyze_network_reachabilityDetermine whether a specific source pod can reach a specific destination pod (optionally on a given port/protocol), by evaluating every NetworkPolicy in the cluster together -- not just whether a blocking policy exists. Reports allowed, denied, or unknown (when a rule cannot be resolved statically, e.g. a named container port or an IP-block peer, or when a pod on the host network is involved, which most network plugins do not apply NetworkPolicy to) with the specific policy responsible.| Parameter | Type | Description |
|---|---|---|
| destination_namespace * | string | Namespace of the destination pod |
| destination_pod * | string | Name of the destination pod |
| port | number | Destination port to check (optional; omit to check whether any port/protocol pair is allowed by both source egress and destination ingress) |
| protocol | string | Protocol for the port check: TCP, UDP, or SCTP (optional, defaults to TCP when port is supplied; ignored when port is omitted, which checks all three protocols) |
| source_namespace * | string | Namespace of the source pod |
| source_pod * | string | Name of the source pod |
analyze_rbac_escalation_pathsDetermine every privilege-escalation path reachable from a starting RBAC identity (ServiceAccount, User, or Group) via graph analysis of the cluster's Roles/ClusterRoles/RoleBindings/ClusterRoleBindings -- not just a single-object posture check. Detects impersonation, the escalate/bind verb self-escalation-prevention bypasses, gaining a ServiceAccount's token by running a workload as it (creating a Pod, or a controller such as a Deployment or CronJob, or updating an existing controller), and minting a ServiceAccount token directly via the TokenRequest API, chained across multiple hops. Reports every other identity reachable and whether cluster-admin-equivalent power is reachable at all, however indirectly.| Parameter | Type | Description |
|---|---|---|
| name * | string | Name of the starting identity |
| namespace | string | Namespace of the starting ServiceAccount (required when subject_kind is ServiceAccount; ignored otherwise) |
| subject_kind * | string | Kind of the starting identity: ServiceAccount, User, or Group |
analyze_secret_exposureAnalyze potential secret exposure in Kubernetes workloads and ConfigMaps within a namespace (alias for detect_secret_exposure).| Parameter | Type | Description |
|---|---|---|
| namespace * | string | Namespace to analyze |
| resource_kind | string | Filter by resource kind: Deployment, DaemonSet, StatefulSet, ReplicaSet, Job, CronJob, Pod, ConfigMap (optional) |
| resource_name | string | Filter by resource name (optional) |
analyze_service_exposureDetermine whether a Service (or every Service in a namespace, if service_name is omitted) is reachable from outside the cluster, and by what mechanism: the Service itself being type LoadBalancer or NodePort, spec.externalIPs being set, a networking.k8s.io/v1 Ingress naming it as a backend, or a Gateway API HTTPRoute or GRPCRoute naming it as a backend through an attached Gateway. Existence of an exposing object is treated as intent to expose -- this does not verify an Ingress controller or Gateway implementation is actually running. Each Service's result carries an 'unclear' note when a cross-namespace HTTPRoute/GRPCRoute backendRef names it and its authorization cannot be determined (ReferenceGrant objects could not be collected); an empty paths list is then not a confirmed all-clear. Cross-namespace references are evaluated against the cluster's ReferenceGrants (requires list permission on referencegrants.gateway.networking.k8s.io): a matching grant makes the Service exposed, and without one the reference is not exposure.| Parameter | Type | Description |
|---|---|---|
| namespace * | string | Namespace to analyze |
| service_name | string | Name of a specific Service to check (optional; omit to report on every Service in the namespace) |
analyze_vulnerability_exposureCorrelate known image vulnerabilities (from already-scanned VulnerabilityManifest objects) with each workload's NetworkPolicy ingress and egress exposure and its external exposure via a Service/Ingress/Gateway, so findings can be prioritized by whether they are actually reachable -- and from where -- rather than by severity alone. Reports each (workload, CVE) pair at or above min_severity together with the widest ingress and egress source/destination classes some NetworkPolicy rule already admits (open/external-cidr/any-namespace/restricted) and every external exposure path (LoadBalancer/NodePort/ExternalIP/Ingress/HTTPRoute/GRPCRoute) already known for that workload's Service(s). External exposure is best-effort: if the caller lacks permission to list Service/Ingress/Gateway API resources (including referencegrants, which authorize cross-namespace route references), findings are still returned in full (NetworkPolicy exposure is never affected) and a warning is added -- an empty external_exposure is then not confirmation that a workload has no external exposure, only that it could not be determined.| Parameter | Type | Description |
|---|---|---|
| include_identity | boolean | Opt in to an additional "identity" section: for each vulnerable workload, the ServiceAccount it runs as, whether a token is mounted (mounted/not-mounted/unknown), and the existing RBAC escalation analysis of that ServiceAccount -- direct permissions, finite permissions it can gain, identities it can reach, unbounded grants, scope uncertainty and cluster-admin reachability. This is static context about authorization; it does not change any severity and does not establish that a vulnerability is exploitable or that a credential is usable. Omitting it leaves the response unchanged (default false). |
| min_severity | string | Minimum vulnerability severity to include: Critical, High, Medium, Low, Negligible (default High) |
| namespace | string | Restrict to one namespace (optional; omit for cluster-wide) |
apply_remediationCompute the exact, deterministic YAML patch for failed controls, from either local IaC (path) or an existing posture report JSON (report_path), which may be a live-cluster report. Derives Kubescape's official yq-based fixes and returns the patched YAML as a string; a cluster resource's patched manifest is returned in rendered_manifests, a file's in files. DOES NOT modify any file on disk and DOES NOT change the cluster — the caller decides whether to write or apply the returned content. items lists every failed (resource, control) pair with a classification and the fixer's own reason; controls with no automatic fix are also listed in unfixed_controls and must not be fixed by guesswork. Use list_controls to discover valid IDs.| Parameter | Type | Description |
|---|---|---|
| base_path | string | Directory a file-backed report's files must stay inside. Required with report_path for a report of a file, directory or git scan, because the report itself names where those files are; ignored for a cluster report, which has none. Not allowed with path. |
| path | string | Absolute or relative path to the local YAML file or directory to scan and remediate (e.g., /path/to/manifest.yaml). Exactly one of path or report_path is required. |
| report_path | string | Path to an existing Kubescape posture report JSON file (kubescape scan --format json) to plan remediation from instead of scanning. Exactly one of path or report_path is required. |
create_admission_policy_bindingGenerate a ValidatingAdmissionPolicyBinding manifest for a policy in the embedded CEL admission policy library, validated like `kubescape vap create-policy-binding`. Name the policy with exactly one of policy_name (see list_admission_policies) or control_id. Read-only: it returns the YAML in manifest and any scope warnings in warnings, and does not create or apply anything in a cluster. Kubescape's ValidatingAdmissionPolicy support is experimental.| Parameter | Type | Description |
|---|---|---|
| binding_name * | string | Name of the binding (a DNS-1123 subdomain) |
| control_id | string | Kubescape control ID whose policy to bind (e.g. C-0016). Exactly one of policy_name or control_id is required |
| labels | array | Object label selector entries as key=value or key==value |
| namespaces | array | Namespaces to narrow the binding to. Narrows only namespaced resources; cluster-scoped ones are never exempted |
| parameter_reference | string | Name of the object the policy reads as params. Required for a policy that declares a paramKind, rejected for one that declares none |
| policy_name | string | Name of the ValidatingAdmissionPolicy to bind. Exactly one of policy_name or control_id is required |
| resource_rules | array | Restrict the binding to group/version/resource entries the policy already matches (e.g. apps/v1/deployments, /v1/pods). Omit to bind everything the policy matches |
| validation_actions | array | Actions to take when the policy fails: Deny, Warn, Audit. Deny and Warn cannot be combined. Defaults to ["Deny"] |
detect_secret_exposureDetect potential secret exposure in Kubernetes workloads and ConfigMaps within a namespace. Analyzes container env configurations, envFrom references, and ConfigMap data for exposed plain-text credentials and high-confidence secret patterns.| Parameter | Type | Description |
|---|---|---|
| namespace * | string | Namespace to analyze |
| resource_kind | string | Filter by resource kind: Deployment, DaemonSet, StatefulSet, ReplicaSet, Job, CronJob, Pod, ConfigMap (optional) |
| resource_name | string | Filter by resource name (optional) |
diff_reportsCompare two already-produced Kubescape scan report files (JSON) and return what changed, reusing the same comparison engine as "kubescape diff"/--baseline. Works for posture reports (kubescape scan --format json), reporting new, resolved, unchanged, and incomparable control failures, and for image vulnerability reports (kubescape scan image --format json), reporting new, resolved, and unchanged CVEs. Unchanged findings are only counted unless include_unchanged is true. Both reports must be the same kind; comparing a posture report against a vulnerability report is rejected rather than silently treated as comparable.| Parameter | Type | Description |
|---|---|---|
| base_report * | string | Path to the baseline/base Kubescape scan report JSON file |
| head_report * | string | Path to the current/head Kubescape scan report JSON file |
| include_unchanged | boolean | Also list the findings that are the same in both reports (default false; counts.unchanged always gives their number) |
| min_severity | string | Minimum finding severity to include: Critical, High, Medium, Low (optional) |
dry_run_remediationPropose and dry-run a YAML/JSON patch against a cluster resource. Includes strict validation barriers.| Parameter | Type | Description |
|---|---|---|
| namespace | string | Namespace of the resource (optional for cluster-scoped) |
| patch_json * | string | JSON representation of the patch to apply |
| patch_type | string | Patch type to apply (optional, default: strategic-merge-patch; alternatives: merge-patch, json-patch) |
| resource_kind * | string | Kind of resource to patch (e.g. pods) |
| resource_name * | string | Name of the resource to patch |
evaluate_cel_ruleEvaluate a CEL (Common Expression Language) rule against a JSON resource object.| Parameter | Type | Description |
|---|---|---|
| cel_expression * | string | The CEL expression to evaluate (e.g. 'object.metadata.name == "test"') |
| resource_json * | string | The JSON representation of the resource to evaluate against |
explain_controlExplain a Kubescape security control by ID, returning its metadata (name, description, severity, remediation guidance, and whether it has an auto-fix available through kubescape fix) and optionally including failing resources and specific failed paths from a local manifest (path) or an existing posture report JSON (report_path).| Parameter | Type | Description |
|---|---|---|
| base_path | string | Optional base directory that files referenced in report_path must stay inside. |
| control_id * | string | The control ID to explain (e.g. "C-0017"). |
| path | string | Optional path to a local YAML manifest file or directory to scan for control failures. |
| report_path | string | Optional path to an existing Kubescape posture report JSON file to extract control failures from. |
generate_vapGenerate a ValidatingAdmissionPolicy manifest for a policy in the embedded CEL admission policy library, validated like `kubescape vap generate-policy`. Name the policy with exactly one of policy_name (see list_admission_policies) or control_id (e.g. C-0016). Only controls that already have a CEL/VAP implementation in the embedded library are supported; for anything else, an error is returned. Read-only: it returns the YAML in manifest and does not create or apply anything in a cluster. Kubescape's ValidatingAdmissionPolicy support is experimental.| Parameter | Type | Description |
|---|---|---|
| control_id | string | Kubescape control ID whose policy to generate (e.g. C-0016). Exactly one of control_id or policy_name is required |
| policy_name | string | Name of the ValidatingAdmissionPolicy to generate (see list_admission_policies). Exactly one of control_id or policy_name is required |
get_configuration_driftGet configuration drift patches (e.g. readOnlyRootFilesystem, drop capabilities) by comparing a workload's runtime ContainerProfile against its static manifest. Useful for suggesting security posture hardening.| Parameter | Type | Description |
|---|---|---|
| namespace | string | Namespace of the profile/workload (optional, defaults to 'default') |
| profile_name * | string | Name of the container profile to compute drift for. |
| workload_kind * | string | Kind of the workload (e.g., Pod, Deployment, DaemonSet, StatefulSet, ReplicaSet, Job, CronJob). |
| workload_name * | string | Name of the workload to compare against (e.g., my-deployment). |
get_configuration_security_scan_manifestGet configuration scan detailsget_scan_resultsRead another page of a completed scan without rescanning. Use scan_id and next_offset from a scan response, in the same MCP session. Results expire after 10 minutes and may be evicted sooner. Absence of next_offset means there are no more pages.| Parameter | Type | Description |
|---|---|---|
| limit | number | Page size, 1–100 (default 100) |
| offset | number | Offset from next_offset (default 0) |
| scan_id * | string | Scan identifier from the initial response |
list_admission_policiesList the ValidatingAdmissionPolicies in the CEL admission policy library embedded in Kubescape, with the Kubescape control each one implements (controlID), whether it reads parameters (takesParams), its failurePolicy and the resources it matches. Read-only: it does not create, bind or apply any policy. Kubescape's ValidatingAdmissionPolicy support is experimental.list_configuration_security_scan_manifestsList configuration scan resultslist_configuration_security_scan_summariesList configuration scan results per resource: the failed controls (ID and severity) and the number of controls by status. Summaries are stored on every install; the full manifests behind get_configuration_security_scan_manifest are stored only when continuous scanning is enabled. kind, name and workload_namespace identify the scanned resource; for RBAC subjects the exact name is not stored, so name_label gives the name as a label value instead (at most 63 characters, may differ from the real name). Use list_controls for what a control checks.| Parameter | Type | Description |
|---|---|---|
| continue | string | Optional Kubernetes continuation token for pagination |
| min_severity | string | Only list failed controls at or above this severity, and only resources that have one: Critical, High, Medium or Low (optional). A page can then be empty while continue is set |
| namespace | string | Filter by namespace (optional, default all namespaces). A workload's summary is stored in the workload's namespace; summaries of cluster-scoped and RBAC resources are in 'kubescape' |
list_controlsList the available security controls with their IDs, names, and the frameworks they belong to. Returns total, returned, truncated, and controls; pass framework or search to filter and use next_offset to request the next page. Use a returned ID as a control_ids value in scan_controls.| Parameter | Type | Description |
|---|---|---|
| framework | string | Only return the controls of this framework, e.g. "NSA" (optional, case-insensitive; see list_frameworks) |
| limit | number | Maximum number of controls to return (optional, default 100, maximum 500) |
| offset | number | Number of controls to skip; pass the previous response's next_offset to get the next page (optional, default 0) |
| search | string | Substring to search for in control IDs, names, or frameworks (optional, case-insensitive; e.g. "privileged", "container", "CIS-1.1") |
list_controls_configList configurable control parameters, their resolved values, descriptions, and the security controls that consume them. Pass control_id to inspect parameters affecting a specific control, or search to filter by keyword.| Parameter | Type | Description |
|---|---|---|
| control_id | string | Optional control ID (e.g. "C-0016") to only list configuration inputs read by that control |
| search | string | Optional keyword to filter configuration entries by name, title, description, or control ID case-insensitively |
list_frameworksList the names of all security frameworks available for scanning (e.g. nsa, mitre, cis-v1.23-t1.0.1). Use a returned name as the framework_name argument to run_framework_security_scan.| Parameter | Type | Description |
|---|---|---|
| search | string | Optional substring to filter framework names case-insensitively (e.g. "cis") |
list_vulnerabilities_in_manifestList CVEs in a manifestlist_vulnerability_manifestsDiscover vulnerability manifestslist_vulnerability_matches_for_cveGet details for a specific CVEpredict_pss_compliancePredict which workloads in a namespace would fail Pod Security Standards (PSS| Parameter | Type | Description |
|---|---|---|
| level | string | Target PSS level: Privileged, Baseline, or Restricted (optional; defaults to Restricted) |
| namespace * | string | Namespace to analyze |
| workload_name | string | Name of a specific workload to check (optional; omit to report on every workload in the namespace) |
run_framework_security_scanrun_network_security_scanrun_rbac_security_scanscan_controlsscan_local_iacscan_local_iac_controlsscan_manifestscan_resource_sliceScan a slice of resources to support granular, token-budgeted chunks. Returns simplified objects with name, namespace, labels, annotations, creationTimestamp, ownerReferences, and spec. Used to avoid overloading context windows for large clusters.| Parameter | Type | Description |
|---|---|---|
| continue | string | Continue token for pagination (optional) |
| include_status | boolean | Include status section of each resource (optional, defaults to false; increases response size) |
| limit | number | Number of resources to fetch in this slice (default 10) |
| namespace | string | Namespace (optional, defaults to all) |
| resource_kind * | string | Kind of resource (e.g. pods, deployments) |
scan_workloadsuggest_fixPreview fixes for security findings as a unified git-compatible diff and structured plan without modifying files. Operates in dry-run mode from either local IaC (path) or an existing posture report JSON (report_path). Returns a unified diff, file-by-file changes, items classification, and unfixed controls. Control IDs are optional; if omitted, fixes are suggested for all failing controls.| Parameter | Type | Description |
|---|---|---|
| base_path | string | Directory a file-backed report's files must stay inside. Required with report_path for a report of a file, directory or git scan, because the report itself names where those files are; ignored for a cluster report, which has none. Not allowed with path. |
| path | string | Absolute or relative path to the local YAML file or directory to scan and suggest fixes for (e.g., /path/to/manifest.yaml). Exactly one of path or report_path is required. |
| report_path | string | Path to an existing Kubescape posture report JSON file (kubescape scan --format json) to suggest fixes from. Exactly one of path or report_path is required. |
validate_scan_selectionCheck, without running a scan, whether control identifiers resolve against the policy catalog the way scan_controls resolves them. Each identifier is a control ID (e.g. C-0286) or a framework section number (e.g. CIS-3.1.1), case-insensitive. Reports which identifiers resolve to which control, which are unknown, which section numbers are ambiguous, and which name a control already named by an earlier identifier. Read-only: it needs no cluster access. If the policy bundle is still loading or cannot be read it returns an error rather than reporting identifiers as unknown.verify_remediationCheck whether findings listed by apply_remediation are fixed, after the caller has applied the changes to local IaC. Rescans path once and returns one verdict per item, in input order: resolved only when the original resource is found in the fresh scan and the control is reported as passed with a complete scan; still_failing when the control is reported as failed; unverified, with a reason code, whenever that cannot be established. A missing resource or control is never a resolution: IaC resource IDs depend on the file path relative to the scan root and the document's position in its file, so a renamed or moved file, a reordered document or a different path root all show up as resource_not_found. Read-only: it does not apply patches or modify any file.| Parameter | Type | Description |
|---|---|---|
| items * | array | The items array returned by apply_remediation, passed unchanged. Only resource_id and control.id are read. Items without a resource_id (not_evaluated items) are returned as unverified. |
| path * | string | The same local YAML file or directory root that was passed to apply_remediation, now holding the applied changes. |
Security checks
Static checks derived from the repository 22 hours ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 2.0K words.
- ✓License declaredThe repository declares the Apache-2.0 license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by go.sum.
2 checks have not been run yet.
Releases
README
The repository's README runs to about 2.0K words, fetched 22 hours ago. The original in the repository is authoritative.
Read full README