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