diff options
Diffstat (limited to 'lib/chef/compliance/runner.rb')
-rw-r--r-- | lib/chef/compliance/runner.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/compliance/runner.rb b/lib/chef/compliance/runner.rb index 5b7049e435..8ab80e11ff 100644 --- a/lib/chef/compliance/runner.rb +++ b/lib/chef/compliance/runner.rb @@ -16,7 +16,9 @@ class Chef def_delegators :node, :logger def enabled? - audit_cookbook_present = node["recipes"].include?("audit::default") + # Did we parse the libraries file from the audit cookbook? This class dates back to when Chef Automate was + # renamed from Chef Visibility in 2017, so should capture all modern versions of the audit cookbook. + audit_cookbook_present = defined?(::Reporter::ChefAutomate) logger.info("#{self.class}##{__method__}: #{Inspec::Dist::PRODUCT_NAME} profiles? #{inspec_profiles.any?}") logger.info("#{self.class}##{__method__}: audit cookbook? #{audit_cookbook_present}") |