Giter Site home page Giter Site logo

Modify command line arguments about slither HOT 23 CLOSED

crytic avatar crytic commented on June 28, 2024 3
Modify command line arguments

from slither.

Comments (23)

kirtixs avatar kirtixs commented on June 28, 2024 2

I've created WIP pr in #55
@benstew thanks, any input/help is appreciated

from slither.

benstew avatar benstew commented on June 28, 2024 2

nitpick - @dguido, maybe we should also add a --version command? Keeping things consistent with a common interface.

from slither.

kirtixs avatar kirtixs commented on June 28, 2024 1

added --version command
@benstew some tools require an additional argument in cases where the output should be written to file instead of stdout. This would also give the user more control and no 'unexpected' files would be created.

from slither.

montyly avatar montyly commented on June 28, 2024 1

I think we should keep the exclusion rules related to the severity, such as --exclude-informational.
When reviewing for a first time a codebase, you probably want to focus only on security issues

from slither.

kirtixs avatar kirtixs commented on June 28, 2024 1

@disconnect3d I agree, imho this a very consistent way.
@montyly going to update the --exclude detector-name.. behaviour but I'm not quite sure that we need --list-{printers,detectors} commands as the values are already displayed in the help.

from slither.

kirtixs avatar kirtixs commented on June 28, 2024 1

I've added --list-{printers,detectors} and utilised the already available output_to_markdown method and adapted it for printers, let me know if this ok.

Also I played a bit around with json output and I think the current behaviour is just fine, i.e --json results.json instead of adding a new --output flag. This is because printers print to stdout by default and this would require a bit more work. I'm becoming more and more unsure if this should be added.

You can also ping me on slack if you want to for further discussions.

from slither.

yohanelly95 avatar yohanelly95 commented on June 28, 2024 1

Is there a resource with all the possible slither args? I am trying to slither with foundry so it would be helpful

from slither.

kirtixs avatar kirtixs commented on June 28, 2024

Personally I'd say this is more consistent with other tools.
I'm going to take a look at this tomorrow.

from slither.

benstew avatar benstew commented on June 28, 2024

In agreement here. I would be in favor of changing following @dguido's suggestion.

It seems like one of the only open items would be around the default --print option. I don't think we need to overthink this, just utilizing the contract summary as the default should add utility. If another printer is sought, it's easy to update the parameters. Plus it will support the existing printer documentation quite seamlessly. Happy to lend a hand @redshark1802.

from slither.

kirtixs avatar kirtixs commented on June 28, 2024

Currently json ouput prints to a file, how should the the argument for output look like?
We would have to require one additional argument for the json output filename if json was chosen.

from slither.

benstew avatar benstew commented on June 28, 2024

@redshark1802 do you think that specifying the output filename warrants an additional required argument? Seems like we could just default to something intuitive for the time being. We can always add this functionality later based on feedback.

from slither.

disconnect3d avatar disconnect3d commented on June 28, 2024

from slither.

gitcoinbot avatar gitcoinbot commented on June 28, 2024

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 70.0 DAI (70.0 USD @ $1.0/DAI) attached to it as part of the Ethereum Community Fund via ECF Web 3.0 Infrastructure Fund fund.

from slither.

gitcoinbot avatar gitcoinbot commented on June 28, 2024

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 7 months, 2 weeks from now.
Please review their action plans below:

1) redshark1802 has been approved to start work.

WIP #55

Learn more on the Gitcoin Issue Details page.

from slither.

kirtixs avatar kirtixs commented on June 28, 2024

I'm also in favor of leaving the --exclude-[LEVEL] switches in but what about --exclude-backdoor etc?
We still need to decide how to handle the output switch between stdout and json: should we just put the results in results.json when json output is used or additionally ask the user for an output filename?

from slither.

montyly avatar montyly commented on June 28, 2024

I am in favor to ask the user for an output filename, and maye have results.json as default value?

I dont have a strong opinion about the exclude-detector, but I am ok if we use the same system than for detect (--exlude detector1, detector2...), as it allows a better control for the user.

Maybe we could also have --list-detectors and --list-printer to print the text description of each detector/printer?

from slither.

disconnect3d avatar disconnect3d commented on June 28, 2024

We could also put json on the stdout and all the other logs to stderr. This way the user could just do slither ... > output.json.

from slither.

montyly avatar montyly commented on June 28, 2024

With each detector/printer you have an help information, which describes what the detector/printer does.

It could be useful to be able to print that description directly from the command line, so the users don't need to go back to the README page

from slither.

montyly avatar montyly commented on June 28, 2024

Hey, I merged the PR, and added some modifications on the command line (like I removed --output, to only keep --json, we will see in the future how people are using the option)

Thanks for your help and your feedback!

@mkosowsk can you validate the bounty? thx!

from slither.

kirtixs avatar kirtixs commented on June 28, 2024

You're welcome, thanks.

from slither.

mkosowsk avatar mkosowsk commented on June 28, 2024

@redshark1802 please submit the bounty on the Gitcoin Issue Details page and I will pay out ASAP. Thanks! :)

from slither.

gitcoinbot avatar gitcoinbot commented on June 28, 2024

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 70.0 DAI (70.0 USD @ $1.0/DAI) has been submitted by:

  1. @redshark1802

@mkosowsk please take a look at the submitted work:


from slither.

gitcoinbot avatar gitcoinbot commented on June 28, 2024

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 70.0 DAI (70.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @redshark1802.

from slither.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.