Repository navigation
.Net: [BREAKING] Upgrade Prompty.Core to 2.0.0-beta.3 to resolve NU1903 vulnerability - #14169
Merged
Roger Barreto (rogerbarreto) merged 2 commits intoJul 20, 2026
Conversation
Bumps Prompty.Core from 0.2.3-beta to 2.0.0-beta.3 to resolve the high severity advisory NU1903 (GHSA-wxhm-2mq7-7697), a path traversal in file reference expansion. The fixed Prompty.Core release targets net9.0 only and ships a rewritten 2.0 spec and API, so this is a breaking change for the preview Microsoft.SemanticKernel.Prompty package. Changes: retarget Functions.Prompty to net10.0 (drops net8.0 and netstandard2.0); migrate KernelFunctionPrompty to the 2.0 loader (FrontmatterParser plus Prompty.Load for text, secure PromptyLoader with AllowedFileRoots for file references); remove the Scriban workaround reference; migrate the test .prompty files to the 2.0 spec; update samples and tests.
Roger Barreto (rogerbarreto)
temporarily deployed
to
integration
July 20, 2026 15:49 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades the .NET Prompty integration to Prompty.Core 2.0.0-beta.3 to resolve the NU1903 vulnerability, and updates Semantic Kernel’s Prompty loader, test data, and samples to match the Prompty 2.0 API/spec changes.
Changes:
- Bump
Prompty.Coreto2.0.0-beta.3(and remove the prior directScribanworkaround dependency). - Migrate Prompty loading/parsing to Prompty 2.0 APIs, including secure file loading with
AllowedFileRoots. - Update Prompty unit tests,
.promptytest assets, and Concepts samples to the Prompty 2.0 spec fields (e.g.,apiType, list-forminputs, renamed options).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/src/Functions/Functions.Prompty/KernelFunctionPrompty.cs | Migrates Prompty parsing/loading to Prompty 2.0 and maps model options into PromptExecutionSettings. |
| dotnet/src/Functions/Functions.Prompty/Functions.Prompty.csproj | Drops multi-targeting and removes the now-unneeded direct Scriban dependency. |
| dotnet/src/Functions/Functions.Prompty.UnitTests/TestData/relativeFileReference.prompty | Updates test prompty asset formatting (BOM/frontmatter) for Prompty 2.0 parsing. |
| dotnet/src/Functions/Functions.Prompty.UnitTests/TestData/model.json | Updates model schema to Prompty 2.0 (apiType, connection changes). |
| dotnet/src/Functions/Functions.Prompty.UnitTests/TestData/chatNoExecutionSettings.prompty | Migrates inputs to the Prompty 2.0 list-based schema. |
| dotnet/src/Functions/Functions.Prompty.UnitTests/TestData/chatJsonObject.prompty | Migrates model/options fields to Prompty 2.0 naming/shape. |
| dotnet/src/Functions/Functions.Prompty.UnitTests/TestData/chat.prompty | Migrates inputs/outputs and model schema to Prompty 2.0 list-based schema. |
| dotnet/src/Functions/Functions.Prompty.UnitTests/PromptyTests.cs | Updates assertions and adds coverage for Prompty 2.0 parsing behavior changes. |
| dotnet/samples/Concepts/PromptTemplates/PromptyFunction.cs | Updates sample inline prompty YAML to Prompty 2.0 (apiType). |
| dotnet/Directory.Packages.props | Central version bump for Prompty.Core and removal of central Scriban pin. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ttings Remove the AdditionalProperties passthrough in ToExtensionData so arbitrary model.options are no longer forwarded. This aligns the behavior with the documented breaking change and avoids overwriting the strongly typed mapped keys.
Roger Barreto (rogerbarreto)
temporarily deployed
to
integration
July 20, 2026 16:05 — with
GitHub Actions
Inactive
Roger Barreto (rogerbarreto)
enabled auto-merge
July 20, 2026 16:32
westey (westey-m)
approved these changes
Jul 20, 2026
Peter Ibekwe (peibekwe)
approved these changes
Jul 20, 2026
4 tasks done
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation and Context
CI (
dotnet-build-and-test) currently fails repo-wide on NU1903:Prompty.Core0.2.3-betahas a known high severity advisory GHSA-wxhm-2mq7-7697 (path traversal in${file:...}reference expansion). The build treats the audit as an error (--warnaserror), so this blocks every .NET PR.The advisory is fixed in
Prompty.Core2.0.0-beta.2+. That release is a significant rewrite: it targets net9.0 only and ships a new.promptyspec and API. There is no intermediate 0.x fix, so resolving the advisory requires this upgrade.Description
Upgrades
Prompty.Core0.2.3-beta→2.0.0-beta.3and adapts Semantic Kernel to the 2.0 surface.Prompty.CoreinDirectory.Packages.props; remove theScribanworkaround reference (2.0 no longer depends on it).Functions.Promptytonet10.0only. The fixed package is net9.0-only, sonet8.0andnetstandard2.0can no longer be supported.KernelFunctionPrompty):FrontmatterParser.Parse+Prompty.Load.PromptyLoader.LoadwithAllowedFileRootsscoped to the prompty file's directory, so${file:...}references are confined (the fix for the advisory).ArgumentExceptionto preserve the input-validation contract..promptyfiles to the 2.0 spec (apiType, list-forminputs, renamedoptions) and updatePromptyTestsaccordingly.Conceptsinline templates to the 2.0 spec.Microsoft.SemanticKernel.Promptyis a preview (-beta) package. This change:net8.0andnetstandard2.0support (nownet10.0only)..promptyfiles to use the 2.0 spec (model.apiType,model.provider,connection.kind,inputs/outputsas lists, renamedmodel.options). v1 files are not auto-migrated. See the Prompty v1→v2 migration guide.json_schema, connectionservice_id, and arbitrarymodel.optionspassthrough beyond the strongly typed set.Validation
Functions.Prompty.UnitTests: 22/22 pass (Release,--warnaserror).Functions.PromptyandConceptsbuild clean, no NU1903.dotnet format --verify-no-changesclean on changed projects.Conceptssamples is byte-for-byte identical to the previously published package, and the samples were run end-to-end against a live model with the expected results.Contribution Checklist