bcnmy / nexus

Nexus by Biconomy: ERC-7579 Modular Smart Account for Enhanced Account Abstraction
https://github.com/bcnmy/nexus/wiki
MIT License
27 stars 5 forks source link

hooking fallback + remove receiver base + disallow bytes4(0) selector #132

Closed livingrockrises closed 3 months ago

livingrockrises commented 3 months ago

removed receiver base and receiverFallback modifier Hooking fallback now ( I think we can remove all blacklisted all together from installFallback @filmakarov ) added receiver function (for now) not throwing on unfound selector [ check comments here ] running the code for token callbacks at the end. left a room and dev notes for throwing in case of unregistered selector and unsupported calltype.

openzeppelin-code[bot] commented 3 months ago

hooking fallback + remove receiver base + disallow bytes4(0) selector

Generated at commit: 626a3a2cf9aebe0025076b16a6c53c06cef4a1ba

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
0
1
0
6
24
31

For more details view the full report in OpenZeppelin Code Inspector

livingrockrises commented 3 months ago

need to review one failing test before merge.. @GabiDev45 @Aboudjem reminder to self..

VGabriel45 commented 3 months ago

need to review one failing test before merge.. @GabiDev45 @Aboudjem reminder to self..

Check branch naming @livingrockrises it does not match the regex

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 42.85714% with 8 lines in your changes missing coverage. Please review.

Project coverage is 71.86%. Comparing base (5f82f00) to head (596c135). Report is 5 commits behind head on remediations/cantina-spearbit.

Files Patch % Lines
contracts/base/ModuleManager.sol 42.85% 8 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## remediations/cantina-spearbit #132 +/- ## ================================================================= - Coverage 72.31% 71.86% -0.45% ================================================================= Files 13 13 Lines 679 686 +7 Branches 124 150 +26 ================================================================= + Hits 491 493 +2 - Misses 188 193 +5 ``` | [Files](https://app.codecov.io/gh/bcnmy/nexus/pull/132?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcnmy) | Coverage Δ | | |---|---|---| | [contracts/base/ModuleManager.sol](https://app.codecov.io/gh/bcnmy/nexus/pull/132?src=pr&el=tree&filepath=contracts%2Fbase%2FModuleManager.sol&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcnmy#diff-Y29udHJhY3RzL2Jhc2UvTW9kdWxlTWFuYWdlci5zb2w=) | `83.63% <42.85%> (-2.44%)` | :arrow_down: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/bcnmy/nexus/pull/132?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcnmy). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcnmy) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/bcnmy/nexus/pull/132?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcnmy). Last update [2375a58...596c135](https://app.codecov.io/gh/bcnmy/nexus/pull/132?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcnmy). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcnmy).
github-actions[bot] commented 3 months ago

:robot: Slither Analysis Report :mag_right:

Slither report

# Slither report **THIS CHECKLIST IS NOT COMPLETE**. Use `--show-ignored-findings` to show all the results. Summary :yellow_circle: - [locked-ether](#locked-ether) (1 results) (Medium) - [constable-states](#constable-states) (2 results) (Optimization) ## locked-ether :yellow_circle: Impact: Medium :red_circle: Confidence: High - [ ] ID-0 Contract locking ether found: Contract [Bootstrap]([utils/RegistryBootstrap.sol#L33-L165](https://github.com/bcnmy/nexus/blob/0f63f69f3ca367f83a192914a050a978f963dca3/contracts/contracts/utils/RegistryBootstrap.sol#L33-L165)) has payable functions: - [ModuleManager.receive()]([base/ModuleManager.sol#L71](https://github.com/bcnmy/nexus/blob/0f63f69f3ca367f83a192914a050a978f963dca3/contracts/contracts/base/ModuleManager.sol#L71)) - [ModuleManager.fallback()]([base/ModuleManager.sol#L74-L124](https://github.com/bcnmy/nexus/blob/0f63f69f3ca367f83a192914a050a978f963dca3/contracts/contracts/base/ModuleManager.sol#L74-L124)) But does not have a function to withdraw the ether [utils/RegistryBootstrap.sol#L33-L165](https://github.com/bcnmy/nexus/blob/0f63f69f3ca367f83a192914a050a978f963dca3/contracts/contracts/utils/RegistryBootstrap.sol#L33-L165) ## constable-states Impact: Optimization :red_circle: Confidence: High - [ ] ID-1 [RegistryAdapter.registry]([base/RegistryAdapter.sol#L12](https://github.com/bcnmy/nexus/blob/0f63f69f3ca367f83a192914a050a978f963dca3/contracts/contracts/base/RegistryAdapter.sol#L12)) should be constant [base/RegistryAdapter.sol#L12](https://github.com/bcnmy/nexus/blob/0f63f69f3ca367f83a192914a050a978f963dca3/contracts/contracts/base/RegistryAdapter.sol#L12) - [ ] ID-2 [RegistryFactory.threshold]([factory/RegistryFactory.sol#L39](https://github.com/bcnmy/nexus/blob/0f63f69f3ca367f83a192914a050a978f963dca3/contracts/contracts/factory/RegistryFactory.sol#L39)) should be constant [factory/RegistryFactory.sol#L39](https://github.com/bcnmy/nexus/blob/0f63f69f3ca367f83a192914a050a978f963dca3/contracts/contracts/factory/RegistryFactory.sol#L39)

This comment was automatically generated by the GitHub Actions workflow.