Closed raghureddy45 closed 6 years ago
Thank you for reporting @raghureddy45 I am going to have a look at this tomorrow.
We update the readme in #47 This profile requires InSpec 1.38.8 since it is using the auditd
resouce, but latest Chef Compliance ships with InSpec 1.34.9. A new release for Chef Compliance is scheduled for January which includes latest InSpec.
In the meantime you can do the following:
$ git clone https://github.com/dev-sec/cis-docker-benchmark.git
Cloning into 'cis-docker-benchmark'...
remote: Counting objects: 587, done.
remote: Compressing objects: 100% (96/96), done.
remote: Total 587 (delta 81), reused 84 (delta 38), pack-reused 453
Receiving objects: 100% (587/587), 171.92 KiB | 205.00 KiB/s, done.
Resolving deltas: 100% (341/341), done.
$ cd cis-docker-benchmark
$ rm controls/host_configuration.rb
$ inspec archive .
Please let us know if this is helpful.
chef-compliance version Version: 1.12.1(latest) I was trying to upload cis-docker-benchmark profile to compliance. I am getting following error.!!
Profile is valid Generate temporary profile archive at /var/folders/ks/x873n92n6vb62rrt_qfpt8f40000gp/T/cis-docker-benchmark20171221-24480-wzaned.tar.gz I, [2017-12-21T12:29:16.364667 #24480] INFO -- : Generate archive /var/folders/ks/x873n92n6vb62rrt_qfpt8f40000gp/T/cis-docker-benchmark20171221-24480-wzaned.tar.gz. I, [2017-12-21T12:29:16.381412 #24480] INFO -- : Finished archive generation. Start upload to walmart45/cis-docker-benchmark Uploading to Chef Compliance Error during profile upload: "Failed to POST /owners/walmart45/compliance/cis-docker-benchmark/tar."
compliance log shows.!! /var/log/chef-compliance/core/current
2017-12-21_18:29:16.84343 18:29:16.840 DEB => Extracting incoming tar to /var/opt/chef-compliance/core/runtime/compliance-profiles/upload_525211858 2017-12-21_18:29:16.84344 18:29:16.843 DEB => Extracted upload to /var/opt/chef-compliance/core/runtime/compliance-profiles/upload_525211858 2017-12-21_18:29:16.84344 18:29:16.843 DEB => Found compliance root folder in /var/opt/chef-compliance/core/runtime/compliance-profiles/upload_525211858 2017-12-21_18:29:16.84344 18:29:16.843 DEB => Run: cd /var/opt/chef-compliance/core/runtime/compliance-profiles/upload_525211858 && inspec [check . --format json --profiles-path /var/opt/chef-compliance/core/runtime/compliance-profiles] 2017-12-21_18:29:18.27781 WARN: Unresolved specs during Gem::Specification.reset: 2017-12-21_18:29:18.27782 net-ssh (< 5.0, >= 2.6.5, >= 2.9) 2017-12-21_18:29:18.27782 ffi (>= 1.0.1) 2017-12-21_18:29:18.27783 multi_json (~> 1.10) 2017-12-21_18:29:18.27783 rainbow (~> 2) 2017-12-21_18:29:18.27783 rspec (~> 3) 2017-12-21_18:29:18.27783 addressable (~> 2.4) 2017-12-21_18:29:18.27783 WARN: Clearing out unresolved specs. 2017-12-21_18:29:18.27783 Please report a bug if this causes problems. 2017-12-21_18:29:18.54880 /opt/chef-compliance/embedded/lib/ruby/gems/2.2.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers.rb:960:in:0x00000002de9b10> (NameError)
2017-12-21_18:29:18.54882 from ./controls/host_configuration.rb:187:in
method_missing': undefined local variable or method
auditd' for #<#block in load_with_context' 2017-12-21_18:29:18.54882 from /opt/chef-compliance/embedded/lib/ruby/gems/2.2.0/gems/inspec-1.34.9/lib/inspec/rule.rb:49:in
instance_eval' 2017-12-21_18:29:18.54882 from /opt/chef-compliance/embedded/lib/ruby/gems/2.2.0/gems/inspec-1.34.9/lib/inspec/rule.rb:49:ininitialize' 2017-12-21_18:29:18.54882 from /opt/chef-compliance/embedded/lib/ruby/gems/2.2.0/gems/inspec-1.34.9/lib/inspec/control_eval_context.rb:71:in
new' 2017-12-21_18:29:18.54883 from /opt/chef-compliance/embedded/lib/ruby/gems/2.2.0/gems/inspec-1.34.9/lib/inspec/control_eval_context.rb:71:inblock (2 levels) in create' 2017-12-21_18:29:18.54883 from ./controls/host_configuration.rb:173:in
load_with_context' 2017-12-21_18:29:18.54883 from /opt/chef-compliance/embedded/lib/ruby/gems/2.2.0/gems/inspec-1.34.9/lib/inspec/profile_context.rb:146:ininstance_eval' 2017-12-21_18:29:18.54883 from /opt/chef-compliance/embedded/lib/ruby/gems/2.2.0/gems/inspec-1.34.9/lib/inspec/profile_context.rb:146:in
load_with_context' 2017-12-21_18:29:18.54884 from /opt/chef-compliance/embedded/lib/ruby/gems/2.2.0/gems/inspec-1.34.9/lib/inspec/profile_context.rb:130:inload_control_file' 2017-12-21_18:29:18.54884 from /opt/chef-compliance/embedded/lib/ruby/gems/2.2.0/gems/inspec-1.34.9/lib/inspec/profile.rb:151:in
block in collect_tests' 2017-12-21_18:29:18.54884 from /opt/chef-compliance/embedded/lib/ruby/gems/2.2.0/gems/inspec-1.34.9/lib/inspec/profile.rb:148:ineach' 2017-12-21_18:29:18.54884 from /opt/chef-compliance/embedded/lib/ruby/gems/2.2.0/gems/inspec-1.34.9/lib/inspec/profile.rb:148:in
collect_tests' 2017-12-21_18:29:18.54884 from /opt/chef-compliance/embedded/lib/ruby/gems/2.2.0/gems/inspec-1.34.9/lib/inspec/profile.rb:454:inload_checks_params' 2017-12-21_18:29:18.54885 from /opt/chef-compliance/embedded/lib/ruby/gems/2.2.0/gems/inspec-1.34.9/lib/inspec/profile.rb:447:in
load_params' 2017-12-21_18:29:18.54885 from /opt/chef-compliance/embedded/lib/ruby/gems/2.2.0/gems/inspec-1.34.9/lib/inspec/profile.rb:141:inparams' 2017-12-21_18:29:18.54885 from /opt/chef-compliance/embedded/lib/ruby/gems/2.2.0/gems/inspec-1.34.9/lib/inspec/profile.rb:307:in
controls_count' 2017-12-21_18:29:18.54886 from /opt/chef-compliance/embedded/lib/ruby/gems/2.2.0/gems/inspec-1.34.9/lib/inspec/profile.rb:278:incheck' 2017-12-21_18:29:18.54886 from /opt/chef-compliance/embedded/lib/ruby/gems/2.2.0/gems/inspec-1.34.9/lib/inspec/cli.rb:69:in
check'what am i missing here? need to update rspec version? please guide me to resolve this issue.
Thanks in advance.