Hook approvals & integrity
muster runs shell scripts with your credentials, so it checks that the code it runs is the code you approved.
What is checked
| Layer | Protects against |
|---|---|
Hook approvals | A hook, muster.json or .env changed (by a pull, a teammate or an attacker) and running unreviewed on this machine. |
Dangerous-command scan | Hooks that wipe disks, pipe downloads into a shell or open listeners. |
muster's own files | A modified muster installation. |
Fleet payload signing | Tampered hooks or configs pushed to fleet servers. |
Deploy trust | Unknown machines deploying to a server. |
Hook approvals
Each machine approves a project's hooks before they run, and again whenever one changes. Deploy, rollback and restart stop at an unapproved file. In a terminal they offer to show the diff and approve; in CI pass --yes or set MUSTER_APPROVE_HOOKS=1.
muster hooks status # approval state of every hook, muster.json and .env
muster hooks approve api # review the diff and approve on this machine
muster hooks approve --yes # approve without a prompt (CI)Approvals live outside the repo, in ~/.muster/trust/<sha256 of the project path>/: a manifest of file hashes, its HMAC signature (key in ~/.muster/.hook_signing_key) and approved copies of each file for diffs. Nothing is committed, so a pushed change can't approve itself. Older versions kept the manifest in .muster/hooks.manifest; it is migrated the first time a project is opened.
Read-only hooks
muster hooks lock [svc] sets hooks to mode 555; unlock sets 755 again (it asks for sudo). Turning hook security off in muster settings also needs sudo.
Dangerous-command scan
Before a hook runs, muster scans it for these patterns and blocks it on a match:
rm -rf / rm -rf /* rm -rf ~ rm -rf $HOME
mkfs dd if= > /dev/sd… > /dev/nvme…
curl … | bash curl … | sh wget … | bash wget … | sh
chmod 777 nc -l ncat -lmuster's own files
After install and every update, muster writes .muster.manifest (SHA-256 of its entry points, libraries, templates and installer) into its install folder, signed as .muster.manifest.sig (Ed25519, or RSA on older OpenSSL). On every start it verifies the signature with openssl, hash-checks its verification code before loading it, then checks the rest. Changed files are listed with an offer to restore them.
muster verify # re-hash every file
muster verify --quick # signature only
muster --no-verify … # skip the startup check onceFleet payload signing
With muster settings --global signing on, the control machine signs the hooks and configs it pushes; servers verify them against trusted public keys before running anything. Set require_signing on on a server to refuse unsigned payloads.
muster fleet keygen # Ed25519 keypair (RSA-2048 fallback)
muster fleet trust-key prod-1 # install your public key on a server
muster fleet list-keys prod-1
muster fleet revoke-key prod-1 --label laptopKeys live in ~/.muster/fleet/keys/ (private key mode 600); servers keep trusted keys in ~/.muster/fleet/authorized_keys/.
Deploy trust
When another machine adds this server to a group with muster group add, a trust request is created here. Deploys are allowed only after you accept it with muster trust.
muster trust requests
muster trust accept 1
muster trust revoke 1