Skip to content
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

Functions that send native eth without having msg.sender checks #597

Conversation

TilakMaddy
Copy link
Contributor

@TilakMaddy TilakMaddy commented Jul 17, 2024

This creates a callgraph. Because we are unsure of performance, etc. ... I have added this to --auditor-mode

cargo run tests/contract-playground --auditor-mode

Let's play with this for a while before converting it to a detector

UPDATE:

Now it's converted to deetctor

@TilakMaddy TilakMaddy force-pushed the auditor-mode-experiment/functions-that-send-ether-without-msg-sender-checks branch from d244b4b to 553ca05 Compare July 17, 2024 11:08
@TilakMaddy TilakMaddy marked this pull request as ready for review July 18, 2024 02:51
@TilakMaddy TilakMaddy requested a review from alexroan as a code owner July 18, 2024 02:51
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New auditor detector here :)

Copy link
Contributor

@alexroan alexroan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want this to be a normal detector, so let's move it there instead of auditor mode.

Completely agree with concerns about performance. My thinking is that, once we have more detector tickets completed, we will do a sprint which will be themed on performance, efficiency, etc.

aderyn_core/src/audit/send_ether_no_checks.rs Outdated Show resolved Hide resolved
@@ -1659,6 +1678,24 @@ Instead of marking a function as `public`, consider marking it as `external` if
function onlyOwnerManualIfRevertCheck() public view {
```

- Found in src/auditor_mode/send_ether_no_checks/Tower.sol [Line: 19](../tests/contract-playground/src/auditor_mode/send_ether_no_checks/Tower.sol#L19)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make these external so that they aren't caught here?


<details><summary>1 Found Instances</summary>


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one instance found? Should we expect more?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, just one I think.

@@ -0,0 +1,208 @@
//! This module helps with strategies on performing different types of investigations.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should move this to a different folder? Maybe browser or context or its own new one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

browser would suitable.

@TilakMaddy TilakMaddy marked this pull request as draft July 19, 2024 16:05
@TilakMaddy
Copy link
Contributor Author

This detector will be part of #605

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants