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

Option to exclude filename and lines from detector message #2222

Open
eshaan7 opened this issue Nov 7, 2023 · 2 comments
Open

Option to exclude filename and lines from detector message #2222

eshaan7 opened this issue Nov 7, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@eshaan7
Copy link

eshaan7 commented Nov 7, 2023

Current Behavior

Currently, the detector messages always include the location (filename and lines) in the results. Examples:

  • ReentranceExploit.get_money() (ReentrancyExploit.sol#35-37) allows anyone to destruct the contract
  • interface_conversion.tester (interface_conversion.vy#4) should be constant

Proposed Behavior

An optional argument, say --exclude-location, that excludes the location information (filename and lines) from the detector messages in the results.

Insipiration

Having the location info in the message is especially noisy in VS code since you anyways know which line it is referring to.

image

Also makes it difficult to parse these messages when building a third party integration.

@eshaan7 eshaan7 added the enhancement New feature or request label Nov 7, 2023
@0xalpharush
Copy link
Contributor

Fwiw, there are multiple machine readable formats available --sarif - and --json -

@eshaan7
Copy link
Author

eshaan7 commented Nov 7, 2023

Fwiw, there are multiple machine readable formats available --sarif - and --json -

Yes, but the detector messages contain such location info regardless of output format. The option I am proposing should exclude these irrespective of the output format.

@0xalpharush 0xalpharush added the good first issue Good for newcomers label Apr 8, 2024
DarkaMaul added a commit that referenced this issue Apr 16, 2024
This PR adds a new parameter to slither (--exlude-location) that exclude locations information from printer output.

Closes #2222
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

2 participants