Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status


mod_security (13) Versions 0.0.6

Installs and configures mod_security for Apache2 or IIS

cookbook 'mod_security', '= 0.0.6', :supermarket
cookbook 'mod_security', '= 0.0.6'
knife supermarket install mod_security
knife supermarket download mod_security
Quality -%


Ever wanted a little guardian angel to protect your chef deployed
servers from the bad guys? Like a bad-ass Jiminy Cricket on your

This package is to make deployment and testing of mod_security easier
with chef. Right now it centers entirely around the OWASP Core Rule
Sets of mod_security rules. In future, it will allow you to manage/deploy
custom rule/rulesets of your own.

There are 2 main use cases right now:

Install on a real production server

  • Adjust the attributes to your liking and install the default recipe.

Find out what ModSecurity could do for your site in less than


  • Setup a base chef recipe for a server. Ubuntu 10.04 on Rackspace Cloud is pretty easy (and what I've tested with)
  • Set it to install the default recipe
  • Create a cookbook to reverse proxy to your real server sorta like this: <pre>
    mod_secure_proxy "my_site" do server_name "" enable_https true # if you want to proxy https too end </pre>
  • Set your local /etc/hosts (or equiv.) file to have that server's IP look like your site
  • Test to your heart's content.
  • Look at /var/log/modsec.log and see what you could be blocking
  • Change the "DetectOnly" attribute to "On" and test some more



This cookbook depends on apache2 and build-essential



  • Ubuntu (tested on 10.04)
  • Debian
  • RedHat
  • CentOS (tested on 5.6)
  • Fedora
  • Scientific?

Coming Soon

  • Arch (anything else that apache2 supports)


Major ones will be documented soon. For right now check the
attributes file. A few suggestions

  • Compile from source. I normally prefer not to do this, but some core rules break if you don't
  • The core rules are in the cookbook because old version seem to disappear from sourceforge, and that sucks if you're maintaining a large deployment.
  • Base rules should generally be safe. the other groups much less so. There are some rules with inconsistently named data files that will need to be fixed.



This installs base and the OWASP core rule set currently.




  • 0.0.6
    • version bump to fix packaging issue
  • 0.0.5
    • add server alias support for mod_secure_proxy definition
    • test and fix data file loading issues in main,srl, and optional rulesets
    • identify experimental rulesets that don't work in our environment yet
  • 0.0.3/0.0.4
    • add RedHat-based distro support
  • 0.0.2
    • upgrade to mod_security 2.6.2
    • flesh out main config options as chef attributes
  • 0.0.1 First release

License and Authors

Author:: Jason Rohwedder

Copyright:: 2011, HoneyApps, Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

build-essential >= 0.0.0
apache2 >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

No quality metric results found