Skip to content

[codex] Harden Enso route execution#1245

Closed
rossgalloway wants to merge 1 commit into
release/26-04-17from
codex/review-enso-route-invariants
Closed

[codex] Harden Enso route execution#1245
rossgalloway wants to merge 1 commit into
release/26-04-17from
codex/review-enso-route-invariants

Conversation

@rossgalloway

@rossgalloway rossgalloway commented May 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add shared Enso route invariants for executable route payloads
  • Require route tx targets to match the known Enso router for the request chain
  • Require route tx sender and chain ID to match the request context
  • Recheck the same invariants immediately before wallet transaction execution
  • Validate successful Enso proxy responses before returning them from both API route implementations

Security rationale

Enso route responses previously became executable wallet transactions after only basic shape checks. A tampered or malicious upstream response could choose tx.to, tx.data, tx.value, and tx.from. This change treats the upstream response as untrusted until it matches local request context and the local Enso router allowlist.

Validation

  • bun run lint:fix
  • bun run tslint
  • bunx vitest run src/components/pages/vaults/hooks/solvers/ensoRoute.test.ts src/components/pages/vaults/components/widget/deposit/useFetchMaxQuote.test.ts
  • bun run build
  • bun --print "await import('./api/enso/route.ts'); 'api route import ok'"

@vercel

vercel Bot commented May 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
yearnfi Ready Ready Preview, Comment May 20, 2026 6:03pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
yearnfi-nextjs Ignored Ignored May 20, 2026 6:03pm

Request Review

@github-actions

github-actions Bot commented May 20, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@rossgalloway

Copy link
Copy Markdown
Collaborator Author

Closing this PR because it has been superseded by the grouped remediation flow.

The Enso route hardening is now covered by the grouped Enso proxy and transaction integrity remediation.

Replacement:

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