Ensure AppArmor is installed
An XCCDF Rule
Description
AppArmor provide Mandatory Access Controls.
Rationale
Without a Mandatory Access Control system installed only the default Discretionary Access Control system will be available.
- ID
- xccdf_org.ssgproject.content_rule_package_apparmor_installed
- Severity
- Medium
- References
- Updated
Remediation - OS Build Blueprint
[[packages]]
name = "apparmor"
version = "*"
Remediation - Ansible
- name: Ensure apparmor is installed
package:
name: apparmor
state: present
when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
tags:
Remediation - Puppet
include install_apparmor
class install_apparmor {
package { 'apparmor':
ensure => 'installed',
}
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
DEBIAN_FRONTEND=noninteractive apt-get install -y "apparmor"
else