Hacker News
What I learned by putting GitHub Copilot behind a MitM proxy
j0selit0
|next
[-]
A few interesting things I found along the way:
- watched model/capability discovery and routing happen in real time - looked at what gets injected into context and sent with ghost completions - found that recent edits can pull in context from files other than the one you're currently editing (including infamous .env) - found the SQLite session store behind Chronicle, including previous prompts/responses - watched the model query that history through tool calls
I then went through the VS Code source to reconcile some of what I was seeing on the wire with the actual implementation.
Overall some interesting lessons around how their harness is implemented.
jiehong
|root
|parent
[-]
Anything cross platform and coding agent agnostic?
I suppose that .env file should be removed, but then things aren’t easy: no native multiplatform secret manager, or the std lib of the language doesn’t offer an API over the native secret store, etc.
Or a "secret injection proxy" for some cases could work I guess.
ElectricalUnion
|root
|parent
|next
[-]
theozero
|root
|parent
|next
|previous
[-]
mehackernewsacc
|root
|parent
|next
|previous
[-]
p1llus
|next
|previous
[-]
That will in practice give you everything from telemetry to prompts, and its funny to see just how much some of them collect/run that is not at all related to your own ask..
A handy alternative when certain applications tend to make it harder to apply a MiTM proxy and you can dump it straight into your own scripts/programs to filter out and store it in whichever format you want for more analysis.
kro
|root
|parent
|next
[-]
They don't offload TLS to the kernel, do they? Most apps do it in userspace linked against openssl afaik.
Do you patch that lib? If ebpf "just" operates at network/packet level, I don't see how it can do more than Mitmproxy in regard to avoid DH-PFS/Pinning
merb
|root
|parent
|next
[-]
p1llus
|root
|parent
[-]
orev
|root
|parent
|previous
[-]
somat
|root
|parent
|next
|previous
[-]
I think I found it, My first thought was some sort of builtin ssl library backdoor, but it looks like you do some ld.preload shenanigans to inject a eBPF monitor. I am not sure exactly what the BPF brings to the table here. A convenient interface to intercept the accept() syscall?
p1llus
|root
|parent
[-]
ameliaquining
|next
|previous
[-]
tolugenius
|next
|previous
[-]
rldjbpin
|next
|previous
[-]
to use it, open the meatballs menu (...) of your current copilot conversation and click "show agent debug logs". it opens a tab showing all the various tool calls and prompts being sent out behind the scenes and how model selection is happening (if auto). it also gives insights on token consumption as well. moreover, vscode has been quietly shipping updates and recently you can connect your own otel service to get this information in a way you can put to use yourself.
while copilot has turned me off post their pricing changes, they have been doing tons at their own pace. highly recommend going through this feature if you find the op interesting.
bartek_gdn
|next
|previous
[-]
Supermancho
|next
|previous
[-]
The other issue with copilot is how episodic memory works. Copilot writes memories after a task is completed, which means a lot of context is lost from the intermediate exploration, success/failure steps (turns), for what? Codex's multithreaded model adds the turn outputs to episodic memory (both agents submit their episodic data to ... themselves for summary) which gives better insight when working on multi-step problems.
_davide_
|next
|previous
[-]
mathieu_aithos
|next
|previous
[-]
bob1029
|next
|previous
[-]
I don't think they care very much about this. The encrypted blobs for reasoning models is a different matter.
tomveber
|next
|previous
[-]
nottorp
|next
|previous
[-]
They use those apps either because of network effects or because there are few alternatives.