HN Debrief

What I learned by putting GitHub Copilot behind a MitM proxy

  • AI
  • Security
  • Developer Tools
  • Open Source

The post is a reverse-engineering walkthrough of GitHub Copilot’s client-side harness. By intercepting traffic with mitmproxy and then checking VS Code source against what appeared on the wire, the author mapped how Copilot discovers models and capabilities, routes requests, injects context for ghost completions, and uses a local SQLite store tied to Chronicle to keep prior prompts and responses. The sharpest finding was not some exotic backend trick. It was that recent edits can pull context from files beyond the one in focus, including `.env`, which means secrets can leak through ordinary editing flow rather than an explicit prompt.

Treat coding agents like untrusted code with broad filesystem access, not like a harmless autocomplete feature. If your team uses them, lock down secret exposure, isolate development environments, and verify what context your tools actually upload instead of trusting vendor defaults.

Discussion mood

Interested and wary. Readers liked the depth of the teardown, but the mood was mostly concern that Copilot can ingest broader local context than people expect and that coding agents still get treated with too much trust around secrets and workstation access.

Key insights

  1. 01

    eBPF uprobes can bypass proxy roadblocks

    Hooking TLS in user space changes the inspection game. Instead of fighting certificate pinning, mutual TLS, or custom clients, you can attach eBPF uprobes to OpenSSL or BoringSSL functions and grab plaintext on the way in or out. That makes telemetry, prompts, and other agent traffic visible even when a classic man-in-the-middle proxy stops working.

    If you need to audit agent behavior on locked-down clients, plan for endpoint instrumentation rather than only network interception. On Linux, this means building or buying observability around uprobes, not assuming HTTPS makes local inspection impossible.

  2. 02

    Secret managers do not solve agent exfiltration

    Moving values out of `.env` files helps with accidental file pickup, but it does not fix the deeper problem. A coding agent with shell or process access can still read environment variables, inspect `/proc/self/environ`, or call `env`, so the weak point is the agent’s runtime privileges, not just where the secret was stored. Tools like Infisical, Bitwarden Secret Manager, SecretSpec, and Varlock were mentioned as partial mitigations, especially when they inject placeholders and swap real credentials at the network edge.

    Do not frame this as a file-format hygiene issue. Reduce what the agent process can access at runtime, and prefer brokered credentials or boundary injection where the real secret never sits in the same execution context as the model.

      Attribution:
    • jiehong #1
    • ElectricalUnion #1
    • theozero #1
    • mehackernewsacc #1
    • sandos #1
  3. 03

    Wireshark is possible but the wrong tool

    Packet capture alone is not enough for modern encrypted clients. To make Wireshark useful here, you still need TLS session secrets from inside the process, which usually means brittle preload tricks or equivalent instrumentation. That is why a MITM proxy remains the simpler path when the client allows it.

    When you need quick visibility into an AI client, start with the least invasive method that exposes plaintext. Save lower-level TLS key extraction for cases where the proxy path is blocked.

      Attribution:
    • jandrese #1
    • personjerry #1

Against the grain

  1. 01

    Harness quality may matter less than model quality

    The post leans toward the idea that context curation and memory plumbing are a big part of Copilot’s edge. One reader pushed back hard, saying top-tier models already perform about as well without elaborate harnessing, and stale learned context can send the system down long dead ends. That reframes the findings as operational detail, not necessarily durable product advantage.

    Do not overinvest in agent scaffolding before validating the underlying model choice. Measure whether your memory and retrieval layers improve task success or just add more ways to be confidently wrong.

      Attribution:
    • _davide_ #1
  2. 02

    Copilot memory may be too coarse

    One reader’s complaint was not about secrecy but usefulness. Copilot appears to write episodic memory after a task finishes, which can miss the failed branches and intermediate discoveries that matter in multi-step coding work. The comparison to Codex was that preserving turn-by-turn exploration gives better summaries for hard tasks.

    If you are building agent workflows, inspect when memory gets written, not just whether memory exists. Post-task summaries can look neat while dropping the exact evidence needed to solve longer problems.

      Attribution:
    • Supermancho #1

In plain english

.env
A file that stores environment variables, often including API keys, passwords, and other application secrets.
BoringSSL
Google’s fork of OpenSSL, used as a TLS and cryptography library in many applications.
Chronicle
The local Copilot session and history component referenced in the post, backed by a SQLite database.
Codex
A coding-oriented AI product name used here to describe agent-like development workflows and interfaces.
eBPF
Extended Berkeley Packet Filter, a Linux technology for safely running small programs in the kernel or attaching to system and user-space events for tracing and inspection.
ghost completions
Inline code suggestions that appear automatically in an editor as you type.
MitM
Man-in-the-middle, a setup where a proxy sits between a client and server so it can inspect or modify traffic.
mitmproxy
An open source interactive proxy tool commonly used to inspect and modify HTTP and HTTPS traffic.
mTLS
Mutual Transport Layer Security, a form of TLS where both client and server authenticate each other with certificates.
OpenSSL
A widely used open source library that applications use to implement TLS and cryptography.
SQLite
A small embedded relational database engine that is widely used in applications and devices.
TLS
Transport Layer Security, the standard protocol used to encrypt network traffic such as HTTPS.
Wireshark
A network protocol analyzer used to capture and inspect packets on a network.

Reference links

Traffic inspection and eBPF references

Secret management and credential brokering

  • Varlock
    Mentioned as an open source tool that can inject placeholders and swap in real secrets at the network boundary.
  • SecretSpec
    Suggested as a possible way to manage or constrain secret usage around agents.

Related coding agent project