Basic Threshold Configuration¶
This guide covers basic threshold configurations for security compliance validation.
Threshold Configuration Structure¶
Thresholds are defined in YAML or JSON files with a standardized structure. Here's a basic example:
Compliance Score¶
The compliance
section sets the minimum overall compliance percentage required:
This ensures that at least 85% of controls must pass for the scan to be considered successful.
Failed Controls by Impact¶
The failed
section lets you set maximum failure counts by impact level:
The impact levels (critical, high, medium, low) correspond to the severity levels in InSpec/CINC Auditor controls.
Using Thresholds with SAF CLI¶
To validate scan results against a threshold file:
The command returns:
- Exit code 0 if all thresholds are met
- Non-zero exit code if any threshold is not met
Using Thresholds in Scripts¶
Our scan-container.sh
script supports threshold files:
Using Thresholds in Helm Charts¶
Our Helm chart supports thresholds via values.yaml
:
You can also use an external threshold file:
Common Basic Configurations¶
Compliance Only¶
The simplest configuration focuses only on the overall compliance score:
No Critical Failures¶
Enforce that no critical vulnerabilities are allowed:
Limited High Failures¶
Allow a small number of high-severity issues:
Troubleshooting¶
If you're experiencing issues with thresholds:
- Verify your threshold file is valid YAML or JSON
- Check that your scan results contain the expected impact levels
- Use the
--debug
flag with SAF CLI for more detailed output: