mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 06:51:16 +08:00
feat: add config toggle to disable secret redaction
New config option:
security:
redact_secrets: false # default: true
When set to false, API keys, tokens, and passwords are shown in
full in read_file, search_files, and terminal output. Useful for
debugging auth issues where you need to verify the actual key value.
Bridged to both CLI and gateway via HERMES_REDACT_SECRETS env var.
The check is in redact_sensitive_text() itself, so all call sites
(terminal, file tools, log formatter) respect it.
This commit is contained in:
7
cli.py
7
cli.py
@@ -364,6 +364,13 @@ def load_cli_config() -> Dict[str, Any]:
|
||||
if model:
|
||||
os.environ[model_env] = model
|
||||
|
||||
# Security settings
|
||||
security_config = defaults.get("security", {})
|
||||
if isinstance(security_config, dict):
|
||||
redact = security_config.get("redact_secrets")
|
||||
if redact is not None:
|
||||
os.environ["HERMES_REDACT_SECRETS"] = str(redact).lower()
|
||||
|
||||
return defaults
|
||||
|
||||
# Load configuration at module startup
|
||||
|
||||
Reference in New Issue
Block a user