TMAegisベータ
bottlerocket のその他のルール

Bottlerocket

TMA-BOTTLEROCKET-1.5.1

Ensure SELinux is configured

高レベル 1自動bottlerocket

説明

SELinux must be enabled and in enforcing mode. The audit runs sestatus and requires SELinux enabled with the fortified policy and enforcing current and configured mode (falls back to getenforce = Enforcing when sestatus is not present). Run tmaegis on the host through the admin container root shell (sudo sheltie).

チェック方法

監査方法: シェルコマンド

shell
if command -v sestatus >/dev/null 2>&1; then
  out=$(sestatus 2>/dev/null) || exit 1
  bad=0
  for l in 'SELinux status: enabled' 'Loaded policy name: fortified' 'Current mode: enforcing' 'Mode from config file: enforcing'; do
    printf '%s\n' "$out" | tr -s ' \t' ' ' | grep -Fxq -- "$l" || { echo "missing: $l"; bad=1; }
  done
  [ "$bad" -eq 0 ] && echo compliant
else
  m=$(getenforce 2>/dev/null) || exit 1
  [ "$m" = Enforcing ] && echo compliant || echo "SELinux: $m"
fi
期待される出力
compliant

修正方法

修正方法: ガイダンスまたは IaC パッチ

Replace the system or reinstall the distribution.

プロパティ

オペレーティングシステム
すべて
タグ
bottlerocketsystem
参照
CIS Bottlerocket Benchmark v1.0.0 - 1.5.1 Ensure SELinux is configured

このホストをチェック

監査が許可されているマシンで実行してください。スキャンは読み取り専用です。

shell
tmaegis scan --target bottlerocket