Skip to content

Suppress false-positive CodeQL warning on TraceContextBase#1350

Open
AnatoliB wants to merge 1 commit intomainfrom
anatolib/codeql-fix-37181650-2
Open

Suppress false-positive CodeQL warning on TraceContextBase#1350
AnatoliB wants to merge 1 commit intomainfrom
anatolib/codeql-fix-37181650-2

Conversation

@AnatoliB
Copy link
Copy Markdown
Collaborator

@AnatoliB AnatoliB commented May 1, 2026

Copilot AI review requested due to automatic review settings May 1, 2026 23:26
@AnatoliB AnatoliB marked this pull request as ready for review May 1, 2026 23:28
Copy link
Copy Markdown
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 PR adds an inline justification comment intended to suppress a CodeQL false-positive on TraceContextBase’s Newtonsoft.Json TypeNameHandling configuration, relying on TraceContextBase.Restore(...) type validation to explain why the deserialization is safe in this context.

Changes:

  • Added a CodeQL suppression/justification comment next to TypeNameHandling = TypeNameHandling.Objects in TraceContextBase’s serializer settings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +44 to 46
// CodeQL [SM02211] Internal-only payload; Restore validates root $type is a TraceContextBase subclass.
TypeNameHandling = TypeNameHandling.Objects,
PreserveReferencesHandling = PreserveReferencesHandling.Objects,
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