Skip to content

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

Draft
marceloceccon wants to merge 1 commit intomainfrom
alert-autofix-5
Draft

Potential fix for code scanning alert no. 5: Clear-text logging of sensitive information#3
marceloceccon wants to merge 1 commit intomainfrom
alert-autofix-5

Conversation

@marceloceccon
Copy link
Copy Markdown
Member

Potential fix for https://github.com/entropyvortex/clashcode/security/code-scanning/5

The best fix is to avoid logging any portion of the resolved API key and instead log only non-sensitive metadata (for example, whether a key was resolved). This preserves functionality and demo intent without exposing secrets.

Concrete change:

  • In examples/keychain-setup.ts, replace the line that logs resolved?.slice(0, 16) with a safe status-only message (e.g., “found/missing”).
  • No changes are required in src/config/keychain.ts because the issue is the logging sink, not the retrieval logic.
  • No new methods/imports/dependencies are needed.

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