Published on

How to fix Shellshock Bash Vulnerability using Chef

Two copy-paste solutions for your recipes that will:

  • Make your Chef deployed servers Shellshock proof
  • Display shellshock-fix during provisioning to make you look good as a bonus

Using package

Place anywhere after your apt-get update action.

package 'shellshock-fix' do
    package_name 'bash'
    action :upgrade

Using execute

Place anywhere.

execute "shellshock-fix" do
    command 'apt-get update && sudo apt-get install --only-upgrade bash'
    action :run