2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-07-31 10:09:40 +00:00

test(httpd): verify security response headers

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
This commit is contained in:
Vinícius Ferrão
2026-07-27 15:17:19 -03:00
parent f6ba29ef80
commit 06eced0951
+30
View File
@@ -0,0 +1,30 @@
start:httpd_security_headers_install
description:verify xcat.conf sets the security response headers on /install
label:mn_only,ci_test,httpd
cmd:curl -sSI --max-time 15 http://localhost/install/ 2>&1
check:rc==0
check:output=~X-Frame-Options:\s*SAMEORIGIN
check:output=~X-Content-Type-Options:\s*nosniff
check:output=~Content-Security-Policy:\s*script-src
check:output=~X-Permitted-Cross-Domain-Policies:\s*none
end
start:httpd_security_headers_tftpboot
description:verify xcat.conf sets the security response headers on /tftpboot
label:mn_only,ci_test,httpd
cmd:curl -sSI --max-time 15 http://localhost/tftpboot/ 2>&1
check:rc==0
check:output=~X-Frame-Options:\s*SAMEORIGIN
check:output=~X-Content-Type-Options:\s*nosniff
check:output=~Content-Security-Policy:\s*script-src
check:output=~X-Permitted-Cross-Domain-Policies:\s*none
end
start:httpd_server_banner_masked
description:verify ServerTokens Prod masks the Apache version in the Server header
label:mn_only,ci_test,httpd
cmd:curl -sSI --max-time 15 http://localhost/install/ 2>&1
check:rc==0
check:output=~Server:\s*Apache
check:output!~Apache/[0-9]
end