SV-256958r961167_rule
V-256958
SRG-APP-000266-WSR-000142
APWS-AT-000620
CAT II
10
As a System Administrator for each Automation Controller nginx web server host, remove any configuration that turns the autoindexing on:
NGINXCONF=`nginx -V 2>&1 | tr ' ' '\n' | sed -ne '/conf-path/{s/.*conf-path=\(.*\)/\1/;p}' ` ;
sed -Ei -e '/autoindex\s+on/d;' $NGINXCONF
To apply these changes to the running service immediately, restart the NGINX service with the following command:
sudo systemctl restart nginx
For each Automation Controller NGINX web server, a system administrator must view to see whether autoindex is turned on or off (autoindex on/autoindex off):
NGINXCONF=`nginx -V 2>&1 | tr ' ' '\n' | sed -ne '/conf-path/{s/.*conf-path=\(.*\)/\1/;p}' ` ;
grep -E 'autoindex\s+on' $NGINXCONF && echo "FAILED"
If "FAILED" is displayed, this is a finding.
V-256958
False
APWS-AT-000620
For each Automation Controller NGINX web server, a system administrator must view to see whether autoindex is turned on or off (autoindex on/autoindex off):
NGINXCONF=`nginx -V 2>&1 | tr ' ' '\n' | sed -ne '/conf-path/{s/.*conf-path=\(.*\)/\1/;p}' ` ;
grep -E 'autoindex\s+on' $NGINXCONF && echo "FAILED"
If "FAILED" is displayed, this is a finding.
M
5535