TMAegis
Thêm quy tắc cho tdsql

TMA-TDSQL-1.6

Ensure Operating System Patches Are Up to Date

CaoCấp 1Tự độngtdsql

Mô tả

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.

Cách kiểm tra

Phương pháp kiểm tra: Lệnh 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
Đầu ra mong đợi
0

Cách khắc phục

Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng

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.

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
tdsqlpatching
Tham chiếu
CIS Tencent TDSQL 10.3.22 Benchmark v1.0.0 - 1.6 Ensure Operating System Patches Are Up to Date

Kiểm tra máy này

Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.

shell
tmaegis scan --target tdsql