Author: Adrian Johnson adrian207@gmail.com
This platform delivers automated Mac OS endpoint hardening through risk-based device posture assessment, real-time telemetry collection, and automated security workflow orchestration. The solution integrates device signals with network and identity controls to enable Zero Trust security with measurable risk reduction.
Device Security Posture Management
- Continuous Mac OS endpoint telemetry collection and risk scoring
- Automated compliance validation against security baselines
- Real-time device health monitoring and threat detection
Risk-Based Automation
- Automated access resets triggered by device risk signals
- Forced re-authentication workflows for high-risk devices
- Dynamic policy enforcement based on device posture
Security Tool Integration
- Kandji endpoint management platform integration
- Zscaler network security enforcement
- Seraphic browser security controls
- Extensible connector framework for additional tools
Zero Trust Implementation
- Device-centric access controls
- Continuous trust verification
- Network segmentation based on device risk
- Identity-aware security policies
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Mac OS Endpoints β
β (Telemetry Agents Installed) β
βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Telemetry Collection Layer β
β (Device Signals, Security Events, Compliance Data) β
βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Risk Assessment Engine β
β (Scoring, Analytics, Threat Detection) β
βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Workflow Orchestration Engine β
β (Automated Response, Policy Enforcement) β
βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββΌββββββββββββββββ
βΌ βΌ βΌ
ββββββββ βββββββββββ ββββββββββββ
βKandjiβ βZscaler β βSeraphic β
β MDM β βNetwork β βBrowser β
ββββββββ βββββββββββ ββββββββββββ
Core Services
core/- Configuration, logging, and shared utilitiestelemetry/- Device data collection and aggregationrisk_engine/- Risk scoring and assessment logicworkflows/- Automated security response orchestrationintegrations/- Security tool API connectors
Security Modules
hardening/- Mac OS baseline configurations and policiesenforcement/- Policy deployment and validationmonitoring/- Analytics, alerting, and dashboards
- Python 3.10 or higher
- Mac OS endpoints with administrative access
- API credentials for integrated security tools
- PostgreSQL or compatible database
# Clone the repository
git clone <repository-url>
cd Mac-Hardening
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp config/config.example.yaml config/config.yaml
# Edit config.yaml with your credentials and settings
# Initialize database and run migrations
python scripts/init_database.py
python scripts/migrate.py upgrade
# Run initial setup
python scripts/setup.pyEdit config/config.yaml to configure:
- Security tool API credentials (Kandji, Zscaler, Seraphic)
- Risk scoring thresholds and policies
- Workflow automation rules
- Alert and notification settings
- Database connection parameters
# Start the main service
python main.py
# Run in background with logging
nohup python main.py > logs/platform.log 2>&1 &
# Use Docker (recommended for production)
docker-compose up -dThe platform calculates device risk scores (0-100) based on:
Security Posture Factors (40%)
- OS version and patch level
- Security tool installation and health
- Firewall and encryption status
- Authentication configuration
Compliance Factors (30%)
- Policy adherence
- Configuration drift
- Required software presence
- Certificate validity
Behavioral Factors (20%)
- Access patterns and anomalies
- Network connections
- Login attempts and failures
- File system changes
Threat Indicators (10%)
- Malware detections
- Suspicious processes
- Network threats
- Vulnerability exposure
trigger: device_risk_score > 75
actions:
- Reset network access tokens (Zscaler)
- Force MFA re-authentication
- Isolate device to quarantine network
- Alert security operations team
- Create incident tickettrigger: compliance_violations > 3
actions:
- Deploy corrective policies (Kandji)
- Restrict network access
- Send user notification
- Schedule compliance review
- Escalate if unresolved after 24htrigger: new_device_connection
actions:
- Verify device enrollment status
- Validate security posture
- Apply conditional access policies
- Grant appropriate network access
- Enable continuous monitoring- Device enrollment and inventory management
- Policy and configuration deployment
- Software distribution and updates
- Compliance reporting and remediation
- Zero Trust Network Access (ZTNA) enforcement
- Access token management and revocation
- Network policy application based on device risk
- Traffic inspection and threat prevention
- Browser-based threat protection
- Data loss prevention controls
- Malicious site blocking
- Session isolation and control
The platform includes 4 pre-built Grafana dashboards for comprehensive monitoring:
π Device Risk Overview
- Real-time device risk scores and trends
- Risk level distribution across your fleet
- Top high-risk devices requiring attention
- Risk factor analysis by category
β Compliance Monitoring
- Overall compliance posture tracking
- Policy violation detection and trending
- Compliance score monitoring by device
- Critical violation alerting
β‘ System Health & Performance
- API performance metrics (latency, throughput)
- Database query performance
- System resource utilization
- Integration health monitoring
π Security Events & Threats
- Real-time security event tracking
- Threat indicator detection
- Alert monitoring by severity
- Security incident visualization
Quick Setup:
# Import dashboards into your Grafana instance
# See grafana/README.md for detailed instructionsFor complete setup instructions and dashboard documentation, see grafana/README.md.
- High-risk device alerts
- Compliance violations
- Security event notifications
- Workflow execution status
- Executive security summaries
- Risk reduction metrics
- Compliance audit reports
- Incident post-mortems
Device Trust Verification
- Continuous posture assessment
- Dynamic trust scoring
- Adaptive access controls
- Real-time policy enforcement
Network Segmentation
- Risk-based network zones
- Micro-segmentation policies
- Least privilege access
- Automatic isolation of compromised devices
Identity Integration
- Device-to-identity binding
- Conditional access policies
- Step-up authentication triggers
- Session management
- Deploy on AWS, Azure, or GCP
- Managed database and services
- Auto-scaling capabilities
- High availability configuration
- Deploy on internal infrastructure
- Direct integration with existing systems
- Full data control
- Custom network architecture
- Central cloud management
- Regional on-premises agents
- Distributed telemetry collection
- Centralized analytics and reporting
Data Protection
- Encrypted data in transit (TLS 1.3)
- Encrypted data at rest (AES-256)
- API authentication and authorization
- Audit logging of all actions
Compliance Frameworks
- NIST Cybersecurity Framework alignment
- CIS Mac OS benchmarks
- ISO 27001 controls
- SOC 2 compliance support
The platform uses Alembic for automated database schema migrations, enabling seamless upgrades between versions.
# Check current database version
python scripts/migrate.py current
# Apply all pending migrations
python scripts/migrate.py upgrade
# Create a new migration (after model changes)
python scripts/migrate.py create -m "Add new field"
# Rollback last migration
python scripts/migrate.py downgrade
# View migration history
python scripts/migrate.py history- Automated Schema Evolution - Safe database upgrades across versions
- Version Control - All schema changes tracked in code
- Rollback Support - Downgrade to previous versions if needed
- Auto-generation - Detect model changes automatically
- Production Ready - Supports offline SQL generation for DBA review
For complete migration guide, see docs/DATABASE_MIGRATIONS.md.
Telemetry Collection Failures
- Verify agent installation on endpoints
- Check network connectivity and firewall rules
- Validate API credentials
- Review agent logs in
/var/log/zerotrust-agent/
Integration Connection Errors
- Confirm API credentials are current
- Check service endpoint URLs
- Verify network access to external services
- Test API connectivity with diagnostic tools
Workflow Not Triggering
- Review workflow conditions and thresholds
- Check risk scoring calculations
- Verify workflow is enabled
- Examine orchestration engine logs
- Automated Database Migration System - Seamless database schema updates (Alembic-based)
- Pre-built Grafana Dashboards - Ready-to-use monitoring dashboards (4 dashboards available)
- Telemetry Agent Installer - Simplified agent deployment to endpoints (Hybrid Munki integration)
- Advanced Behavioral Analytics & Anomaly Detection - ML/statistical threat detection with baseline profiling
- SIEM Integration - Splunk, Elastic Stack, Syslog/CEF connectors with batching and retry
- Additional Integration Connectors - Kandji, Zscaler, Seraphic, Okta, CrowdStrike integrations
- Mobile App for Alerts - iOS/Android app for security notifications
- Custom Policy Builder - Web UI for creating custom compliance policies
- Automated Remediation Workflows - Self-healing security controls
- Enhanced Reporting & Analytics - Executive dashboards, compliance reports, automated scheduling, email delivery
- Multi-platform Support - Windows and Linux endpoint support
Current Status: v1.0.0 GA (Production Ready) π
Release Date: October 29, 2025
Next Milestone: v1.1 (Multi-Platform Support)
See release notes:
RELEASE_NOTES_v1.0.md- v1.0 GA (Production Ready) πRELEASE_NOTES_v0.9.7.md- Security Tool IntegrationsRELEASE_NOTES_v0.9.6.md- SIEM IntegrationRELEASE_NOTES_v0.9.5.md- Behavioral Analytics & Anomaly DetectionRELEASE_NOTES_v0.9.4.md- Enhanced Reporting & AnalyticsRELEASE_NOTES_v0.9.3.md- Telemetry Agent InstallerRELEASE_NOTES_v0.9.2.md- Automated Database MigrationsRELEASE_NOTES_v0.9.1.md- Grafana DashboardsRELEASE_NOTES_v0.9.0.md- Initial Beta Release
Contributions are welcome. Please follow secure coding practices and include tests for new features.
For issues, questions, or feature requests, please contact: Adrian Johnson adrian207@gmail.com
[Specify your license here]
Platform Version: 1.0.0 GA π
Last Updated: October 29, 2025
Author: Adrian Johnson adrian207@gmail.com