feat(monitoringV2): minter-guard auto-deny watcher#33
Merged
Conversation
…ed minters A new MinterGuardService runs after syncMinters() each cycle. For any PROPOSED minter that is not on a committed whitelist (initially empty), it submits denyMinter() within the application period using a signer fetched from Vaultwarden at container start. Bridge proposals are not exempted because the bridge type is inferred from a trivial usd() check. The signing key is loaded by entrypoint.sh via bw CLI using the vault-password file and a per-container copy of the bw appdata dir mounted from the host. The key only ever lives in container memory. Whitelisted exceptions are added via PR + redeploy. GUARD_ENABLED=false disables the watcher entirely without removing the service from the module graph.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MinterGuardServicethat runs aftersyncMinters()each monitoring cyclePROPOSEDminter not on a committed whitelist (whitelist.{testnet,mainnet}.json, both empty initially), submitsdenyMinter()within the application period using a signer fetched from Vaultwarden at container startusd()view call and is therefore unsafe to exemptGUARD_ENABLED=falsedisables the watcher entirelySigning key handling
entrypoint.shusesbwCLI (newly added to the image) to fetchGUARD_PRIVATE_KEYfrom Vaultwarden on every container start/run/secrets/vault-password)bw sync/bw unlockwork without races between containersTest plan
MinterGuardServicelogsENABLEDwith the expected signer address for bothjdt-monitoringandjdm-monitoringsuggestMinter()from a non-whitelisted address → expectdenyMinter()within one sync cycle, Telegram alert deliveredAPPROVEDin DB) is NOT deniedGUARD_PRIVATE_KEYleaks into logs