File: internal/tool/config_tool.go L120.
strings.Contains(lower, 'token') masks any key containing 'token'. Executed proof: config set max_tokens 8192 echoes '(secret stored securely)'; context_tokens likewise. Value IS stored correctly - only the display misleads users into thinking a plain numeric went into secret storage, and they cannot confirm the value.
Impact: Low-Medium - misleading security-related feedback.
Fix: whitelist known secret keys (api_key/auth_token/...) instead of substring.
Verified by independent re-review with executed repro.
File: internal/tool/config_tool.go L120.
strings.Contains(lower, 'token') masks any key containing 'token'. Executed proof: config set max_tokens 8192 echoes '(secret stored securely)'; context_tokens likewise. Value IS stored correctly - only the display misleads users into thinking a plain numeric went into secret storage, and they cannot confirm the value.
Impact: Low-Medium - misleading security-related feedback.
Fix: whitelist known secret keys (api_key/auth_token/...) instead of substring.
Verified by independent re-review with executed repro.