Saltstack Official Apache Formula
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

30 lines
1.1KB

  1. # frozen_string_literal: true
  2. control 'Apache mod_security configuration' do
  3. title 'should match desired lines'
  4. modspec_file =
  5. case platform[:family]
  6. when 'redhat', 'fedora'
  7. '/etc/httpd/conf.d/mod_security.conf'
  8. when 'debian'
  9. '/etc/modsecurity/modsecurity.conf-recommended'
  10. end
  11. describe file(modspec_file) do
  12. it { should be_file }
  13. its('mode') { should cmp '0644' }
  14. its('owner') { should eq 'root' }
  15. its('group') { should eq 'root' }
  16. its('content') { should match(/SecRuleEngine On/) }
  17. its('content') { should match(/SecRequestBodyAccess On/) }
  18. its('content') { should match(/SecRequestBodyLimit 14000000/) }
  19. its('content') { should match(/SecRequestBodyNoFilesLimit 114002/) }
  20. its('content') { should match(/SecRequestBodyInMemoryLimit 114002/) }
  21. its('content') { should match(/SecRequestBodyLimitAction Reject/) }
  22. its('content') { should match(/SecPcreMatchLimit 15000/) }
  23. its('content') { should match(/SecPcreMatchLimitRecursion 15000/) }
  24. its('content') { should match(/SecDebugLogLevel 3/) }
  25. end
  26. end