-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audit coobook via Chef Automate fails to inherit profiles #206
Comments
@timusmc96 Is that a profile that depends on our internal cis-windows? |
yes, inspec yml below
|
translated-controls.rb:
|
So I have cut the profile down and still issues arises, just doing small include with skip |
Thank you @timusmc96 for providing that example. I'll let you know once I have updates |
Also FYI, this is working with Chef Compliance, but not Chef Automate |
Audit cook book fetcher.rb still has
inspec was fixed in #1647 to 1.20.0 inspec gem def compliance_profile_name
|
may be related to inspec/inspec#1647 |
@timusmc96 That should net be required here. An upload profiles should have all profiles vendored into the profile. If the main profile is downloaded, but InSpec complains about dependencies it should be a different issue |
Can you try if the inherited profile works with the json-file reporter? https://github.com/chef-cookbooks/audit#write-to-file-on-disk |
We do not have Chef Compliance connected to our Chef Server in this environment |
Chris, do you have an update? |
@chris-rock @timusmc96 do you know the next step to take to test @timusmc96 |
@timusmc96 and @aaronlippold I started working on this but it seems to be more complex. I need to further investigate this. I expect to have a solution by Monday. |
@timusmc96 is this error happening with Chef Compliance and/or Chef Automate? |
Chef Automate |
@timusmc96 I was able to report a meta-profile to Chef Automate with this branch: #212 This branch would only work with Chef Automate but not with Chef Compliance yet. Could you test your profile again with that branch? |
I will test. I only want this inheritance to work with chef automate
Thanks
… On Apr 26, 2017, at 19:20, Christoph Hartmann ***@***.***> wrote:
@timusmc96 I was able to report a meta-profile to Chef Automate with this branch: #212 This branch would only work with Chef Automate but not with Chef Compliance yet. Could you test it again with that branch?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Chris, I am working on a test server to test these changes, I also see there are some big changes coming with next version of audit cookbook, example chef-server-visibility => chef-server-automate. I will give an update tomorrow. Thanks |
Chris, I pulled in your updates. So to go back, we are trying to read the profiles from chef-automate. This is what the role looks like I have set for calling up the profiles
|
Chris here is updated log
|
Still seeing the same issue
C:\windows\system32>chef-clientStarting Chef Client, version 12.18.31resolving cookbooks for run list: ["r101_all_audit"]Synchronizing Cookbooks: - r101_all_audit (0.1.0) - compat_resource (12.16.3) - audit (3.0.0)Installing Cookbook Gems:Compiling Cookbooks...Recipe: audit::inspec * inspec_gem[inspec] action install (up to date) Converging 1 resources * inspec_gem[inspec] action nothing (skipped due to action :nothing)
Running handlers:[2017-05-01T14:23:34-04:00] ERROR: Report handler Chef::Handler::AuditReport raised #<TypeError: no implicit conversion of URI::HTTPS into String>[2017-05-01T14:23:34-04:00] ERROR: C:/chef/cache/cookbooks/audit/files/default/vendor/chef-server/fetcher.rb:115:in `match'[2017-05-01T14:23:34-04:00] ERROR: C:/chef/cache/cookbooks/audit/files/default/vendor/chef-server/fetcher.rb:115:in `chef_server_url'[2017-05-01T14:23:34-04:00] ERROR: C:/chef/cache/cookbooks/audit/files/default/vendor/chef-server/fetcher.rb:74:in `resolved_source'[2017-05-01T14:23:34-04:00] ERROR: C:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/inspec-1.22.0/lib/inspec/cached_fetcher.rb:23:in `resolved_source'[2017-05-01T14:23:34-04:00] ERROR: C:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/inspec-1.22.0/lib/inspec/dependencies/requirement.rb:63:in `resolved_source'
Also noticed that your count_controls is not being declared.
| # calculate statistics |
| | stats = count_controls(JSON.parse(r[:profiles].to_json)) |
| | |
| | time = 0 |
| | time = r[:statistics][:duration] unless r[:statistics].nil? |
| | |
| | # count controls |
| | Chef::Log.info "Summary #{stats['total']} controls: #{stats['passed']['total']} successful, #{stats['failed']['total']} failures, #{stats['skipped']['total']} skipped in #{time} s"
Let me know what else we can look at here.
Thanks |
On Wednesday, April 26, 2017 7:20 PM, Christoph Hartmann <notifications@github.com> wrote:
@timusmc96 I was able to report a meta-profile to Chef Automate with this branch: #212 This branch would only work with Chef Automate but not with Chef Compliance yet. Could you test it again with that branch?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@timusmc96 Can you please send me the cis/mitre-cis-windows2012-baseline_test profile? I'd like to use this for testing too |
Chris here is a snipit, I cut it down or what have you just does not work if I have a depends in inspec.yml and include in the rb
Thanks
On Tuesday, May 2, 2017 5:02 AM, Christoph Hartmann <notifications@github.com> wrote:
@timusmc96 Can you please send me the cis/mitre-cis-windows2012-baseline_test profile? I'd like to use this for testing too—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
This should be fixed with 3.1. @timusmc96 The issue regarding z-lib is another topic that need to be addressed though. |
Cookbook version
Audit 3.0.0
Chef-client version
12.18.31
Platform Details
Redhat 7.3
Scenario:
Chef Automate execute an inherit profile, but failing on depends
Steps to Reproduce:
Expected Result:
Chef Automate compliance should be able to inherit profile
Actual Result:
Failed to inherit profile with depends
The text was updated successfully, but these errors were encountered: