diff --git a/freqtrade/configuration/configuration.py b/freqtrade/configuration/configuration.py index 58b1fdf84..0da307175 100644 --- a/freqtrade/configuration/configuration.py +++ b/freqtrade/configuration/configuration.py @@ -200,6 +200,12 @@ class Configuration: config['exportfilename'] = (config['user_data_dir'] / 'backtest_results') + if self.args.get('show_sensitive'): + logger.warning( + "Sensitive information will be shown in the upcomming output. " + "Please make sure to never share this output without redacting " + "the information yourself.") + def _process_optimize_options(self, config: Config) -> None: # This will override the strategy configuration diff --git a/tests/commands/test_commands.py b/tests/commands/test_commands.py index a0908bd78..9b0451f88 100644 --- a/tests/commands/test_commands.py +++ b/tests/commands/test_commands.py @@ -1581,7 +1581,7 @@ def test_start_strategy_updater(mocker, tmp_path): assert sc_mock.call_count == 2 -def test_start_show_config(capsys): +def test_start_show_config(capsys, caplog): args = [ "show-config", "--config", @@ -1608,3 +1608,4 @@ def test_start_show_config(capsys): assert "Your combined configuration is:" in captured.out assert '"max_open_trades":' in captured.out assert '"secret": "REDACTED"' not in captured.out + assert log_has_re(r'Sensitive information will be shown in the upcomming output.*', caplog)