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

[Nexus 1.2.0] Always hook set registry #259

Merged

Conversation

filmakarov
Copy link
Collaborator

@filmakarov filmakarov commented Mar 18, 2025

If called by EP, setRegistry won't be not hooked, which means owner could update the registry and make the claims revert for the solvers if Nexus is used with resource locks


PR-Codex overview

This PR modifies the setRegistry function in the Nexus.sol contract to remove the access control modifier and enforce that only the contract itself can call the function.

Detailed summary

  • Removed the onlyEntryPointOrSelf modifier from the setRegistry function.
  • Added a require statement to ensure that msg.sender is the contract itself.
  • The function still configures the registry using _configureRegistry.

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

Copy link

🤖 Slither Analysis Report 🔎

Slither report

# Slither report

THIS CHECKLIST IS NOT COMPLETE. Use --show-ignored-findings to show all the results.
Summary
🟡 - unused-return (2 results) (Medium)

unused-return

🟡 Impact: Medium
🟡 Confidence: Medium

base/ModuleManager.sol#L220-L229

base/ModuleManager.sol#L243-L247

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

[Nexus 1.2.0] Always hook set registry

Generated at commit: 9ac502fed1ae4cbe9cca2f6bad39512bd36b17be

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
1
1
0
6
30
38

For more details view the full report in OpenZeppelin Code Inspector

@filmakarov filmakarov merged commit ce37a39 into release/nexus-v1.2.0-ep-v0.7 Mar 20, 2025
5 of 9 checks passed
@filmakarov filmakarov deleted the fix/always-hook-set-registry branch March 20, 2025 19:36
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.

2 participants