Skip to content

Security: wildfirebill-ai/localai-code-editor

Security

SECURITY.md

Security Policy

πŸ”’ Supported Versions

Version Supported
0.1.x βœ… Yes
< 0.1.0 ❌ No

We provide security updates for the latest minor release of each major version.


πŸ›‘οΈ Reporting a Vulnerability

Do not open a public issue for security vulnerabilities.

Instead, report them privately via:

Include:

  • Description of the vulnerability
  • Steps to reproduce
  • Impact assessment
  • Suggested fix (if any)

We aim to:

  • Acknowledge within 48 hours
  • Provide initial assessment within 7 days
  • Release a fix within 30 days for critical issues

πŸ” Security Principles

Transparency first: known weaknesses and accepted risks are documented publicly in VULNERABILITIES.md β€” including prompt-injection exposure, the unauthenticated server, and Docker socket implications. Read it before deploying beyond localhost.

Local-First by Design

LocalAI Code Editor is built on a local-first architecture:

  • No external network calls unless explicitly configured by the user
  • No telemetry, analytics, or tracking β€” ever
  • No automatic updates that could execute untrusted code
  • No cloud dependencies for core functionality

Agent Safety

The AI agent operates with explicit user consent:

Capability Default Control
File read/write βœ… Enabled Workspace-scoped
Shell commands ❌ Disabled allowShell: true in config
MCP tool calls βœ… Enabled Per-server config
Network requests ❌ Disabled Only via configured MCP/HTTP servers
Docker socket ❌ Disabled Opt-in with explicit warning

Protected Paths

The agent cannot access paths matching protectedPaths in config (default: [".git"]). This prevents:

  • Credential leakage (.env, .npmrc, SSH keys)
  • Repository corruption
  • Unintended modifications to sensitive files

Configuration Security

  • No secrets in config β€” Use environment variables or secure secret stores
  • Config validation β€” All config parsed with strict schema validation
  • No eval/exec β€” Config is data-only, never executed as code

🐳 Docker Security

Socket Mount Warning

Mounting /var/run/docker.sock grants root-equivalent control over the Docker host to the container. Because the AI agent can run arbitrary shell commands, anything reaching the editor's web UI could take over your host.

Safe alternatives:

Option Description Risk
B β€” Build on host Edit in editor, build on host against mounted workspace βœ… None
C β€” Docker-in-Docker Nested Docker daemon inside container βœ… Isolated
A β€” Socket mount Direct socket access ⚠️ Root host access

Never expose the editor's UI to the internet while the Docker socket is mounted.

Container Hardening

The Docker image:

  • Runs as non-root user (node:22-alpine)
  • Uses multi-stage builds (minimal runtime image)
  • No unnecessary packages
  • Health checks for orchestration
  • Read-only root filesystem (where possible)

πŸ”‘ Secret Management

Never Commit Secrets

The following are never committed:

  • API keys (OpenAI, Anthropic, etc.)
  • Database passwords
  • SSH keys, certificates
  • Docker registry credentials
  • CI/CD tokens

Recommended Practices

  1. Use .env files (gitignored) for local development
  2. Use secret managers in production (1Password, Vault, AWS Secrets Manager)
  3. Rotate keys regularly
  4. Use least-privilege credentials

πŸ“¦ Supply Chain Security

Dependencies

  • All dependencies pinned in pnpm-lock.yaml
  • pnpm install --frozen-lockfile in CI
  • pnpm audit runs in CI pipeline
  • Dependabot configured for automated updates

Actions

  • All GitHub Actions pinned to SHA or major version
  • Actions reviewed before upgrades
  • Minimal permissions (contents: read, packages: write)

Build Integrity

  • Multi-stage Docker builds with --platform
  • SBOM generation (planned)
  • Image signing with cosign (planned)

🚨 Incident Response

Severity Levels

Level Description Response Time
Critical RCE, data exfiltration, auth bypass < 24 hours
High Privilege escalation, significant data exposure < 72 hours
Medium Info disclosure, DoS, logic bugs < 7 days
Low Minor info leaks, cosmetic issues < 30 days

Process

  1. Triage β€” Assess severity, impact, exploitability
  2. Contain β€” Disable affected feature, deploy hotfix if needed
  3. Fix β€” Root cause analysis, patch development, testing
  4. Release β€” Security patch release, advisory publication
  5. Postmortem β€” Public retrospective (for Critical/High)

βœ… Security Checklist for Contributors

  • No hardcoded secrets in code
  • Input validation on all user inputs
  • No eval(), Function(), or dynamic code execution
  • Path traversal protection on file operations
  • Command injection prevention on shell commands
  • Proper error handling (no stack traces to user)
  • Dependencies updated, no known vulnerabilities
  • Tests cover security-relevant code paths

πŸ“ž Contact


πŸ“œ Compliance

LocalAI Code Editor is designed to support compliance with:

  • GDPR β€” No personal data collection
  • SOC 2 β€” No external data transmission by default
  • ISO 27001 β€” Security controls aligned with best practices

This is not legal advice. Consult your compliance officer for your specific requirements.

There aren't any published security advisories