slither icon indicating copy to clipboard operation
slither copied to clipboard

Slither output as CSV format

Open mrthankyou opened this issue 3 years ago • 1 comments
trafficstars

Describe the desired feature

What's The Problem

Slither output in the terminal can become nearly impossible to read if the contract being analyzed is large. In numerous cases I've had to dramatically decrease the font size in my terminal in order to read the text.

Potential Solution

It would be great if slither had an option to output the results in csv format. This would make it easier for users to review the output.

Anything Else I Should Know

I would be tempted to build this if any of the devs think this task is doable and can be accomplished without major refactorings, etc. I have not investigated the slither code base so I'm not sure how easy it would be to do this. If it's manageable, I think sometime in the near future I can contribute to building this feature.

mrthankyou avatar Mar 25 '22 20:03 mrthankyou

Hi @mrthankyou.

There is an (undocumented) flag that might be useful for you: --checklist. This will create a markdown file with all the detector results.

I improved the documentation of this flag in https://github.com/crytic/slither/pull/1190, you will find more info here: https://github.com/crytic/slither/blob/bd827e748a223726f829a6376d1f04c0a0bf45b1/README.md#integration

Additionally, I would recommend to check out our github-action: https://github.com/crytic/slither-action, in particular the github code scanning integration: https://github.com/crytic/slither-action#github-code-scanning-integration

If neither of these solutions work for you, we actually already have a json output --json; but we could also implement a csv if there is a need for it.

montyly avatar Apr 27 '22 09:04 montyly

I am not sure if this issue is still being considered, but having the option to get a csv (or txt) output directly from the CLI would be a very good idea

krypston104 avatar Nov 01 '22 17:11 krypston104

Hi @montyly , where --checklist create the markdown file? When using it I cannot add something to --checklist and I have the output showing only in my command line interface. I face the same issue as @mrthankyou .

Would it be possible to add an arg for specifying the output file to generate on --checklist report.md, to have the same behavior as the JSON output (which works, but is less readable than the markdown one)

foufrix avatar Jan 06 '23 07:01 foufrix