diff options
author | Collin McNeese <cmcneese@chef.io> | 2022-02-16 08:23:32 -0600 |
---|---|---|
committer | John McCrae <john.mccrae@progress.com> | 2022-02-17 13:52:39 -0800 |
commit | 08c42590b51b66b91fc757ab0f669be7ebae02b4 (patch) | |
tree | dca82973dc68ee9e032422dfab02f7334b3c03f4 /lib | |
parent | 7c42c958607ebcbf635f2330ee98f3e39ec6c010 (diff) | |
download | chef-08c42590b51b66b91fc757ab0f669be7ebae02b4.tar.gz |
fixes for #12589 for compliance audit-enforcer reporter
Signed-off-by: Collin McNeese <cmcneese@chef.io>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/compliance/default_attributes.rb | 2 | ||||
-rw-r--r-- | lib/chef/compliance/reporter/compliance_enforcer.rb | 2 | ||||
-rw-r--r-- | lib/chef/compliance/runner.rb | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/compliance/default_attributes.rb b/lib/chef/compliance/default_attributes.rb index fc30716205..52cda4dc30 100644 --- a/lib/chef/compliance/default_attributes.rb +++ b/lib/chef/compliance/default_attributes.rb @@ -27,7 +27,7 @@ class Chef # Controls what is done with the resulting report after the Chef InSpec run. # Accepts a single string value or an array of multiple values. - # Accepted values: 'chef-server-automate', 'chef-automate', 'json-file', 'audit-enforcer', 'cli' + # Accepted values: 'chef-server-automate', 'chef-automate', 'json-file', 'audit-enforcer', 'compliance-enforcer', 'cli' "reporter" => nil, # Controls if Chef InSpec profiles should be fetched from Chef Automate or Chef Infra Server diff --git a/lib/chef/compliance/reporter/compliance_enforcer.rb b/lib/chef/compliance/reporter/compliance_enforcer.rb index 47b3a4d2df..d682208821 100644 --- a/lib/chef/compliance/reporter/compliance_enforcer.rb +++ b/lib/chef/compliance/reporter/compliance_enforcer.rb @@ -1,7 +1,7 @@ class Chef module Compliance module Reporter - class AuditEnforcer + class ComplianceEnforcer class ControlFailure < StandardError; end def send_report(report) diff --git a/lib/chef/compliance/runner.rb b/lib/chef/compliance/runner.rb index f6d3e89b15..59b60112e7 100644 --- a/lib/chef/compliance/runner.rb +++ b/lib/chef/compliance/runner.rb @@ -7,7 +7,7 @@ class Chef class Runner < EventDispatch::Base extend Forwardable - SUPPORTED_REPORTERS = %w{chef-automate chef-server-automate json-file audit-enforcer cli}.freeze + SUPPORTED_REPORTERS = %w{chef-automate chef-server-automate json-file audit-enforcer compliance-enforcer cli}.freeze SUPPORTED_FETCHERS = %w{chef-automate chef-server}.freeze attr_accessor :run_id @@ -300,7 +300,7 @@ class Chef require_relative "reporter/json_file" path = node.dig("audit", "json_file", "location") Chef::Compliance::Reporter::JsonFile.new(file: path) - when "audit-enforcer" + when "audit-enforcer", "compliance-enforcer" require_relative "reporter/compliance_enforcer" Chef::Compliance::Reporter::ComplianceEnforcer.new when "cli" |