diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..48b8bf9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +vendor/ diff --git a/Gemfile b/Gemfile index 126ddfa..1d20d4f 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,14 @@ -source 'https://rubygems.org' +source ENV['GEM_SOURCE'] || 'https://rubygems.org' -gem 'inspec', '~> 3' -gem 'rake' -gem 'rubocop' +gem 'github_changelog_generator', '~> 1.12.0', source: 'https://rubygems.org/' +gem 'rake', source: 'https://rubygems.org/' +gem 'rubocop', source: 'https://rubygems.org/' +gem 'unf_ext', source: 'https://rubygems.org/' -group :tools do - gem 'github_changelog_generator', '~> 1.12.0' +source 'https://packagecloud.io/cinc-project/stable' do + gem 'chef-config' + gem 'chef-utils' + gem 'cinc-auditor-bin' + gem 'inspec' + gem 'inspec-core' end diff --git a/Rakefile b/Rakefile index cb51c7e..6f5c608 100644 --- a/Rakefile +++ b/Rakefile @@ -20,7 +20,7 @@ namespace :test do # run inspec check to verify that the profile is properly configured task :check do dir = File.join(File.dirname(__FILE__)) - sh("bundle exec inspec check #{dir}") + sh("bundle exec cinc-auditor check #{dir} --format json --log-level=error | jq .") end end diff --git a/controls/1_1_filesystem_configuration.rb b/controls/1_1_filesystem_configuration.rb index 7d19d99..8c9a9f7 100644 --- a/controls/1_1_filesystem_configuration.rb +++ b/controls/1_1_filesystem_configuration.rb @@ -15,7 +15,7 @@ # # author: Kristian Vlaardingerbroek -cis_level = attribute('cis_level') +cis_level = input('cis_level') title '1.1 Filesystem Configuration' diff --git a/inspec.yml b/inspec.yml index bba95d7..1c5e0e4 100644 --- a/inspec.yml +++ b/inspec.yml @@ -10,7 +10,7 @@ version: 0.4.2 inspec_version: '>= 2.3.5' supports: - platform-family: linux -attributes: +inputs: - name: cis_level required: false description: 'CIS profile level to audit'