We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6725b98 commit 395b6c7Copy full SHA for 395b6c7
controls/nginx_spec.rb
@@ -274,9 +274,10 @@
274
impact 1.0
275
title 'Disable insecure HTTP-methods'
276
desc 'Disable insecure HTTP-methods and allow only necessary methods.'
277
+ ref 'OWASP HTTP Methods', url: 'https://www.owasp.org/index.php/Test_HTTP_Methods_(OTG-CONFIG-006)'
278
279
describe file(nginx_conf) do
- its('content') { should match(/^\s+if ($request_method !~ ^(GET|HEAD|POST)$ )$/) }
280
+ its('content') { should match(/^\s*if\s+\(\$request_method\s+\!\~\s+\^\(#{HTTP_METHODS}\)\$\)\{?$/) }
281
end
282
283
0 commit comments