Skip to content

[security] v1.116 lowers security by breaking GitHub Copilot AI per-workspace opt-in #310143

Closed

Description

Users may have some workspaces used with GitHub Copilot, but also have other sensitive workspaces for which under no circumstances must any local information be sent to an LLM. VSCode v.116 has broken the ability to opt-in to GitHub Copilot AI, and instead forced sensitive workspaces to opt-out of GitHub Copilot AI. This is not workable and against security best practices. Now VS Code exposes a system to inadvertently leaking information in arbitrary directories.

Expected: Before v1.116 I could disable GitHub Copilot globally, and only enable it on a per-workspace basis. I would do this by disabling the plugin globally, and then selecting "enable (workspace)" only in each workspace for which I wanted to use GitHub Copilot. This is referred to as "opt-in". This is security best practices: I should not be required to hunt down all my sensitive workspaces and opt them out. Instead, I should be allowed to only opt-in workspaces that I want to use with AI.

Actual: In v1.116 GitHub Copilot is built-in. There is now only a single chat.disableAIFeatures setting which allows the user to turn off AI either globally, or on a per-workspace basis. The plugin no longer has an option to enable it on a per-workspace basis, because the plugin is now built in. Although it appears I can disable AI, for one particular workspace, this is an "opt-out" paradigm which is extremely insecure.

Discussion

Imagine if a user has 10 sensitive directories (e.g. bank statements, love letters, the formulas for secret sauces). Some of them may not even have VS Code workspace yet, as VS Code automatically creates workspaces when a directory is opened. It is unacceptable, intrusive, and unreasonable that the user must go into each of these 10 sensitive directories, create VS Code workspaces for them, and then opt them out. What if the user forgets a directory? Plus the user has to open VS Code in that directory opt them out!

Implications: Abandoning VS Code

The lack of an opt-in mechanism is simply too great of a security risk. I cannot expose all my system to the possibility of inadvertently sending information to LLMS from sensitive directories. If VS Code is removing its AI opt-in feature, I will be removing VS Code as my default editor.

VS Code is not secure unless it brings back an opt-in feature for AI. I will not expose my entire system to an information-leaking security risk.

Activity

  1. added
    chat-ext-issue
    on Apr 15, 2026
  2. garretwilson commented on Apr 15, 2026

    @garretwilson
    Author

    To add insult to injury, if you disable AI for a particular workspace using "chat.disableAIFeatures": true, if the workspace is restricted (the secure mode) then every time you try to open that workspace, VS Code nags you trust the folder (i.e. to make the workspace less secure) in order to disable AI!

    Do you trust the authors of the files in this folder?

    A feature you are trying to use may be a security risk if you do not trust the source of the files or folders you currently have open.

    If you don't trust the authors of these files, we do not recommend continuing as the files may be malicious. …

    Image

    Apparently it sees a feature related to AI and warns of a security risk, even though the AI "feature" is the option to turn off AI!

    This is a secondary issue. However it illustrates two things:

    • The default use of AI is a security issue, as the warning basically admits.
    • The disconnect that VS Code thinks you must lower security of a workspace in order to disable AI to make it more secure shows how forcing an opt-out paradigm is against security best practices and was ill-thought-out to begin with.

    I reiterate: VS Code must have an AI opt-in mechanism, not an opt-out mechanism.

  3. removed
    chat-ext-issue
    on Apr 15, 2026
  4. added
    bug
    confirmed
    regression
    on Apr 16, 2026
  5. added
    important
    on Apr 16, 2026
  6. bpasero commented on Apr 16, 2026

    @bpasero
    Contributor

    Garret Wilson (@garretwilson) the intent was not to break this scenario but preserve the ability to allow to globally disable the extension and then enable it on a per-workspace.

    However it turns out that the action appears disabled, which is clearly a bug:

    Image

    You can still configure chat.disableAIFeatures as a workspace setting and that will work, but its not the ideal solution.

    Thanks for the report, we will fix this asap.

  7. added a commit that references this issue on Apr 16, 2026
    e4fd096
  8. sandy081 commented on Apr 16, 2026

    @sandy081
    Member

    Verification Steps:

    • Open Extensions view in VS Code on Folder 1
    • Type @builtin chat
    • Right click on Copilot Chat extension and run Disable AI Features action
    • Make sure AI features are disabled
    • Close and Open VS Code on Folder 2
    • Make sure AI features are disabled
    • Go to Extensions View and type @builtin chat
    • Right click on Copilot Chat extension and run Enable AI Features (Workspace) action
    • Make sure AI features are enabled in this Folder 2
    • Open VS Code on Folder 1 and make sure AI features are still disabled in Folder 1 and also on any other folders
  9. added
    unreleased
    on Apr 16, 2026
  10. added a commit that references this issue on Apr 16, 2026
    17c5eed
  11. added
    insiders-released
    and removed
    unreleased
    on Apr 17, 2026
  12. added
    verified
    on Apr 20, 2026
  13. garretwilson commented on Apr 22, 2026

    @garretwilson
    Author

    No, this is still broken in v1.117, because the workspace opt-in setting don't persist. I have filed ticket #311898.

    Verification Steps:

    • Open Extensions view in VS Code on Folder 1
    • Type @builtin chat
    • Right click on Copilot Chat extension and run Disable AI Features action
    • Make sure AI features are disabled
    • Close and Open VS Code on Folder 2
    • Make sure AI features are disabled
    • Go to Extensions View and type @builtin chat
    • Right click on Copilot Chat extension and run Enable AI Features (Workspace) action
    • Make sure AI features are enabled in this Folder 2
    • Open VS Code on Folder 1 and make sure AI features are still disabled in Folder 1 and also on any other folders

    Sandeep Somavarapu (@sandy081) it appears that your verification steps were missing these:

    • Close and Reopen VS Code on Folder 2
    • Verify that AI features are still enabled in this Folder 2

    Benjamin Pasero (@bpasero), this needs to be fixed immediately, and a new out-of-band hotfix release should be made for it. In fact the original issue should have been taken as higher priority and a hotfix released for it as well.

  14. locked and limited conversation to collaborators on May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugconfirmedimportantinsiders-releasedregressionverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions