← Rules Catalog
mediumsystemverified

Ensure package manager repositories are configured

dnf-repositories-configured · RHEL ≥ 8 · 1 impl

Description

At least one enabled package repository must be configured so the system can receive vendor packages and security updates.

Rationale

Without a configured, enabled repository the system cannot obtain security patches, leaving known vulnerabilities unremediated.

Check → Remediate

Checkcommand
n=$(dnf -q repolist --enabled 2>/dev/null | grep -vc '^repo id')
if [ "${n:-0}" -lt 1 ]; then echo "FAIL: no enabled dnf repositories"; exit 1; fi
echo "OK: $n enabled repositories"
expected_exit:
0
Remediatemanual
note:
Review configured repositories under /etc/yum.repos.d/ and enable the approved vendor/security repositories for this system.

Framework references

CIS

rhel9 1.2.1.4rhel8 1.2.1.4rhel10 1.2.1.4

NIST 800-53

SI-2

Live verification

rhel9:check
#dnf#repositories#patching