CIS Benchmark compliance checking for OS and network configurations
The Security Configuration Auditor performs automated compliance checks against CIS Benchmarks and NIST 800-53 security controls. It evaluates password policies, SSH hardening, filesystem permissions, network settings, logging configuration, running services, and file permissions. Each check produces a PASS/FAIL result mapped to specific NIST controls, enabling rapid gap identification and remediation prioritization.
Ensure you have root/sudo access on the target system. The auditor reads system configuration files directly.
# Verify access
sudo cat /etc/ssh/sshd_config > /dev/null && echo 'Access OK'Execute the auditor script. It will automatically check all seven configuration categories and produce a comprehensive report.
sudo python3 config_audit.py \
--target localhost \
--output /reports/config_audit.mdExamine the report organized by category. Each failed check includes the specific NIST control reference and recommended remediation.
Import critical failures into the risk assessment pipeline for consolidated scoring.
python3 risk_report.py add-risk \
--project my-audit \
--title 'Weak Password Policy' \
--source config-audit \
--likelihood 4 --impact 4 \
--control IA-5Run all 30 configuration checks across 7 categories on the local system.
sudo python3 config_audit.py --target localhost --output config_report.mdSecurity Configuration Audit — localhost ════════════════════════════════════════ Category: Password Policy [FAIL] PWD-001: Min password length >= 14 [FAIL] PWD-002: Password complexity enabled ... Category: SSH Config [PASS] SSH-001: Protocol version 2 only [FAIL] SSH-002: Root login disabled ... ══════════════════════════════ Total: 30 checks | PASS: 19 | FAIL: 11 Compliance Rate: 63.3%
# Security Configuration Audit Report
**Target:** localhost | **Date:** 2026-03-01 | **Framework:** CIS Benchmarks
## Results Summary
| Category | Total | Pass | Fail | Compliance |
|----------|-------|------|------|------------|
| Password Policy | 4 | 0 | 4 | 0% |
| SSH Config | 5 | 1 | 4 | 20% |
| Filesystem | 3 | 1 | 2 | 33% |
| Network | 5 | 4 | 1 | 80% |
| Logging | 4 | 3 | 1 | 75% |
| Services | 5 | 5 | 0 | 100% |
| Permissions | 4 | 4 | 0 | 100% |
| **TOTAL** | **30** | **19** | **11** | **63.3%** |[FAIL] SSH-002: SSH root login disabled
NIST Control: AC-17 (Remote Access)
Current Value: PermitRootLogin yes
Expected: PermitRootLogin no
Remediation: Edit /etc/ssh/sshd_config, set PermitRootLogin to 'no'
Risk: HIGH — Direct root access increases attack surface
CIS Benchmark: 5.2.10Establish and document configuration settings for system components.
Configure systems to provide only mission-essential capabilities.
Monitor and control communications at external and key internal boundaries.
Enforce approved authorizations for logical access to information and system resources.
Manage system authenticators by verifying identity before issuing credentials.
Identify events that the system is capable of logging in support of the audit function.