SEC-B09: governance emergency multisig rehearsal runbook and LocalTerra dry-run (#397) #927
No reviewers
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic!927
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-397-governance-emergency-rehearsal"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements SEC-B09 (#397): governance emergency controls must be rehearsed from the actual planned multisig signing flow, not only local
test1deploy keys.This MR adds:
docs/runbooks/governance-emergency-rehearsal.md— scope (pause → blacklist → unpause → unblacklist), Cosmos multisign flow, evidence workflowdocs/templates/governance-emergency-rehearsal-evidence.mdfor launch-issue sign-offscripts/rehearse-governance-emergency-controls.sh— 2-of-3terrad tx multisignrehearsal with on-chain verification and transcript outputskills/AGENTS_GOVERNANCE_EMERGENCY_REHEARSAL.mdmake check-governance-emergency-rehearsal-docs+make verify-issue-397LocalTerra rehearsal proves message shapes and threshold signing; production launch still requires operators to repeat from the planned production multisig on testnet/staging and attach tx hashes to the launch tracking issue (#391).
Acceptance checklist
./scripts/rehearse-governance-emergency-controls.sh(2-of-3terrad tx sign+multisign)is_paused+blacklist_check--output /tmp/sec-b09.mdtranscript table with tx hashesnetwork=localterrain transcriptdocs/runbooks/launch-checklist.mdlinks runbook +make verify-issue-397Verification checklist (third parties)
Expected: all doc checks PASS; with chain up, LocalTerra multisig rehearsal PASS and transcript lists four emergency operations with tx hashes.
Follow-ups
Related to #397
Security review — MR !927
Commit reviewed:
3493333f254e4899a541233494478a36ffa54261Scope: SEC-B09 governance emergency multisig rehearsal — runbook/docs/templates,
scripts/rehearse-governance-emergency-controls.sh,scripts/lib/terrad-multisig-tx.sh,scripts/qa/verify-issue-397.sh,scripts/check_governance_emergency_rehearsal_docs.py, Makefile targets, agent skill cross-links.Outcome:
FINDINGS: 0medium+Inline threads: None (no medium+ findings).
Review notes
Reviewed all added/modified code for injection, authn/authz bypass, secret leakage, SSRF, path traversal, and supply-chain risk. This MR adds operator runbooks, a LocalTerra-only multisig dry-run script, and doc/CI regression checks. No production dApp, indexer API, or CosmWasm contract logic changes.
terrad-multisig-tx.sh: Arguments are interpolated intodocker exec sh -cwith single-quote wrapping. A crafted env value (e.g.BLACKLIST_TARGETcontaining') could break quoting, but the script is operator-local, requires thelocalterracompose container, and execution stays inside that dev container — not a plausible remote or CI attacker path at medium+ severity.test1: Intentional for LocalTerra rehearsal; script hard-requires thelocalterradocker service and documents that production sign-off needs a separate testnet/staging run.--no-backupin the test keyring; transcript output is addresses and tx hashes only.Security review: no medium+ findings on this diff.
added 7 commits
mainaf1e6156- Merge origin/main into issue-397-governance-emergency-rehearsal.Compare with previous version
Resolved merge conflicts with
mainby mergingorigin/mainintoissue-397-governance-emergency-rehearsal.Conflicts resolved:
Makefile— kept SEC-B09 targets (check-governance-emergency-rehearsal-docs,rehearse-governance-emergency,verify-issue-397) alongside main's SEC-B12 blacklist decision targets (check-blacklist-decision-docs,verify-issue-400); updated.PHONY,lint, andhelp.docs/testing.md— added both CI reference rows (docs-governance-emergency-rehearsalanddocs-blacklist-decision).Sanity checks:
make check-governance-emergency-rehearsal-docsandmake check-blacklist-decision-docsboth PASS.Security review — MR !927
Commit reviewed:
af1e61564a33c2bde42c06861854f455ef15ea51Scope: SEC-B09 governance emergency multisig rehearsal — runbook/docs/templates,
scripts/rehearse-governance-emergency-controls.sh,scripts/lib/terrad-multisig-tx.sh,scripts/qa/verify-issue-397.sh,scripts/check_governance_emergency_rehearsal_docs.py, Makefile targets, agent skill cross-links. Re-reviewed after merge oforigin/main(conflict resolution inMakefile/docs/testing.mdonly; no new SEC-B09 logic).Outcome:
FINDINGS: 0medium+Inline threads: None (no medium+ findings).
Review notes
Traced attacker-controlled inputs through the added shell paths (
docker exec sh -c, LCD smart queries,--output, env overrides). This MR adds operator runbooks, a LocalTerra-only multisig dry-run script, and doc/CI regression checks. No production dApp, indexer API, or CosmWasm contract logic changes.terrad-multisig-tx.sh: Arguments are interpolated intodocker exec sh -cwith single-quote wrapping. A crafted env value containing'could break quoting, but inputs are operator-local defaults or bech32 addresses from deploy/LCD; execution stays inside thelocalterracompose container — not a plausible remote or CI attacker path at medium+ severity.test1: Intentional for LocalTerra rehearsal; script hard-requires thelocalterradocker service and documents that production sign-off needs a separate testnet/staging run from the planned multisig.--no-backupin the test keyring; transcript output is addresses and tx hashes only.make lintruns doc invariants only (check-governance-emergency-rehearsal-docs); live chain rehearsal runs only via explicitmake verify-issue-397/make rehearse-governance-emergencywhen LocalTerra is up.Security review: no medium+ findings on this diff.
added 9 commits
main9d1abf86- Merge origin/main into issue-397-governance-emergency-rehearsal.Compare with previous version
Resolved merge conflicts with latest
main.Conflict:
Makefile.PHONYline — merged SEC-B09 targets (check-governance-emergency-rehearsal-docs,rehearse-governance-emergency,verify-issue-397) withmainadditions (smoke-wrap-mapper-pause,verify-issue-396).Sanity checks:
make check-governance-emergency-rehearsal-docsandmake check-blacklist-decision-docsboth PASS.Security review — MR !927
Commit reviewed:
9d1abf868e67e07f5d688bfdc964b4e50356a8fcScope: SEC-B09 governance emergency multisig rehearsal — runbook/docs/templates,
scripts/rehearse-governance-emergency-controls.sh,scripts/lib/terrad-multisig-tx.sh,scripts/qa/verify-issue-397.sh,scripts/check_governance_emergency_rehearsal_docs.py, Makefile targets, agent skill cross-links. Re-reviewed after merge oforigin/main(Makefile.PHONY/verify-issue-396conflict resolution; no SEC-B09 logic changes).Outcome:
FINDINGS: 0medium+Inline threads: None (no medium+ findings).
Review notes
Traced attacker-controlled inputs through the added shell paths (
docker exec sh -c, LCD smart queries,--output, env overrides). This MR adds operator runbooks, a LocalTerra-only multisig dry-run script, and doc/CI regression checks. No production dApp, indexer API, or CosmWasm contract logic changes.terrad-multisig-tx.sh: Arguments are interpolated intodocker exec sh -cwith single-quote wrapping. A crafted env value containing'could break quoting, but inputs are operator-local defaults or bech32 addresses from deploy/LCD; execution stays inside thelocalterracompose container — not a plausible remote or CI attacker path at medium+ severity.test1: Intentional for LocalTerra rehearsal; script hard-requires thelocalterradocker service and documents that production sign-off needs a separate testnet/staging run from the planned multisig.--no-backupin the test keyring; transcript output is addresses and tx hashes only.make lintruns doc invariants only (check-governance-emergency-rehearsal-docs); live chain rehearsal runs only via explicitmake verify-issue-397/make rehearse-governance-emergencywhen LocalTerra is up.Security review: no medium+ findings on this diff.
mentioned in commit
0c87b934f4