Skip to content

Potential fix for code scanning alert no. 5: Clear-text logging of sensitive information#6

Draft
johnteee wants to merge 1 commit into
mainfrom
alert-autofix-5
Draft

Potential fix for code scanning alert no. 5: Clear-text logging of sensitive information#6
johnteee wants to merge 1 commit into
mainfrom
alert-autofix-5

Conversation

@johnteee
Copy link
Copy Markdown
Member

Potential fix for https://github.com/TeaEntityLab/teaAgent/security/code-scanning/5

Best fix: keep behavior (validation + user-facing errors) but remove dynamic sensitive content from error strings returned by _load_key_ring, so line 27 can safely print generic errors.

In teaagent/cli/_handlers/_mcp.py, update _load_key_ring error messages that currently include {path}, {exc}, {kid!r}, or {active_kid!r} to static/sanitized text. This addresses both variants because error at line 27 will no longer carry tainted sensitive data. No functional flow changes are needed; only message content changes.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…nsitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant