# yaml-language-server: $schema=../../../../schema/control.schema.json id: CB-DEB-BOOT-010 title: Keep no AppArmor profile in complain mode finding: title: Some AppArmor profiles only log violations instead of blocking them description: A profile in complain mode confines nothing; the program it covers runs as if it had no profile. status: active profiles: [server-hardened, desktop-hardened] risk: severity: medium assessment: automated tags: [apparmor, mac] description: | Each loaded AppArmor profile runs in a mode. In `enforce` mode, accesses outside the profile are blocked and logged. In `complain` mode, they are only logged. Profiles flagged `unconfined` are a third case: they do not restrict the program but attach specific rights to it (Debian 13 ships many of them for user namespace mediation), and are out of scope here. rationale: | Complain mode is meant for writing and testing profiles. A profile left in complain mode in production gives a false sense of confinement: the program is not restricted at all. impact: | Switching a profile to enforce mode can break the program it covers if the profile is incomplete. Debian 13 ships several profiles in complain mode on purpose; enforce them one by one, checking the logs (`journalctl -k | grep apparmor`) for denials. audit: manual: | Run `aa-status --complaining`. It must print `0`. `aa-status` lists the profiles in complain mode by name. checks: - id: complain-count engine: shell description: Number of loaded profiles in complain mode. spec: script: | n=$(aa-status --complaining 2>/dev/null) || exit 3 echo "$n" [ "$n" -eq 0 ] remediation: manual: | 1. List the profiles in complain mode: `aa-status`. 2. For each one, install `apparmor-utils` and run `aa-enforce /etc/apparmor.d/`. 3. Watch for denials with `journalctl -k | grep apparmor` and fix or revert the profile. rollback: | Put a profile back in complain mode with `aa-complain /etc/apparmor.d/`. references: - title: aa-status(8), Debian manual pages url: https://manpages.debian.org/trixie/apparmor/aa-status.8.en.html publisher: Debian kind: vendor-doc accessed: 2026-10-18 - title: Debian Wiki - AppArmor/HowToUse url: https://wiki.debian.org/AppArmor/HowToUse publisher: Debian kind: vendor-doc accessed: 2026-10-18 - title: ANSSI-BP-028 v2.0 - Recommandations de configuration d'un système GNU/Linux (R45) url: https://messervices.cyber.gouv.fr/documents-guides/fr_np_linux_configuration-v2.0.pdf publisher: ANSSI kind: guide accessed: 2026-10-18 mappings: - framework: anssi-linux framework_version: "2.0" id: R45 relation: partial note: R45 also asks for AppArmor to be enabled, which is CB-DEB-BOOT-008. - framework: nist-800-53r5 framework_version: "5.1.1" id: AC-3 relation: related - framework: cis-debian-12 framework_version: "2.0.0" id: "1.3.1.3" relation: equivalent - framework: cis-debian-13 framework_version: "1.1.0" id: "1.3.1.3" relation: equivalent threats: - framework: mitre-attack id: T1068 related_controls: - id: CB-DEB-BOOT-008 type: requires authors: - name: Alice github: Sn0wAlice verified: - date: 2026-10-18 by: Sn0wAlice versions: ["12"] environment: Proxmox VM, Debian 12 genericcloud image, kernel 6.1.0-54-cloud-amd64, BIOS boot notes: Passes on a fresh install (11 profiles, all enforce). - date: 2026-10-18 by: Sn0wAlice versions: ["13"] environment: Proxmox VM, Debian 13 genericcloud image, kernel 6.12.113+deb13-cloud-amd64, BIOS boot notes: Fails on a fresh install (23 complain profiles); manual procedure with aa-enforce makes it pass. introduced_in: 0.1.0 created: 2026-10-18 updated: 2026-10-18