@ -18,6 +18,7 @@ from crytic_compile import cryticparser, CryticCompile
from crytic_compile . platform . standard import generate_standard_export
from crytic_compile . platform . standard import generate_standard_export
from crytic_compile . platform . etherscan import SUPPORTED_NETWORK
from crytic_compile . platform . etherscan import SUPPORTED_NETWORK
from crytic_compile import compile_all , is_supported
from crytic_compile import compile_all , is_supported
import shtab
from slither . detectors import all_detectors
from slither . detectors import all_detectors
from slither . detectors . abstract_detector import AbstractDetector , DetectorClassification
from slither . detectors . abstract_detector import AbstractDetector , DetectorClassification
@ -290,6 +291,8 @@ def parse_args(
usage = usage ,
usage = usage ,
)
)
shtab . add_argument_to ( parser )
parser . add_argument ( " filename " , help = argparse . SUPPRESS )
parser . add_argument ( " filename " , help = argparse . SUPPRESS )
cryticparser . init ( parser )
cryticparser . init ( parser )
@ -465,28 +468,28 @@ def parse_args(
help = ' Export the results as a JSON file ( " --json - " to export to stdout) ' ,
help = ' Export the results as a JSON file ( " --json - " to export to stdout) ' ,
action = " store " ,
action = " store " ,
default = defaults_flag_in_config [ " json " ] ,
default = defaults_flag_in_config [ " json " ] ,
)
) . complete = shtab . FILE
group_misc . add_argument (
group_misc . add_argument (
" --sarif " ,
" --sarif " ,
help = ' Export the results as a SARIF JSON file ( " --sarif - " to export to stdout) ' ,
help = ' Export the results as a SARIF JSON file ( " --sarif - " to export to stdout) ' ,
action = " store " ,
action = " store " ,
default = defaults_flag_in_config [ " sarif " ] ,
default = defaults_flag_in_config [ " sarif " ] ,
)
) . complete = shtab . FILE
group_misc . add_argument (
group_misc . add_argument (
" --sarif-input " ,
" --sarif-input " ,
help = " Sarif input (beta) " ,
help = " Sarif input (beta) " ,
action = " store " ,
action = " store " ,
default = defaults_flag_in_config [ " sarif_input " ] ,
default = defaults_flag_in_config [ " sarif_input " ] ,
)
) . complete = shtab . FILE
group_misc . add_argument (
group_misc . add_argument (
" --sarif-triage " ,
" --sarif-triage " ,
help = " Sarif triage (beta) " ,
help = " Sarif triage (beta) " ,
action = " store " ,
action = " store " ,
default = defaults_flag_in_config [ " sarif_triage " ] ,
default = defaults_flag_in_config [ " sarif_triage " ] ,
)
) . complete = shtab . FILE
group_misc . add_argument (
group_misc . add_argument (
" --json-types " ,
" --json-types " ,
@ -502,13 +505,14 @@ def parse_args(
help = " Export the results as a zipped JSON file " ,
help = " Export the results as a zipped JSON file " ,
action = " store " ,
action = " store " ,
default = defaults_flag_in_config [ " zip " ] ,
default = defaults_flag_in_config [ " zip " ] ,
)
) . complete = shtab . FILE
group_misc . add_argument (
group_misc . add_argument (
" --zip-type " ,
" --zip-type " ,
help = f ' Zip compression type. One of { " , " . join ( ZIP_TYPES_ACCEPTED . keys ( ) ) } . Default lzma ' ,
help = f ' Zip compression type. One of { " , " . join ( ZIP_TYPES_ACCEPTED . keys ( ) ) } . Default lzma ' ,
action = " store " ,
action = " store " ,
default = defaults_flag_in_config [ " zip_type " ] ,
default = defaults_flag_in_config [ " zip_type " ] ,
choices = list ( ZIP_TYPES_ACCEPTED . keys ( ) ) ,
)
)
group_misc . add_argument (
group_misc . add_argument (
@ -540,7 +544,7 @@ def parse_args(
action = " store " ,
action = " store " ,
dest = " config_file " ,
dest = " config_file " ,
default = None ,
default = None ,
)
) . complete = shtab . FILE
group_misc . add_argument (
group_misc . add_argument (
" --change-line-prefix " ,
" --change-line-prefix " ,