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

RSS

cis_centos6 (3) Versions 0.5.0

This cookbook implements server hardening as specified by the CIS Benchmark for CentOS 6, version 1.1.0.

Policyfile
Berkshelf
Knife
cookbook 'cis_centos6', '= 0.5.0', :supermarket
cookbook 'cis_centos6', '= 0.5.0'
knife supermarket install cis_centos6
knife supermarket download cis_centos6
README
Dependencies
Quality 0%

CIS CentOS 6 Cookbook

This cookbook implements server hardening as specified by the CIS Benchmark for CentOS 6, version 1.1.0. The sections of the benchmark are largely split into different recipes:

  • 1. Install Updates, Patches and Additional Security Software - recipes/additional_security.rb, recipes/filesystem.rb
  • 2. OS Services - recipes/legacy_services.rb
  • 3. Special Purpose Services - recipes/special_purpose_services.rb
  • 4. Network Configuration and Firewalls - recipes/network.rb
  • 5. Logging and Auditing - recipes/logging.rb
  • 6. System Access, Authentication and Authorization - recipes/cron.rb, recipes/sshd.rb, recipes/pam.rb
  • 7. User Accounts and Environment - recipes/environment.rb
  • 8. Warning Banners - recipes/banners.rb
  • 9. System Maintenance - recipes/system_file_permissions.rb

This cookbook cannot cover everything in the benchmark. For example server maintenance tasks like "1.2.3 Obtain Software Package Updates with yum" or auditing tasks like "9.1.1 Verify System File Permissions". It does aim to cover all server configuration items that can be done during the course of a Chef run.

It is recommended that you reboot the system after applying changes for the first time as some changes require a system reboot to take effect.

Pre-requisites

This cookbook does not perform partitioning of the filesystem. This will need to be done before the cookbook is run so that the filesystem recipe can apply updates to those entries in the fstab. See section 1.1 of the benchmark for details of which filesystems to create. The filesystem recipe will apply the options.

This cookbook enables iptables (as required by the benchmark) but does not configure any rules. Consider configuring firewall rules with another cookbook, for example the firewall cookbook.

Attributes

Not all servers will be able to support all parts of the benchmark being applied. Most of the attributes are provided to customise or disable sections of the hardening. All of the hardening is enabled by default.

Testing

This cookbook has been applied to servers and tested using Nessus to ensure that the benchmark items have been implemented correctly.

It has been tested with Chef 12.7.2 but may work with earlier releases. It should work with later (minor) releases.

There is not currently any unit testing, integration testing or style linting.

License

The cookbook is licensed under the MIT license:

The MIT License (MIT)

Copyright (c) 2016 Huddle

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Foodcritic Metric
            

0.5.0 failed this metric

FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cbc58223b5e61d720c3aebc/cis_centos6/recipes/additional_security.rb:8
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cbc58223b5e61d720c3aebc/cis_centos6/recipes/additional_security.rb:41
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cbc58223b5e61d720c3aebc/cis_centos6/recipes/banners.rb:5
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cbc58223b5e61d720c3aebc/cis_centos6/recipes/environment.rb:10
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cbc58223b5e61d720c3aebc/cis_centos6/recipes/environment.rb:11
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cbc58223b5e61d720c3aebc/cis_centos6/recipes/environment.rb:12
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cbc58223b5e61d720c3aebc/cis_centos6/recipes/environment.rb:24
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cbc58223b5e61d720c3aebc/cis_centos6/recipes/environment.rb:31
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cbc58223b5e61d720c3aebc/cis_centos6/recipes/logging.rb:58
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cbc58223b5e61d720c3aebc/cis_centos6/recipes/logging.rb:59
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cbc58223b5e61d720c3aebc/cis_centos6/recipes/pam.rb:27
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cbc58223b5e61d720c3aebc/cis_centos6/recipes/special_purpose_services.rb:51
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/2cbc58223b5e61d720c3aebc/cis_centos6/recipes/special_purpose_services.rb:78
FC019: Access node attributes in a consistent manner: /tmp/cook/2cbc58223b5e61d720c3aebc/cis_centos6/recipes/additional_security.rb:29
FC019: Access node attributes in a consistent manner: /tmp/cook/2cbc58223b5e61d720c3aebc/cis_centos6/recipes/environment.rb:57