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

Ensure code consistency by using aide_conf_path var #12066

Merged
merged 1 commit into from
Jun 18, 2024
Merged
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 @@ -25,7 +25,7 @@ vuldiscussion: |-
checktext: |-
Check that AIDE is properly configured to protect the integrity of the audit tools with the following command:

$ sudo cat /etc/aide.conf | grep /usr/sbin/au
$ sudo cat {{{ aide_conf_path }}} | grep /usr/sbin/au

/usr/sbin/auditctl p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/auditd p+i+n+u+g+s+b+acl+xattrs+sha512
Expand All @@ -39,7 +39,7 @@ checktext: |-
If any of the audit tools listed above do not have a corresponding line, ask the SA to indicate what cryptographic mechanisms are being used to protect the integrity of the audit tools. If there is no evidence of integrity protection, this is a finding.

fixtext: |-
Add or update the following lines to "/etc/aide.conf", to protect the integrity of the audit tools.
Add or update the following lines to {{{ aide_conf_path }}}, to protect the integrity of the audit tools.

/usr/sbin/auditctl p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/auditd p+i+n+u+g+s+b+acl+xattrs+sha512
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ ocil: |-
If one or more lines are missing, this is a finding.

fixtext: |-
Add or update the following lines to "/etc/aide.conf", to protect the integrity of the audit tools.
Add or update the following lines to {{{ aide_conf_path }}}, to protect the integrity of the audit tools.

<pre>
{{{ aide_files() }}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/bin/bash
# platform = multi_platform_fedora,multi_platform_ol,multi_platform_rhel
# platform = multi_platform_fedora,multi_platform_ol,multi_platform_rhel,multi_platform_ubuntu
# packages = aide

aide --init


declare -a bins
bins=('/usr/sbin/auditctl' '/usr/sbin/auditd' '/usr/sbin/augenrules' '/usr/sbin/aureport' '/usr/sbin/ausearch' '/usr/sbin/autrace' '/usr/sbin/rsyslogd')
bins=('/usr/sbin/auditctl' '/usr/sbin/auditd' '/usr/sbin/augenrules' '/usr/sbin/aureport' '/usr/sbin/ausearch' '/usr/sbin/autrace' '/usr/sbin/rsyslogd' '/usr/sbin/audispd')

for theFile in "${bins[@]}"
do
echo "$theFile p+i+n+u+g+s+b+acl+xattrs+sha512" >> /etc/aide.conf
echo "$theFile p+i+n+u+g+s+b+acl+xattrs+sha512" >> {{{ aide_conf_path }}}
done
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash
# platform = multi_platform_fedora,multi_platform_ol,multi_platform_rhel
# platform = multi_platform_fedora,multi_platform_ol,multi_platform_rhel,multi_platform_ubuntu
# packages = aide

declare -a bins
bins=('/usr/sbin/auditctl' '/usr/sbin/auditd' '/usr/sbin/augenrules' '/usr/sbin/aureport' '/usr/sbin/ausearch' '/usr/sbin/autrace' '/usr/sbin/rsyslogd')
bins=('/usr/sbin/auditctl' '/usr/sbin/auditd' '/usr/sbin/augenrules' '/usr/sbin/aureport' '/usr/sbin/ausearch' '/usr/sbin/autrace' '/usr/sbin/rsyslogd' '/usr/sbin/audispd')

for theFile in "${bins[@]}"
do
echo "$theFile p+i+n+u+g+s+b+acl+selinux+xattrs+sha512" >> /etc/aide.conf
echo "$theFile p+i+n+u+g+s+b+acl+selinux+xattrs+sha512" >> {{{ aide_conf_path }}}
done
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash
# platform = multi_platform_fedora,multi_platform_ol,multi_platform_rhel
# platform = multi_platform_fedora,multi_platform_ol,multi_platform_rhel,multi_platform_ubuntu
# packages = aide

declare -a bins
bins=('/usr/sbin/auditctl' '/usr/sbin/auditd' '/usr/sbin/augenrules' '/usr/sbin/aureport' '/usr/sbin/ausearch' '/usr/sbin/autrace' '/usr/sbin/rsyslogd')
bins=('/usr/sbin/auditctl' '/usr/sbin/auditd' '/usr/sbin/augenrules' '/usr/sbin/aureport' '/usr/sbin/ausearch' '/usr/sbin/autrace' '/usr/sbin/rsyslogd' '/usr/sbin/audispd')

for theFile in "${bins[@]}"
do
echo "$theFile p+i+n+u+g+s+b+acl+selinux+xattrs+sha5122" >> /etc/aide.conf
echo "$theFile p+i+n+u+g+s+b+acl+selinux+xattrs+sha5122" >> {{{ aide_conf_path }}}
done
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash
# platform = multi_platform_fedora,multi_platform_ol,multi_platform_rhel
# platform = multi_platform_fedora,multi_platform_ol,multi_platform_rhel,multi_platform_ubuntu
# packages = aide

aide --init

declare -a bins
bins=('/usr/sbin/auditctl' '/usr/sbin/auditd' '/usr/sbin/augenrules' '/usr/sbin/aureport' '/usr/sbin/ausearch' '/usr/sbin/autrace' '/usr/sbin/rsyslogd')
bins=('/usr/sbin/auditctl' '/usr/sbin/auditd' '/usr/sbin/augenrules' '/usr/sbin/aureport' '/usr/sbin/ausearch' '/usr/sbin/autrace' '/usr/sbin/rsyslogd' '/usr/sbin/audispd')

for theFile in "${bins[@]}"
do
echo sed -i "s#^.*${theFile}.*##g" /etc/aide.conf
echo sed -i "s#^.*${theFile}.*##g" {{{ aide_conf_path }}}
done
Loading