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

Add SELinux as platform #11138

Merged
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
2 changes: 1 addition & 1 deletion linux_os/guide/system/selinux/selinux-booleans/group.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ documentation_complete: true

title: 'SELinux - Booleans'

platform: not osbuild
platform: not osbuild and selinux

description: |-
Enable or Disable runtime customization of SELinux system policies
Expand Down
32 changes: 32 additions & 0 deletions shared/applicability/oval/selinux_is_enabled.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<def-group>
<definition class="inventory" id="selinux_is_enabled" version="1">
<metadata>
<title>SELinux status check</title>
<affected family="unix">
<platform>multi_platform_all</platform>
</affected>
<description>Check if System has SELinux enabled.</description>
<reference ref_id="cpe:/a:selinux" source="CPE" />
</metadata>
<criteria operator="AND">
<criterion comment="enforce is disabled" test_ref="test_etc_selinux_configured" />
</criteria>
</definition>

<ind:textfilecontent54_test check="all" check_existence="all_exist"
comment="/selinux/enforce is 1" id="test_etc_selinux_configured" version="1">
<ind:object object_ref="object_etc_selinux_configured" />
<ind:state state_ref="state_etc_selinux_configured" />
</ind:textfilecontent54_test>

<ind:textfilecontent54_object id="object_etc_selinux_configured" version="1">
<ind:filepath>/etc/selinux/config</ind:filepath>
<ind:pattern operation="pattern match">^SELINUX=(.*)$</ind:pattern>
<ind:instance datatype="int">1</ind:instance>
</ind:textfilecontent54_object>

<ind:textfilecontent54_state id="state_etc_selinux_configured" version="1">
<ind:subexpression datatype="string"
operation="pattern match">^(enforcing|permissive)$</ind:subexpression>
</ind:textfilecontent54_state>
</def-group>
3 changes: 3 additions & 0 deletions shared/applicability/selinux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: cpe:/a:selinux
title: SELinux enabled on system
check_id: selinux_is_enabled
Loading