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

filter name-reused to only run on Truffle projects #2390

Closed
0xalpharush opened this issue Mar 29, 2024 · 0 comments
Closed

filter name-reused to only run on Truffle projects #2390

0xalpharush opened this issue Mar 29, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@0xalpharush
Copy link
Contributor

The detector should check which platform was used with https://crytic.github.io/crytic-compile/crytic_compile/crytic_compile.html#CryticCompile.platform and https://crytic.github.io/slither/slither/core/compilation_unit.html#SlitherCompilationUnit.crytic_compile

WIKI_EXPLOIT_SCENARIO = """
Bob's `truffle` codebase has two contracts named `ERC20`.
When `truffle compile` runs, only one of the two contracts will generate artifacts in `build/contracts`.
As a result, the second contract cannot be analyzed.
"""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Rename the contract."
# pylint: disable=too-many-locals,too-many-branches
def _detect(self) -> List[Output]:

https://github.com/crytic/crytic-compile/blob/b5c538aaa66be44b7a68d9723881a7eba2c20898/crytic_compile/platform/truffle.py#L83-L90

@0xalpharush 0xalpharush added enhancement New feature or request good first issue Good for newcomers labels Mar 29, 2024
nsiregar added a commit to nsiregar/slither that referenced this issue Mar 31, 2024
0xalpharush added a commit that referenced this issue Apr 7, 2024
Filter name-reused detector to only run on Truffle projects (#2390)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant