---
title: AppArmor profile 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 > AppArmor profile explicitly disabled
---

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

# AppArmor profile 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-apparmor-profile-unconfined` 

**Platform:** DockerCompose

**Severity:** Medium

**Category:** Resource Management

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

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

### Description{% #description %}

Setting `apparmor:unconfined` in `security_opt` explicitly disables the AppArmor policy Docker would otherwise apply, removing mandatory access controls that restrict container access to host resources. Services should omit this override to use Docker's `docker-default` profile or specify a loaded custom AppArmor profile.

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

```yaml
services:
  implicit_default:
    image: alpine
  explicit_default:
    image: alpine
    security_opt:
      - apparmor:docker-default
  custom_profile:
    image: alpine
    security_opt:
      - apparmor=my-custom-profile
```

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

```yaml
services:
  colon_syntax:
    image: alpine
    security_opt:
      - apparmor:unconfined
  equals_syntax:
    image: alpine
    security_opt:
      - apparmor=unconfined
```
