Skip to content

Agent-compromise tests, Kani share-math proofs, WCAG 2.1 AA, and web push (#673 #672 #668 #669) - #721

Merged
Abidoyesimze merged 2 commits into
Neurowealth:mainfrom
josephchimebuka:feat/agent-compromise-formal-a11y-push-668-669-672-673
Aug 27, 2026
Merged

Agent-compromise tests, Kani share-math proofs, WCAG 2.1 AA, and web push (#673 #672 #668 #669)#721
Abidoyesimze merged 2 commits into
Neurowealth:mainfrom
josephchimebuka:feat/agent-compromise-formal-a11y-push-668-669-672-673

Conversation

@josephchimebuka

Copy link
Copy Markdown
Contributor

Summary

Closes #673, #672, #668, and #669.

  • Adversarial testing suite for agent compromise scenarios #673 Agent key compromise: New Soroban suite test_agent_compromise_scenarios.rs treats a stolen agent key as the attacker. Each scenario is its own test: owner-only calls (set_caps, transfer_ownership, caps/limits/TTL/timelock/migration/queue), withdrawing another user's funds, writing privileged storage, pause/unpause, WASM upgrade, pool retarget to a drain address, arbitrary TotalAssets inflate/decrease, and deposit front-running. Allowed agent entry points (rebalance, submit_mev_report, submit_apy_prediction, process_withdrawal_queue) are covered to show they cannot steal shares. Threat-model table added to SECURITY.md.
  • Formal verification of share accounting math #672 Formal verification: Share mint/burn/redeem math lives in the share-math crate (the contract calls the same helpers). Kani proofs cover: total_shares equals the sum of user shares, no negative balances, exchange rate non-decreasing with yield, deposit/redeem round-trip never creates value, and rounding always favours the vault. Spec, CI job (kani-share-math), and maintenance process are in docs/FORMAL_VERIFICATION.md.
  • WCAG 2.1 AA accessibility compliance #668 WCAG 2.1 AA: Skip link, landmarks, labelled forms, aria-live errors, :focus-visible, AA contrast (gray-700 / primary-700), rem-based type, chart data tables, axe-core via Vitest, and docs/ACCESSIBILITY.md (including VoiceOver/NVDA checklist).
  • Push notifications for important events #669 Push notifications: Web Push + PWA service worker with View portfolio / Quick withdraw actions, per-type preferences, 60s same-type batching (security alerts flush immediately), Resend/SendGrid email fallback, tests, and docs/NOTIFICATIONS.md.

Test plan

  • cargo test -p share-math
  • cargo test -p neurowealth-vault --lib test_agent_compromise
  • ./scripts/run-kani-proofs.sh (or CI kani-share-math job)
  • cd packages/vault-ui && npm install && npm test (axe-core + notification unit tests)
  • Keyboard-only pass on Deposit / Withdraw, Earnings, Notifications (skip link, tab order, focus ring)
  • Optional: VoiceOver or NVDA pass using the checklist in docs/ACCESSIBILITY.md

Made with Cursor

josephchimebuka and others added 2 commits August 27, 2026 09:35
…push.

Closes Neurowealth#673, Neurowealth#672, Neurowealth#668, and Neurowealth#669 by covering the agent blast radius on-chain, proving vault-favouring share accounting, bringing the vault UI to WCAG 2.1 AA with axe-core in CI, and adding batched Web Push plus email fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep both the vault-ui accessibility job and the new frontend lint job from main.

Co-authored-by: Cursor <cursoragent@cursor.com>
@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@josephchimebuka Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Abidoyesimze
Abidoyesimze merged commit a6341b8 into Neurowealth:main Aug 27, 2026
6 of 25 checks passed
@josephchimebuka

Copy link
Copy Markdown
Contributor Author

Follow-up: GitHub auto-closed only #673 from Closes #673, #672, #668, and #669 (a closing keyword applies to the next issue number only). Manually closed the remaining issues: #668, #669, #672.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adversarial testing suite for agent compromise scenarios

2 participants