Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Fix CodeQL SM02211 alert - #6548

Merged
tracyboehrer (tracyboehrer) merged 1 commit into
mainfrom
southworks/fix/sm02211-memorystorage-objectpath-resourceexplorer
Nov 11, 2022
Merged

tracyboehrer (tracyboehrer) merged 1 commit into
mainfrom
southworks/fix/sm02211-memorystorage-objectpath-resourceexplorer

Conversation

@sw-joelmut

Copy link
Copy Markdown
Collaborator

Fixes #6506 #6508 #6509

Description

This PR fixes the CodeQL SM02211 alert related to unsafe JsonSerializer TypeNameHandling usage.

Specific Changes

  • Updates the MemoryStorage disabling the alert.
    • Added a unit test validating that the setting is required.
  • Updates the ObjectPath, removing the global serialization setting and setting the TypeNameHandling to the default None.
  • Updates the ResourceExplorer, removing the TypeNameHandling property defaulting to None.

Testing

The following image shows the tests for the three classes passing successfully.
imagen

@sw-joelmut
Joel Mut (sw-joelmut) requested a review from a team as a code owner November 11, 2022 17:50
@sw-joelmut Joel Mut (sw-joelmut) added the Automation: No parity PR does not need to be applied to other languages. label Nov 11, 2022
@coveralls

Copy link
Copy Markdown
Collaborator

Pull Request Test Coverage Report for Build 328965

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 36 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.04%) to 79.055%

Files with Coverage Reduction New Missed Lines %
/libraries/AdaptiveExpressions/BuiltinFunctions/GetNextViableTime.cs 1 90.91%
/libraries/AdaptiveExpressions/BuiltinFunctions/GetPreviousViableTime.cs 1 90.91%
/libraries/Microsoft.Bot.Builder.Dialogs/ObjectPath.cs 34 82.38%
Totals Coverage Status
Change from base Build 328804: 0.04%
Covered Lines: 25613
Relevant Lines: 32399

💛 - Coveralls

@BruceHaley

Copy link
Copy Markdown
Contributor

✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.dll
✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.Dialogs.dll

@tracyboehrer
tracyboehrer (tracyboehrer) deleted the southworks/fix/sm02211-memorystorage-objectpath-resourceexplorer branch November 11, 2022 18:40
This was referenced May 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Automation: No parity PR does not need to be applied to other languages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CodeQL alert SM02211: Unsafe TypeNameHandling in microsoft/microsoft/botbuilder-dotnet/botbuilder-dotnet

4 participants