Commit Graph
2641 Commits
Author SHA1 Message Date
Dongbo Wang 0b825b31a0 [release/v7.6.1] Build, package, and create VPack for the PowerShell-LTS store package within the same msixbundle-vpack pipeline (#27237) 2026-04-09 15:35:37 -07:00
Mirroring 44d691766e Merge commit '47d65d0b1e7c6a153b5dc8940c10abec80bd7fec' 2026-03-16 21:27:41 +00:00
PowerShell Team Bot d384bb89b3 [release/v7.6] Update v7.6 release branch to use .NET SDK 10.0.201 (#27041) 2026-03-16 14:22:38 -07:00
Dongbo Wang 348e3470c0 Merged PR 38918: Update MaxVisitCount and MaxHashtableKeyCount if VisitorSafeValueContext indicates SkipLimitCheck is true
Update MaxVisitCount and MaxHashtableKeyCount if visitor safe value context indicates SkipLimitCheck is true

Related work items: #163537

----
#### AI description  (iteration 1)
#### PR Classification
Enhancement: Conditionally update AST limit checks based on safe value context flags.

#### PR Summary
This pull request refactors the safe value visitor to initialize runtime limit values, setting them to maximum if the `SkipLimitCheck` flag is present, and adjusts the corresponding condition checks to support larger AST structures safely.
- `src/System.Management.Automation/engine/parser/SafeValues.cs`: Replaced hard-coded limit constants with runtime-initialized readonly fields based on the safe value context, and updated conditional checks in `IsAstSafe` and `VisitHashtable`.
- `test/powershell/Modules/Microsoft.PowerShell.Utility/PowerShellData.tests.ps1`: Added tests to validate behavior when using `-SkipLimitCheck`, ensuring insecure PSD1 files are properly rejected.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->

Related work items: #163537
2026-03-11 18:24:34 +00:00
PowerShell Team Bot 5ea8cb48cf [release/v7.6] Update branch for release (#26989) 2026-03-10 23:27:36 +00:00
PowerShell Team Bot c04c9b65cf [release/v7.6] Update branch for release (#26779) 2026-02-10 16:15:28 -05:00
Dongbo Wang 60ab5bcbdd [release/v7.6] Update Microsoft.PowerShell.Native package version (#26748) 2026-02-05 14:02:36 -08:00
Dongbo Wang 0a912658a4 [release/v7.6] Move PowerShell build to depend on .NET SDK 10.0.102 (#26717) 2026-01-21 13:31:55 -08:00
Dongbo Wang 9c844308b0 [release/v7.6] Move PowerShell build to depend on .NET SDK 10.0.101 (#26716) 2026-01-21 12:49:24 -08:00
Aditya Patwardhan 826a2d0801 [release/v7.6] Update Microsoft.PowerShell.Native package version (#26607) 2025-12-11 13:39:34 -08:00
Aditya PatwardhanandPowerShell Team Bot dcccde9e0e [release/v7.6] [master] Update branch for release (#26600)
Co-authored-by: PowerShell Team Bot <69177312+pwshBot@users.noreply.github.com>
2025-12-10 13:15:05 -08:00
Travis Plunk 8f3b14c74b [release/v7.6] Make the experimental feature PSFeedbackProvider stable (#26502) 2025-12-05 19:47:24 +00:00
Travis Plunk dfa094e851 [release/v7.6] Fix a regression in the API CompletionCompleters.CompleteFilename() that causes null reference exception (#26487) 2025-12-05 10:53:01 -08:00
Travis Plunk 932aea6967 [release/v7.6] Update the WCF packages to the latest version that is compatible with v4.10.3 (#26503) 2025-12-05 10:52:30 -08:00
Aditya PatwardhanandRyan Yates 6827de520b [release/v7.6] Properly Expand Aliases to their actual ResolvedCommand (#26571)
Co-authored-by: Ryan Yates <ryan.yates@kilasuit.org>
2025-12-04 10:37:54 -08:00
Aditya Patwardhan 2e047922ca [release/v7.6] Close pipe client handles after creating the child ssh process (#26564) 2025-12-02 15:58:22 -08:00
Travis Plunk 9532f85fe4 [release/v7.6] Make some experimental features stable (#26490) 2025-11-20 14:57:21 -08:00
e9af4e7710 [release/v7.6] Update outdated package references (#26471)
Co-authored-by: PowerShell Team Bot <69177312+pwshBot@users.noreply.github.com>
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
2025-11-19 10:01:24 -08:00
Travis PlunkandAditya Patwardhan 168482463d [release/v7.6] DSC v3 resource for Powershell Profile (#26447)
Co-authored-by: Aditya Patwardhan <adityap@microsoft.com>
2025-11-13 15:02:24 -08:00
Anam Navied d5267d2ee6 Add CodeQL suppressions for UpdatableHelp and NativeCommandProcessor methods (#26132) 2025-10-01 15:52:12 -07:00
Dongbo Wang b85237876d Remove the use of Windows PowerShell ETW provider id and update PSDiagnostics module to work for PowerShell 7 (#25590) 2025-10-01 12:38:19 -07:00
Dongbo Wang 859431e002 Allow opt-out of the named-pipe listener using the environment variable POWERSHELL_DIAGNOSTICS_OPTOUT (#26086) 2025-09-30 12:56:54 -07:00
Dongbo Wang 506869c157 Fix -Debug to not trigger the ShouldProcess prompt (#26081) 2025-09-23 09:19:39 +05:00
xtqqczze 5e62bb7fa9 Remove unused FileStreamBackReader.NativeMethods type (#26062) 2025-09-22 17:22:09 -07:00
PowerShell Team Bot f08e75899c Update outdated package references (#26069) 2025-09-22 16:52:58 -07:00
Travis Plunk 2376e28482 Ensure that socket timeouts are set only during the token validation (#26066)
The main goal is to ensure that socket timeouts are set only during the token validation phase and are properly reset afterward, improving reliability and preventing unintended blocking or premature timeouts in subsequent operations.
2025-09-22 10:56:19 -07:00
Travis Plunk 42e86f6c5f Fix race condition in RemoteHyperVSocket (#26057) 2025-09-15 11:37:04 -07:00
Dongbo Wang abb70228cb Update version for the package Microsoft.PowerShell.Native (#26041) 2025-09-11 11:29:46 -07:00
PowerShell Team BotandDongbo Wang a1b417691f Move PowerShell build to use .NET SDK 10.0.100-rc.1 (#26027)
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
2025-09-10 14:55:07 -07:00
xtqqczze 43c2d98349 Remove unnecessary CS0618 suppressions from Variant APIs (#26006) 2025-09-07 14:44:14 +00:00
Anam Navied 1e46d89c63 Add Codeql Suppressions (#25943) 2025-09-03 11:14:44 -07:00
xtqqczze e2b2d1ea59 Ensure .cs files end with exactly one newline (#25968) 2025-09-03 14:09:34 +00:00
xtqqczze 7ef03a14ae Remove obsolete CA2105 rule suppression (#25938) 2025-09-03 03:45:41 +00:00
xtqqczze 44d366adb2 Remove obsolete CA1703 rule suppression (#25955) 2025-09-02 03:31:08 +00:00
xtqqczze 06ff422d2a Remove obsolete CA2240 rule suppression (#25957) 2025-09-02 03:26:45 +00:00
xtqqczze 3b6f267e19 Remove obsolete CA2233 rule suppression (#25951) 2025-09-01 03:56:16 +00:00
xtqqczze eda56e282e Remove obsolete CA1026 rule suppression (#25934) 2025-08-31 23:20:07 +05:00
Dongbo Wang 53805fb426 Add the parameter Register-ArgumentCompleter -NativeFallback to support registering a cover-all completer for native commands (#25230) 2025-08-29 15:50:02 -07:00
xtqqczze 8d524adf7f Remove obsolete CA2118 rule suppression (#25924) 2025-08-29 10:57:40 +05:00
xtqqczze cf2d7021ab Remove redundant System.Runtime.Versioning attributes (#25926) 2025-08-28 05:54:18 +00:00
Dongbo Wang 44e34f0044 Change the default feedback provider timeout from 300ms to 1000ms (#25910) 2025-08-26 16:06:23 -07:00
PowerShell Team Bot 2fb12a31f3 Update PowerShell to use .NET SDK v10-preview.7 (#25876) 2025-08-20 14:38:09 -07:00
Dongbo Wang d68c15e743 Update PATH environment variable for package manager executable on Windows (#25847)
Implementation for PowerShell/PowerShell-RFC#391. A few implementation decisions:

1. Check the package manager list only once per process (**same as CMD**). So, changing the package manager list in registry doesn't affect a PowerShell session that is already running.

2. When detecting user/system PATH value changes, only check new items PREPENDED or APPENDED to the original string (**same as CMD**). The detection is made simple, which is not intended to detect complex changes to the user/system PATH.

3. The PATH update feature is disabled when the `Environment` provider is not available, or when the current session is restricted.
    - Both `Environment` provider and `IsSessionRestricted` are checked only once per PowerShell session.
    - Use `ConditionalWeakTable` to cache whether the feature is enabled or not for a given session.
    - We cannot use `thread-static` variable for the caching because it's possible for Runspace to reuse threads.
2025-08-20 12:53:59 -07:00
Dongbo Wang f4a452ea3c Update PSRP protocol to deprecate session key exchange between newer client and server (#25774) 2025-08-06 22:54:11 +00:00
PowerShell Team Bot 5de50164c9 Update to .NET 10 Preview 6 (#25828) 2025-08-06 22:28:13 +00:00
Jordan Borean 8dd0d2acf8 Fix the ssh PATH check in SSHConnectionInfo when the default Runspace is not available (#25780) 2025-08-04 16:37:45 -07:00
Steve Lee 65b899c3a9 Fix Write-Host to respect OutputRendering = PlainText (#21188) 2025-08-04 16:31:59 -07:00
Jordan Borean 4415386172 Improve the $using expression support in Invoke-Command (#24025)
Always use the v5.1 `$using:` logic when dealing with any connection type that is not based on the `WSManConnectionInfo`. This allows the caller to use the more advanced `$using` features like variables with special names, having `$using` vars inside sub scopes, and more. `WSMan` based connections might still communicate with older versions but as the oldest supported version is v3 on Server 2012. We don't need to keep the default as v2 (which has been deprecated) to support some of the newer features.
2025-08-04 16:31:30 -07:00
Stéphane BARIZIEN a993992298 Adding hex format for native command exit codes (#21067) 2025-07-31 08:23:20 +05:00
Jordan Borean 11eeae97f0 Use parameter HelpMessage for tool tip in parameter completion (#25108)
Use the help message on the parameter in the completion tool tip to provide better completion help. This can be utilized by other tools to provide more context for a parameter outside of the current type and parameter name which is quite minimal.
2025-07-30 12:05:13 -07:00