Getting Started¶
1) What this project is¶
CIS Hardening Tool orchestrates multiple security scanners and presents their output in a unified way.
- Linux:
openscap,lynis,usg,ciscat - Windows:
hardeningkitty,sct,ciscat
It supports: - Interactive CLI (cis-tool) with subcommands including doctor and findings - Direct CLI subcommands (scan, tools, server, history, doctor, findings) - FastAPI web server + multi-page SPA dashboard (main.py) - PDF/HTML report generation - JSON output mode (--json), exit-code control, quiet/verbose flags
2) Installation options¶
A. Development install (recommended while contributing)¶
Requires uv. There is no setup.py; the project is configured entirely via pyproject.toml (includes distro dependency for Linux detection).
Note: Building the
tiktokendependency from source (if pre-built wheels aren't available for your architecture) requires the Rust compiler. Install it viacurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh.
Optional dev dependencies:
B. Docker¶
A unified multi-stage Dockerfile uses uv for fast, reproducible builds:
C. Release artifact install (for validation)¶
Download release artifacts and run via package/AppImage/EXE as appropriate.
Helper scripts: - scripts/install.sh (Linux) - scripts/install.ps1 (Windows)
3) Common commands¶
Interactive menu¶
Version¶
Environment health check¶
Install tools¶
Run scans¶
cis-tool scan --tools lynis,openscap --non-interactive
cis-tool scan --json # JSON output
cis-tool scan --exit-code # non-zero exit on failures
cis-tool scan --quiet # suppress progress output
cis-tool scan --verbose # extra detail
cis-tool scan --only-failures # show only failed checks
View findings for a scan¶
Export report for an existing scan¶
Server control¶
4) Running the web app¶
Or via CLI wrapper:
Default URL: http://localhost:8000
The frontend is a multi-page SPA with hash routing. Pages include:
- Dashboard -- KPI cards, compliance overview
- Scans -- scan list with pagination, per-scan inline logs, modal log viewer
- Tools -- tool status and install controls
- Logs -- aggregated log browser
Additional frontend features: dark/light theme toggle, toast notifications, CSV/JSON export.
5) Key file locations¶
| Item | Path |
|---|---|
| CLI package | cli/ (__init__.py, styles.py, menu.py, server.py, scan.py, tools_cmd.py, history.py, elevation.py) |
| Report parsers | core/parsers/ (oscap.py, lynis.py, hardeningkitty.py, ciscat.py) |
| Reporter orchestrator | core/reporter.py (slim; report_gen.py merged in and deleted) |
| Project config | pyproject.toml (setup.py deleted) |
6) Database and reports¶
- Runtime home (Linux/macOS):
~/.cis-sentinel - Runtime home (Windows):
%LOCALAPPDATA%\\cis-sentinel - Override runtime home:
CIS_SENTINEL_HOME - SQLite DB:
<runtime_home>/cis_history.db(orCIS_DB_PATHoverride) - Lazy initialization (no module-level
init_db()) - Supports
completed_atcolumn,delete_scan(),count_scans(), pagination - Scan reports:
<runtime_home>/reports/<YYYYmmdd_HHMMSS>__<scan_id>/... - Session logs:
<runtime_home>/logs/scans/<scan_id>/<tool_name>.ndjson(per-tool log files, lazy dir init) - Server logs:
<runtime_home>/logs/web_server_<YYYYmmdd_HHMMSS>.log - JSON logging: set
LOG_FORMAT=jsonenvironment variable
7) Build/test shortcuts¶
Use make targets:
make testmake test-unitmake lintmake securitymake run-climake run-server
8) VM validation flow¶
This downloads release artifacts to vms/artifacts/, provisions VMs, executes in-VM test runners, and stores logs and reports.