Skip to content

Security

Chuck edited this page Nov 30, 2026 · 6 revisions

Glint holds two powerful credentials (a GitLab api token and an AI provider API key), accepts requests from the network, and, unless you use a local model, sends source code to a third party. This page describes what it protects against, what it doesn't, and how to deploy it safely.


What Glint does to protect itself

Area Protection
Webhook authentication Every /webhook request must carry a valid HMAC-SHA256 signature (WEBHOOK_SIGNING_TOKEN) or secret token (WEBHOOK_SECRET). Both are compared in constant time. Signed requests older than 5 minutes are rejected.
Input validation Project IDs and MR IIDs must be positive integers and release tags must be 1–255 characters with no whitespace or control characters; anything else gets 400 before any GitLab call.
Secrets in logs Failed GitLab calls are logged as a one-line summary (method, path, status, message). The raw HTTP client error, which would include the PRIVATE-TOKEN header, is never logged.
Error responses Errors are answered with a short JSON body and never include stack traces, file paths or other internal details; the image runs with NODE_ENV=production. (Before v0.1.21, malformed JSON returned Express's HTML error page with a stack trace, without needing a valid token. Upgrade if you run an older version.)
Fail-fast config Missing credentials, missing webhook authentication or an unreadable CA file stop the process at startup.
TLS Certificate verification is on by default; private CAs are trusted explicitly via GITLAB_CA_FILE.
Container Runs as a non-root user; production dependencies only; no secrets baked into the image.
Supply chain CI scans the full git history for secrets with gitleaks; GitHub secret scanning and push protection are enabled; images are built by GitHub Actions with build attestations.

Risks to understand

Prompt injection

MR titles, descriptions, diffs and commit messages are sent to the AI model verbatim. Anyone who can open an MR can write text intended to steer the summary — for example, to make a risky change look harmless.

Glint gives the model no tools and only ever posts the text it returns, so the impact is limited to misleading or unwanted content in a comment or release description. Treat AI output as untrusted: it is labelled as AI-generated, and reviewers should read the diff themselves.

Data sent to the AI provider

For every MR summary, Glint sends the MR metadata and up to 20,000 characters of diff (MAX_DIFF_CHARS) to the configured provider; for every release, the commit log and diff between tags. By default that is the Anthropic API. With AI_PROVIDER=openai-compatible it is whatever server OPENAI_BASE_URL points at.

  • Hosted providers (Anthropic, OpenAI, Gemini, OpenRouter, …): don't enable Glint on projects whose code must not be shared with a third party, and check that your use complies with your organisation's policies and the provider's terms (for example Anthropic's commercial terms).
  • Local models (Ollama, LM Studio, vLLM on your own hardware): the content stays on your network. This is the option for code that must not leave it. See Configuration → AI providers.
  • Plain http:// base URLs send the diff, and any OPENAI_API_KEY, unencrypted. Keep them to localhost or a network you trust.
  • Anyone who can change OPENAI_BASE_URL decides where your code is sent. Protect the env file like the credentials in it.

Token reach

GITLAB_TOKEN can comment and edit releases on every project it can access. If Glint's host is compromised, so is that access. Limit it — see below.

Release descriptions are overwritten

On every new release, Glint replaces the release description. Text you wrote when creating the release is lost unless you keep a copy.


Hardening checklist

  1. Use a signing token (WEBHOOK_SIGNING_TOKEN, GitLab 19.0+). It authenticates GitLab and protects the payload. Otherwise use a long random WEBHOOK_SECRET (openssl rand -hex 32).
  2. Narrow the GitLab token: a project or group access token, or a bot user that is a member of only the projects you want reviewed. Set an expiry date and rotate it.
  3. Keep TLS verification on. Use GITLAB_CA_FILE for private CAs; never ship GITLAB_REJECT_UNAUTHORIZED=false.
  4. Restrict network access. Only GitLab needs to reach /webhook; firewall or proxy-allowlist everything else. /health needs no exposure beyond the host or orchestrator.
  5. Protect the env file (chmod 600, owned by the service user) and keep it out of version control. The repository's .gitignore and .dockerignore already exclude .env.
  6. Pin the image to a vX.Y.Z tag and update deliberately.
  7. Set a spend limit with your hosted provider (for Anthropic, in the Anthropic Console) so a burst of MRs, or a leaked key, can't run up an unbounded bill.
  8. Collect logs. Failures in background processing only appear in Glint's log.

Reporting a vulnerability

Please don't open a public issue for a security problem. Use Report a vulnerability on the repository's Security tab to contact the maintainer privately, with steps to reproduce and the affected version. SECURITY.md has the full policy: which versions get fixes (only the latest release), what's in scope, and what to expect after you report.

Clone this wiki locally