-
Couldn't load subscription status.
- Fork 54
Add support for [SecureString] in PowerShell adapter
#1208
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
Add support for [SecureString] in PowerShell adapter
#1208
Conversation
a13082c to
5e08a3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds support for [SecureString] type properties in PowerShell class-based DSC resources and fixes handling of fully qualified PSCredential property types.
- Adds conversion logic to handle
[SecureString]properties by converting plain text values to secure strings - Updates
PSCredentialtype checking to use wildcard matching for fully qualified type names - Adds test coverage for
SecureStringproperty handling
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| adapters/powershell/psDscAdapter/psDscAdapter.psm1 | Implements SecureString conversion logic and updates PSCredential type matching to handle fully qualified names |
| adapters/powershell/Tests/powershellgroup.resource.tests.ps1 | Adds test case to verify SecureString property processing |
| adapters/powershell/Tests/TestClassResource/0.0.1/TestClassResource.psm1 | Adds SecureStringProp property to test resource for validation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5e08a3e to
cc35c35
Compare
PR Summary
This pull request adds support for
[SecureString]in class-based DSC resources. Small remediation fix if a user uses the fully qualified property name on[PSCredential].PR Context
Fix #1207.