Skip to content

Commit

Permalink
Merge pull request #2298 from crytic/dev-triage-db
Browse files Browse the repository at this point in the history
Make triage database path customizable
  • Loading branch information
0xalpharush authored Feb 19, 2024
2 parents 9fa8e8e + 4f09d23 commit 3163e24
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion slither/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,12 +528,20 @@ def parse_args(

group_misc.add_argument(
"--triage-mode",
help="Run triage mode (save results in slither.db.json)",
help="Run triage mode (save results in triage database)",
action="store_true",
dest="triage_mode",
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(
"--config-file",
help="Provide a config file (default: slither.config.json)",
Expand Down
2 changes: 2 additions & 0 deletions slither/slither.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ def __init__(self, target: Union[str, CryticCompile], **kwargs) -> None:
self._exclude_dependencies = kwargs.get("exclude_dependencies", False)

triage_mode = kwargs.get("triage_mode", False)
triage_database = kwargs.get("triage_database", "slither.db.json")
self._triage_mode = triage_mode
self._previous_results_filename = triage_database

printers_to_run = kwargs.get("printers_to_run", "")
if printers_to_run == "echidna":
Expand Down
1 change: 1 addition & 0 deletions slither/utils/command_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class FailOnLevel(enum.Enum):
"no_fail": False,
"sarif_input": "export.sarif",
"sarif_triage": "export.sarif.sarifexplorer",
"triage_database": "slither.db.json",
**DEFAULTS_FLAG_IN_CONFIG_CRYTIC_COMPILE,
}

Expand Down

0 comments on commit 3163e24

Please sign in to comment.