Closed rx294 closed 5 years ago
Add Modules:
compliance parses an inspec results json to check if the compliance level meets a specified threshold.
If the specified threshold is not met, an error code (1) is returned along with non-compliant elements.
USAGE: inspec_tools compliance [OPTIONS] -j <inspec-json> -i <threshold-inline> inspec_tools compliance [OPTIONS] -j <inspec-json> -f <threshold-file> FLAGS: -j --inspec-json <inspec-json> : path to InSpec results Json -i --template-inline <threshold-inline> : inline compliance threshold definition -f --template-file <threshold-file> : yaml file with compliance threshold definition Examples: inspec_tools compliance -j examples/sample_json/rhel-simp.json -i '{compliance.min: 80, failed.critical.max: 0, failed.high.max: 0}' inspec_tools compliance -j examples/sample_json/rhel-simp.json -f examples/sample_yaml/threshold.yaml
failed: critical: max: 0 high: max: 1 compliance: min: 81
{compliance: {min: 80}, failed: {critical: {max: 0}, high: {max: 0}}}
{compliance.min: 81, failed.critical.max: 10, failed.high.max: 0}
compliance.min: 81 failed.critical.max: 10 failed.high.max: 1
summary parses an inspec results json to create a summary json
USAGE: inspec_tools summary [OPTIONS] -j <inspec-json> -o <summary-csv> FLAGS: -j --inspec-json <inspec-json> : path to InSpec results Json -o --output <output-json> : path to summary json Examples: inspec_tools summary -j examples/sample_json/rhel-simp.json -o summary.json
Add Modules:
compliance
compliance parses an inspec results json to check if the compliance level meets a specified threshold.
If the specified threshold is not met, an error code (1) is returned along with non-compliant elements.
Possible In-line and yaml file threshold definition styles:
summary
summary parses an inspec results json to create a summary json