Skip to content
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

Opening a terminal in an empty restricted window #141463

Closed
kieferrm opened this issue Jan 25, 2022 · 4 comments · Fixed by #141660 or #141971
Closed

Opening a terminal in an empty restricted window #141463

kieferrm opened this issue Jan 25, 2022 · 4 comments · Fixed by #141660 or #141971
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders terminal-process Problems launching processes, managing ptys, exiting, process leaks, etc. verified Verification succeeded workspace-trust Trusted workspaces
Milestone

Comments

@kieferrm
Copy link
Member

It's an edge case but worthwhile considering

  1. Ensure that all new windows are in restricted mode by default
  2. Open a new empty window (no open files at all, no open folder)
  3. Use Cmd+`
    -> prompt for trusting the workspace, but there is nothing there to be trusted
@kieferrm kieferrm added the workspace-trust Trusted workspaces label Jan 25, 2022
@sbatten sbatten added the under-discussion Issue is under discussion for relevance, priority, approach label Jan 25, 2022
@sbatten
Copy link
Member

sbatten commented Jan 25, 2022

In this case, it definitely gets in the way that we ask about trust, and also doesn't make too much to limit access to the terminal. However, what considerations should be in place for when someone decides to bring in untrusted content into the workspace after the terminal is opened? Does this matter for empty workspaces @Tyriar?

@Tyriar
Copy link
Member

Tyriar commented Jan 25, 2022

@sbatten it's only useful for the terminal if the folder is of a potentially foreign origin. I could special case this since it's going to open in the home directory anyway, but should it even be possible to have an empty window in restricted mode? Might need to handle this special case in multiple places if it's not handled by the trust request service?

@sbatten
Copy link
Member

sbatten commented Jan 25, 2022

we have settings to configure the empty window experience... this allows empty windows to bring in untrusted content easily without prompting.

@Tyriar
Copy link
Member

Tyriar commented Jan 25, 2022

Ok, let's allow opening the terminal if the active workspace root is undefined then as it's safe in that case.

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug terminal-process Problems launching processes, managing ptys, exiting, process leaks, etc. and removed under-discussion Issue is under discussion for relevance, priority, approach labels Jan 25, 2022
@Tyriar Tyriar assigned Tyriar and meganrogge and unassigned lszomoru and sbatten Jan 25, 2022
@Tyriar Tyriar added this to the January 2022 milestone Jan 25, 2022
meganrogge added a commit that referenced this issue Jan 27, 2022
@meganrogge meganrogge reopened this Jan 28, 2022
meganrogge added a commit that referenced this issue Feb 1, 2022
@amunger amunger added the verified Verification succeeded label Feb 24, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders terminal-process Problems launching processes, managing ptys, exiting, process leaks, etc. verified Verification succeeded workspace-trust Trusted workspaces
Projects
None yet
7 participants
@amunger @Tyriar @lszomoru @kieferrm @sbatten @meganrogge and others