How theusererr0r/deadbolt works
Deadbolt is a local control plane for human-approved, time-limited privileged actions. Hermes submits a structured request to the unprivileged bot, which relays it to the root executor; the executor validates it against root-owned policy, records it, and presents an approval card through Discord. After approval, the executor applies a fixed action and tracks expiry or rollback. Separate operator capabilities cover emergency stop and recovery, and approved body-capture exclusions. The README documents the external integrations; source excerpts establish key validation, persistence, and protocol responsibilities, but not every runtime call.
Main entry points: executor.py Root executor · actions.py Privileged actions · bot.py Bot relay · emergency_restore.py Boot-time restore
Components 16
Request and approval
- Bot relay
src/deadbolt/bot.py - Socket protocol
src/deadbolt/protocol.py
Policy and actions
- Root executor
src/deadbolt/executor.py - Policy configuration
src/deadbolt/config.py - Privileged actions
src/deadbolt/actions.py - Capture helper
- UFW firewall
- Exclusion matcher
src/deadbolt/exclusion_match.py - Capture expiry timer
systemd/hermes-body-capture-expiry.timer
State and audit
- Request and emergency state
src/deadbolt/store.py - Audit log
src/deadbolt/store.py
Emergency controls
- Emergency nftables block
- Boot-time restore
src/deadbolt/emergency_restore.py
Other components
- Hermes agent
- Discord operator
- Hermes TLS proxy
Connections 16
- Hermes agent → Bot relay: submits request
README.md - Bot relay → Root executor: relays request
README.md - Discord operator → Bot relay: approves or denies
README.md - Bot relay → Socket protocol: uses socket RPC
src/deadbolt/bot.py - Root executor → Socket protocol: serves socket RPC
src/deadbolt/executor.py - Root executor → Policy configuration: validates policy
src/deadbolt/executor.py - Root executor → Privileged actions: validates and applies
src/deadbolt/executor.py - Root executor → Request and emergency state: tracks requests
src/deadbolt/executor.py - Root executor → Audit log: records events
README.md - Privileged actions → UFW firewall: applies firewall rules
README.md - Privileged actions → Capture helper: runs fixed helper
README.md - Privileged actions → Exclusion matcher: updates exclusions
README.md - Hermes TLS proxy → Exclusion matcher: checks equivalent logic
src/deadbolt/exclusion_match.py - Boot-time restore → Request and emergency state: reads emergency state
src/deadbolt/emergency_restore.py - Boot-time restore → Privileged actions: enforces block
src/deadbolt/emergency_restore.py - Privileged actions → Emergency nftables block: installs emergency block
README.md