Skip to content

Encode MDE machine IDs in unisolate requests - #14903

Open
idoshabi07 wants to merge 1 commit into
Azure:masterfrom
idoshabi07:ai-scan/mde-url
Open

Encode MDE machine IDs in unisolate requests#14903
idoshabi07 wants to merge 1 commit into
Azure:masterfrom
idoshabi07:ai-scan/mde-url

Conversation

@idoshabi07

Copy link
Copy Markdown
Contributor

Summary

URL-encodes the Sentinel-provided MDE device identifier before placing it in the privileged unisolate endpoint path.

AI scan items

Validation

ARM template JSON parsing passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ccff4d4a-3094-4de9-a5c0-d00c63d96a37
@idoshabi07
idoshabi07 requested review from a team as code owners August 13, 2026 12:11
@v-maheshbh v-maheshbh (v-maheshbh) added the Playbook Playbook specialty review needed label Aug 13, 2026

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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR aims to prevent malformed/unexpected request paths by URL-encoding the Sentinel-provided MDE device identifier before calling the MDE privileged unisolate endpoint.

Changes:

  • Wraps MdatpDeviceId with a URL-encoding function when constructing the api/machines/{id}/unisolate URI.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

},
"method": "POST",
"uri": "https://api.securitycenter.microsoft.com/api/machines/@{items('For_each_-_Host')?['additionalData']?['MdatpDeviceId']}/unisolate"
"uri": "https://api.securitycenter.microsoft.com/api/machines/@{encodeURIComponent(items('For_each_-_Host')?['additionalData']?['MdatpDeviceId'])}/unisolate"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Playbook Playbook specialty review needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants