Skip to content

Security

Chuck edited this page Nov 15, 2026 · 7 revisions

Glint holds two powerful credentials (a GitLab api token and an Anthropic API key), accepts requests from the network, and 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.
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 Claude 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 Claude 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 Anthropic

For every MR summary, Glint sends the MR metadata and up to 20,000 characters of diff to the Anthropic API; for every release, the commit log and diff between tags. Don't enable Glint on projects whose code must not be shared with a third-party AI provider, and check that your use complies with your organisation's policies and Anthropic's commercial terms.

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 an Anthropic spend limit 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