Add env/chain address cross-check for post-deploy verification (SEC-H04, #442) #977
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!977
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-442-env-address-cross-check"
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
Adds SEC-H04 post-deploy env/chain address cross-check (#442):
scripts/qa/verify-env-addresses.shreadsFACTORY_ADDRESS,ROUTER_ADDRESS, andFEE_DISCOUNT_ADDRESSfromindexer/.envandVITE_*counterparts from the frontend env, asserts parity, then queries on-chain factory/router/fee-discountconfig(routerfactorymust equal envFACTORY_ADDRESS; fee-discountgovernancenon-empty).make qa-verify-deploy(runs after Q1 schema/stamp) and documented as invariant Q4 indocs/qa-invariants.md.skills/AGENTS_DEPLOY_ENV_ADDRESSES_VERIFY.md.Acceptance checklist
make verify-issue-442(live LocalTerra step)VERIFY_ENV_FRONTEND_FILE=<mismatched .env.local> ./scripts/qa/verify-env-addresses.sh→ exit 1docs/runbooks/launch-checklist.mdPhase 4 requires comparison before go/no-gogrep verify-env-addresses docs/runbooks/launch-checklist.md+make check-deploy-env-addresses-docsVerification checklist (third parties)
Staging/mainnet override:
Paste full
qa-verify-env-addressesoutput on the launch tracking issue (Phase 4 / SEC-H04).Security review — MR !977
Commit reviewed:
8f5db8bccf450bf2ab864076b5e6e6ccf3e8a3f3Scope:
scripts/qa/verify-env-addresses.shand wiring (Makefile,verify-deploy.sh, doc/skill drift guards, unit tests) for SEC-H04 env/chain address cross-check (#442).Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff.
Summary
This MR adds an operator-run post-deploy verification script that compares indexer vs frontend contract addresses and probes on-chain
configvia existinglcd-smart-query.sh/localterra-host-curl.shhelpers. It follows the same trust model and patterns asverify-deploy-config.sh(SEC-H03): env files andTERRA_LCD_URLare operator-controlled; address values are quoted before URL construction; no new runtime services or user-facing attack surface.Reviewed attack paths considered:
read_env_varkeys are fixed literals; contract addresses and LCD base URL are passed quoted into curl helpers; no eval or unquoted expansion.TERRA_LCD_URL/TERRA_RPC_URLoverride is intentional for staging/mainnet and matches pre-existing QA scripts; not attacker-controlled in CI/deploy contexts.sed; does not source indexer/frontend env files wholesale.Inline threads: none (no medium+ findings).
mentioned in issue #442
added 7 commits
maind7b7eca3- Merge origin/main into issue-442-env-address-cross-check.Compare with previous version
Resolved merge conflicts with
main(Makefile only).Merged both sides:
check-deploy-env-addresses-docs,qa-verify-env-addresses,test-qa-verify-env-addresses,verify-issue-442check-wasm-migration-rollback-docs,check-rollback-decision-docs,verify-issue-443,verify-issue-445Sanity:
make test-qa-verify-env-addressesandmake check-deploy-env-addresses-docspass.Security review — MR !977 (re-review)
Commit reviewed:
d7b7eca3e513a71262cfe20d51fb097178d9c242Scope:
scripts/qa/verify-env-addresses.shand wiring (Makefile,verify-deploy.sh, doc/skill drift guards, unit tests) for SEC-H04 env/chain address cross-check (#442). Re-reviewed after merge oforigin/maininto the MR branch (prior review was on8f5db8b).Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff.
Summary
This MR adds an operator-run post-deploy verification script that compares indexer vs frontend contract addresses and probes on-chain
configvia existinglcd-smart-query.sh/localterra-host-curl.shhelpers. It follows the same trust model and patterns asverify-deploy-config.sh(SEC-H03): env files andTERRA_LCD_URLare operator-controlled; address values are quoted before URL construction;read_env_varkeys are fixed literals; no eval or unquoted expansion.Attack paths considered:
localterra_docker_execusesprintf '%q'for container args.TERRA_LCD_URL/TERRA_RPC_URLoverride is intentional for staging/mainnet and matches pre-existing QA scripts; not attacker-controlled in CI/deploy contexts.sed; does not source indexer/frontend env files wholesale.terra1validation) are inherent verification scope limits, not exploitable weaknesses introduced here.Inline threads: none (no medium+ findings).
mentioned in commit
96f0f8514e