TMAegisBeta
Mais regras para linux

Linux distributions

TMA-SLES16-1.2.1.5

Ensure weak dependencies are configured

BaixaNível 2Automatizadalinux

Descrição

The RPM packaging specification allows for 3 levels of dependencies to be declared: • hard dependencies (Requires / Provides) for packages which must be installed for a minimal installation of the application to function • weak dependencies (Recommends / Supplements) for packages which provide additional features, but which are not required for a minimal installation to function • hints (Suggests / Enhances) for packages which offer add-ons which might be useful.

Como é verificado

Método de auditoria: Comando shell

shell
alt0() { command -v grep >/dev/null 2>&1 || { echo "step1: grep not installed"; return 1; }; o=$(bash -c 'grep -Pi -- '"'"'^\h*solver.onlyRequires\h*=\h*true\b'"'"' /etc/zypp/zypp.conf' 2>&1); printf '%s\n' "$o" | tr -s ' \t' '  ' | sed 's/^ //;s/ $//' | grep -Fxq -- 'solver.onlyRequires = true' || { echo step1: missing 'solver.onlyRequires = true'; return 1; }; }; if alt0; then echo compliant; fi
Saída esperada
compliant

Como é corrigido

Método de correção: Orientação ou patch de infraestrutura

Edit /etc/zypp/zypp.conf and set solver.onlyRequires = true. Example script: #!/usr/bin/env bash { if grep -Pq '^solver.onlyRequires' /etc/zypp/zypp.conf; then sed -i 's/^solver.onlyRequires\s*=\s*.*/solver.onlyRequires = true/' /etc/zypp/zypp.conf else printf '%s\n' "" "solver.onlyRequires = true" >> /etc/zypp/zypp.conf fi }

Propriedades

Sistemas operacionais
sles-16
Tags
cis-convertedlinux
Referência
CIS SUSE Linux Enterprise 16 Benchmark v1.0.0 - 1.2.1.5

Verificar este host

Execute isto em uma máquina que você tenha permissão para auditar. A varredura é somente leitura.

shell
tmaegis scan --target linux --level 2