echidna icon indicating copy to clipboard operation
echidna copied to clipboard

Enable FFI cheatcode

Open montyly opened this issue 3 years ago • 2 comments

By default HEVM creates a VM where vmoptAllowFFI is set to false:

https://github.com/dapphub/dapptools/blob/a2b96cc2dbc28508c9fe699d6438bf6eccafc2ad/src/hevm/src/EVM/Exec.hs#L21-L46

We can add a flag in Echidna to set this to true (or just always enable it to true if it does not impact performance).

montyly avatar Apr 02 '22 08:04 montyly

Rather than impacting peformance, true-by-default may impact developer's local security, so a flag would probably be preferable

It is generally advised to use this cheat code as a last resort, and to not enable it by default, as anyone who can change the tests of a project will be able to execute arbitrary commands on devices that run the tests. (from foundry docs)

patrickd- avatar Apr 02 '22 09:04 patrickd-

I'm working on this in #750, it should work if you want to test it.

gustavo-grieco avatar Apr 04 '22 09:04 gustavo-grieco

Already in master.

gustavo-grieco avatar Jan 26 '23 08:01 gustavo-grieco