Support for redacting private/sensitive information #20951

Open
opened 2026-01-31 07:28:47 +00:00 by claunia · 2 comments
Owner

Originally created by @StephenCleary on GitHub (Dec 5, 2023).

Description of the new feature/enhancement

I'd like the ability to automatically mask sensitive information in terminal windows. Masking application output would be great; masking user input (e.g., passwords on command line) would be nice as well.

This would be useful when screen sharing, demos, and when recording screencasts.

Warp does this.

Proposed technical implementation details (optional)

Terminal needs to know what to mask. At the very least it should have a user-editable series of regexes to detect potentially sensitive information. Even better would be integration with GitHub's existing secret scanning code, masking anything that matches GitHub's token patterns.

Masked information could use a specific Unicode character (or one of a few similar Unicode characters), so it's as obvious as possible that the output was masked.

Ideally, copying a masked value would copy the original plaintext, so copy/paste works the same as it always does, ignoring the masking.

Originally created by @StephenCleary on GitHub (Dec 5, 2023). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement I'd like the ability to automatically mask sensitive information in terminal windows. Masking application output would be great; masking user input (e.g., passwords on command line) would be nice as well. This would be useful when screen sharing, demos, and when recording screencasts. [Warp does this](https://mkennedy.codes/posts/hide-those-terminal-secrets/). <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) Terminal needs to know what to mask. At the very least it should have a user-editable series of regexes to detect potentially sensitive information. Even better would be integration with GitHub's existing secret scanning code, masking anything that matches GitHub's token patterns. Masked information could use a specific Unicode character (or one of a few similar Unicode characters), so it's as obvious as possible that the output was masked. Ideally, copying a masked value would copy the original plaintext, so copy/paste works the same as it always does, ignoring the masking. <!-- A clear and concise description of what you want to happen. -->
claunia added the Area-OutputIssue-TaskProduct-Terminal labels 2026-01-31 07:28:48 +00:00
Author
Owner

@237dmitry commented on GitHub (Dec 5, 2023):

Like this?

Screenshot 2023-12-06 000442

@237dmitry commented on GitHub (Dec 5, 2023): Like this? ![Screenshot 2023-12-06 000442](https://github.com/microsoft/terminal/assets/78153320/1aa9c3f1-5ca7-46c5-8775-b312b2275c37)
Author
Owner

@zadjii-msft commented on GitHub (Dec 5, 2023):

I saw something like this a while back

image

from https://youtu.be/NxsaHxON350?si=af0dLmZVEYsIeJN-&t=503

and I thought it was genuinely super cool. Now admittedly, this is from a project where someone is writing their own shell, so they're able to parse all the output from the client app then change it to colored block-drawing characters before it even hits the Terminal, but I thought it was a super clever idea.

(this of course wouldn't work for a11y at all, but then presumably, you'd disable it if you use a screen reader)

also xlink #5916

@zadjii-msft commented on GitHub (Dec 5, 2023): I saw something like this a while back ![image](https://github.com/microsoft/terminal/assets/18356694/9dba8d97-9976-4fa7-aa12-cef0f38c8960) from https://youtu.be/NxsaHxON350?si=af0dLmZVEYsIeJN-&t=503 and I thought it was genuinely super cool. Now admittedly, this is from a project where someone is writing their own _shell_, so they're able to parse all the output from the client app then change it to colored block-drawing characters before it even hits the Terminal, but I thought it was a super clever idea. (this of course wouldn't work for a11y at all, but then presumably, you'd disable it if you use a screen reader) also xlink #5916
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20951