-
Notifications
You must be signed in to change notification settings - Fork 58
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
Feat: filter functions #275
Conversation
fuzzing/config/config.go
Outdated
@@ -128,6 +129,12 @@ type TestingConfig struct { | |||
// even if this option is not enabled. | |||
TraceAll bool `json:"traceAll"` | |||
|
|||
// FilterWhitelist describes an array of function signatures that are to be called during a fuzzing campaign (if FilterBlacklist is set to false). | |||
FilterWhitelist []string `json:"filterFunctions"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FilterWhitelist []string `json:"filterFunctions"` | |
FilterWhitelist []string `json:"filterWhitelist"` |
Right now, it's essentially like we have a default arg of |
This PR (closes issue #248 ) adds
FilterFunctions
andFilterBlacklist
options to the fuzzer's configuration. WhenFilterBlacklist
is set to true, specified functions inFilterFunctions
array are excluded from fuzzing; when false, only these functions are included. The FilterFunctions array should consist of contract names and function signatures for blacklisting/whitelisting. Additional validation logic added to ensure the array is not empty when whitelisting is enabled.