fix: address 0.5.0 release blockers#48
Merged
Merged
Conversation
Security: validate approve call.Target against action input token in batched Tempo swap pre-sign checks, enforce at most one approve per batch, and require zero value on approve calls. Adds three regression tests covering wrong-token approve, duplicate approve, and non-zero value approve. Moonwell: wire --rpc-url flag for lend markets, lend rates, and yield opportunities commands so users can override the default Base RPC for on-chain multicall reads. Docs: add wallet balance to Mintlify command reference; fix Tempo signer wording from "spending limits" to "expiry checks" across README, CHANGELOG, and Mintlify; surface Moonwell mWETH/native ETH caveat in README and Mintlify provider docs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Addresses Bugbot review: a tampered action that omits token_in from metadata previously bypassed the approve target check. Now missing token_in metadata causes the approve call to be rejected outright. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
call.Targetagainst the action's input token, enforces at most one approve per batch, and requiresvalue=0on approve calls. Prevents tampered actions from sneaking approvals on arbitrary tokens.--rpc-urlforlend markets,lend rates, andyield opportunitiesso users can override the default Base RPC (https://mainnet.base.org) for on-chain multicall reads.wallet balanceto Mintlify command reference; fixes Tempo signer "spending limits" → "expiry checks" across README/CHANGELOG/Mintlify; surfaces Moonwell mWETH/native ETH caveat in public docs.Changes
internal/execution/policy_basic.govalidateTempoSwapCallsinternal/execution/policy_basic_test.gointernal/providers/moonwell/client.goSetRPCOverridemethodinternal/app/runner.go--rpc-urlflag for markets/rates/opportunities +applyRPCOverridehelperdocs/reference/wallet-and-meta-commands.mdxdocs/reference/commands-overview.mdxwalletto command listdocs/docs.jsonREADME.mdCHANGELOG.mddocs/concepts/providers-and-auth.mdxTest plan
go test ./...passesgo vet ./...cleantoken_inmetadatalend markets --provider moonwell --chain 8453 --asset USDC --rpc-url <reliable-rpc>on Basenpx mint validatefromdocs/)🤖 Generated with Claude Code
Note
Medium Risk
Strengthens pre-sign validation for Tempo batched swap steps, which directly affects transaction safety and could block previously accepted (but unsafe) actions. Also changes cached request keys/behavior for Moonwell read commands by introducing
--rpc-urloverrides, which may impact caching and provider connectivity.Overview
Hardens Tempo batched swap pre-sign policy by enforcing at most one ERC-20
approvecall per batch, requiringapproveto havevalue=0, and validating theapprovecall.Targetagainst the action’stoken_inmetadata (with new regression tests covering wrong-token, duplicate-approve, non-zero-value, and missing-metadata cases).Adds user-configurable RPC routing for on-chain Moonwell reads by wiring a
--rpc-urloverride throughlend markets,lend rates, andyield opportunities(including cache-keying onrpc_url) via a newrpcConfigurable/applyRPCOverridehelper and amoonwell.Client.SetRPCOverrideimplementation.Docs/navigation updates: adds
walletto the command reference and expands thewallet balancedocs page, fixes Tempo--signer tempowording, and documents Moonwell mWETH/native ETH wrapping caveats.Written by Cursor Bugbot for commit a4f7640. This will update automatically on new commits. Configure here.