Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secure batch decode implementation #235

Merged
merged 1 commit into from
Feb 5, 2025
Merged

Conversation

filmakarov
Copy link
Collaborator

@filmakarov filmakarov commented Feb 3, 2025

Add secure decodeBatch implementation
https://github.com/Vectorized/solady/blob/21e3649841829dd3b265d1228defefb23b5d977b/src/accounts/LibERC7579.sol#L149


PR-Codex overview

This PR focuses on enhancing the functionality of the MockExecutor contract and its tests by modifying execution handling, particularly for batch executions, and improving the decodeBatch function's implementation for better safety and clarity.

Detailed summary

  • Modified the executeFromExecutor function in MockExecutor to handle additional execution cases.
  • Increased the size of the Execution array from 1 to 2 for batch processing.
  • Updated the decodeBatch function in ExecLib for improved safety and clarity using memory-safe assembly.
  • Adjusted tests in TestAccountExecution_ExecuteFromExecutor to accommodate changes in execution handling and ensure the correct revert conditions are checked.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@filmakarov filmakarov requested a review from fichiokaku February 3, 2025 13:41
@filmakarov filmakarov changed the title secure batch decode + test fix Secure batch decode implementation Feb 3, 2025
Copy link

github-actions bot commented Feb 3, 2025

🤖 Slither Analysis Report 🔎

Slither report

# Slither report

THIS CHECKLIST IS NOT COMPLETE. Use --show-ignored-findings to show all the results.
Summary
🟡 - locked-ether (1 results) (Medium)

locked-ether

🟡 Impact: Medium
🔴 Confidence: High

utils/NexusBootstrap.sol#L33-L185

constable-states

Impact: Optimization
🔴 Confidence: High

base/RegistryAdapter.sol#L10

factory/RegistryFactory.sol#L38

_This comment was automatically generated by the GitHub Actions workflow._

Copy link

secure batch decode + test fix

Generated at commit: 451ed01d5f6dd54da4b46b1369276ddc5f8c4cdd

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
1
1
0
6
29
37

For more details view the full report in OpenZeppelin Code Inspector

@filmakarov filmakarov merged commit 71218d6 into dev Feb 5, 2025
5 of 8 checks passed
@filmakarov filmakarov deleted the fix/decodeBatch-security branch February 5, 2025 15:14
@filmakarov filmakarov mentioned this pull request Feb 6, 2025
2 tasks
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