Skip to content

fix: Add chat widget guide and improve URL validation and hooks - #299

Open
Harsh-Microsoft wants to merge 3 commits into
devfrom
psl-hb-codeqlfix
Open

fix: Add chat widget guide and improve URL validation and hooks#299
Harsh-Microsoft wants to merge 3 commits into
devfrom
psl-hb-codeqlfix

Conversation

@Harsh-Microsoft

Copy link
Copy Markdown
Contributor

Purpose

This pull request introduces several improvements focused on security, documentation, and deployment configuration. The most significant changes include enhancing endpoint validation logic to prevent security issues, adding comprehensive documentation for the embeddable chat widget, and updating deployment hooks for interactive execution.

Security improvements:

  • Refactored endpoint validation in chat-app/backend/app/utils/voice_utils.py to use a robust _hostname_matches helper, ensuring hostnames match exactly or as subdomains, and replacing insecure substring checks in both resolve_endpoint and is_valid_realtime_endpoint. This guards against incomplete URL sanitization and related security risks.

Documentation updates:

  • Added a new guide, documents/EmbeddableWidgetGuide.md, detailing the architecture, build, embedding process, and validation steps for the chat widget, including local development and cross-origin considerations.
  • Removed the outdated documents/customer-chatbot-product-roadmap.md, which previously described the product roadmap and implementation sequence for the embeddable widget and related accelerator components.

Deployment configuration:

  • Changed the interactive flag from false to true in both the Windows and POSIX hooks sections of azure.yaml, enabling interactive execution for deployment hooks. [1] [2]

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

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.

1 participant