Skip to content

Conversation

@Gijsreyn
Copy link
Contributor

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.

@SteveL-MSFT SteveL-MSFT requested a review from Copilot October 24, 2025 16:51
Copy link
Contributor

Copilot AI left a 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 PSCredential type checking to use wildcard matching for fully qualified type names
  • Adds test coverage for SecureString property 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.

@Gijsreyn Gijsreyn force-pushed the gh-1207/main/fix-support-securestring branch from 5e08a3e to cc35c35 Compare October 25, 2025 00:24
@Gijsreyn Gijsreyn requested a review from SteveL-MSFT October 25, 2025 00:29
@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Oct 27, 2025
Merged via the queue into PowerShell:main with commit 33d2f64 Oct 27, 2025
19 checks passed
@Gijsreyn Gijsreyn deleted the gh-1207/main/fix-support-securestring branch October 28, 2025 00:55
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.

PowerShell adapter doesn't support [System.Security.SecureString]

2 participants