code-review-graph icon indicating copy to clipboard operation
code-review-graph copied to clipboard

No warning before cloud embeddings send codebase to external APIs

Open dev-arctik opened this issue 7 months ago • 1 comments

Problem

When Google Gemini or MiniMax embeddings are configured, the tool sends codebase content to external APIs with no prominent warning at the point of invocation. The risk is only mentioned in optional dependency docs — not surfaced at runtime.

Impact

  • Developers working on proprietary, client, or regulated codebases may unknowingly exfiltrate source code to third-party APIs
  • There is no confirmation step before code leaves the machine
  • This is especially dangerous when embed_graph_tool is called by an AI assistant autonomously without the developer realising an external API call is being made

Example Scenario

A developer installs with pip install code-review-graph[google-embeddings], runs install, and their AI assistant later calls embed_graph_tool during a review session — sending internal business logic to Google's API without any explicit action from the developer.

Suggested Fix

  1. At serve startup, print a clear warning if a cloud embedding provider is configured: "Warning: Gemini embeddings are enabled — code will be sent to Google APIs"
  2. On first invocation of embed_graph_tool with a cloud provider, require explicit confirmation before proceeding
  3. Add a --local-only flag that prevents any network egress entirely

dev-arctik avatar Apr 09 '26 06:04 dev-arctik

Valid security/privacy concern. When Gemini or MiniMax embeddings are configured, code content is sent to external APIs with no runtime warning. This is especially problematic in agentic workflows where embed_graph_tool may be called autonomously.

Suggested minimum fix: print a clear warning at serve startup if a cloud embedding provider is configured, e.g. 'WARNING: Cloud embeddings enabled (provider=gemini) — code content will be sent to Google APIs.' A --local-only flag would also be valuable.

This is a valid open issue.

tirth8205 avatar Apr 11 '26 08:04 tirth8205