fix: audit hardening bundle (issue #25) #41

Merged
PlasticDigits merged 2 commits from 25-feat-audit-hardening-bundle-m-2-m-3-m-8-m-12-14-m-19-l-8-10-l-16-l-20-l-21 into main 2026-08-08 05:21:41 +00:00
PlasticDigits commented 2026-08-08 04:57:35 +00:00 (Migrated from gitlab.com)

Closes #25

Summary

Implements the issue #25 audit hardening bundle from audits/INTERNAL_KIMIK3_1786162831.md:

  • M-2/M-3: Dust deposit/withdraw revert via ZeroOutput before mint/burn/treasury msgs (INV-SWAP-003/004)
  • M-8: Bump cw20-mintable to 8a50c36 (PR #1) so UpdateMinter(None|/transfer) clears stale MINTERS (INV-MINTER-001)
  • M-12: BSC RPC transport timeouts + TICK_TIMEOUT_SECS around ticks
  • M-13: Terra account JSON fail-hard (BaseAccount / vesting wrappers)
  • M-14: Adaptive gas max(configured, network_min) with documented fallback
  • M-19: Oracle wiremock/unit coverage + window multitest backfills (stale withdraw, rolling reset, governance)
  • L-8: .env.* gitignore + gitleaks allowlists for docs/audits/target/
  • L-9: Liveness mutex recovers via into_inner
  • L-10: SIGTERM/SIGINT graceful shutdown
  • L-16: GET /healthz process-up only (no freshness claim)
  • L-20: ust1-common extreme/proptest edges
  • L-21: Instantiate/migrate require vFDUSD decimals ≥ UST1 (INV-DECIMALS-001)

Docs/skills: README.md, docs/DEPLOYMENT.md, skills/audit-hardening-bundle/SKILL.md.

Acceptance checklist

  • M-2/M-3 dust deposit/withdraw revert; multitests green
  • M-8 UpdateMinter(None) removes map entry; rev bumped; fork tests
  • M-12 hung RPC cannot block past tick timeout
  • M-13 malformed account JSON fails with clear error
  • M-14 gas uses at least network minimum when probe available; fallback documented
  • M-19 automated tests for oracle network modules + named window gaps
  • L-8 .env.* ignored; gitleaks allowlist hygiene
  • L-9 poisoned mutex does not abort via expect
  • L-10 SIGTERM exits gracefully
  • L-16 /healthz shipped; docs accurate (liveness-only)
  • L-20 new property/edge tests
  • L-21 instantiate rejects decimal inversion; 6/6 happy path

Intentionally out of scope (tracked elsewhere)

  • H-1 deposit min_ust1_out / fee cap
  • C-1/C-2/C-3 wire drift / circuit breaker / ConfirmTx
  • H-3 poll vs stale-age defaults
  • LocalTerra e2e in CI (TEST-16) — not claimed done here

Test plan

  • cargo test -p ust1-window --lib (20)
  • cargo test -p ust1-common --lib (22)
  • cargo test -p ust1-oracle-service (30)
  • cargo clippy -p ust1-window -p ust1-common -p ust1-oracle-service -- -D warnings
  • git check-ignore -v .env.local
  • Manual: SIGTERM against running oracle-service exits 0 with graceful log
  • Manual/Render: GET /healthz → 200; set HEALTHZ_BIND=off disables

Closes #25

Closes #25 ## Summary Implements the [issue #25](https://gitlab.com/PlasticDigits/ust1-window/-/issues/25) audit hardening bundle from [`audits/INTERNAL_KIMIK3_1786162831.md`](../audits/INTERNAL_KIMIK3_1786162831.md): - **M-2/M-3:** Dust deposit/withdraw revert via `ZeroOutput` before mint/burn/treasury msgs (`INV-SWAP-003/004`) - **M-8:** Bump `cw20-mintable` to `8a50c36` ([PR #1](https://github.com/PlasticDigits/cw20-mintable/pull/1)) so `UpdateMinter(None|/transfer)` clears stale `MINTERS` (`INV-MINTER-001`) - **M-12:** BSC RPC transport timeouts + `TICK_TIMEOUT_SECS` around ticks - **M-13:** Terra account JSON fail-hard (BaseAccount / vesting wrappers) - **M-14:** Adaptive gas `max(configured, network_min)` with documented fallback - **M-19:** Oracle wiremock/unit coverage + window multitest backfills (stale withdraw, rolling reset, governance) - **L-8:** `.env.*` gitignore + gitleaks allowlists for docs/audits/`target/` - **L-9:** Liveness mutex recovers via `into_inner` - **L-10:** SIGTERM/SIGINT graceful shutdown - **L-16:** `GET /healthz` process-up only (no freshness claim) - **L-20:** `ust1-common` extreme/proptest edges - **L-21:** Instantiate/migrate require vFDUSD decimals ≥ UST1 (`INV-DECIMALS-001`) Docs/skills: `README.md`, `docs/DEPLOYMENT.md`, `skills/audit-hardening-bundle/SKILL.md`. ## Acceptance checklist - [x] M-2/M-3 dust deposit/withdraw revert; multitests green - [x] M-8 `UpdateMinter(None)` removes map entry; rev bumped; fork tests - [x] M-12 hung RPC cannot block past tick timeout - [x] M-13 malformed account JSON fails with clear error - [x] M-14 gas uses at least network minimum when probe available; fallback documented - [x] M-19 automated tests for oracle network modules + named window gaps - [x] L-8 `.env.*` ignored; gitleaks allowlist hygiene - [x] L-9 poisoned mutex does not abort via expect - [x] L-10 SIGTERM exits gracefully - [x] L-16 `/healthz` shipped; docs accurate (liveness-only) - [x] L-20 new property/edge tests - [x] L-21 instantiate rejects decimal inversion; 6/6 happy path ## Intentionally out of scope (tracked elsewhere) - H-1 deposit `min_ust1_out` / fee cap - C-1/C-2/C-3 wire drift / circuit breaker / ConfirmTx - H-3 poll vs stale-age defaults - LocalTerra e2e in CI (TEST-16) — not claimed done here ## Test plan - [x] `cargo test -p ust1-window --lib` (20) - [x] `cargo test -p ust1-common --lib` (22) - [x] `cargo test -p ust1-oracle-service` (30) - [x] `cargo clippy -p ust1-window -p ust1-common -p ust1-oracle-service -- -D warnings` - [x] `git check-ignore -v .env.local` - [ ] Manual: SIGTERM against running oracle-service exits 0 with graceful log - [ ] Manual/Render: `GET /healthz` → 200; set `HEALTHZ_BIND=off` disables Closes #25
PlasticDigits commented 2026-08-08 04:57:53 +00:00 (Migrated from gitlab.com)

added 2 commits

  • af2f3dda - fix: audit hardening bundle for issue #25
  • 1ee515aa - chore(gitleaks): allowlist public docs addresses and target/

Compare with previous version

added 2 commits <ul><li>af2f3dda - fix: audit hardening bundle for issue #25</li><li>1ee515aa - chore(gitleaks): allowlist public docs addresses and target/</li></ul> [Compare with previous version](/PlasticDigits/ust1-window/-/merge_requests/8/diffs?diff_id=1950010663&start_sha=6367d18df99f280d3289ffd617ba0ed112f4447e)
PlasticDigits commented 2026-08-08 04:57:53 +00:00 (Migrated from gitlab.com)

marked this merge request as ready

marked this merge request as **ready**
PlasticDigits commented 2026-08-08 05:10:50 +00:00 (Migrated from gitlab.com)

mentioned in issue #25

mentioned in issue #25
PlasticDigits commented 2026-08-08 05:17:27 +00:00 (Migrated from gitlab.com)

added 6 commits

  • 1ee515aa...deb4453d - 4 commits from branch main
  • 4cf6e451 - fix: audit hardening bundle for issue #25
  • 29ce6f35 - chore(gitleaks): allowlist public docs addresses and target/

Compare with previous version

added 6 commits <ul><li>1ee515aa...deb4453d - 4 commits from branch <code>main</code></li><li>4cf6e451 - fix: audit hardening bundle for issue #25</li><li>29ce6f35 - chore(gitleaks): allowlist public docs addresses and target/</li></ul> [Compare with previous version](/PlasticDigits/ust1-window/-/merge_requests/8/diffs?diff_id=1950018279&start_sha=1ee515aad09b3bdff3df3a5a90b2933fd13023b9)
PlasticDigits commented 2026-08-08 05:20:12 +00:00 (Migrated from gitlab.com)

added 4 commits

  • 29ce6f35...47e20e78 - 2 commits from branch main
  • 4903c83b - fix: audit hardening bundle for issue #25
  • 586789d1 - chore(gitleaks): allowlist public docs addresses and target/

Compare with previous version

added 4 commits <ul><li>29ce6f35...47e20e78 - 2 commits from branch <code>main</code></li><li>4903c83b - fix: audit hardening bundle for issue #25</li><li>586789d1 - chore(gitleaks): allowlist public docs addresses and target/</li></ul> [Compare with previous version](/PlasticDigits/ust1-window/-/merge_requests/8/diffs?diff_id=1950019461&start_sha=29ce6f35b2f8df7289d572b8d818668f1a73d9ec)
PlasticDigits commented 2026-08-08 05:21:41 +00:00 (Migrated from gitlab.com)

mentioned in commit 9acb26818f

mentioned in commit 9acb26818f793ad0db8ccb45be2f2f9f7d934670
PlasticDigits (Migrated from gitlab.com) merged commit 9acb26818f into main 2026-08-08 05:21:41 +00:00
PlasticDigits commented 2026-08-08 05:21:47 +00:00 (Migrated from gitlab.com)

mentioned in merge request !44

mentioned in merge request !44
PlasticDigits commented 2026-08-08 05:35:31 +00:00 (Migrated from gitlab.com)

mentioned in issue #21

mentioned in issue #21
PlasticDigits commented 2026-08-08 06:01:02 +00:00 (Migrated from gitlab.com)

mentioned in issue #26

mentioned in issue #26
PlasticDigits commented 2026-08-08 06:01:53 +00:00 (Migrated from gitlab.com)

mentioned in issue #28

mentioned in issue #28
Sign in to join this conversation.
No reviewers
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/ust1-window!41
No description provided.