TMAegisBeta
Más reglas para ros

ROS (Robot Operating System)

TMA-ROS1-1.3.2

Ensure sudo commands use pty

MediaNivel 1Automatizadaros

Descripción

sudo can be configured to run only from a psuedo-pty The audit requires "Defaults use_pty" in /etc/sudoers or /etc/sudoers.d/*. Host-level control from the CIS ROS Melodic benchmark (Ubuntu 18.04 robot hosts); run as root.

Cómo se verifica

Método de auditoría: Comando de shell

shell
grep -Pqs -- '^\s*Defaults\s+([^#]+,\s*)?use_pty(,\s*\S+\s*)*(\s+#.*)?$' /etc/sudoers /etc/sudoers.d/* && echo compliant || echo 'Defaults use_pty is not set'
Salida esperada
compliant

Cómo se corrige

Método de corrección: Guía o parche de infraestructura

edit the file /etc/sudoers or a file in /etc/sudoers.d/ and add the following line: Defaults use_pty

Propiedades

Sistemas operativos
Cualquiera
Etiquetas
rosros1melodicsystem
Referencia
CIS ROS Melodic Benchmark v1.0.0 - 1.3.2 Ensure sudo commands use pty

Verificar este host

Ejecute esto en un equipo que tenga permiso para auditar. El escaneo es de solo lectura.

shell
tmaegis scan --target ros