feat: cover runtime OAV injection, refresh registry, bump to 1.7.0 [eng-3209] - #34
feat: cover runtime OAV injection, refresh registry, bump to 1.7.0 [eng-3209]#34ajag408 wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 14074fc. Configure here.
There was a problem hiding this comment.
Risk: high. Left a non-blocking comment and did not approve; reviewers were already assigned, so none were added. Cursor Bugbot skipped with one unresolved finding, Cursor Security Agent did not finish in time, and runtime OAV whitelist injection is above the low-risk approval threshold.
Sent by Cursor Approval Agent: Pull Request Router and Approver
There was a problem hiding this comment.
Agentic security review completed for this head. One high-severity finding: caller-supplied ValidationContext.feeConfiguration[].allocatorVaultAddress expands the ERC-4626 vault/spender allowlist on the same request path as the untrusted unsigned transaction.
Sent by Cursor Security Agent: Security Reviewer
| private getInjectedAllocatorVaults(context?: ValidationContext): Set<string> { | ||
| const injected = new Set<string>(); | ||
| for (const fee of context?.feeConfiguration ?? []) { | ||
| if (isNonEmptyString(fee.allocatorVaultAddress)) { | ||
| injected.add(fee.allocatorVaultAddress.toLowerCase()); |
There was a problem hiding this comment.
🔒 Agentic Security Review
Severity: HIGH
Caller-supplied ValidationContext.feeConfiguration[].allocatorVaultAddress is treated as a vault/spender allowlist. Any non-empty string is accepted with no registry membership, checksum, chain binding, or attestation. resolveVault and validateApproval then treat that address as a legitimate ERC-4626 vault and reuse the yield’s base-vault metadata (including inputTokenAddress).
The JSON validate path forwards request.context from the same payload as unsignedTransaction, so the party that builds the transaction can also expand Shield’s destination allowlist. That breaks the embedded-registry / zero-trust model: a wallet that forwards Yield/dApp context can be told that approve(attacker) on the vault input token, or deposit/mint/withdraw/redeem to that attacker, is valid.
Impact: Users who sign after a Shield isValid: true result can grant unlimited allowance or deposit the vault’s underlying asset to an attacker contract that the static registry would have rejected.
Reviewed by Cursor Security Reviewer for commit 14074fc. Configure here.
There was a problem hiding this comment.
Intentional. context.feeConfiguration is trusted control-plane input, not end-user input. Embedded validation never takes context from the transaction submitter. Standalone/JSON callers must not forward dApp-supplied context; they should inject only their own OAV addresses. Remaining invariants still apply (from/owner/receiver = user, method + calldata checks). We’ll document this; schema address format is hardening only.




Summary
@yieldxyz/shieldfrom1.5.0to1.7.01.7.0is intentional because an unrelated1.6.0change is already in review.QA Proof
What Needs to Be QA'd in Staging
QA Team Notification
Note
Medium Risk
Changes ERC-4626 vault whitelisting for supply, withdraw, and approvals; incorrect context handling could allow or block the wrong contract addresses.
Overview
ERC-4626 validation now whitelists runtime allocator vault (OAV) addresses supplied in
ValidationContext.feeConfiguration[].allocatorVaultAddress, alongside the static registry.resolveVaultand APPROVAL spenders accept injected addresses by reusing the yield’s base vault metadata (input token, decimals, pause flags); without context or for unrelatedtx.to, behavior stays fail-closed (not whitelisted/ wrong approval token).Adds a regression test suite for context-injected SUPPLY, WITHDRAW, and APPROVAL paths and confirms static
allocatorVaultsstill work with no context. Refreshesvault-registry.json(new/updated vaults and allocator lists) and bumps@yieldxyz/shieldto 1.7.0.Reviewed by Cursor Bugbot for commit 14074fc. Configure here.