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).
Closes #461
This PR adds a rule which verifies that the signature length check is ensured using the
_checkSignaturesLength(...)
in theSafe4337Module
.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 acanonicalSignatureHash(...)
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).