Back to controls

Minimize access to create pods

The ability to create pods in a namespace can provide a number of opportunities for privilege escalation, such as assigning privileged service accounts to these pods or mounting hostPaths with access to sensitive data (unless Pod Security Policies are implemented to restrict this access)

Category

Controls

Low

Applies to

Kubernetes

Coverage

3 queries

Asset types

2 covered

Overview

The ability to create pods in a namespace can provide a number of opportunities for privilege escalation, such as assigning privileged service accounts to these pods or mounting hostPaths with access to sensitive data (unless Pod Security Policies are implemented to restrict this access)

As such, access to create new pods should be restricted to the smallest possible group of users.

Rationale

The ability to create pods in a cluster opens up possibilities for privilege escalation and should be restricted, where possible.

Impact

Care should be taken not to remove access to pods to system components which require this for their operation.

Remediation guidance

Where possible, remove create access to pod objects in the cluster.

References

  1. https://workbench.cisecurity.org/sections/1126661/recommendations/1838592

  2. https://kubernetes.io/docs/reference/access-authn-authz/rbac/

Service-wide remediation

Recommended when many resources are affected: fix the platform baseline first so new resources inherit the secure setting, then remediate the existing flagged resources in batches.

Kubernetes

Use admission policies, baseline cluster configuration, GitOps templates, and namespace or workload guardrails so new deployments follow the control by default.

Operational rollout

  1. Fix the baseline first at the account, subscription, project, cluster, or tenant scope that owns this control.
  2. Remediate the currently affected resources in batches, starting with internet-exposed and production assets.
  3. Re-scan and track approved exceptions with an owner and expiry date.

Query logic

These are the stored checks tied to this control.

Kubernetes RoleBindings to Roles that can create pods

Connectors

Kubernetes

Covered asset types

RoleBinding

Expected check: eq []

{
  roles(
    where: {
      AND: [
        {
          rules_SOME: {
            AND: [
              {
                OR: [
                  { verbs_INCLUDES: "create" }
                  { verbs_INCLUDES: "*" }
                ]
              }
              {
                OR: [
                  { resources_INCLUDES: "pods" }
                  { resources_INCLUDES: "*" }
                ]
              }
              { OR: [{ apiGroup_INCLUDES: "" }, { apiGroup_INCLUDES: "*" }] }
            ]
          }
        },
        {bindings_SOME: {idFromProvider_NOT: ""}}
      ]
    }
  ) {
    bindings {
      ...AssetFragment
    }
  }
}
Kubernetes RoleBindings to ClusterRoles that can create pods

Connectors

Kubernetes

Covered asset types

RoleBinding

Expected check: eq []

{
  clusterRoles(
    where: {
      AND: [
        {
          rules_SOME: {
            AND: [
              {
                OR: [
                  { verbs_INCLUDES: "create" }
                  { verbs_INCLUDES: "*" }
                ]
              }
              {
                OR: [
                  { resources_INCLUDES: "pods" }
                  { resources_INCLUDES: "*" }
                ]
              }
              { OR: [{ apiGroup_INCLUDES: "" }, { apiGroup_INCLUDES: "*" }] }
            ]
          }
        },
        {roleBindings_SOME: {idFromProvider_NOT: ""}}
      ]
    }
  ) {
    roleBindings {
      ...AssetFragment
    }
  }
}
Kubernetes RoleBindings to ClusterRoles that can create pods

Connectors

Kubernetes

Covered asset types

ClusterRoleBinding

Expected check: eq []

{
  clusterRoles(
    where: {
      AND: [
        {
          rules_SOME: {
            AND: [
              {
                OR: [
                  { verbs_INCLUDES: "create" }
                  { verbs_INCLUDES: "*" }
                ]
              }
              {
                OR: [
                  { resources_INCLUDES: "pods" }
                  { resources_INCLUDES: "*" }
                ]
              }
              { OR: [{ apiGroup_INCLUDES: "" }, { apiGroup_INCLUDES: "*" }] }
            ]
          }
        },
        {clusterRoleBindings_SOME: {idFromProvider_NOT: ""}}
      ]
    }
  ) {
    clusterRoleBindings {
      ...AssetFragment
    }
  }
}
Cyscale Logo
Cyscale is an agentless cloud-native application protection platform (CNAPP) that automates the contextual analysis of cloud misconfigurations, vulnerabilities, access, and data, to provide an accurate and actionable assessment of risk.

Stay connected

Receive new blog posts and product updates from Cyscale

By clicking Subscribe, I agree to Cyscale’s Privacy Policy


© 2026 Cyscale Limited

LinkedIn icon
Twitter icon
Facebook icon
crunch base icon
angel icon