Skip to content

Security: ranjankumar-gh/localpilot

Security

SECURITY.md

🔐 Security Policy — LocalPilot

LocalPilot is designed with security, safety, and trust as first‑class concerns. This document explains the security model, threat assumptions, and responsible disclosure process.


🛡️ Security Philosophy

LocalPilot follows a defensive-by-design approach:

  • LLMs are never trusted with direct file modifications
  • All changes are validated using Git before application
  • Unsafe or ambiguous operations fail closed, not open

If LocalPilot cannot prove a change is safe, it will not apply it.


🧠 Threat Model

In Scope

  • LLM hallucinated or malformed code
  • Incorrect file targeting
  • Partial or corrupt patch application
  • Accidental developer mistakes
  • Concurrent file modification during refactor

Out of Scope

  • Malicious local users with direct filesystem access
  • Compromised Git binaries
  • OS-level attacks

🔒 Security Guarantees

LocalPilot enforces three hard guarantees:

1️⃣ No Unauthorized File Writes

  • All diffs are system-generated
  • File paths are validated and normalized
  • Multi-file patches are rejected

2️⃣ Git-Enforced Validation

  • All patches are checked using:
    git apply --check
  • Invalid patches are never applied

3️⃣ Explicit User Consent

  • No refactor is applied without developer confirmation
  • No background or silent writes

🚨 Failure Handling

When a security condition fails:

  • The operation is aborted
  • The repository remains unchanged
  • The developer is notified with context

There are no partial writes.


🧪 Security Testing

Recommended security validation:

  • Run LocalPilot only inside Git repositories
  • Use version control hooks if needed
  • Review diffs before applying

Future plans include:

  • Read-only / dry-run modes
  • CI enforcement workflows

📢 Reporting Security Issues

If you discover a security vulnerability:

  1. Do not open a public issue
  2. Contact the maintainer privately
  3. Provide:
    • Description of the issue
    • Steps to reproduce
    • Impact assessment

Security issues are treated with priority.


❤️ Final Note

LocalPilot is built for engineers who value correctness over convenience.

Security is not a feature — it is the foundation.

There aren't any published security advisories