logoalt Hacker News

What I learned by putting GitHub Copilot behind a MitM proxy

182 pointsby j0selit0yesterday at 10:40 AM25 commentsview on HN

Comments

p1llusyesterday at 3:47 PM

One thing I found that I thought was a fun addition, is using eBPF made this even easier. No need to fight with anyone that is using certificate pinning, mTLS or anything else, you just get the raw plaintext data straight of the wire (right before encryption and right after decryption) and works nicely for most of the agents and IDE's.

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.

show 2 replies
j0selit0yesterday at 11:16 AM

I was curious to understand how Copilot implements its harness, and also how I was exhausting my quota so quickly. End up going down a rabbit hole of intercepting its network traffic with mitmproxy.

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.

show 1 reply
ameliaquiningyesterday at 2:12 PM

Minor factual correction: The Codex client is open source. https://github.com/openai/codex

bob1029today at 8:52 AM

When I did this I just used a custom token in visual studio and then looked at the logs in the provider's web UI.

I don't think they care very much about this. The encrypted blobs for reasoning models is a different matter.

tolugeniusyesterday at 2:06 PM

Nice deep dive, I always wondered how copilot worked compared to similar tools. I'm shocked at the lack of of a rule for env files, I at least thought with a tool more integrated with github as a whole that would be a default but alas.

bartek_gdnyesterday at 1:33 PM

Nice one! Really shows why we should run those in sandboxes without env access. I like the proxy swap approach

Supermanchoyesterday at 4:16 PM

I wish copilot was better at coding Java. It's like using ChatGpt 5.1, even with Fable 5 or Opus 5 as models.

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.

show 1 reply
_davide_yesterday at 8:44 PM

Disagree with the conclusion, even without carefully curated context every high end LLM perform just as well, maybe with an extra detour. In contrast if even one of the learnings is not up to date or doesn't apply to the current situation you find yourself with a long detour or even a failure.

mathieu_aithosyesterday at 3:22 PM

Interesting to see how big companies make compromises with security for innovation and i feel that it's comprehensible and better that doing nothing. But i guess it also show how we can see governance problems as real opportunity for involved peoples to build good systems with an agent native perspective.

nottorpyesterday at 4:58 PM

"Apps users love, made with Electron". Seriously?

They use those apps either because of network effects or because there are few alternatives.

show 1 reply
personjerryyesterday at 7:48 PM

I believe this can be done without a MitM by using Wireshark or adjacent tool

show 1 reply
bpatchyesterday at 11:58 PM

[flagged]

m_montazeriyesterday at 5:58 PM

[flagged]

saadyousfiyesterday at 3:31 PM

[flagged]

tombuildsyesterday at 7:38 PM

[flagged]

driftproofhqyesterday at 6:36 PM

[flagged]

devondaleyyesterday at 5:15 PM

[flagged]