Automated remediation service with comprehensive monitoring, analytics, and policy enforcement. When Lachesis detects entropy above threshold, Atropos executes the "cut" - isolate, pause, or reset the offending node.
Named after the Greek Fate who cuts the thread of life. This one cuts network tunnels and reverts snapshots.
go mod tidy
go build# start with default policy
./atropos
# custom policy file
./atropos -policy /etc/atropos/policy.yaml
# custom history directory
./atropos -history-dir /var/lib/atropos/history
# with HMAC secret (recommended)
ATROPOS_HMAC_SECRET=your-secret ./atroposDefault port is :8443.
- Execute automated cuts based on entropy thresholds
- Strategy escalation on critical action failure
- Support for Docker, VirtualBox, and SSH-based cuts
- Dry-run simulation for policy testing
- Persistent cut history with gzip compression
- Automatic history retention (configurable)
- Cut record includes: timestamp, entropy, action, latency, success, error details
- Success/failure rates by node and action
- Mean Time To Remediation (MTTR) calculation
- Problematic node identification
- Timeline view of cut events
- Most frequently used actions
- Real-time statistics overview
- Node-level metrics and trends
- Cut history with filtering
- Built-in dry-run testing interface
- Responsive design with dark mode
- Time Windows: Only execute cuts during specified hours
- Rate Limiting: Limit cuts per time period
- Conditional Actions: Define fallback strategies on failure
- Escalation: Automatic escalation to higher thresholds on critical failure
- CSV export of cut history
- JSON export for programmatic access
- HTML report generation with statistics and breakdowns
- Import Clotho audit reports
- Correlate audit failures with remediation actions
- Track remediation effectiveness
- Identify controls that trigger most cuts
- View unresolved findings
- Email alerts on cut execution
- Webhook notifications with custom headers
- Support for multiple notification channels
- Retry logic with configurable attempts
Edit atropos_policy.yaml:
meta:
version: "1.0"
last_reviewed: "2026-01-14"
server:
listen_addr: ":8443"
hmac_secret: "change-me-in-prod"
nodes:
athena:
host: "athena.local"
port: 22
user: "root"
description: "Primary application server"
# Only cut during business hours
time_windows:
- start: "09:00"
end: "17:00"
# Rate limit: max 3 cuts per hour
rate_limit:
max_cuts: 3
window_minutes: 60
strategies:
# High entropy: revert VM
- threshold: 0.85
action: vbox_revert_snapshot
snapshot_name: "LAST_ORDERED_STATE"
critical: true
# On failure, try network isolation
on_failure: "ssh_isolate_network"
# Medium entropy: pause containers
- threshold: 0.70
action: docker_pause_all
borg:
host: "borg.local"
port: 22
user: "root"
description: "Message broker / API gateway"
strategies:
- threshold: 0.90
action: ssh_isolate_network
command: "systemctl stop wireguard@wg0"
critical: true
- threshold: 0.75
action: docker_stop_allRestrict cuts to specific time windows:
nodes:
production:
time_windows:
- start: "09:00"
end: "17:00" # Business hours only
- start: "00:00"
end: "04:00" # Allow maintenance windowLimit the frequency of cuts per node:
nodes:
critical:
rate_limit:
max_cuts: 5
window_minutes: 60 # Max 5 cuts per hourDefine fallback strategies when primary action fails:
strategies:
- threshold: 0.85
action: vbox_revert_snapshot
on_failure: "ssh_isolate_network" # Fallback if VM revert failsLachesis sends entropy alerts:
PAYLOAD='{"node":"athena","entropy":0.87}'
SIG=$(echo -n "$PAYLOAD" | openssl dgst -sha256 -hmac "your-secret" | cut -d' ' -f2)
curl -X POST http://localhost:8443/api/v1/cut \
-H "Content-Type: application/json" \
-H "X-Lachesis-Signature: sha256=$SIG" \
-d "$PAYLOAD"POST /api/v1/cut- Execute cut (requires HMAC signature)POST /api/v1/cut/dryrun- Simulate cut without execution
GET /api/v1/cuts/history?limit=100- List all cutsGET /api/v1/cuts/history/:node?limit=100- List cuts for specific nodeGET /api/v1/cuts/:id- Get specific cut detailsGET /api/v1/stats- Global statisticsGET /api/v1/stats/:node- Node-level statistics
GET /api/v1/trends?days=30- Global trends (default: 30 days)GET /api/v1/trends/:node- Node-specific trends
POST /api/v1/correlation/import- Import Clotho audit reportGET /api/v1/correlation/:node?hours=24- Get correlations
GET /api/v1/export/history.csv?limit=1000- Export CSVGET /api/v1/export/history.json?limit=1000- Export JSONGET /api/v1/export/report.html?limit=1000- Generate HTML report
GET /or/dashboard- Web dashboardGET /static/index.html- Direct dashboard access
Notifications can be configured via environment variables or config file:
# atropos_notification.yaml
enabled: true
email:
smtp_host: "smtp.example.com"
smtp_port: 587
smtp_user: "alerts@example.com"
smtp_password: "password"
from: "atropos@example.com"
to:
- "admin@example.com"
- "ops@example.com"enabled: true
webhook:
url: "https://hooks.example.com/atropos"
headers:
Authorization: "Bearer token123"
X-Custom-Header: "value"
retries: 3Set environment variable:
ATROPOS_NOTIFICATIONS_CONFIG=/path/to/config.yaml ./atroposImport Clotho audit reports to correlate failures with remediation:
# Import audit report
curl -X POST http://localhost:8443/api/v1/correlation/import \
-H "Content-Type: application/json" \
-d @clotho_audit_report.json
# Get correlations
curl http://localhost:8443/api/v1/correlation/athena?hours=24Response includes:
- Effectiveness percentage
- Number of resolved findings
- Unresolved findings
- Controls triggering most cuts
- Time deltas between failures and remediation
Access the web dashboard at http://localhost:8443/:
Features:
- Real-time statistics (total cuts, success rate, failed cuts, problematic nodes)
- Node breakdown with success rates and common actions
- Recent cut history
- Trend analysis visualization
- Dry-run testing interface
- Auto-refresh every 30 seconds
| Action | What it does |
|---|---|
docker_pause_all |
Pause all containers |
docker_stop_all |
Stop all containers |
docker_kill_all |
Kill all containers |
ssh_isolate_network |
Run command via SSH (e.g., kill WireGuard) |
vbox_revert_snapshot |
Revert VM to snapshot |
vbox_poweroff |
Power off VM |
MIT