Skip to content

fix(functions): validate complex kernel function arguments - #14466

Open
ADİL ALPEREN ÇİFTCİ (adilalperenciftci) wants to merge 2 commits into
microsoft:mainfrom
adilalperenciftci:fix/validate-complex-kernel-arguments
Open

ADİL ALPEREN ÇİFTCİ (adilalperenciftci) wants to merge 2 commits into
microsoft:mainfrom
adilalperenciftci:fix/validate-complex-kernel-arguments

Conversation

@adilalperenciftci

Copy link
Copy Markdown

Summary

Complex and Union annotations containing commas could bypass parameter parsing in gather_function_parameters, allowing raw argument values to reach the kernel function.

Changes

  • Validated generic and union annotations with Pydantic TypeAdapter.
  • Removed the condition "," not in param.type_ that skipped parsing for comma-containing type metadata.
  • Added regression test covering invalid union argument handling.

Complex and Union annotations containing commas could bypass parameter parsing in gather_function_parameters, allowing raw argument values to reach the kernel function. Validate generic annotations with Pydantic TypeAdapter and remove the condition that skipped parsing for comma-containing type metadata.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch had an error being deployed

1 failed deployment
github-app-auth b7dbf3ca Deployed Sep 21, 2026 by adilalperenciftci via add_label #29047
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