Skip to content

Feature: Auto-mask API keys in VS Code extension chat #22548

Closed as not planned
Closed as not planned

Description

@Arterial78

API keys and secrets should be automatically detected and masked in the VS Code extension chat interface.

Currently, if an API key appears in conversation (e.g., from reading a config file or user input), it displays in plaintext. This is poor security UX - keys should be redacted to something like sk-proj-****...**** in the display layer.

Many tools implement this pattern (GitHub redacts tokens in logs, etc.). Would improve the security posture of the extension.

Note: This was observed in the VS Code extension - untested whether CLI has the same behavior.

Activity

  1. github-actions commented on Feb 2, 2026

    @github-actions

    Found 3 possible duplicate issues:

    1. [BUG] Claude displayed sensitive .env credentials (API keys, secrets) in output when it should have redacted them. #18223
    2. [HIGH PRIORITY] Claude exposes secrets/tokens in tool output - no redaction #20966
    3. [BUG] 5th time I instructed Claude Cli to NOT display key while editing .env.local. Then it shows it! #17523

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. stevenelliottjr commented on Feb 2, 2026

    @stevenelliottjr

    Related: I've created a plugin that provides secret detection for the CLI: PR #22594

    The secrets-scanner plugin scans all tool output for 35+ secret patterns and displays warnings when credentials are detected. While it doesn't auto-mask (which would require core/UI changes), it provides immediate alerts.

    This could potentially be adapted for the VS Code extension as well.

  3. github-actions commented on Mar 3, 2026

    @github-actions

    Closing for now — inactive for too long. Please open a new issue if this is still relevant.

  4. github-actions commented on Mar 12, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  5. locked as resolved and limited conversation to collaborators on Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions