Compliance Toolkit - Project Status
Last Updated: 2025-01-05 Version: 1.1.0 Status: β Production Ready (with CLI Support & Comprehensive Documentation)
Executive Summary
The Compliance Toolkit is a professional Windows registry compliance scanner with modern HTML reporting, evidence logging, CLI automation support, and multiple compliance frameworks (NIST 800-171, FIPS 140-2). Supports both interactive menu mode and non-interactive CLI mode for scheduled tasks.
Current Features
β Core Functionality
- [x] Windows Registry reading (all types: REG_SZ, REG_MULTI_SZ, REG_DWORD, REG_QWORD, REG_BINARY)
- [x] Context-aware operations with timeout support
- [x] Structured logging (JSON format via slog)
- [x] Batch registry operations
- [x] Rich error types with operation context
- [x] Functional options pattern (WithLogger, WithTimeout)
β CLI Interface (Compliance Toolkit)
Interactive Mode: - [x] Interactive ASCII menu system - [x] Dynamic report discovery from JSON configs - [x] Report selection and execution - [x] HTML report viewing (opens in browser) - [x] Evidence log viewing (opens in text editor) - [x] Application log viewing - [x] Configuration management - [x] About/Help screens
Non-Interactive Mode (NEW in v1.1.0):
- [x] Command-line flags for automation
- [x] List available reports (-list)
- [x] Run specific report (-report=<name>)
- [x] Run all reports (-report=all)
- [x] Quiet mode for scheduled tasks (-quiet)
- [x] Custom output directories (-output, -evidence, -logs)
- [x] Configurable timeout (-timeout)
- [x] Proper exit codes for monitoring
- [x] Scheduled task support (Windows Task Scheduler)
β Reporting System
- [x] Modern HTML reports with Bulma CSS framework
- [x] Interactive Chart.js visualizations (donut charts)
- [x] Dark mode toggle with localStorage persistence
- [x] Professional print stylesheet (PDF-ready)
- [x] Collapsible registry detail sections
- [x] Sortable data tables (click column headers)
- [x] Search and filter functionality
- [x] Template-based architecture (separate HTML/CSS from Go code)
- [x] Metadata and versioning support
- [x] Expected vs Actual value comparison
- [x] KPI dashboard with compliance rate
β Evidence & Audit Trail
- [x] JSON evidence logs for compliance audits
- [x] Machine information gathering
- [x] Scan metadata with timestamps
- [x] Compliance rate calculation
- [x] Separate evidence directory (output/evidence/)
β Compliance Reports
- NIST 800-171 Security Compliance (13 checks)
- UAC, Windows Defender, Firewall
- Auto Updates, SMBv1, LSA Protection
-
Remote Desktop, Secure Boot, BitLocker
-
FIPS 140-2 Compliance (35 checks)
- FIPS Algorithm Policy
- TLS/SSL Protocol Security (15 checks)
- Cipher Suites (7 checks)
- Hash Algorithms (6 checks)
- Key Exchange Algorithms (3 checks)
-
Encryption Implementation (5 checks)
-
System Information Report
- OS version, build, edition
- Installation date, architecture
-
Computer name, domain
-
Software Inventory Report
- Installed programs
- Windows features
-
System components
-
Network Configuration Report
- Hostname, DNS, DHCP
- Proxy settings
- IPv6 configuration
-
Network discovery
-
User Settings Report
- Desktop wallpaper, theme
- Screen saver settings
- Explorer settings
- Startup programs
-
Environment variables
-
Performance Diagnostics Report
- Virtual memory settings
- Prefetch/Superfetch
- Visual effects
- Crash dump configuration
- Processor scheduling
Directory Structure
D:\golang-labs\lab3-registry-read\
βββ cmd/
β βββ toolkit.go # Main CLI application
βββ pkg/
β βββ registryreader.go # Core registry operations
β βββ config.go # JSON config loader
β βββ evidence.go # Evidence logging
β βββ htmlreport.go # HTML report generator
β βββ templatedata.go # Template data structures
β βββ menu.go # CLI menu system
β βββ templates/ # Embedded templates
β βββ html/
β β βββ base.html
β β βββ components/
β β βββ header.html
β β βββ kpi-cards.html
β β βββ chart.html
β β βββ data-table.html
β βββ css/
β βββ main.css
β βββ print.css
βββ configs/
β βββ reports/ # Report JSON configurations
β βββ NIST_800_171_compliance.json
β βββ fips_140_2_compliance.json
β βββ system_info.json
β βββ software_inventory.json
β βββ network_config.json
β βββ user_settings.json
β βββ performance_diagnostics.json
βββ output/
β βββ reports/ # Generated HTML reports
β βββ evidence/ # JSON evidence logs
β βββ logs/ # Application logs
βββ docs/ # Comprehensive documentation
β βββ README.md # Documentation index
β βββ user-guide/ # End-user documentation
β β βββ QUICKSTART.md
β β βββ INSTALLATION.md
β β βββ USER_GUIDE.md
β β βββ CLI_QUICKSTART.md
β β βββ CLI_USAGE.md
β β βββ AUTOMATION.md
β βββ developer-guide/ # Developer documentation
β β βββ ARCHITECTURE.md
β β βββ DEVELOPMENT.md
β β βββ ADDING_REPORTS.md
β β βββ TEMPLATES.md
β βββ reference/ # Technical reference
β β βββ REPORTS.md
β β βββ EVIDENCE.md
β β βββ EXECUTIVE.md
β β βββ CONFIG.md
β βββ PROJECT_STATUS.md # This file
βββ templates/ # Template source (copied to pkg/)
βββ examples/ # Example automation scripts (NEW v1.1.0)
β βββ README.md
β βββ scheduled_compliance_scan.bat
β βββ scheduled_compliance_scan.ps1
βββ go.mod
βββ go.sum
βββ ComplianceToolkit.exe # Built executable
βββ Documentation/
βββ CLAUDE.md
βββ IMPROVEMENTS.md
βββ TEMPLATE_SYSTEM.md
βββ TEMPLATE_QUICK_START.md
βββ MODERNIZATION_SUMMARY.md
βββ ADDING_NEW_REPORTS.md
βββ QUICK_REFERENCE.md
βββ EVIDENCE_LOGGING.md
βββ COMPLIANCE_EVIDENCE_QUICKSTART.md
βββ EXECUTIVE_REPORTS.md
βββ CLI_USAGE.md (NEW v1.1.0)
βββ PROJECT_STATUS.md (this file)
Technical Specifications
Language & Framework
- Go Version: 1.24.0
- Platform: Windows (uses golang.org/x/sys/windows/registry)
Dependencies
golang.org/x/sys/windows/registry- Windows registry accesslog/slog- Structured logging- Standard library only (no external runtime dependencies)
Frontend (HTML Reports)
- Bulma CSS v0.9.4 - Component framework
- Chart.js v4.4.0 - Interactive charts
- Font Awesome v6.4.0 - Icons
- Vanilla JavaScript - No framework needed
Report Generation
html/template- Go template engineembedpackage - Embedded template files- Zero external dependencies at runtime
Key Features Explained
1. Auto-Detecting Registry Reader
Automatically handles all Windows registry value types:
// Tries in order: String β Multi-String β Integer β Binary
value, err := reader.ReadValue(ctx, rootKey, path, valueName)
2. Dynamic Report Loading
Reports are auto-discovered from configs/reports/*.json:
# Add a new report:
1. Create new JSON file in configs/reports/
2. Restart ComplianceToolkit.exe
3. New report appears in menu automatically!
3. Expected vs Actual Values
Every compliance check shows what's required:
Expected Value: 1 (Enabled)
Actual Value: 0
Status: β FAIL
4. Template-Based Architecture
HTML separated from Go code: - Easy customization without recompiling - Component-based design - CSS variables for theming - Embedded at build time
5. Evidence Logging
Compliance audit trail in JSON format:
{
"scan_metadata": { ... },
"machine_info": { ... },
"scan_results": [ ... ],
"compliance_summary": {
"total_checks": 35,
"passed": 28,
"failed": 7,
"compliance_rate": 80.0
}
}
Build & Deploy
Build Command
go build -o ComplianceToolkit.exe ./cmd/toolkit.go
Deployment
- Single Executable: All templates embedded
- Size: ~6-8 MB
- Requirements: Windows 10/11, Server 2016+
- Permissions: Requires read access to registry
- No Installation: Portable executable
Output Structure
output/
βββ reports/ # HTML compliance reports
βββ evidence/ # JSON audit logs
βββ logs/ # Application logs (JSON)
How to Add New Reports
Quick Method (JSON Only)
- Create
configs/reports/my_report.json - Add metadata section with title, version, compliance
- Define registry queries with expected values
- Rebuild:
go build -o ComplianceToolkit.exe ./cmd/toolkit.go - Report appears in menu automatically!
See ADDING_NEW_REPORTS.md for full guide.
Configuration Format
Report JSON Structure
{
"version": "1.0",
"metadata": {
"report_title": "My Compliance Report",
"report_version": "1.0.0",
"author": "Compliance Toolkit",
"description": "Description here",
"category": "Security & Compliance",
"last_updated": "2025-01-04",
"compliance": "Framework Name"
},
"queries": [
{
"name": "check_name",
"description": "Human readable description",
"root_key": "HKLM",
"path": "SYSTEM\\Path\\To\\Key",
"value_name": "ValueName",
"operation": "read",
"expected_value": "1 (Enabled)"
}
]
}
Usage Examples
Interactive Mode
Run Compliance Report
- Launch
ComplianceToolkit.exe - Select
[1] Run Reports - Choose report (e.g.,
[1] FIPS 140-2 Compliance) - Review results
View Generated Report
- Select
[2] View HTML Reports - Choose report from list
- Opens in default browser
View Evidence Logs
- Select
[3] View Evidence Logs - Choose evidence log from list
- Opens in default text/JSON editor
Non-Interactive Mode (CLI) - NEW in v1.1.0
List Available Reports
ComplianceToolkit.exe -list
Run Single Report
ComplianceToolkit.exe -report=NIST_800_171_compliance.json
Run All Reports (Scheduled Task)
ComplianceToolkit.exe -report=all -quiet
Custom Output Directory
ComplianceToolkit.exe -report=all -output=C:\Compliance\Reports -quiet
For complete CLI documentation, see: CLI_USAGE.md
Recent Updates
v1.1.0 - CLI & Automation Support (2025-01-04)
- β Added CLI flags for non-interactive execution
- β
Implemented
-listflag to list available reports - β
Implemented
-reportflag to run specific or all reports - β
Added
-quietmode for scheduled tasks - β
Added custom directory flags (
-output,-evidence,-logs) - β Implemented proper exit codes for monitoring
- β Created example batch script for Windows Task Scheduler
- β Created advanced PowerShell script with archiving and email
- β Documented CLI usage in CLI_USAGE.md
- β Added examples directory with automation scripts
- β Updated report titles to include "Compliance Toolkit" branding
- β Improved header template formatting (fixed alignment issues)
- β Implemented smart path resolution for deployment
- β Created comprehensive installation guide (INSTALLATION.md)
- β Executable now finds configs relative to its location
- β Fixed dark mode contrast issues (text visibility)
- β Improved dark mode header styling for consistency
v1.0.0 - Initial Release (2025-01-04)
- β Fixed registry value type detection (added REG_MULTI_SZ support)
- β Added expected values to all compliance reports
- β Created FIPS 140-2 compliance report (35 checks)
- β Separated evidence logs to dedicated directory
- β Fixed file opening for logs and evidence
- β Updated HTML templates to show Expected vs Actual values
- β Added NIST 800-171 expected values
- β Improved template architecture with Bulma CSS
- β Added Chart.js for interactive visualizations
- β Implemented dark mode with toggle
Known Issues & Limitations
Current Limitations
- Windows Only - Uses Windows-specific registry APIs
- Read-Only - No registry writing capability (by design for safety)
- Local Execution - No remote registry scanning
- Manual Evidence Review - No automated pass/fail determination
Non-Issues (By Design)
- Some registry keys may not exist (this is normal and expected)
- "Not found" can be compliant if expected value allows it
- Requires manual interpretation for some checks
Performance Metrics
- Registry Read: ~1-5ms per value
- Report Generation: <100ms for typical reports
- HTML File Size: 50-200 KB
- Evidence Log Size: 10-50 KB
- Scan Time: 1-3 seconds for 35-check report
Future Enhancements
Completed in v1.1.0
- [x] CLI mode for automation - Fully implemented
- [x] Scheduled task support - Example scripts provided
- [x] Quiet mode - For unattended execution
Potential Future Features
- [ ] Remote registry scanning
- [ ] Email report delivery (built into scripts, not exe)
- [ ] Excel/CSV export
- [ ] Native PDF generation (without print dialog)
- [ ] Multi-machine comparison reports
- [ ] Custom color themes
- [ ] Automated remediation suggestions
- [ ] REST API for integration
- [ ] PowerShell module wrapper
- [ ] Compliance trending dashboard
- [ ] Alerting/notifications engine
Testing Checklist
Core Functionality
- [x] Read REG_SZ values
- [x] Read REG_MULTI_SZ values
- [x] Read REG_DWORD values
- [x] Read REG_QWORD values
- [x] Read REG_BINARY values
- [x] Handle missing keys/values gracefully
- [x] Context timeout works
- [x] Batch operations work
Reports
- [x] FIPS 140-2 generates successfully
- [x] NIST 800-171 generates successfully
- [x] System Info generates successfully
- [x] All reports show expected values
- [x] Charts render correctly
- [x] Dark mode toggles properly
- [x] Print layout is clean
- [x] Search/filter/sort work
CLI - Interactive Mode
- [x] Menu navigation works
- [x] Reports auto-discovered
- [x] HTML reports open in browser
- [x] Evidence logs open in editor
- [x] Application logs open
CLI - Non-Interactive Mode (v1.1.0)
- [x]
-listflag works - [x]
-report=<name>runs single report - [x]
-report=allruns all reports - [x]
-quietmode suppresses output - [x] Custom output directories work
- [x] Exit codes are correct (0=success, 1=failure)
- [x] Scheduled task execution tested
Documentation
Available Guides
- CLAUDE.md - Codebase overview for AI assistants
- TEMPLATE_SYSTEM.md - Technical template documentation
- TEMPLATE_QUICK_START.md - 60-second template guide
- ADDING_NEW_REPORTS.md - Complete guide to adding reports
- QUICK_REFERENCE.md - Quick start for new reports
- EVIDENCE_LOGGING.md - Evidence log documentation
- COMPLIANCE_EVIDENCE_QUICKSTART.md - Quick evidence guide
- EXECUTIVE_REPORTS.md - C-level report features
- MODERNIZATION_SUMMARY.md - HTML modernization details
- IMPROVEMENTS.md - Technical improvements log
- CLI_USAGE.md - CLI and automation guide (NEW v1.1.0)
- PROJECT_STATUS.md - This document
Example Scripts (NEW v1.1.0)
Located in examples/ directory:
1. scheduled_compliance_scan.bat - Basic Windows batch script
2. scheduled_compliance_scan.ps1 - Advanced PowerShell script with archiving
3. README.md - Example script documentation
Support & Maintenance
Version Control
- Current state represents a stable snapshot
- All templates embedded in binary
- JSON configs can be updated without recompile (for new instances)
Backup Current State
To preserve current working version:
# Backup the executable
copy ComplianceToolkit.exe ComplianceToolkit_v1.1.0.exe
# Backup configs
xcopy configs configs_backup\ /E /I
# Backup templates
xcopy templates templates_backup\ /E /I
xcopy pkg\templates pkg\templates_backup\ /E /I
Contact & Contributing
Project Information
- Project Type: Internal Compliance Tool
- Language: Go 1.24.0
- License: Internal Use
- Maintained By: Compliance Toolkit Team
Summary
The Compliance Toolkit is production-ready with: - β Full registry reading capability (all types) - β Modern HTML reports (Bulma + Chart.js) - β Complete compliance frameworks (NIST, FIPS) - β Evidence logging for audits - β Professional UI suitable for C-level presentations - β Easy extensibility via JSON configs - β Zero runtime dependencies - β Comprehensive documentation - β CLI automation support (NEW v1.1.0) - β Scheduled task ready (NEW v1.1.0)
Next Steps:
1. Interactive Use: Run ComplianceToolkit.exe and explore the menu
2. Scheduled Scans: Use ComplianceToolkit.exe -report=all -quiet in Task Scheduler
3. Automation: Review example scripts in examples/ directory
4. Documentation: See CLI_USAGE.md for complete CLI guide
Document Version: 1.1.0 Last Updated: 2025-01-05 Status: Production Ready with CLI Automation & Comprehensive Documentation