SV-278382r1171898_rule
V-278382
SRG-APP-000033
NGNX-APP-000140
CAT II
10
Set a nonlogin shell for the nginx user:
sudo usermod -s /sbin/nologin nginx
Determine the path to NGINX config file(s):
nginx -qT | grep "# configuration"
# configuration file /etc/nginx/nginx.conf:
Note: The default NGINX configuration is "/etc/nginx/nginx.conf", though various files may also be included.
Identify the NGINX runtime user:
grep -E '^\s*user\s+' /etc/nginx/nginx.conf
Expected output (example):
user nginx;
Verify the user has no login shell:
getent passwd nginx
Expected output:
nginx:x:998:998:Nginx user:/nonexistent:/sbin/nologin
Ensure the shell is "/sbin/nologin", "/usr/sbin/nologin", or "/bin/false".
If the NGINX runtime user has shell access, this is a finding.
V-278382
False
NGNX-APP-000140
Determine the path to NGINX config file(s):
nginx -qT | grep "# configuration"
# configuration file /etc/nginx/nginx.conf:
Note: The default NGINX configuration is "/etc/nginx/nginx.conf", though various files may also be included.
Identify the NGINX runtime user:
grep -E '^\s*user\s+' /etc/nginx/nginx.conf
Expected output (example):
user nginx;
Verify the user has no login shell:
getent passwd nginx
Expected output:
nginx:x:998:998:Nginx user:/nonexistent:/sbin/nologin
Ensure the shell is "/sbin/nologin", "/usr/sbin/nologin", or "/bin/false".
If the NGINX runtime user has shell access, this is a finding.
M
5720