Shuangchi He
8cc39848bc
Fix some typos in source code ( #17481 )
2022-06-06 10:14:53 -07:00
James Truher [MSFT]
65d8f11aeb
Update telemetry collecting with a few changes ( #17304 )
2022-05-16 17:10:51 -07:00
Dongbo Wang
c40066d5f2
Fix the word wrapping in formatting to handle escape sequences properly ( #17316 )
2022-05-16 16:10:55 -07:00
Dongbo Wang
4c6c4f30af
Fix formatting truncation to handle strings with VT sequences ( #17251 )
2022-05-06 11:40:34 -07:00
Andrew and Travis Plunk
c3b7e10fd0
Merged PR 20126: Fix for partial PowerShell module search paths, that can be resolved to CWD locations ( #17231 )
...
The problem is .NET will return empty strings for special folders that don't exist in some accounts (like System account), and the module path code appends path locations without first checking if the root path is non-empty. This results in partial paths in the PSModulePath list, which are then interpreted by .NET file APIs as rooted in the current working directory. And this in turn can allow low privilege users to drop modules in locations that higher privilege accounts will load from, thus gaining escalated privilege code execution.
These changes detect this non-rooted condition and prevents partial paths from being included in search lists.
Cherry picked from !17201
Co-authored-by: Travis Plunk <tplunk@microsoft.com >
2022-05-01 13:04:58 +05:00
Patrick Meinecke and Andrew Menagarishvili
1c568d42d8
Make NameObscurerTelemetryInitializer internal ( #17167 )
...
Making NameObscurerTelemetryInitializer internal
Co-authored-by: Andrew Menagarishvili <anmenaga@microsoft.com >
2022-04-21 09:54:50 -07:00
James Truher [MSFT]
84e73b2b45
Do not include node names when sending telemetry. ( #16981 )
2022-04-14 10:02:55 -07:00
Paul Higinbotham
a6d04226c3
Add Custom Remote Connections Feature ( #17011 )
...
* Changes for custom remote connections
* Remove NamedPipeConnection dependency on RemoteSessionNamedPipe.
* Enable custom connection tests and tool build for all platforms
* Fix CustomConnection.Tests.ps1
* Fix tests attempt 1
* Fix tool build
* Move test to elevated
* Fix non-Windows pipe name
* Update test for non-Windows
* Skip broken non-Windows timer
* Add comment for skipped test
2022-03-23 08:04:07 -07:00
Dongbo Wang
8ad642013a
Remove EventLogLogProvider and its related legacy code ( #17027 )
2022-03-19 12:04:15 +05:00
Steven Bucher
ee6bc9527c
Add the module CompatPowerShellGet to the allow-list of telemetry modules ( #16935 )
2022-02-28 17:49:52 -08:00
Ikko Ashimine
0ef30e54c7
Fix typo in PowerShellExecutionHelper.cs ( #16776 )
2022-01-28 16:04:34 +00:00
Dongbo Wang
88ba3f61fa
Use the same temporary home directory when 'HOME' env variable is not set ( #16263 )
2021-11-22 10:44:58 -08:00
Travis Plunk and Aditya Patwardhan
d74c6bfb7b
Configure ApplicationInsights to not send cloud role name ( #16246 )
...
Configure ApplicationInsights to not send cloud role name
Co-authored-by: Aditya Patwardhan <adityap@microsoft.com >
2021-10-14 15:12:37 -07:00
Paul Higinbotham
e2c23fc5bd
Add error catch for unauthorized access when removing AppLocker test files ( #15881 )
2021-08-10 11:03:53 -07:00
Ilya
45adfee558
Enhance Remove-Item to work with OneDrive ( #15571 )
2021-08-05 11:41:55 -07:00
xtqqczze
883ca98dd7
Seal private classes ( #15725 )
...
* Seal private classes
* Fix CS0509
* Fix CS0628
2021-07-19 14:09:12 +05:00
xtqqczze
03b07a0062
Enable IDE0044: MakeFieldReadonly ( #13880 )
...
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0044
2021-07-07 09:33:19 +05:00
Konstantin Gukov
8dcd5a2e1c
Use nameof to get parameter names when creating ArgumentNullException ( #15604 )
2021-07-05 22:04:13 -07:00
xtqqczze
4c2d6dcfca
Make classes sealed ( #15675 )
...
Fix [RCS1225](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1225.md )
2021-07-04 16:49:52 +05:00
Jason Helmick
170a226689
Add Microsoft.PowerShell.Crescendo to telemetry allow list ( #15372 )
2021-06-24 12:30:40 -07:00
Konstantin Gukov
da578e5f34
Do not stop powershell when can't create telemetry mutex. ( #15574 )
2021-06-14 11:59:20 -07:00
Francesco Saltori
088eb6d039
Replace ProcessModule.FileName with Environment.ProcessPath and remove PSUtils.GetMainModule ( #15012 )
2021-06-03 12:32:55 -07:00
Aditya Patwardhan
7ead137407
Update to .NET Preview 6 SDK ( #15452 )
2021-05-25 19:24:28 -07:00
Steve Lee
38d582f038
Handle exception if ConsoleHost tries to set cursor out of bounds because screen buffer changed ( #15380 )
2021-05-14 11:05:49 -07:00
Paul Higinbotham
a95b2cb17f
Remove unneeded SSH standard handle workaround ( #15308 )
2021-04-30 09:35:55 -07:00
Staffan Gustafsson
1feed0671a
Enable nullable for System.Management.Automation.Tracing.IMethodInvoker ( #14157 )
2021-04-16 13:25:15 -04:00
Ilya
91e7298fd8
Use static lambda keyword ( #15154 )
2021-04-12 12:44:05 -07:00
xtqqczze
b7a431a442
Fix SA1504: All accessors should be single-line or multi-lin ( #14241 )
...
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1504.md
2021-01-09 12:44:38 +05:00
Staffan Gustafsson
4c8df5c1de
Enable nullable: System.Management.Automation.Tracing.IEtwActivityReverter ( #14154 )
2021-01-09 12:22:37 +05:00
xtqqczze
50fd950920
Enable CA1052: Static holder types should be Static or NotInheritable ( #14483 )
...
* Enable CA1052: Static holder types should be Static or NotInheritable
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/CA1052
* Fix SA1505
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1505.md
2021-01-08 22:53:11 +05:00
Ilya
65456893bd
Avoid string.ToLowerInvariant() from GetEnvironmentVariableAsBool() to avoid loading ICU at startup ( #14323 )
2021-01-06 10:24:40 -08:00
xtqqczze
9d4665f32f
Enable SA1003: Symbols should be spaced correctly ( #14476 )
...
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1003.md
2020-12-23 21:21:26 +05:00
xtqqczze
fd934e08a1
Enable SA1314: Type parameter names should begin with T ( #14470 )
...
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1314.md
2020-12-23 08:02:22 +05:00
Staffan Gustafsson
429125a8f3
Enable nullable: System.Management.Automation.Tracing.IEtwEventCorrelator ( #14168 )
2020-12-11 10:43:23 +05:00
xtqqczze
41ab20cce3
Mark applicable structs as readonly and use in-modifier ( #13919 )
2020-12-09 11:36:48 -08:00
xtqqczze
8d4869372e
Mark private members as static part 10 ( #14235 )
...
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1822
2020-11-27 13:16:31 +05:00
xtqqczze
d5b0264374
Use consistent spacing in xml documentation tags ( #14231 )
2020-11-25 22:58:52 +05:00
xtqqczze
0d1ea73e59
Enable IDE0074: Use coalesce compound assignment ( #13396 )
...
* Autofix IDE0074: Use compound assignment
2020-11-25 17:37:01 +05:00
xtqqczze
c7bdb24ff3
Mark local variable as const ( #13217 )
...
RCS1118: Mark local variable as const https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1118.md
2020-11-24 20:06:16 +05:00
xtqqczze
fa6caf957e
Use see keyword in documentation ( #14220 )
...
Fix [DOC104](https://github.com/DotNetAnalyzers/DocumentationAnalyzers/blob/master/docs/DOC104.md )
2020-11-24 09:35:46 +05:00
xtqqczze
cb6ef9bdee
Remove incorrectly implemented finalizer ( #14246 )
2020-11-24 08:16:23 +05:00
xtqqczze
60643e27df
Enable CA1012: Abstract types should not have public constructors ( #13940 )
...
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1012
2020-11-21 20:07:28 +05:00
xtqqczze
cba73e724f
Enable SA1106: Code should not contain empty statements ( #13964 )
...
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1106.md
2020-11-21 19:26:44 +05:00
xtqqczze
fcafb7f57d
Code performance fixes follow-up ( #14207 )
2020-11-20 15:29:58 -08:00
xtqqczze
99a49e0eab
Enable SA1131: Use readable conditions ( #14132 )
...
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1131.md
2020-11-20 17:26:46 +05:00
xtqqczze
f14c76aab9
Enable SA1516: Elements should be separated by blank line ( #14137 )
...
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1516.md
2020-11-20 16:11:36 +05:00
xtqqczze
9e285298c0
Enable IDE0031: Null check can be simplified ( #13548 )
...
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0031
2020-11-20 11:42:51 +05:00
xtqqczze
b521b858ad
Fix RCS1049: Simplify boolean comparison ( #13994 )
...
* Fix RCS1049: Simplify boolean comparison
https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1049.md
Related https://github.com/dotnet/runtime/pull/44564
2020-11-13 09:39:25 +05:00
xtqqczze
5c874207ec
Enable CA1837: Use 'Environment.ProcessId' ( #14063 )
...
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1837
2020-11-13 08:47:23 +05:00
xtqqczze
4d2965af29
Autofix SA1518: The code must not contain extra blank lines at the end of the file ( #13574 )
2020-11-11 12:15:20 +05:00