Pre-launch: no parameterized emergency command cookbook for pause, blacklist, and unpause operations [SEC-B11] #399

Closed
opened 2026-06-19 10:42:47 +00:00 by totdking · 10 comments
totdking commented 2026-06-19 10:42:47 +00:00 (Migrated from gitlab.com)
No description provided.
totdking commented 2026-06-19 10:43:45 +00:00 (Migrated from gitlab.com)

Checklist Item

SEC-B11: Add an emergency "pause/blacklist/unpause/unblacklist" command cookbook. Verify: commands are copy-pastable, parameterized, and rehearsed on LocalTerra.


Summary

The incident template and deployment guide provide structural guidance but neither contains a copy-pastable, parameterized command sequence for executing emergency controls under time pressure. An operator responding to an active incident cannot quickly derive the correct terrad tx invocations from existing documentation.


What Was Checked

  • docs/templates/incident-dex-indexer.md -- Mitigation section only says "Follow Security model (pause, governance)" with no command examples
  • docs/deployment-guide.md -- general contract instantiation and config commands only, no emergency pause/blacklist operations
  • docs/runbooks/ -- no emergency-commands.md or equivalent file found
  • docs/adr/0003-governance-trading-blacklist.md -- design rationale only, no command reference
  • scripts/ -- no emergency pause/blacklist scripts; only deploy, seed, and CI scripts
  • smartcontracts/contracts/factory/src/msg.rs -- execute message definitions exist in source but not surfaced in any operator-facing doc

Expected (per checklist)

A copy-pastable command cookbook must exist covering: pause a pair, unpause a pair, blacklist a wallet, unblacklist a wallet, blacklist a token, unblacklist a token, blacklist a pair, and unblacklist a pair. Commands must use named parameters so an operator can fill in values under pressure. Evidence of rehearsal on LocalTerra must be linked.


Actual

No such cookbook exists. The closest reference is docs/deployment-guide.md which shows general terrad tx wasm execute patterns but does not cover any emergency control operations. An operator responding to an incident would need to construct the correct JSON message format and flags from scratch by reading contract source.


Evidence

  • docs/templates/incident-dex-indexer.md Mitigation section: no command examples
  • docs/deployment-guide.md: contract instantiation and config commands only
  • docs/runbooks/: no emergency-operations.md or equivalent
  • scripts/: no emergency pause/blacklist scripts

Suggested Fix

Add docs/runbooks/emergency-commands.md containing parameterized terrad tx wasm execute commands for each emergency operation on the factory contract, including:

  • SetPairPaused with $PAIR_ADDR and paused: true/false
  • BlacklistWallet and UnblacklistWallet with $WALLET_ADDR
  • BlacklistToken and UnblacklistToken with $TOKEN_ADDR
  • BlacklistPair and UnblacklistPair with $PAIR_ADDR

Include required flags (--from $GOVERNANCE_KEY --chain-id $CHAIN_ID --gas auto --gas-adjustment 1.4) and a brief post-execution query to confirm each operation succeeded. Link LocalTerra rehearsal evidence when available. Reference this document from docs/templates/incident-dex-indexer.md at the Mitigation step.


Verification Checklist

  • docs/runbooks/emergency-commands.md (or equivalent) exists with parameterized commands
  • Commands cover all eight operations: pause, unpause, blacklist wallet, unblacklist wallet, blacklist token, unblacklist token, blacklist pair, unblacklist pair
  • Commands include required flags and a post-execution query to confirm success
  • LocalTerra rehearsal evidence is linked from the cookbook or this issue
  • Document is referenced from the incident triage template Mitigation step

Labels

security, pre-launch

Cc: @PlasticDigits

### Checklist Item SEC-B11: Add an emergency "pause/blacklist/unpause/unblacklist" command cookbook. Verify: commands are copy-pastable, parameterized, and rehearsed on LocalTerra. --- ### Summary The incident template and deployment guide provide structural guidance but neither contains a copy-pastable, parameterized command sequence for executing emergency controls under time pressure. An operator responding to an active incident cannot quickly derive the correct `terrad tx` invocations from existing documentation. --- ### What Was Checked - `docs/templates/incident-dex-indexer.md` -- Mitigation section only says "Follow Security model (pause, governance)" with no command examples - `docs/deployment-guide.md` -- general contract instantiation and config commands only, no emergency pause/blacklist operations - `docs/runbooks/` -- no emergency-commands.md or equivalent file found - `docs/adr/0003-governance-trading-blacklist.md` -- design rationale only, no command reference - `scripts/` -- no emergency pause/blacklist scripts; only deploy, seed, and CI scripts - `smartcontracts/contracts/factory/src/msg.rs` -- execute message definitions exist in source but not surfaced in any operator-facing doc --- ### Expected (per checklist) A copy-pastable command cookbook must exist covering: pause a pair, unpause a pair, blacklist a wallet, unblacklist a wallet, blacklist a token, unblacklist a token, blacklist a pair, and unblacklist a pair. Commands must use named parameters so an operator can fill in values under pressure. Evidence of rehearsal on LocalTerra must be linked. --- ### Actual No such cookbook exists. The closest reference is `docs/deployment-guide.md` which shows general `terrad tx wasm execute` patterns but does not cover any emergency control operations. An operator responding to an incident would need to construct the correct JSON message format and flags from scratch by reading contract source. --- ### Evidence - `docs/templates/incident-dex-indexer.md` Mitigation section: no command examples - `docs/deployment-guide.md`: contract instantiation and config commands only - `docs/runbooks/`: no emergency-operations.md or equivalent - `scripts/`: no emergency pause/blacklist scripts --- ### Suggested Fix Add `docs/runbooks/emergency-commands.md` containing parameterized `terrad tx wasm execute` commands for each emergency operation on the factory contract, including: - `SetPairPaused` with `$PAIR_ADDR` and `paused: true/false` - `BlacklistWallet` and `UnblacklistWallet` with `$WALLET_ADDR` - `BlacklistToken` and `UnblacklistToken` with `$TOKEN_ADDR` - `BlacklistPair` and `UnblacklistPair` with `$PAIR_ADDR` Include required flags (`--from $GOVERNANCE_KEY --chain-id $CHAIN_ID --gas auto --gas-adjustment 1.4`) and a brief post-execution query to confirm each operation succeeded. Link LocalTerra rehearsal evidence when available. Reference this document from `docs/templates/incident-dex-indexer.md` at the Mitigation step. --- ### Verification Checklist - [ ] `docs/runbooks/emergency-commands.md` (or equivalent) exists with parameterized commands - [ ] Commands cover all eight operations: pause, unpause, blacklist wallet, unblacklist wallet, blacklist token, unblacklist token, blacklist pair, unblacklist pair - [ ] Commands include required flags and a post-execution query to confirm success - [ ] LocalTerra rehearsal evidence is linked from the cookbook or this issue - [ ] Document is referenced from the incident triage template Mitigation step --- ### Labels `security`, `pre-launch` Cc: @PlasticDigits
totdking commented 2026-06-19 10:57:16 +00:00 (Migrated from gitlab.com)

mentioned in issue #381

mentioned in issue #381
PlasticDigits commented 2026-06-19 11:10:25 +00:00 (Migrated from gitlab.com)

mentioned in commit 09c12d728b

mentioned in commit 09c12d728b0270960b52db1c3b0c289b24e6d7f3
PlasticDigits commented 2026-06-19 11:10:52 +00:00 (Migrated from gitlab.com)

mentioned in merge request !928

mentioned in merge request !928
PlasticDigits commented 2026-06-19 13:49:46 +00:00 (Migrated from gitlab.com)

mentioned in commit 392c0986f5

mentioned in commit 392c0986f5775f0b7e3de3ea5a409c9334e72878
PlasticDigits commented 2026-06-19 14:15:55 +00:00 (Migrated from gitlab.com)

mentioned in commit 6f4fd29bf7

mentioned in commit 6f4fd29bf704c18cfc9f7c848690c4400cc9d562
PlasticDigits commented 2026-06-19 14:19:56 +00:00 (Migrated from gitlab.com)

mentioned in commit b177633c32

mentioned in commit b177633c326a4a4aa5a87b6c5b85a624985a42ac
PlasticDigits commented 2026-06-19 14:20:02 +00:00 (Migrated from gitlab.com)

mentioned in merge request !930

mentioned in merge request !930
PlasticDigits commented 2026-06-25 11:50:11 +00:00 (Migrated from gitlab.com)

Verification — GitLab #399 (SEC-B11)

Result: PASS — emergency command cookbook exists, is cross-linked, and LocalTerra rehearsal succeeded.

Acceptance checklist

Criterion Result How verified
docs/runbooks/emergency-commands.md exists with parameterized commands PASS File present; exports $FACTORY_ADDR, $GOVERNANCE_KEY, $CHAIN_ID, $PAIR_ADDR, $WALLET_ADDR, $TOKEN_ADDR
All eight operations covered PASS Sections 1–8: pause, unpause, blacklist/unblacklist wallet, token, pair
Required flags + post-execution confirm queries PASS Each block includes --from, --chain-id, --gas auto, --gas-adjustment 1.4; confirm via is_paused or factory blacklist_check
LocalTerra rehearsal evidence linked PASS Cookbook links make verify-issue-399 / scripts/qa/verify-issue-399.sh
Referenced from incident template Mitigation PASS docs/templates/incident-dex-indexer.md Mitigation links emergency-commands.md

Commands run

make check-emergency-commands-docs
# OK: emergency-commands cookbook covers SEC-B11 operations and is cross-linked

make setup-cloud-localterra --skip-build --fresh   # provision chain + deploy
make verify-issue-399
# 8 passed, 0 failed (SetPairPaused ×2, wallet/token/pair blacklist cycles)
  • docs/security-model.md → emergency-commands.md
  • docs/adr/0003-governance-trading-blacklist.md → emergency-commands.md
  • skills/AGENTS_EMERGENCY_COMMANDS.md agent playbook present

No repo changes required; closing issue.

## Verification — GitLab #399 (SEC-B11) **Result: PASS** — emergency command cookbook exists, is cross-linked, and LocalTerra rehearsal succeeded. ### Acceptance checklist | Criterion | Result | How verified | |-----------|--------|------------| | `docs/runbooks/emergency-commands.md` exists with parameterized commands | **PASS** | File present; exports `$FACTORY_ADDR`, `$GOVERNANCE_KEY`, `$CHAIN_ID`, `$PAIR_ADDR`, `$WALLET_ADDR`, `$TOKEN_ADDR` | | All eight operations covered | **PASS** | Sections 1–8: pause, unpause, blacklist/unblacklist wallet, token, pair | | Required flags + post-execution confirm queries | **PASS** | Each block includes `--from`, `--chain-id`, `--gas auto`, `--gas-adjustment 1.4`; confirm via `is_paused` or factory `blacklist_check` | | LocalTerra rehearsal evidence linked | **PASS** | Cookbook links `make verify-issue-399` / `scripts/qa/verify-issue-399.sh` | | Referenced from incident template Mitigation | **PASS** | `docs/templates/incident-dex-indexer.md` Mitigation links `emergency-commands.md` | ### Commands run ```bash make check-emergency-commands-docs # OK: emergency-commands cookbook covers SEC-B11 operations and is cross-linked make setup-cloud-localterra --skip-build --fresh # provision chain + deploy make verify-issue-399 # 8 passed, 0 failed (SetPairPaused ×2, wallet/token/pair blacklist cycles) ``` ### Cross-links verified - `docs/security-model.md` → `emergency-commands.md` - `docs/adr/0003-governance-trading-blacklist.md` → `emergency-commands.md` - `skills/AGENTS_EMERGENCY_COMMANDS.md` agent playbook present No repo changes required; closing issue.
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-06-25 11:50:12 +00:00
Brouie commented 2026-06-28 23:24:44 +00:00 (Migrated from gitlab.com)

mentioned in issue #337

mentioned in issue #337
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic#399
No description provided.