Upgrade System.Linq.Dynamic.Core to 1.6.0 and fix breaking changes #1389
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR upgrades System.Linq.Dynamic.Core from version 1.3.0 to 1.6.0 to address the high severity security vulnerability GHSA-4cv2-4hjh-77rx.
Problem
The current version 1.3.0 has a known security vulnerability that needs to be resolved. However, upgrading to 1.6.0 introduces breaking changes due to stricter security controls that prevent access to certain .NET framework methods like
object.Equals()
used in workflow definitions.Solution
1. Expression Transformation
Added automatic transformation of legacy expression patterns to maintain backward compatibility:
2. Enhanced Security Configuration
Implemented a
ParsingConfig
with appropriate permissions for workflow expression parsing while maintaining security:3. Comprehensive Updates
Updated all
DynamicExpressionParser.ParseLambda()
calls throughout theDefinitionLoader
to use the new configuration and automatic expression transformation.Backward Compatibility
Existing workflow definitions continue to work without modification:
object.Equals()
expressions are automatically convertedTesting
Verified the upgrade works correctly with:
The security vulnerability warning is now resolved, and the build produces no vulnerability warnings.
Fixes #1371.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.