> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/compute/appsec-k8s-37.md).

# Admission of containers with capabilities assigned is not limited misconfiguration detected in code

## Rule Details

|                        |                                                        |
| ---------------------- | ------------------------------------------------------ |
| Cortex AppSec Rule ID  | APPSEC\_K8S\_37                                        |
| Category - Subcategory | Kubernetes - Access Control                            |
| Provider               | OTHER                                                  |
| Severity               | LOW                                                    |
| Framework              | Helm, Kubernetes, Kustomize, Terraform, Terraform Plan |

## Impact

Docker has a default list of capabilities that are allowed for each container of a pod. The containers use the capabilities from this default list, but pod manifest authors can alter it by requesting additional capabilities, or dropping some of the default capabilities. Limiting the admission of containers with capabilities ensures that only a small number of containers have extended capabilities outside the default range. This helps ensure that if a container becomes compromised it is unable to provide a productive path for an attacker to move laterally to other containers in the pod.

## How to Fix

*Resource:* Container

* *Arguments:* securityContext:capabilities:drop (Optional)

## Capabilities field allows granting certain privileges to a process without granting all the privileges of the root user. when *drop* includes *ALL*, all of the root privileges are disabled for that container. \[source,go]

apiVersion: v1 kind: Pod metadata: name: spec: containers:

* name: image:  securityContext: capabilities: drop:
* * ALL

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/compute/appsec-k8s-37.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
