Originally created by: fu351
Doberman's host hooks are registered by editing the agent's settings file, and nothing today records what was installed or notices when it changes. An agent (or anything else) that strips those entries silently removes Doberman from its own execution path.
Build
.doberman/install-manifest.json, written by install-hooks: which settings file, scope, and a keyed HMAC fingerprint of the installed hook groups (reuse the existing fingerprint helper; never a plain hash).uninstall-hooks clears the manifest first: an absent manifest means silence is intentional and no alarm fires.doberman doctor reports manifest status: intact, diverged (naming the group), or absent.Tests must prove: removing any one hook group is detected at the next sibling invocation; a legitimate uninstall raises no alarm; the integrity check can never crash or block hook execution (it degrades to a warning); no absolute user paths or secrets appear in the manifest or logs.
Prior art: Cisco DefenseClaw's hook-config guard. This issue covers detection + doctor; a warm-daemon watcher that re-asserts the installation lands separately once the ambient monitor daemon (#237) exists.
Ticket changed by: fu351
Ticket changed by: fu351
Originally posted by: fu351
Design notes for when this gets built, from reading
core/integrity.pyin WayneCider/YourOwnPersonalJean-Luc (Apache-2.0), which implements the same idea for its own install:.pyfiles absent from the manifest. Tampering by addition is invisible to a hash-only check.hmac.compare_digest, salt + iteration count stored in the manifest.getpass) at every verify — that would hang a headless hook start. Ours should use the existing keyring /0600HMAC key we already use for fingerprints.