Skip to content

Fix PSAvoidUsingConvertToSecureStringWithPlainText in tests#115

Merged
andyleejordan merged 10 commits intoPowerShell:mainfrom
jshigetomi:sfiFixGH
Apr 30, 2026
Merged

Fix PSAvoidUsingConvertToSecureStringWithPlainText in tests#115
andyleejordan merged 10 commits intoPowerShell:mainfrom
jshigetomi:sfiFixGH

Conversation

@jshigetomi
Copy link
Copy Markdown
Contributor

PR Summary

This pull request updates test code for the Microsoft.PowerShell.SecretStore module to improve how SecureString objects are created, and also updates the .NET SDK version in global.json. Additionally, a new metadata file is added for inventory and ownership tracking. The most important changes are summarized below:

Test improvements and code consistency:

  • Replaced all uses of ConvertTo-SecureString -AsPlainText -Force with [System.Net.NetworkCredential]::new('', $string).SecurePassword for creating SecureString objects in Microsoft.PowerShell.SecretStore.Tests.ps1, ensuring more robust and consistent test code. [1] [2] [3] [4]

Build and environment updates:

  • Updated the .NET SDK version in global.json from 8.0.300 to 8.0.318 to use a newer SDK for builds.

Metadata and ownership tracking:

  • Added a new es-metadata.yml file specifying schema version, provider information, production status, accountable owners, and default routing for the service.

PR Context

This PR is to fix an SFI bug on the ADO side. Changes merged here are all changes from ADO main branch that need to be on GitHub before mirroring can begin.

@andyleejordan andyleejordan enabled auto-merge (squash) April 30, 2026 21:57
Copy link
Copy Markdown
Member

@andyleejordan andyleejordan left a comment

Choose a reason for hiding this comment

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

Let's hope that doesn't break anything.

@andyleejordan andyleejordan disabled auto-merge April 30, 2026 21:57
@andyleejordan andyleejordan merged commit 8f47b9c into PowerShell:main Apr 30, 2026
4 checks passed
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.

2 participants