Skip to content

Improve the default sensitive history scrubbing to allow safe property access#3630

Merged
andyleejordan merged 1 commit into
PowerShell:masterfrom
daxian-dbw:scrub
Mar 22, 2023
Merged

Improve the default sensitive history scrubbing to allow safe property access#3630
andyleejordan merged 1 commit into
PowerShell:masterfrom
daxian-dbw:scrub

Conversation

@daxian-dbw

@daxian-dbw daxian-dbw commented Mar 21, 2023

Copy link
Copy Markdown
Member

PR Summary

Fix #3318

Improve the default sensitive history scrubbing to allow safe property access.
When the sensitive string is part of a property access:

  • If this member access operation is not part of an assignment, then we consider it safe;
  • Otherwise, if the right-hand side is a pipeline or a variable, we also consider it safe.

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Make sure you've added one or more new tests
  • Make sure you've tested these changes in terminals that PowerShell is commonly used in (i.e. conhost.exe, Windows Terminal, Visual Studio Code Integrated Terminal, etc.)
  • User-facing changes
    • Not Applicable
    • OR
    • Documentation needed at PowerShell-Docs
      • Doc Issue filed:
Microsoft Reviewers: Open in CodeFlow

@andyleejordan andyleejordan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@andyleejordan andyleejordan merged commit 1e84d68 into PowerShell:master Mar 22, 2023
@daxian-dbw daxian-dbw deleted the scrub branch March 22, 2023 22:57
@ghost

ghost commented May 3, 2023

Copy link
Copy Markdown

🎉 v2.3.1-beta1 has been released which incorporates this pull request. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow saving command to history file if it reads a property with a sensitive name

2 participants