forked from ComplianceAsCode/content
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ComplianceAsCode#11368 from a-skr/feature-debian12
ANSSI BP 028 profile for debian12
- Loading branch information
Showing
55 changed files
with
373 additions
and
60 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...guide/services/mail/postfix_client/postfix_client_configure_mail_alias/ansible/shared.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
2 changes: 1 addition & 1 deletion
2
..._os/guide/services/mail/postfix_client/postfix_client_configure_mail_alias/bash/shared.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
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 |
---|---|---|
|
@@ -11,5 +11,5 @@ operator: equals | |
interactive: true | ||
|
||
options: | ||
default: [email protected] | ||
default: change_me@localhost | ||
mil_sysadmin: [email protected] |
2 changes: 1 addition & 1 deletion
2
linux_os/guide/services/ssh/ssh_server/sshd_set_keepalive/ansible/shared.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
2 changes: 1 addition & 1 deletion
2
linux_os/guide/services/ssh/ssh_server/sshd_set_keepalive/bash/shared.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
2 changes: 1 addition & 1 deletion
2
...ounts-restrictions/password_expiration/accounts_maximum_age_login_defs/ansible/shared.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
9 changes: 8 additions & 1 deletion
9
linux_os/guide/system/apparmor/all_apparmor_profiles_enforced/ansible/shared.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
2 changes: 1 addition & 1 deletion
2
linux_os/guide/system/apparmor/all_apparmor_profiles_enforced/bash/shared.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
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
2 changes: 1 addition & 1 deletion
2
linux_os/guide/system/apparmor/all_apparmor_profiles_enforced/sce/shared.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
2 changes: 1 addition & 1 deletion
2
linux_os/guide/system/apparmor/apparmor_configured/ansible/shared.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
2 changes: 1 addition & 1 deletion
2
linux_os/guide/system/apparmor/apparmor_configured/bash/shared.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# platform = multi_platform_sle,multi_platform_ubuntu | ||
# platform = multi_platform_sle,multi_platform_ubuntu,multi_platform_ubuntu | ||
|
||
# Enable apparmor | ||
{{{ bash_service_command("enable", "apparmor") }}} |
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
4 changes: 2 additions & 2 deletions
4
linux_os/guide/system/apparmor/grub2_enable_apparmor/bash/shared.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
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
2 changes: 1 addition & 1 deletion
2
linux_os/guide/system/apparmor/package_apparmor_installed/rule.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
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
4 changes: 2 additions & 2 deletions
4
...s/audit_kernel_module_loading/audit_rules_kernel_module_loading_delete/ansible/shared.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
4 changes: 2 additions & 2 deletions
4
...es/audit_kernel_module_loading/audit_rules_kernel_module_loading_finit/ansible/shared.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
4 changes: 2 additions & 2 deletions
4
...les/audit_kernel_module_loading/audit_rules_kernel_module_loading_init/ansible/shared.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
2 changes: 1 addition & 1 deletion
2
...figure_rules/audit_privileged_commands/audit_rules_privileged_commands/ansible/shared.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
2 changes: 1 addition & 1 deletion
2
linux_os/guide/system/auditing/auditd_configure_rules/audit_rules_immutable/bash/shared.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
2 changes: 1 addition & 1 deletion
2
...auditing/auditd_configure_rules/audit_rules_networkconfig_modification/ansible/shared.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
2 changes: 1 addition & 1 deletion
2
...tem/auditing/auditd_configure_rules/audit_rules_networkconfig_modification/bash/shared.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
2 changes: 1 addition & 1 deletion
2
...uide/system/auditing/auditd_configure_rules/audit_rules_session_events/ansible/shared.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
2 changes: 1 addition & 1 deletion
2
...os/guide/system/auditing/auditd_configure_rules/audit_rules_session_events/bash/shared.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
2 changes: 1 addition & 1 deletion
2
.../guide/system/auditing/auditd_configure_rules/audit_rules_sysadmin_actions/bash/shared.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
2 changes: 1 addition & 1 deletion
2
...auditing/auditd_configure_rules/audit_time_rules/audit_rules_time_adjtimex/bash/shared.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# platform = Red Hat Virtualization 4,multi_platform_fedora,multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_ubuntu | ||
# platform = Red Hat Virtualization 4,multi_platform_fedora,multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_ubuntu,multi_platform_debian | ||
|
||
{{{ bash_perform_audit_adjtimex_settimeofday_stime_remediation() }}} |
2 changes: 1 addition & 1 deletion
2
...ing/auditd_configure_rules/audit_time_rules/audit_rules_time_clock_settime/bash/shared.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
2 changes: 1 addition & 1 deletion
2
...g/auditd_configure_rules/audit_time_rules/audit_rules_time_watch_localtime/bash/shared.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
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
61 changes: 61 additions & 0 deletions
61
.../system/software/integrity/software-integrity/aide/aide_build_database/ansible/debian.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,61 @@ | ||
# platform = multi_platform_debian | ||
# reboot = false | ||
# strategy = restrict | ||
# complexity = low | ||
# disruption = low | ||
|
||
- name: "{{{ rule_title }}} - Ensure AIDE Is Installed" | ||
ansible.builtin.apt: | ||
name: aide | ||
state: present | ||
|
||
- name: "{{{ rule_title }}} - Check if DB Path in /etc/aide/aide.conf Is Already Set" | ||
ansible.builtin.lineinfile: | ||
path: /etc/aide/aide.conf | ||
regexp: ^#?(\s*)(database=)(.*)$ | ||
state: absent | ||
check_mode: true | ||
changed_when: false | ||
register: database_replace | ||
|
||
- name: "{{{ rule_title }}} - Check if DB Out Path in /etc/aide/aide.conf Is Already Set" | ||
ansible.builtin.lineinfile: | ||
path: /etc/aide/aide.conf | ||
regexp: ^#?(\s*)(database_out=)(.*)$ | ||
state: absent | ||
check_mode: true | ||
changed_when: false | ||
register: database_out_replace | ||
|
||
- name: "{{{ rule_title }}} - Fix DB Path in Config File if Necessary" | ||
ansible.builtin.lineinfile: | ||
path: /etc/aide/aide.conf | ||
regexp: ^#?(\s*)(database)(\s*)=(\s*)(.*)$ | ||
line: \2\3=\4file:/var/lib/aide/aide.db | ||
backrefs: true | ||
when: database_replace.found > 0 | ||
|
||
- name: "{{{ rule_title }}} - Fix DB Out Path in Config File if Necessary" | ||
ansible.builtin.lineinfile: | ||
path: /etc/aide/aide.conf | ||
regexp: ^#?(\s*)(database_out)(\s*)=(\s*)(.*)$ | ||
line: \2\3=\4file:/var/lib/aide/aide.db.new | ||
backrefs: true | ||
when: database_out_replace.found > 0 | ||
|
||
- name: "{{{ rule_title }}} - Ensure the Default DB Path is Added" | ||
ansible.builtin.lineinfile: | ||
path: /etc/aide/aide.conf | ||
line: database=file:/var/lib/aide/aide.db | ||
create: true | ||
when: database_replace.found == 0 | ||
|
||
- name: "{{{ rule_title }}} - Ensure the Default Out Path is Added" | ||
ansible.builtin.lineinfile: | ||
path: /etc/aide/aide.conf | ||
line: database_out=file:/var/lib/aide/aide.db.new | ||
create: true | ||
when: database_out_replace.found == 0 | ||
|
||
- name: "{{{ rule_title }}} - Build and Test AIDE Database" | ||
ansible.builtin.command: /usr/sbin/aideinit -y -f |
20 changes: 20 additions & 0 deletions
20
...uide/system/software/integrity/software-integrity/aide/aide_build_database/bash/debian.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,20 @@ | ||
# platform = multi_platform_debian | ||
|
||
{{{ bash_package_install("aide") }}} | ||
|
||
AIDE_CONFIG=/etc/aide/aide.conf | ||
DEFAULT_DB_PATH=/var/lib/aide/aide.db | ||
|
||
# Fix db path in the config file, if necessary | ||
if ! grep -q '^database=file:' ${AIDE_CONFIG}; then | ||
# replace_or_append gets confused by 'database=file' as a key, so should not be used. | ||
#replace_or_append "${AIDE_CONFIG}" '^database=file' "${DEFAULT_DB_PATH}" '@CCENUM@' '%s:%s' | ||
echo "database=file:${DEFAULT_DB_PATH}" >> ${AIDE_CONFIG} | ||
fi | ||
|
||
# Fix db out path in the config file, if necessary | ||
if ! grep -q '^database_out=file:' ${AIDE_CONFIG}; then | ||
echo "database_out=file:${DEFAULT_DB_PATH}.new" >> ${AIDE_CONFIG} | ||
fi | ||
|
||
/usr/sbin/aideinit -y -f |
Oops, something went wrong.