Skip to content

CodeGate: Security, Workspaces and Muxing for AI Applications, coding assistants, and agentic frameworks.

License

Notifications You must be signed in to change notification settings

stacklok/codegate

Folders and files

NameName
Last commit message
Last commit date
Feb 20, 2025
Feb 19, 2025
Feb 9, 2025
Jan 20, 2025
Jan 15, 2025
Feb 19, 2025
Feb 19, 2025
Jan 29, 2025
Feb 17, 2025
Feb 10, 2025
Feb 19, 2025
Feb 20, 2025
Jan 29, 2025
Feb 17, 2025
Dec 9, 2024
Nov 26, 2024
Jan 10, 2025
Dec 14, 2024
Dec 17, 2024
Feb 19, 2025
Feb 8, 2025
Jan 22, 2025
Jan 30, 2025
Dec 17, 2024
Jan 21, 2025
Dec 24, 2024
Jan 28, 2025
Feb 19, 2025
Feb 19, 2025
Jan 15, 2025
Feb 20, 2025
Feb 20, 2025
Feb 12, 2025

Repository files navigation

CodeGate logo

Release | CI | License: Apache 2.0 | Star on GitHub | Discord

Website | Documentation | YouTube | Discord


CodeGate: secure AI code generation

By Stacklok

CodeGate is a local gateway that makes AI agents and coding assistants safer. It ensures AI-generated recommendations adhere to best practices while safeguarding your code's integrity and protecting your privacy. With CodeGate, you can confidently leverage AI in your development workflow without sacrificing security or productivity.

CodeGate dashboard

โœจ Why choose CodeGate?

AI coding assistants are powerful, but they can inadvertently introduce risks. CodeGate protects your development process by:

  • ๐Ÿ”’ Preventing accidental exposure of secrets and sensitive data
  • ๐Ÿ›ก๏ธ Ensuring AI suggestions follow secure coding practices
  • โš ๏ธ Blocking recommendations of known malicious or deprecated libraries
  • ๐Ÿ” Providing real-time security analysis of AI suggestions

๐Ÿš€ Quickstart

Prerequisites

CodeGate is distributed as a Docker container. You need a container runtime like Docker Desktop or Docker Engine. Podman and Podman Desktop are also supported. CodeGate works on Windows, macOS, and Linux operating systems with x86_64 and arm64 (ARM and Apple Silicon) CPU architectures.

These instructions assume the docker CLI is available. If you use Podman, replace docker with podman in all commands.

Installation

To start CodeGate, run this simple command:

docker run --name codegate -d -p 8989:8989 -p 9090:9090 -p 8990:8990 \
  --mount type=volume,src=codegate_volume,dst=/app/codegate_volume \
  --restart unless-stopped ghcr.io/stacklok/codegate:latest

Thatโ€™s it! CodeGate is now running locally.

Get into action

Now it's time to configure your preferred AI coding assistant to use CodeGate See supported AI Coding Assistants and providers

โš™๏ธ For advanced configurations and parameter references, check out the CodeGate Install and Upgrade documentation.


๐Ÿ–ฅ๏ธ Dashboard

CodeGate includes a web dashboard that provides:

  • A view of security risks detected by CodeGate
  • A history of interactions between your AI coding assistant and your LLM
CodeGate dashboard

Accessing the dashboard

Open http://localhost:9090 in your web browser to access the dashboard.

To learn more, visit the CodeGate Dashboard documentation.


๐Ÿ” Features

Secrets encryption

CodeGate helps you protect sensitive information from being accidentally exposed to AI models and third-party AI provider systems by redacting detected secrets from your prompts using encryption. Learn more

Dependency risk awareness

LLMsโ€™ knowledge cutoff date is often months or even years in the past. They might suggest outdated, vulnerable, or non-existent packages (hallucinations), exposing you and your users to security risks.

CodeGate scans direct, transitive, and development dependencies in your package definition files, installation scripts, and source code imports that you supply as context to an LLM. Learn more

Security reviews

CodeGate performs security-centric code reviews, identifying insecure patterns or potential vulnerabilities to help you adopt more secure coding practices. Learn more


๐Ÿค– Supported AI coding assistants and providers

  • Local / self-managed:
    • Ollama
  • Hosted:
    • OpenAI and compatible APIs

๐Ÿ”ฅ Getting started with CodeGate and aider - watch on YouTube

  • Local / self-managed:
    • Ollama
    • LM Studio
  • Hosted:
    • Anthropic
    • OpenAI and compatible APIs
  • Local / self-managed:
    • Ollama
    • llama.cpp
    • vLLM
  • Hosted:
    • Anthropic
    • OpenAI and compatible APIs
  • The Copilot plugin works with Visual Studio Code (VS Code) (JetBrains is coming soon!)

๐Ÿ›ก๏ธ Privacy first

Unlike other tools, with CodeGate your code never leaves your machine. CodeGate is built with privacy at its core:

  • ๐Ÿ  Everything stays local
  • ๐Ÿšซ No external data collection
  • ๐Ÿ” No calling home or telemetry
  • ๐Ÿ’ช Complete control over your data

๐Ÿ› ๏ธ Development

Are you a developer looking to contribute? Dive into our technical resources:


๐Ÿ“œ License

CodeGate is licensed under the terms specified in the LICENSE file.


๐ŸŒŸ Support us

Love CodeGate? Starring this repository and sharing it with others helps CodeGate grow ๐ŸŒฑ

Star on GitHub


๐Ÿค Contributing

We welcome contributions! Whether you're submitting bug reports, feature requests, or code contributions, your input makes CodeGate better for everyone. We thank you โค๏ธ!

Start by reading our Contributor guidelines.

Thank you!

Made with contrib.rocks.