Skip to content

[Node] Set requestPermission False If Using Default Permission Handler#1056

Merged
SteveSandersonMS merged 3 commits intomainfrom
mrayermannmsft/dontsendifnotusing
Apr 10, 2026
Merged

[Node] Set requestPermission False If Using Default Permission Handler#1056
SteveSandersonMS merged 3 commits intomainfrom
mrayermannmsft/dontsendifnotusing

Conversation

@MRayermannMSFT
Copy link
Copy Markdown
Contributor

Needed for extensions security work. We want to detect if an extension is trying to setup a permission handler.

@MRayermannMSFT MRayermannMSFT requested a review from a team as a code owner April 10, 2026 00:07
Copilot AI review requested due to automatic review settings April 10, 2026 00:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts Node.js SDK session-resume behavior so extensions that don’t explicitly install a permission handler can be detected by the CLI/security layer, by sending requestPermission: false when the default join-session handler is used.

Changes:

  • Introduces a shared defaultJoinSessionPermissionHandler in types.ts for extension session joining.
  • Updates joinSession() to use the shared default permission handler instead of a local definition.
  • Changes session.resume RPC params to set requestPermission based on whether a real permission handler was provided.
Show a summary per file
File Description
nodejs/src/types.ts Adds shared default permission handler used as the sentinel for “no explicit handler.”
nodejs/src/extension.ts Switches joinSession() to use the shared default handler (removes local handler).
nodejs/src/client.ts Sets requestPermission to false when the default join-session handler is in use.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 2

@SteveSandersonMS SteveSandersonMS added this pull request to the merge queue Apr 10, 2026
Merged via the queue into main with commit 7fc03d2 Apr 10, 2026
26 checks passed
@SteveSandersonMS SteveSandersonMS deleted the mrayermannmsft/dontsendifnotusing branch April 10, 2026 10:27
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.

3 participants