Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/apparmor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ rules:
- package_apparmor_installed
- package_apparmor-utils_installed
- package_pam_apparmor_installed
- sysctl_kernel_apparmor_restrict_unprivileged_unconfined
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
documentation_complete: true

title: 'Enable kernel.apparmor_restrict_unprivileged_unconfined'

description: '{{{ describe_sysctl_option_value(sysctl="kernel.apparmor_restrict_unprivileged_unconfined", value="1") }}}'

rationale: |-
Restricting unprivileged unconfined processes with AppArmor reduces the
attack surface available to local users and helps enforce additional
kernel-level hardening.

severity: medium

{{{ complete_ocil_entry_sysctl_option_value(sysctl="kernel.apparmor_restrict_unprivileged_unconfined", value="1") }}}

fixtext: |-
Configure {{{ full_name }}} to enable AppArmor restrictions for
unprivileged unconfined processes.
{{{ fixtext_sysctl("kernel.apparmor_restrict_unprivileged_unconfined", "1") | indent(4) }}}

platform: system_with_kernel

template:
name: sysctl
vars:
sysctlvar: kernel.apparmor_restrict_unprivileged_unconfined
datatype: int
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
documentation_complete: true

title: kernel.apparmor_restrict_unprivileged_unconfined

description: |-
Prevent unprivileged and unconfined processes.

type: number

operator: equals

interactive: false

options:
default: 1
1: "1"
2: "2"