class Chef::Compliance::Reporter::AuditEnforcer

Public Instance Methods

send_report(report) click to toggle source
# File lib/chef/compliance/reporter/compliance_enforcer.rb, line 7
def send_report(report)
  report.fetch(:profiles, []).each do |profile|
    profile.fetch(:controls, []).each do |control|
      control.fetch(:results, []).each do |result|
        raise ControlFailure, "Audit #{control[:id]} has failed. Aborting #{ChefUtils::Dist::Infra::CLIENT} run." if result[:status] == "failed"
      end
    end
  end
  true
end
validate_config!() click to toggle source
# File lib/chef/compliance/reporter/compliance_enforcer.rb, line 18
def validate_config!
  true
end