Skip to content

fix(program): remediate escrow audit findings 2-14#27

Draft
dev-jodee wants to merge 1 commit intomainfrom
fix/a26sfr3-audit-remediations
Draft

fix(program): remediate escrow audit findings 2-14#27
dev-jodee wants to merge 1 commit intomainfrom
fix/a26sfr3-audit-remediations

Conversation

@dev-jodee
Copy link
Collaborator

Summary

  • remediate confirmed Creature audit findings refactor: post-review improvements and cleanup #2 through chore(deps): bump @solana/kit to v6.0.1 and related packages #14 in the escrow program
  • harden account validation (version/discriminator checks, owner/mint checks, allowed mint self-validation)
  • enforce extension and hook safety constraints, including signer rejection and withdraw context fixes
  • fix prefunded-PDA create flow to avoid lamport transfer griefing while keeping strict create-once semantics
  • defer finding #15 (receipt policy snapshot design) for a follow-up PR

Test Plan

  • cargo fmt -p escrow-program -p tests-escrow-program --check
  • cd program && cargo clippy --all-targets -- -D warnings
  • cd tests && cargo clippy --all-targets -- -D warnings
  • cargo test -p escrow-program
  • cargo test -p tests-escrow-program

Notes

  • just fmt fails at pnpm lint:fix due existing strict TypeScript lint errors in apps/web and examples/typescript unrelated to these Rust/program changes.

Apply and test remediations for the confirmed findings from the Creature audit repository, including account validation hardening, extension enforcement updates, hook context/signer restrictions, discriminator/version guards, and prefunded PDA-safe creation semantics.\n\nFinding #15 remains intentionally deferred for later design alignment.
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.

1 participant