-
Notifications
You must be signed in to change notification settings - Fork 2
fix(disk-hygiene): gate PowerShell move/rename/overwrite spellings #2470
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4396,6 +4396,12 @@ def test_powershell_deletion_spellings_force_final_prompt(self) -> None: | |
| "C:\\Windows\\System32\\robocopy.exe C:\\src C:\\dst /MIR", | ||
| "& 'C:/Windows/System32/robocopy.exe' C:/src C:/dst /PURGE", | ||
| "[Microsoft.VisualBasic.FileIO.FileSystem]::DeleteFile('x', 'OnlyErrorDialogs', 'SendToRecycleBin')", | ||
| "Move-Item C:/tmp/old C:/tmp/new", | ||
| "Rename-Item C:/tmp/old C:/tmp/new", | ||
| "Set-Content C:/tmp/file.txt 'overwrite'", | ||
| "Out-File C:/tmp/file.txt -Force", | ||
| "New-Item C:/tmp/file.txt -ItemType File -Force", | ||
| "'data' > C:/tmp/file.txt", | ||
|
Comment on lines
+4399
to
+4404
Contributor
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. 🔴 Important — several of the newly added regex alternatives have no test coverage at all
Suggest adding one case per newly-added alternative (
Comment on lines
+4399
to
+4404
Contributor
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. 🔴 Important — audit-only (kill-switch) deny path isn't re-verified for any of the new spellings
|
||
| ): | ||
| result = self.run_guard_powershell(command) | ||
| assert result is not None, command | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.