Client data and LLMs: protect, verify, choose where inference runs
Data protection starts as soon as you write the system that processes it. You can stay compliant with a capable model if what the LLM does is verifiable; a proxy centralises costs, anonymisation and keys.
- Category
- Note
- Published
- Reading time
- 4 min read
- Topics
- Software engineering
- Tags
- #security#privacy#compliance#freelance#llm
TranslationTranslated by AI from the original in French.Read the original
A client gives me access to their repository, and the temptation is to start Claude Code within the minute. Often, they provide their own infrastructure. If not, their constraints may call for a more elaborate inference stack.
During development, the agent sees what the developer sees: the database dump pulled to reproduce a bug, the staging .env, the logs copied from production. Nothing is in production, yet everything already goes into the model's context, and the contract almost never mentions it. The client expects speed and compliance: one must not cost the other.
Working on private data with a capable model while staying compliant is possible, if what the LLM does is verifiable, by a verifier that is itself verifiable.
Two kinds of compliance: the client's and mineLink to this section
If the code or data sent to the LLM contain personal data, the client is the controller, the freelancer is their processor, and the LLM provider becomes a sub-processor: Article 28 of the GDPR then requires the client's prior written authorisation. Without personal data, the provider's terms of use still add to the confidentiality commitments. And nothing may spill over from one project to another, side projects included: that is the job of the isolation described in the previous post.
Day to day, I use Claude, for its subscription. It is a consumer plan: training on sessions must be turned off, otherwise they may be used for it and retained for five years. If the client requires a data processing agreement (DPA), you need a commercial plan or the API. I only move to a European AI platform if they require their data to stay in the EU.
A proxy between the agent and the LLMLink to this section
Routing requests through a proxy gives a single point of control. There you track and cap costs per project, anonymise the prompt on one server rather than on every workstation, and filter prompt injections before inference, which reduces the risk without removing it. The provider's keys stay there, stored per project; the agent only gets a proxy key, scoped and revocable. The proxy assumes API access: on the subscription, Claude Code talks directly to the provider.
A verifier that is itself verifiableLink to this section
That leaves proving what the proxy did. A log is still the word of whoever keeps it: a record only counts as evidence if the third party behind it is verifiable.
That is the role of a TEE, an isolated hardware region that even the host cannot read, whose remote attestation proves which code is running. The proxy goes there, as frozen code, logging the prompt and the response, then signing the lot. Phala Network offers this as a service: a signing key is born inside the TEE, and every response is signed.
The guarantee is strong, not absolute: in 2025, the TEE.Fail attack extracted attestation keys, NVIDIA GPUs included, through physical access to the server. A TEE does not spare you from choosing a host you trust.
Four ways to run inferenceLink to this section
A local model, offline and memoryless. To summarise a CV or sort HR documents, Ollama on a machine cut off from the network is enough. Less brilliant, but nothing leaves.
Anonymised data, sent to an attested service. The proxy replaces names, addresses and numbers with placeholders, then restores the real values in the response. The limit: TEE services mostly offer open models, not the most advanced ones.
A model hosted, by the freelancer or by the client, in a verifiable VM. The model runs in a confidential VM, on GPUs that support a TEE, from a reproducible image. Inference becomes verifiable, and the host has no access to the client's data, short of a hardware attack.
A proprietary model, such as Claude. Inference is not private: the provider sees what you send it. It is what I use daily, without a proxy, so without proof: I keep it for code without personal data, with the client's agreement. When the stakes justify it, every call can go through the API and the TEE proxy, which logs it, signs it and publishes a salted hash of it, timestamped by a third party such as OpenTimestamps and stored on IPFS, for example. If a response is aberrant, the company can prove what it asked and what it received, without exposing the user's data.
Homomorphic encryption, which computes on encrypted data without ever seeing it in the clear, will go further, but for now it remains far too slow.
What I set up for a clientLink to this section
During development: synthetic or anonymised data, secrets out of the agent's reach, access limited to the task, and training turned off on a consumer subscription. In the contract, one sentence stating which LLM touches the code: "I use Claude Code on my clients' codebases".
When the client goes through the API, an open-source proxy such as LiteLLM covers anonymisation with Presidio in a few lines:
guardrails:
- guardrail_name: "presidio-pii"
litellm_params:
guardrail: presidio
mode: "pre_call"
Each project then gets its own virtual key, with a capped budget; OmniRoute offers the equivalent.
When everything to do with the client lives in their container, an end-of-engagement destruction or return clause takes minutes to honour: archive, hand back, delete. What was sent to an LLM provider, however, follows that provider's own retention period.
Next post: choosing the right model for each role in the development loop.