architecture · privacy · local ai code review
Security architecture: local-first AI code review
NeonDiff is a local-first AI code reviewer. This page describes the architecture, threat model, and the specific guarantees that make it safe to point at a private repo.
Most AI code review tools work by uploading your diff — sometimes the whole file, sometimes the whole repo — to a vendor-controlled inference cluster. That model runs somewhere you cannot inspect, on hardware you do not own, behind a terms-of-service you did not write. If the vendor changes their training policy, indexes prompts for evaluation, or gets breached, your source code is exposed by default.
NeonDiff inverts that model. The agent runs where you run it, talks to a model endpoint you choose, and never sends bytes of your repo to a NeonDiff-hosted ingestion service.
The four guarantees
No NeonDiff repo ingestion
NeonDiff has no hosted service that ingests your repo. Model-bound review input and context go only to the model endpoint you select, under that provider's policy. Findings may be posted to the configured GitHub PR under your explicit posting policy.
Local or selected-provider inference
Review inference runs locally or goes directly to the model provider you select. There is no NeonDiff-hosted model proxy or repo ingestion service; provider-bound review data is handled under that provider's data handling and retention policy.
No training pipeline
NeonDiff itself has no training pipeline. Review data and authentication may go directly to the selected provider under its policy.
Your keys
Provider credentials are stored locally and sent only to the selected provider when explicitly used. NeonDiff never proxies them through a shared account.
Data flow
┌────────────────┐ diff ┌──────────────┐
│ your repo │ ──────────▶ │ neondiff │
│ (git, local) │ │ agent (cli) │
└────────────────┘ └──────┬───────┘
│ prompt (selected endpoint)
▼
┌──────────────┐
│ your model │
│ ollama / │
│ vllm / glm │
└──────┬───────┘
│ review
▼
┌──────────────┐
│ pr comments │
│ (your ci) │
└──────────────┘scroll →
No arrow routes through a NeonDiff cloud. Review data goes directly to the local, self-hosted, or BYOK model endpoint you select.
Explicit hosted provider verification may authenticate one bounded readiness request to the selected provider over HTTPS. That request carries no repository content, diff, or review prompt, and it is separate from the review path; no NeonDiff cloud proxies it.
Threat model
- Vendor breach: reduced by avoiding a NeonDiff-hosted repo ingestion service.
- Silent policy change: scoped to the model/provider endpoint you choose.
- Training-set contamination: controlled by your selected local or BYOK provider policy.
- Compromised model provider: scoped to the endpoint you point at; swap it without changing tools.
- Compromised developer laptop: the same risk that already existed before the review agent.
Why local AI code review
Cloud-hosted reviewers are convenient because the vendor absorbs the infra work. The trade is control over where review prompts, diffs, and repo context are processed. For regulated industries, product-secret code, and teams that want inspectable review infrastructure, NeonDiff keeps the agent local-first and leaves model/provider selection in your hands.
Run NeonDiff on your next PR
Local-first AI code review. Your keys, your model, your rules.