Skip to content

[business-logic] config_tool.go 'token' substring masking reports max_tokens as 'secret stored securely' #825

Description

@topcheer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions