documentation_complete: true

title: Verify Permissions On /etc/selinux Directory

description: '{{{ describe_file_permissions(file="/etc/selinux", perms="0755") }}}'

rationale: |-
    Setting correct permissions on the /etc/selinux directory is important
    because this directory hosts SELinux configuration. Protection of this
    directory is critical for system security. Restricting the permissions
    ensures exclusive control of the SELinux configuration.

severity: medium

identifiers:
    cce@rhel8: CCE-86278-9
    cce@rhel9: CCE-86279-7
    cce@rhel10: CCE-87997-3
    cce@sle15: CCE-92524-8

ocil_clause: '{{{ ocil_clause_file_permissions(file="/etc/selinux", perms="0755") }}}'

ocil: |-
    {{{ ocil_file_permissions(file="/etc/selinux", perms="0755") }}}

fixtext: '{{{ fixtext_file_permissions(file="/etc/selinux", mode="0755") }}}'

srg_requirement: '{{{ srg_requirement_file_permission(file="/etc/selinux", mode="0755") }}}'

template:
    name: file_permissions
    vars:
        filepath: /etc/selinux/
        filemode: '0755'
