Skip to content

Commit 1b010aa

Browse files
committed
V-13738.rb Complete
1 parent 3a1cf6c commit 1b010aa

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

controls/V-13738.rb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,24 @@
2222
-----------------
2323
=end
2424

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+
2543
control "V-13738" do
2644
title "The HTTP request header field size must be limited."
2745

@@ -54,5 +72,8 @@
5472
to 1k or less."
5573

5674
# 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
5778
# STOP_DESCRIBE V-13738
5879
end

0 commit comments

Comments
 (0)