---
title: No new privileges explicitly disabled
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > Code Security > Infrastructure as Code (IaC)
  Security > IaC Security Rules > No new privileges explicitly disabled
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# No new privileges explicitly disabled

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

## Metadata{% #metadata %}

**Id:** `dockercompose-no-new-privileges-disabled` 

**Platform:** DockerCompose

**Severity:** Medium

**Category:** Least Privilege

#### Learn More{% #learn-more %}

- [Provider Reference](https://docs.docker.com/reference/compose-file/services/#security_opt)

### Description{% #description %}

Setting `no-new-privileges:false` explicitly allows container processes to gain privileges through setuid or setgid binaries and file capabilities. This weakens protection against privilege escalation after a process is compromised. Services should remove the explicit disable or set `no-new-privileges:true` in `security_opt`.

## Compliant Code Examples{% #compliant-code-examples %}

```yaml
services:
  absent:
    image: alpine
  bare:
    image: alpine
    security_opt: [no-new-privileges]
  colon:
    image: alpine
    security_opt: [no-new-privileges:true]
  equal:
    image: alpine
    security_opt: [no-new-privileges=true]
```

## Non-Compliant Code Examples{% #non-compliant-code-examples %}

```yaml
services:
  false_colon:
    image: alpine
    security_opt:
      - no-new-privileges:false
  false_equal:
    image: alpine
    security_opt: [no-new-privileges=false]
```
