-
Notifications
You must be signed in to change notification settings - Fork 36
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
Added: Slither[arbitrary from in transferFrom] rule | #61 #80
Added: Slither[arbitrary from in transferFrom] rule | #61 #80
Conversation
|
||
use crate::analyzer::ast::{self, Target}; | ||
|
||
pub fn _arbitrary_from_in_transferfrom_vulnerability(source_unit: SourceUnit) -> HashSet<Loc> { |
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.
Can you remove the leading _
from the function name?
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.
Done
ast::extract_target_from_node(Target::FunctionDefinition, source_unit.into()); | ||
|
||
//For each target node that was extracted, check for the vulnerability patterns | ||
for _node in target_nodes { |
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.
Can you remove the _
in front of the _node
since node
is being used?
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.
Done
} = box_fn_definition.body.unwrap() | ||
{ | ||
// We loop through each body expression to determine if 'transferFrom/SafeTransferFrom' is used. | ||
for _statement in statements { |
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.
Same thing here, can you remove the _
in front of _statement
?
Thanks for opening this PR! Just a few comments above. |
851cb1e
to
5dd699f
Compare
Hey thanks for updating this PR as well, will get this reviewed and merged in. |
5dd699f
to
c4b01e5
Compare
Related Issue: #61