Skip to content

Fix security scan findings in test and sample code#251

Open
lukat01 wants to merge 1 commit into
Azure:masterfrom
lukat01:dev/lukatokmai/security_fixes
Open

Fix security scan findings in test and sample code#251
lukat01 wants to merge 1 commit into
Azure:masterfrom
lukat01:dev/lukatokmai/security_fixes

Conversation

@lukat01

@lukat01 lukat01 commented Jul 14, 2026

Copy link
Copy Markdown

Address 7 Azure DevOps security findings across test utilities and
PowerShell samples:

  • CommonTestUtils.cs (CA2301): Replace BinaryFormatter.Deserialize
    pragma suppression with a restrictive SerializationBinder
    (ExceptionRoundTripBinder) that only allows primitives, string,
    Exception, List<>/ReadOnlyCollection<>, and ElasticScale types.
  • Globals.cs (CSCAN-MSFT0090): Replace hardcoded test login password
    with a runtime-generated value.
  • MultiShardTestUtils.cs (CSCAN-GENERAL0060): Replace hardcoded test
    login password with a runtime-generated value.
  • PowerShell sample help (CSCAN-MSFT0090): Replace example passwords in
    comment-based help with the placeholder in
    GetMappings.ps1, GetShards.ps1, ExecuteSampleSplitMerge.ps1, and
    SetupSampleSplitMergeEnvironment.ps1.

Validated: exception serialization tests pass on net481, net6.0, and
net8.0.

Address 7 Azure DevOps security findings across test utilities and
PowerShell samples:

- CommonTestUtils.cs (CA2301): Replace BinaryFormatter.Deserialize
  pragma suppression with a restrictive SerializationBinder
  (ExceptionRoundTripBinder) that only allows primitives, string,
  Exception, List<>/ReadOnlyCollection<>, and ElasticScale types.
- Globals.cs (CSCAN-MSFT0090): Replace hardcoded test login password
  with a runtime-generated value.
- MultiShardTestUtils.cs (CSCAN-GENERAL0060): Replace hardcoded test
  login password with a runtime-generated value.
- PowerShell sample help (CSCAN-MSFT0090): Replace example passwords in
  comment-based help with the <my-sql-pwd-of-choice> placeholder in
  GetMappings.ps1, GetShards.ps1, ExecuteSampleSplitMerge.ps1, and
  SetupSampleSplitMergeEnvironment.ps1.

Validated: exception serialization tests pass on net481, net6.0, and
net8.0.
@lukat01

lukat01 commented Jul 14, 2026

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="Microsoft"

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.

1 participant