Skip to content

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

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

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

Conversation

@johnteee
Copy link
Copy Markdown
Member

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

General fix: never include raw credential-bearing input in log/error text. Log a generic validation failure, optionally with non-sensitive metadata (like argument name and expected format), but not the provided value.

Best targeted fix here: in teaagent/cli/_handlers/_mcp.py, replace the stderr print at line 47 to remove {spec} entirely. Keep functionality unchanged (still rejects malformed input and returns 1), while preventing accidental secret disclosure. No new methods/imports/dependencies are required.

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