NGINX
TMA-NGINX-2.2.2
Ensure the NGINX service account is locked
보통레벨 1자동nginx
설명
The NGINX service account must not have a usable password and should be explicitly locked in the system's shadow file to prevent direct login or password-based privilege escalation. Reads the account from the user directive and expects passwd -S to report L or LK (run as root). Evaluated on the merged configuration printed by `nginx -T` (all included files; needs permission to read them). CIS marks this recommendation Manual; the automated check implements its audit procedure.
점검 방법
감사 방식: 셸 명령
shell
out=$(nginx -T 2>/dev/null) || exit 1; u=$(printf '%s\n' "$out" | awk '$1=="user"{x=$2; sub(/;$/,"",x); print x; exit}'); [ -n "$u" ] || { echo noncompliant; exit 0; }; s=$(passwd -S "$u" 2>/dev/null) || exit 1; printf '%s\n' "$s" | awk '{print ($2=="L"||$2=="LK")?"compliant":"noncompliant"}'- 예상 출력
compliant
조치 방법
조치 방식: 가이드 또는 인프라 패치
Lock the account: passwd -l <nginx user>.
속성
- 운영 체제
- 모두
- 태그
- nginxaccounts
- 참고 자료
- CIS NGINX Benchmark v3.0.0 - 2.2.2 Ensure the NGINX service account is locked
이 호스트 점검하기
감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.
shell
tmaegis scan --target nginx