Merge pull request #2298 from crytic/dev-triage-db

Make triage database path customizable
pull/2288/merge
alpharush 9 months ago committed by GitHub
commit 3163e248dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      slither/__main__.py
  2. 2
      slither/slither.py
  3. 1
      slither/utils/command_line.py

@ -528,12 +528,20 @@ def parse_args(
group_misc.add_argument( group_misc.add_argument(
"--triage-mode", "--triage-mode",
help="Run triage mode (save results in slither.db.json)", help="Run triage mode (save results in triage database)",
action="store_true", action="store_true",
dest="triage_mode", dest="triage_mode",
default=False, default=False,
) )
group_misc.add_argument(
"--triage-database",
help="File path to the triage database (default: slither.db.json)",
action="store",
dest="triage_database",
default=defaults_flag_in_config["triage_database"],
)
group_misc.add_argument( group_misc.add_argument(
"--config-file", "--config-file",
help="Provide a config file (default: slither.config.json)", help="Provide a config file (default: slither.config.json)",

@ -135,7 +135,9 @@ class Slither(
self._exclude_dependencies = kwargs.get("exclude_dependencies", False) self._exclude_dependencies = kwargs.get("exclude_dependencies", False)
triage_mode = kwargs.get("triage_mode", False) triage_mode = kwargs.get("triage_mode", False)
triage_database = kwargs.get("triage_database", "slither.db.json")
self._triage_mode = triage_mode self._triage_mode = triage_mode
self._previous_results_filename = triage_database
printers_to_run = kwargs.get("printers_to_run", "") printers_to_run = kwargs.get("printers_to_run", "")
if printers_to_run == "echidna": if printers_to_run == "echidna":

@ -70,6 +70,7 @@ defaults_flag_in_config = {
"no_fail": False, "no_fail": False,
"sarif_input": "export.sarif", "sarif_input": "export.sarif",
"sarif_triage": "export.sarif.sarifexplorer", "sarif_triage": "export.sarif.sarifexplorer",
"triage_database": "slither.db.json",
**DEFAULTS_FLAG_IN_CONFIG_CRYTIC_COMPILE, **DEFAULTS_FLAG_IN_CONFIG_CRYTIC_COMPILE,
} }

Loading…
Cancel
Save