Redundant CLI output
meanrin opened this issue · comments
At the moment credsweeper produce output to the CLI event if --save-json
option is selected
This creates redundancy, as CLI output duplicate same data that saved to the json file
Apparently it might create issue if credsweeper called as sub-process in a java application, as CLI out is too long to be parsed properly. That might create a zombie process as a result
$ python -m credsweeper --path "tests/samples/password" --ml_validation --save-json o.json
rule: Password / severity: medium / line_data_list: [line: 'password = "cackle!"' / line_num: 1 / path: tests/samples/password / value: 'cackle!' / entropy_validation: False] / api_validation: NOT_AVAILABLE / ml_validation: VALIDATED_KEY
Propose to suppress CLI out if --save-json
selected
$ python -m credsweeper --path "tests/samples/password" --ml_validation --save-json o.json
OR add -q/--quiet
as an option to suppress CLI out
$ python -m credsweeper --path "tests/samples/password" --ml_validation --save-json o.json -q
I agree to suppress CLI output when --save-json
selected.
Thank you for propose!