Securely wipe state.db on exit (#216)
- Add secure_wipe_file() to utils/crypto.py for file overwrites + deletion - Add secure_wipe parameter to StateManager.stop() method - Wipes all SQLite WAL files (.db, .db-wal, .db-shm) with 3 passes - Normal exit now calls state.stop(secure_wipe=True) to clear state database - Falls back to regular delete if secure wipe fails - Prevents state.db from persisting on disk after shutdown
This commit is contained in:
+1
-1
@@ -244,7 +244,7 @@ def start(daemon, passive_only):
|
||||
res_mon.stop()
|
||||
engine.stop_all()
|
||||
tool_manager.stop_all()
|
||||
state.stop()
|
||||
state.stop(secure_wipe=True)
|
||||
bus.stop()
|
||||
console.print("[green]SystemMonitor stopped.[/green]")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user