Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load all the profile if not loaded for Ubuntu #12482

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
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
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ references:
cis@ubuntu2004: 1.7.1.4
cis@ubuntu2204: 1.6.1.4

platform: package[apparmor]
platform: machine and package[apparmor]
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# packages = apparmor-utils

#Replace apparmor definitions
apparmor_parser -q -r /etc/apparmor.d/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# packages = apparmor

#Configure the OS to unload all AppArmor profiles
aa-teardown
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# packages = apparmor

#Replace apparmor definitions and force profiles into compliant mode
apparmor_parser -C -q -r /etc/apparmor.d/
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ fi

if [ "$APPARMOR_MODE" = "complain" ]
then
{{% if 'ubuntu' in product %}}
# Load all not-loaded profiles into complain mode
apparmor_parser -a --Complain /etc/apparmor.d/
echo "***WARNING***: This remediation will not downgrade any existing AppArmor profiles."
{{% else %}}
# Set all profiles to complain mode
aa-complain /etc/apparmor.d/*
{{% endif %}}
fi

{{% if 'ubuntu' in product %}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ references:
cis@ubuntu2004: 1.7.1.3
cis@ubuntu2204: 1.6.1.3

platform: package[apparmor]
platform: machine and package[apparmor]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# packages = apparmor-utils
# packages = apparmor

#Configure the OS to unload all AppArmor profiles
aa-teardown
Loading