Security: no committed historical exploit replay matrix for known Cosmos/CosmWasm attack classes [SEC-D01] #406
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#406
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?
Checklist Item
SEC-D01: Create a historical exploit matrix with date, protocol, root cause, affected component, our equivalent surface, mitigation, and verification. Verify: committed docs table with links to tests/issues.
Summary
The repo has an in-repo invariant matrix (
contracts-security-audit.md) and an "Attack paths considered" section, but neither constitutes a historical exploit replay matrix. No document maps historical incidents (Terra IBC-hooks, Osmosis LP share, Levana oracle, etc.) by date, protocol, root cause, affected component, our equivalent surface, mitigation status, and test link.What Was Checked
docs/contracts-security-audit.md: invariant matrix and "Attack paths considered" section reviewed; covers internal invariants and non-governance attacks, not external historical incidentsdocs/security-model.md: governance, treasury, hook safety, off-chain trust boundaries; no exploit replay matrixdocs/security-posture.md: TVL-scaled posture and residual risks; no historical incident tablehelp/checklist.mdcontains those termsExpected (per checklist)
A committed document or table listing each modeled historical incident with: date, protocol name, root cause, affected component class, our equivalent attack surface, our mitigation, and a link to the test or issue verifying coverage.
Actual
No such document exists. The contracts-security-audit.md covers what invariants hold and what attack paths are rejected, but does not trace those to specific external incidents by date and protocol. The SEC-D checklist items (D02-D12) each reference specific historical incidents (Terra/Astroport IBC-hooks, Osmosis pool-share bug, Levana oracle, etc.) but there is no central committed table linking them all.
Evidence
docs/contracts-security-audit.mdlines 79-88: "Attack paths considered"; covers sandwich, reentrancy, fee-on-transfer, hook griefing, router state, router dust; no dates, protocols, or historical incident linksdocs/security-posture.md: no exploit matrixhelp/checklist.mdSuggested Fix
Create
docs/exploit-replay-matrix.mdwith a table structured as:Populate with at minimum the incidents referenced in SEC-D02 through SEC-D12 (Terra IBC-hooks reentrancy, Osmosis LP-share accounting, Levana oracle timing, malicious CW20, fake pair indexing, SQL injection, LCD amplification, admin key compromise, wallet phishing, stale deployment). Link each row to the relevant contract test, docs section, or GitLab issue.
Verification Checklist
docs/exploit-replay-matrix.mdcommitted with a row for each historical incident from SEC-D02 through SEC-D12docs/contracts-security-audit.mdanddocs/security-model.mdLabels
security,pre-launchCc: @PlasticDigits
mentioned in issue #381
mentioned in commit
74c66522edmentioned in merge request !935
mentioned in commit
d635061066mentioned in commit
64ae472470Verification — SEC-D01 / #406 (PASS)
Verified on
main(clean working tree, up to date withorigin/main). No repo changes required.Acceptance checklist
docs/exploit-replay-matrix.mdcommitted with SEC-D02–D12 rowstest_reentrant_swap_during_swap_rejected,test_lp_share_inflation_first_depositor_griefing,fee_on_transfer_creates_reserve_imbalance,verify_factory_provenance_*,SwapPreSubmitSummary.test.tsx, etc.).docs/contracts-security-audit.mdanddocs/security-model.mdexploit-replay-matrix.mdin intro and body sections; agent playbookskills/AGENTS_EXPLOIT_REPLAY_MATRIX.mdpresent.make check-exploit-replay-matrix-docs→OK: exploit replay matrix covers SEC-D02–D12 and is linked from contracts-security-audit, security-model, and agent skill. Target also wired intomake lint.Notes
Closing as implemented on
main.mentioned in issue #424