Skip to content

Support another settings scope for safe per-project configuration #103100

@hyangah

Description

@hyangah

As discussed briefly in the "Settings and security" document, some settings are dangerous
to be set through the workspace settings - i.e. an attacker can influence an extension to run
arbitrary binaries by storing a workspace settings file formulated in a specific way and
convincing users to browse the repo with vscode.

Security concerns around the workspace settings were raised for various extensions
multiple times (e.g. vscode-python, etc).

One option to reduce such risks is to disallow workspace settings for those critical ones.
E.g. using the machine scope, or implementing a custom way to read only global settings.
However, this completely prevents from project-specific settings, which is not desirable.
(e.g. I want to use a different version of a tool for a different project)

Another option is to use VSCode storage (e.g. move of python's pythonPath).
However, this comes with its own cost - each extension has to come up with its own
UI/UX solution so that users can easily browse and set those settings.
This is not ideal for consistent user experience across extensions and VS code itself.

Neither option is satisfactory. Can you consider another mode of settings that allows
per-project settings, but does not store the state as a file in the repo? The settings should
be still configurable through VS Code's awesome, user-friendly settings UI.

Metadata

Metadata

Labels

under-discussionIssue is under discussion for relevance, priority, approach

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions