TMAegisBeta
更多 tdsql 規則

TDSQL

TMA-TDSQL-1.6

Ensure Operating System Patches Are Up to Date

高等級 1自動化tdsql

說明

The operating system hosting TDSQL should have the latest security patches installed. Counts pending security updates (dnf/yum updateinfo list security, or apt list --upgradable entries from security pockets). Uses the locally cached repository metadata; refresh it (yum makecache / apt update) before scanning.

檢查方式

稽核方法: Shell 指令

shell
if command -v dnf >/dev/null 2>&1 || command -v yum >/dev/null 2>&1; then pm=$(command -v dnf || command -v yum); out=$($pm -q updateinfo list security 2>/dev/null) || exit 1; printf '%s\n' "$out" | grep -c '[^[:space:]]' || true; elif command -v apt >/dev/null 2>&1; then out=$(apt list --upgradable 2>/dev/null) || exit 1; printf '%s\n' "$out" | grep -ci security || true; else exit 1; fi
預期輸出
0

修補方式

修補方法: 操作指南或基礎設施修補檔

Apply security updates during a maintenance window: yum update --security (RHEL/CentOS) or apt update && apt upgrade (Debian/Ubuntu), restarting TDSQL components one node at a time.

屬性

作業系統
不限
標籤
tdsqlpatching
參考資料
CIS Tencent TDSQL 10.3.22 Benchmark v1.0.0 - 1.6 Ensure Operating System Patches Are Up to Date

檢查此主機

請在您有權稽核的機器上執行此指令。掃描為唯讀操作。

shell
tmaegis scan --target tdsql