SV-256957r1155090_rule
V-256957
SRG-APP-000251-WSR-000157
APWS-AT-000610
CAT II
10
As an SA for each Automation Controller NGINX web server, verify the NGINX web server configuration file in use is located at '/etc/nginx/nginx.conf'
NGINXCONF=`nginx -V 2>&1 | tr ' ' '\n' | sed -ne '/conf-path/{s/.*conf-path=\(.*\)/\1/;p}' ` ;
Add the directive to the NGINX configuration to force a required charset.
sed -i '/location/i charset_required; ' $NGINXCONF
Reload the NGINX server configurations for all NGINX processes.
$ pkill -HUP nginx
As a system administrator (SA) for each Automation Controller NGINX web server, verify the configuration requires a charset is mandatory.
grep 'charset_required' "$(nginx -V 2>&1 | tr ' ' '\n' | sed -ne '/conf-path/{s/.*conf-path=\(.*\)/\1/;p}')" || echo "FAILED"
If "FAILED" is displayed, this is a finding.
V-256957
False
APWS-AT-000610
As a system administrator (SA) for each Automation Controller NGINX web server, verify the configuration requires a charset is mandatory.
grep 'charset_required' "$(nginx -V 2>&1 | tr ' ' '\n' | sed -ne '/conf-path/{s/.*conf-path=\(.*\)/\1/;p}')" || echo "FAILED"
If "FAILED" is displayed, this is a finding.
M
5535