Putting GitHub Copilot Behind a MitM Proxy Reveals an Intent-Classification Router and a Plaintext Session Database
A Lighthouse Newsletter teardown (185 points, 27 comments) proxied Copilot's traffic and documented a `/models/session/intent` endpoint that classifies each prompt into buckets like 'code-gen', 'debugging' and 'reasoning' to pick a model, alongside a separate `/agents/swe/models` discovery endpoint for agentic work. Context injection is larger than advertised: up to 20 recently edited files with 8 edit summaries each and 3 lines of context per change, with completion requests pinned at max_tokens 500 and temperature 0. Most consequential for builders: the local session store is a SQLite database holding every user message and model response in plaintext with no sanitization on write, and there is no default .env protection at individual plan tiers, so credentials from unrelated files can ride along in completion requests.
↳ Follow the thread