-
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 cookbook does not automatically skip profiles for a different platform type #248
Comments
If I remove the Windows references from the attributes file and run chef-client the audit completes successfully. |
@grdnrio What path did you take here? I'm polluting my attributes file with conditions like
For "platforms" that don't have a matching profile, I'm going to see if you can create a comment-only InSpec rule. The cookbook fails if |
I've noticed this is still an issue with version of 7.0.1 of the cookbook. I've made use of inspec's ability to know what controls need to run so I have developed multi os controls around individual products profiles. Do you think this will resolved in the future? as I will would need to start splitting out my profiles as I would like to move to the audit cookbook approach for running my compliance scans. |
Need @chris-rock to comment on this :) |
I understand this is indeed an issue. The reason why this happens is that each profile executes individually and fails because it is not applicable. You could work around that if you place all the profiles into a wrapper profile that depends on all the profiles. I think it makes sense for the audit cookbook to understand the read and skip exception. As part of inspec/inspec#3158 we discussed to define a mechanism to report a skipped profile which would be beneficial for that issue as well. |
Cookbook version
4.0.0
Chef-client version
12.19.36
Platform Details
Amazon Linux and Windows 2012 R2 (AWS default AMIs)
Scenario:
I have an audit role that is added to a base role in the run-list of all nodes. My attributes are set as follows:
Steps to Reproduce:
See attributes and versions above.
Expected Result:
I'd like the audit cookbook to determine the platform and skip profiles that are not relevant.
Actual Result:
At the moment an error is thrown:
The text was updated successfully, but these errors were encountered: