There was an error while loading. Please reload this page.
1 parent 3a1cf6c commit 1b010aaCopy full SHA for 1b010aa
controls/V-13738.rb
@@ -22,6 +22,24 @@
22
-----------------
23
=end
24
25
+
26
+NGINX_HARDENING_FILE = attribute(
27
+ 'nginx_hardening_file',
28
+ description: 'Path to the nginx hardening file',
29
+ default: "/etc/nginx/conf.d/90.hardening.conf"
30
+)
31
32
33
+options = {
34
+ assignment_regex: /^\s*([^:]*?)\s*\ \s*(.*?)\s*;$/
35
+}
36
37
38
+only_if do
39
+ command('nginx').exist?
40
+end
41
42
43
control "V-13738" do
44
title "The HTTP request header field size must be limited."
45
@@ -54,5 +72,8 @@
54
72
to 1k or less."
55
73
56
74
# START_DESCRIBE V-13738
75
+ describe parse_config_file(NGINX_HARDENING_FILE, options) do
76
+ its('client_header_buffer_size') { should eq '1k' }
77
+ end
57
78
# STOP_DESCRIBE V-13738
58
79
end
0 commit comments