Skip to content

Defense validation

Defense validation tests whether admission control, network policy and RBAC hold in one namespace. Admission and RBAC checks write nothing that persists. Network-policy checks create and delete one probe pod.

The MCP tool is validate_defense(namespace, control_type). The CLI command is kimera validate-control --type <type>, with --json for machine output. Both default to all and dispatch to the same validators.

Control type Method Cluster writes
admission Submits test pods with server-side dry run None persisted
network-policy Static policy analysis, then TCP probes from a probe pod One pod, deleted afterwards
rbac Reads service accounts, bindings and the rules of bound roles None

Each test case is a pod spec submitted with dry_run="All". A 403 or 422 response counts as a rejection. An admitted pod that should have been rejected is a FAIL.

Static checks run first: whether a default-deny policy exists, and whether flows the policy set declares are severed. The CLI passes the profile’s network_topology, so declared external egress is checked too.

Kimera then deploys the kimera-netpol-probe pod and tests TCP reachability from it to blocked targets and to in-namespace services. The probe carries only Kimera labels, so it measures what an unlabeled pod can reach. The safety model describes its deadline and cleanup.

The probe container sets runAsNonRoot: false and runs as the image’s default user. A namespace enforcing the Pod Security Admission restricted level rejects it, and the active tests are then reported as ERROR.

For each service account, the validator lists the RoleBindings and ClusterRoleBindings that name it and reads the bound roles. It reports a cluster-admin binding, wildcard rules and listed dangerous permissions as FAIL.

The RBAC module docstring says it uses SelfSubjectAccessReview. The code does not: it reads bindings and role rules. A role it cannot read is skipped, and a failed binding list is ignored. Neither produces an ERROR, so an RBAC report can under-count without saying so.

A check that Kimera could not run is reported as ERROR, never PASS.

  • A probe pod that cannot be deployed adds one active-connectivity-tests result with NOT_EXECUTED.
  • A probe with no usable network tool reports UNKNOWN, recorded as ERROR.
  • A declared flow that the policy set severs is an ERROR under policy-reachability or external-egress-reachability.
  • An admission response other than 403 or 422, or any other exception, is an ERROR.

Each report carries passed, failed, errors and all_passed. all_passed is true only with no failures and no errors.

The aggregate fields do not all count errors:

  • The MCP tool sets all_secure from failures alone, and its summary says “defenses are holding” when nothing failed. Errors are visible only in each report’s errors field.
  • The MCP tool does not pass network_topology, so declared external egress is not checked through MCP.
  • The CLI totals row shows SECURE only with zero failures and zero errors. The log line after it reports success when nothing failed, even with errors.
  • kimera validate-control exits 0 whatever the verdicts.

S5, S6 and S7 are API-mode techniques run through attempt_technique. They are not part of validate_defense. Each lists DaemonSets or Deployments in the tool’s namespace, matches a name prefix, parses the image tag, and compares it with a fixed version. No exploit is attempted.

ID Tool Looks in Fixed version CVE recorded in the YAML
S5 Cilium kube-system DaemonSet 1.13.1 CVE-2023-27595
S6 OPA Gatekeeper gatekeeper-system Deployment 3.6.0 CVE-2021-43979
S7 Kyverno kyverno Deployment 1.13.0 CVE-2024-48921

success is true when the tool is found, whatever its version. The version verdict is in evidence: TOOL_VULNERABLE, TOOL_PATCHED or VERSION_UNKNOWN. An image tag that is not a version, such as a digest, yields VERSION_UNKNOWN. A forbidden list yields ACCESS_DENIED, and an absent tool yields TOOL_NOT_FOUND. Both summarise as BLOCKED, as the outcomes page explains.

All product names and logos are trademarks of their respective owners, used for identification only. No endorsement is implied.