-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Workspace trust: improve docs #15531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,23 @@ | ||
| # Workspace trust | ||
|
|
||
| Helix has a number of potentially dangerous features, namely LSP and ability to use local to workspace configurations. Those features can lead to unexpected code execution. To protect against code execution in dangerous contexts, Helix has a workspace trust protection, which will prevent these potentially dangerous features from running automatically. | ||
| Helix has a concept of workspace trust. Workspace that is not deemed to be trusted cannot: | ||
|
|
||
| Helix will not trust any workspace by default. | ||
| - load `.helix/languages.toml` and `.helix/config.toml` files found in the workspace; | ||
| - start a language server. | ||
|
|
||
| By default, it will prompt about trust when you open new file in a workspace where you didn't make a decision about trust yet. | ||
| Helix will not trust any workspace by default. | ||
|
|
||
| If you decide not to trust a workspace and don't want to be prompted about trust every time you start a new session in it, you can exclude the workspace by choosing `Never` option in trust selection window. | ||
| When you open a file in an untrusted workspace, you will be prompted about trust. You can make a choice with arrow keys, `<Tab>`, `<C-n>` and `<C-p>`, confirming selection with `<Enter>`. Typing anything else will close the menu selecting 'Not now' option. | ||
|
|
||
| You can always make current workspace trusted by running `:workspace-trust` command, and untrust it with `:workspace-untrust`. | ||
| You can always make active workspace trusted by running `:workspace-trust` command, or you can remove trust with `:workspace-untrust`. | ||
|
|
||
| Lists of trusted and excluded workspaces, delimited by newline characters, are stored in `~/.local/share/helix/trusted_workspaces` and `~/.local/share/helix/excluded_workspaces` correspondingly. | ||
| <!-- TODO: Windows paths --> | ||
| Lists of trusted and excluded workspaces, delimited by newline characters, are stored in: | ||
| - Linux and macOS: `~/.local/share/helix/trusted_workspaces` and `~/.local/share/helix/excluded_workspaces` | ||
| - Windows: `%AppData%/Roaming/helix/trusted_workspaces` and `%AppData%/Roaming/helix/excluded_workspaces` | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Windows path is taken from |
||
|
|
||
| # Configuration | ||
|
|
||
| You can return to the old behaviour of loading every local `.helix/config.toml` and `.helix/languages.toml` and starting LSP's without an explicit permission by setting following option: | ||
| You can return to the old behavior of implicitly trusting every workspace by setting configuration option: | ||
|
|
||
| ```toml | ||
| [editor] | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably more words than we really need, but what I am trying to say here is: you can make the menu go away by pressing pretty much any button except those that do something in the menu.
I think that's really important to understand, so that the thing doesn't get in the way. On the second thought, it should get pretty apparent when you actually use the thing yourself, so it might not need an explanation.