Security: no monitoring runbook listing commands or log queries for launch signals [SEC-G01] #434
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#434
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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
The repo has runbooks for emergency response (pause/blacklist), reorg recovery, and blacklist decisions, but no runbook defines minimum launch monitoring for the signals listed in SEC-G01. The only proactive alerting documented is for reorg halt (
INDEXER_REORG_HALTstderr prefix andREORG_ALERT_WEBHOOK_URL), covered indocs/operator-secrets.mdanddocs/runbooks/indexer-reorg-replay-dedup.md. No runbook lists commands, log queries, or dashboards for: contract error spikes, indexer lag (behind chain tip), API 429/5xx rate, large swap detection, large LP withdrawal detection, blacklist hits, or pause state changes.What Was Checked
docs/operator-secrets.mdline 42-44: documents that there is no Prometheus/metricsendpoint; directs operators to usetracinglogs; covers only reorg halt alerting (INDEXER_REORG_HALT,REORG_ALERT_WEBHOOK_URL).docs/runbooks/indexer-reorg-replay-dedup.md: covers reorg halt alerting and recovery. Does not cover indexer lag, API errors, or swap size monitoring.docs/runbooks/emergency-commands.md: covers pause/blacklist commands for triage. No proactive monitoring queries.docs/templates/incident-dex-indexer.md: covers incident triage checklist. Does not define pre-incident monitoring signals.Expected (per checklist)
A runbook must list commands, log queries, or dashboard entries covering at minimum: contract error spikes, indexer lag behind chain tip, API 429/5xx rate, large swaps, large LP withdrawals, blacklist hits, and pause state changes. These define the operator's eyes on the system at launch.
Actual
Only reorg halt alerting is documented. The remaining six signal categories (contract errors, indexer lag, API error rate, swap/LP size, blacklist hits, pause changes) have no documented monitoring commands or queries. An operator responding to a report would have no runbook to consult for rapid signal triage.
Evidence
docs/operator-secrets.mdlines 42-44: only reorg halt alerting documenteddocs/runbooks/covering contract errors, indexer lag, 429/5xx, swap/LP size, blacklist hits, or pause state changesdocs/runbooks/indexer-reorg-replay-dedup.md: reorg only, not general indexer healthSuggested Fix
Create
docs/runbooks/launch-monitoring.mdlisting: (1) log query for contract execution errors from tracing output; (2) indexer lag check (comparelast_indexed_heightfrom indexer DB against chain tip via LCD); (3) API rate query for 429 responses (from access log or tracingtower_governorevents); (4) SQL query for swaps or LP events above a size threshold; (5) indexer API call or SQL query for blacklist hits against the compliance endpoint; (6) on-chain query for current pair pause state. Each entry should include the command, expected baseline output, and escalation signal.Verification Checklist
Labels
security,pre-launchCc: @PlasticDigits
mentioned in issue #381
mentioned in merge request !964
Took this one — no agent was on it (no label, no MR, no branch), so I built the runbook + a docs-check (MR !964).
What's there:
One thing worth flagging that I hit while validating: a naive grep -ci error on the indexer log returns ~7100 false positives (the substring "Parse error" inside benign oracle WARNs), while the real ERROR-level count was 4 — and those 4 were exactly the reorg-halt events. So the runbook tells operators to grep the level token after stripping ANSI, not the bare word; same trap on "429".
Good to close from my side once !964 merges. @PlasticDigits
mentioned in commit
131058d111Re-ran my checks on !964 — still clean.
Branch is mergeable, no conflicts. Nothing left on my side — @PlasticDigits good to merge !964 + close #434.
mentioned in commit
32063409d0mentioned in commit
11666a0059mentioned in merge request !969
mentioned in merge request !968
Verification complete — PASS
Verified SEC-G01 / #434 on
mainafter merge of !964 (e3806af0).Acceptance criteria
docs/runbooks/launch-monitoring.mdsections 1–8;make check-launch-monitoring-docs→OK: … covers all 8 launch signals**Baseline:**and**Escalate if:**linesmake check-launch-monitoring-docsinMakefilelinttarget; adversarial removal of pause section → exit 1docs/runbooks/launch-checklist.mdPhase 4 item references runbook +make check-launch-monitoring-docsLive-stack command run (fresh
make setup-cloud-localterra --fresh --skip-build)indexer_failed_blocks=0,ERROR-level count0chain_tip=1818,last_indexed=1813,lag=5(single-digit)/health200; 20-request burst all200swap_eventscount60, max return776306256, above-threshold0atTHRESH=2e926, remove1, above-threshold remove1atTHRESH_LP=1e9{"blocked":false,…}for test address; noBLACKLIST HITlines{"paused":false}viaterrad query … is_paused0INDEXER_REORG_HALT/indexer_reorg_haltlines in indexer logQuick sweep also ran clean (lag 5, failed_blocks 0, ERROR-level 0, reorg-halt 0).
No repo changes required from this verification pass. Closing #434.