Skip to content

Commit

Permalink
Merge pull request #141 from artem-sidorenko/gem-update
Browse files Browse the repository at this point in the history
Update of Gemfile
  • Loading branch information
atomic111 authored Feb 14, 2017
2 parents 4f596bf + 891adff commit ac6d642
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 30 deletions.
33 changes: 11 additions & 22 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,32 @@

source 'https://rubygems.org'

gem 'berkshelf', '~> 4.0'
gem 'chef', '>= 12.0'
gem 'inspec', '~> 0.9'

# pin dependency for Ruby 1.9.3 since bundler is not
# detecting that net-ssh 3 does not work with 1.9.3
if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new('1.9.3')
gem 'net-ssh', '~> 2.9'
end
gem 'berkshelf', '~> 5.3'
gem 'chef', '~> 12.5'

group :test do
gem 'chefspec', '~> 5.3.0'
gem 'coveralls', require: false
gem 'foodcritic', '~> 6.0'
gem 'rake'
gem 'chefspec', '~> 4.2.0'
gem 'foodcritic', '~> 6.3'
gem 'rubocop', '~> 0.43.0'
gem 'coveralls', require: false
gem 'bundler', '~> 1.5'
gem 'minitest', '~> 5.5'
gem 'rubocop', '~> 0.46.0'
gem 'simplecov', '~> 0.10'
end

group :development do
gem 'guard'
gem 'guard-foodcritic', '~>2.1'
gem 'guard-rspec'
# gem 'guard-kitchen' # guard-kitchen is not compatable with Guard 2.x
gem 'guard-rubocop'
gem 'guard-foodcritic'
end

group :integration do
gem 'test-kitchen', '~> 1.0'
gem 'kitchen-vagrant'
gem 'kitchen-dokken'
gem 'kitchen-inspec', '~> 0.9'
gem 'concurrent-ruby', '~> 0.9'
gem 'kitchen-inspec'
gem 'kitchen-vagrant'
gem 'test-kitchen', '~> 1.0'
end

group :tools do
gem 'github_changelog_generator', '~> 1'
gem 'github_changelog_generator', '~> 1.12.0'
end
12 changes: 6 additions & 6 deletions libraries/gpgcheck.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ class GPGCheck
def self.check(file)
pattern = /gpgcheck\s*=\s*0/

if File.file?(file)
File.open(file) do |f|
f.each_line do |line|
next unless pattern.match(line)
Chef::Log.warn file + ': gpgcheck=1 not properly configured'
end
return unless File.file?(file)

File.open(file) do |f|
f.each_line do |line|
next unless pattern.match(line)
Chef::Log.warn file + ': gpgcheck=1 not properly configured'
end
end
end
Expand Down
7 changes: 5 additions & 2 deletions recipes/suid_sgid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@
block do
SuidSgid.remove_suid_sgid_from_unknown(whitelist, root, dry_run)
end
end if node['os-hardening']['security']['suid_sgid']['remove_from_unknown'] ||
node['os-hardening']['security']['suid_sgid']['dry_run_on_unknown']
only_if do
node['os-hardening']['security']['suid_sgid']['remove_from_unknown'] ||
node['os-hardening']['security']['suid_sgid']['dry_run_on_unknown']
end
end

0 comments on commit ac6d642

Please sign in to comment.