remote code download for github copilot auth #1212

Closed
opened 2026-02-16 17:30:01 -05:00 by yindo · 1 comment
Owner

Originally created by @hhoeflin on GitHub (Aug 10, 2025).

Originally assigned to: @thdxr on GitHub.

Hi,

thanks for providing opencode. I wanted to use it with github copilot, and it is great that opencode supports this (as opposed to e.g. crush). However looking into how this is done, i found

https://github.com/sst/opencode/blob/542186aa49e766c3acfe285c00bdfeae902be748/packages/opencode/src/auth/copilot.ts#L8

where seemingly code from

https://github.com/sst/opencode-github-copilot

is downloaded and executed. The idea that the auth-framework is downloading separate code that has not been present during install of the software sounds like a big security risk and I don´t understand why it is done in the first place (it is a single file that could be included directly into opencode).

Is my understanding of this workflow correct? Could you comment on why this is done this way?

Thanks

Originally created by @hhoeflin on GitHub (Aug 10, 2025). Originally assigned to: @thdxr on GitHub. Hi, thanks for providing opencode. I wanted to use it with github copilot, and it is great that opencode supports this (as opposed to e.g. crush). However looking into how this is done, i found https://github.com/sst/opencode/blob/542186aa49e766c3acfe285c00bdfeae902be748/packages/opencode/src/auth/copilot.ts#L8 where seemingly code from https://github.com/sst/opencode-github-copilot is downloaded and executed. The idea that the auth-framework is downloading separate code that has not been present during install of the software sounds like a big security risk and I don´t understand why it is done in the first place (it is a single file that could be included directly into opencode). Is my understanding of this workflow correct? Could you comment on why this is done this way? Thanks
yindo closed this issue 2026-02-16 17:30:01 -05:00
Author
Owner

@thdxr commented on GitHub (Aug 11, 2025):

this kind of functionality should be implemented as a plugin - we didn't have plugin support initially so this was a hack

if microsoft has an issue with this integration we don't want them DMCA-ing the main repo

i'll fix this though

@thdxr commented on GitHub (Aug 11, 2025): this kind of functionality should be implemented as a plugin - we didn't have plugin support initially so this was a hack<br><br>if microsoft has an issue with this integration we don't want them DMCA-ing the main repo<br><br>i'll fix this though
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1212