-
Notifications
You must be signed in to change notification settings - Fork 87
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
bad transferFrom access control rule #66
Conversation
- requires: INPUT_TO and INPUT_FROM | ||
pattern-either: | ||
- patterns: | ||
- pattern: $TOKEN.transferFrom(...,$FROM,...); |
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.
Shouldn't $FROM always be the first argument in transferFrom?
pattern-either: | ||
- patterns: | ||
- pattern: $TOKEN.transferFrom(...,$FROM,...); | ||
- pattern: $TOKEN.transferFrom(...,$TO,...); |
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.
And $TO is always second in transferFrom
- pattern: $TOKEN.safeTransferFrom(...,$FROM,...); | ||
- pattern: $TOKEN.safeTransferFrom(...,$TO,...); | ||
- patterns: | ||
- pattern: $HELPER.transferFrom($TOKEN,...,$FROM,...); |
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.
if TransferHelper is used $FROM is always second argument
- pattern: $TOKEN.safeTransferFrom(...,$TO,...); | ||
- patterns: | ||
- pattern: $HELPER.transferFrom($TOKEN,...,$FROM,...); | ||
- pattern: $HELPER.transferFrom($TOKEN,...,$TO,...); |
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.
And $TO is always third
@@ -0,0 +1,51 @@ | |||
rules: | |||
- id: bad-transferFrom-access-control |
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.
rule id should be lower case
Don't forget to update README as well |
No description provided.