TMAegisBeta
Thêm quy tắc cho openshift-virt

OpenShift Virtualization

TMA-OPENSHIFT-VIRT-4.2

Enable MAC spoof filtering

Trung bìnhCấp 1Tự độngopenshift-virt

Mô tả

Mac spoof filtering is a feature that helps prevent man - in - the - middle attacks by verifying the authenticity of MAC addresses in network packets. By checking the MAC address of incoming packets, mac - spoof filtering can help ensure that only authorized devices are able to communicate with a particular device or network. Audit: Passes when every SR-IOV network has spoofChk "on" and every bridge-type NetworkAttachmentDefinition sets macspoofchk to true (needs jq). OVN Kubernetes localnet filters MAC spoofing by default. Requires oc logged in to the cluster with read access.

Cách kiểm tra

Phương pháp kiểm tra: Lệnh shell

shell
command -v oc >/dev/null 2>&1 || exit 1; command -v jq >/dev/null 2>&1 || exit 1; s=$(oc get sriovnetwork -A -o json 2>/dev/null || echo '{"items":[]}'); n=$(oc get network-attachment-definitions -A -o json) || exit 1; b1=$(printf '%s' "$s" | jq '[.items[]|select(.spec.spoofChk != "on")]|length'); b2=$(printf '%s' "$n" | jq '[.items[]|(.spec.config|fromjson? // {})|select(.type == "bridge")|select(.macspoofchk != true)]|length'); [ "$b1" = 0 ] && [ "$b2" = 0 ] && echo compliant || echo noncompliant
Đầu ra mong đợi
compliant

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

Enable MAC-spoof filtering per the deployed networking provider instructions. Instructions for Bridge CNI and SR-IOV CNI.

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
openshift-virtnetworkmac-spoofing
Tham chiếu
CIS Red Hat OpenShift Virtual Machine Extension Benchmark v1.0.0 - 4.2 Enable MAC spoof filtering

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 openshift-virt