Skip to content

Security: reddy895/RepoPilot

Security

SECURITY.md

Security Policy & Safeguards

RepoPilot is designed with a defense-in-depth security model to ensure that ingesting repositories and running local AI inference is safe, private, and isolated.


1. Core Security Invariants

1. Source Code is Treated Purely as Data

RepoPilot NEVER executes arbitrary code from an ingested repository:

  • No package installations: Does not execute npm install, yarn install, pip install, cargo build, or any dependency resolution commands on user code.
  • No arbitrary script execution: Does not run build scripts (setup.py, Makefile, shell scripts, or npm lifecycle hooks).
  • No binary execution: Never executes binaries, shared libraries, or downloaded executables.
  • Ingestion is strictly limited to read-only lexical analysis, AST parsing, and chunk extraction.

2. Path Traversal & Sandbox Isolation

  • Cloned repositories are strictly isolated under the managed directory .repopilot/repositories/{owner}_{repo}.
  • All file access requests (/api/directory/{repo_id}/file?path=...) validate against directory traversal (.. path segments or symlinks pointing outside the repository root).
  • Any attempt to escape the repository root returns HTTP 400 Bad Request with zero filesystem disclosure.

3. Sensitive Files & Secret Protection

RepoPilot's scanner and chunker automatically ignore and never index:

  • Secret manifests: .env, .env.*, credentials.json, id_rsa, id_ed25519, *.pem, *.key
  • Version control metadata: .git/, .svn/, .hg/
  • Build artifacts & virtualenvs: node_modules/, venv/, .venv/, dist/, build/, __pycache__/
  • Large media and binary files: .zip, .tar.gz, .png, .jpg, .mp4, .exe, .bin

4. Zero Cloud AI Telemetry & Local Isolation

  • RepoPilot communicates exclusively with your local Ollama daemon (http://localhost:11434) and local ChromaDB (.repopilot/chroma).
  • No prompts, context blocks, embeddings, or code excerpts are ever transmitted to OpenAI, Anthropic, Gemini, OpenRouter, or any third-party cloud AI APIs.

5. Secure OAuth Token Handling

  • GitHub and Google OAuth tokens are stored server-side only in SQLite session tables.
  • Access tokens are never returned to client-side JavaScript or exposed in browser consoles.
  • For private GitHub repositories, authenticated clone requests inject credentials securely into temporary git clone memory without logging authentication headers.

2. Reporting a Vulnerability

If you discover a security vulnerability in RepoPilot:

  1. Do NOT open a public GitHub issue.
  2. Send an email with reproduction steps and a proof of concept to the maintainer.
  3. We acknowledge reports within 48 hours and coordinate a coordinated security release.

There aren't any published security advisories