cha-sysctlhardener

The Calibration Bench. A command line validator that reads a YAML or JSON configuration against a hardening policy written as a JSON schema and reports every setting that does not comply. Gauges are read against the standard, certificates are written, and the adjusting screws stay sealed: the report is the entire output.

The red tagged gauge close up beside its cream certificate on the bench, its face plain and blank, the wire seal on its adjusting screw unbroken and the deadweight tester soft behind
The tagged gauge, read up close; its seal is unbroken.
InputA configuration file and a policy file, both required
OutputEvery schema failure found, reported rather than stopping at the first
Dry runThe -n flag changes neither the output nor the exit code, because every run is report only
ExitsCompliant 0, non compliant 1, missing file 1

Usage

python3 main.py -c CONFIG_FILE -p POLICY_FILE [-n]
OptionWhat it does
-c, --configPath to the configuration file, YAML or JSON. Required.
-p, --policyPath to the JSON schema policy file. Required.
-n, --dry-runDescribed in the README as a dry run. Every run of this tool is report only, so the flag does not change the output or the exit code: a non compliant configuration still exits 1 with it.
-hShow help message and exit.
A steel calibration bench with a row of brass pressure gauges with plain blank faces beside a deadweight tester, a technician at the end of the bench writing on a cream certificate, one gauge tagged with a plain red tag and its adjusting screw sealed with wire
A row of gauges read in turn; nothing on the bench is adjusted.

Stated limits