fix(cli): redact security.recovery_passphrase_hash in show_cmd
Adjacent secret leak in show_cmd noticed during Task 3 code review. SecurityConfig has two sensitive fields and the redaction block only covered pin_hash. vigilar config show would print the recovery passphrase hash verbatim whenever one was configured. One-line fix; same redaction pattern as the surrounding secrets. Part of issue #2. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -49,6 +49,8 @@ def show_cmd(config_path: str | None) -> None:
|
||||
data["web"]["password_hash"] = "***"
|
||||
if data.get("security", {}).get("pin_hash"):
|
||||
data["security"]["pin_hash"] = "***"
|
||||
if data.get("security", {}).get("recovery_passphrase_hash"):
|
||||
data["security"]["recovery_passphrase_hash"] = "***"
|
||||
if data.get("alerts", {}).get("webhook", {}).get("secret"):
|
||||
data["alerts"]["webhook"]["secret"] = "***"
|
||||
click.echo(json.dumps(data, indent=2))
|
||||
|
||||
Reference in New Issue
Block a user