-
Notifications
You must be signed in to change notification settings - Fork 710
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add aide_disable_silentreports OVAL and remediations
This commit will add in OVAL definition and ansible/bash remediations for disabling silentreports from AIDE
- Loading branch information
Showing
7 changed files
with
72 additions
and
5 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
.../software/integrity/software-integrity/aide/aide_disable_silentreports/ansible/ubuntu.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# platform = multi_platform_ubuntu | ||
# reboot = false | ||
# strategy = restrict | ||
# complexity = low | ||
# disruption = low | ||
- name: Ensure aide is installed | ||
package: | ||
name: "{{ item }}" | ||
state: present | ||
with_items: | ||
- aide | ||
|
||
|
||
- name: Ensure AIDE silentreports is disabled | ||
lineinfile: | ||
path: /etc/default/aide | ||
regexp: "^((#+(.*)SILENTREPORTS)|(SILENTREPORTS(\\s*)=(\\s*)yes))" | ||
line: "SILENTREPORTS=no" | ||
create: true |
12 changes: 12 additions & 0 deletions
12
...stem/software/integrity/software-integrity/aide/aide_disable_silentreports/bash/ubuntu.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# platform = multi_platform_ubuntu | ||
# reboot = false | ||
# strategy = restrict | ||
# complexity = low | ||
# disruption = low | ||
|
||
{{{ bash_package_install("aide") }}} | ||
|
||
if ! grep -i "^SILENTREPORTS*=*no$" {{{ aide_default_path }}} | ||
then | ||
sed -i "^((#+(\s*)SILENTREPORTS)|(SILENTREPORTS(\s*)=(\s*)yes))" "SILENTREPORTS=no" {{{ aide_default_path }}} | ||
fi |
25 changes: 25 additions & 0 deletions
25
...tem/software/integrity/software-integrity/aide/aide_disable_silentreports/oval/ubuntu.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<def-group> | ||
<definition class="compliance" | ||
id="aide_disable_silentreports" version="1"> | ||
{{{ oval_metadata("The " ~ full_name ~ " operating system file must notify designated personnel if baseline configurations are changed in an unauthorized manner.", title="" )}}} | ||
<criteria operator="AND"> | ||
<extend_definition comment="Aide is installed" | ||
definition_ref="package_aide_installed" /> | ||
<criterion comment="Aide is checked in {{ aide_default_path }}" | ||
test_ref="test_aide_silentreports" /> | ||
</criteria> | ||
</definition> | ||
<ind:textfilecontent54_test check="all" check_existence="all_exist" comment="SILENTREPORTS is set to no in {{ aide_default_path }}" id="test_aide_silentreports" version="1"> | ||
<ind:object object_ref="object_aide_verify_silentreports" /> | ||
</ind:textfilecontent54_test> | ||
<ind:textfilecontent54_object | ||
id="object_aide_verify_silentreports" version="1"> | ||
<ind:filepath>{{{ aide_default_path }}}</ind:filepath> | ||
<ind:pattern operation="pattern match">^SILENTREPORTS\s*=\s*no$</ind:pattern> | ||
<ind:instance datatype="int" operation="equals">1</ind:instance> | ||
</ind:textfilecontent54_object> | ||
|
||
</def-group> | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...ftware/integrity/software-integrity/aide/aide_disable_silentreports/tests/correct.pass.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
# platform = multi_platform_ubuntu | ||
# packages = aide | ||
|
||
echo "SILENTREPORTS=no" >> /etc/default/aide |
5 changes: 5 additions & 0 deletions
5
...are/integrity/software-integrity/aide/aide_disable_silentreports/tests/not_config.fail.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
# platform = multi_platform_ubuntu | ||
# packages = aide | ||
|
||
echo sed -i "^SILENTREPORTS\s*=\s*no$" /etc/default/aide |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters