Skip to content

Conversation

@dotnet-policy-service
Copy link
Contributor

Please don't squash-merge this PR.

)

Add untrusted-data-instance-note to APIs that handle external XML/SRGS/SSML/audio files to warn developers about security risks when processing untrusted data.

Changes:
- SrgsDocument: Added class-level warning and warnings to constructors that accept file paths and XmlReader
- Grammar: Added warnings to constructors that accept file paths and streams
- PromptBuilder: Added warnings to AppendSsml(XmlReader) and AppendAudio(string) methods
- GrammarBuilder: Added warnings to AppendRuleReference methods that accept file paths

These APIs can load and parse external files which may contain corrupted or malicious content. The warnings direct developers to validate all inputs per OWASP guidelines.

Co-authored-by: Pranav Gupta <[email protected]>
@dotnet-policy-service dotnet-policy-service bot merged commit 9c52efd into live Dec 17, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant