safe-global / safe-modules

A collection of modules that can be used with the Safe contract
GNU Lesser General Public License v3.0
140 stars 73 forks source link

Signature Length Check FV #464

Closed remedcu closed 1 month ago

remedcu commented 1 month ago

Closes #461

This PR adds a rule which verifies that the signature length check is ensured using the _checkSignaturesLength(...) in the Safe4337Module.

The rule ensures that a signature that the bundler could manipulate, which could clear the check in Safe using checkSignatures(...) will still get caught using the _checkSignaturesLength(...). For this, we use a canonicalSignatureHash(...) which generates the same hash for valid signatures, with and without the excess data. An example is added to show this case before the function is written.

Also have added the workflow for checking the same in CI (Currently, it uses a script, which will be modified in a later PR to be consistent with our other repos).

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 9988150675

Details


Totals Coverage Status
Change from base Build 9906147334: 0.0%
Covered Lines: 51
Relevant Lines: 51

💛 - Coveralls