Security at githug

githug hands coding agents GitHub access, so here is exactly what that access is, what we keep, and how to cut it off. Last updated 22 October 2026. githug is in beta and has not had a third-party security audit.

What an agent can do

How agents appear on GitHub

What goes through githug

Minting a token is the main step, but not the only one. The hug CLI also reports each pushed commit to githug (attestation), fetches the commit trailers, and can open pull requests through githug; the verify check asks githug whether a commit was attested. Git objects never pass through githug: pushes go from the agent to GitHub. If githug is down, agents with a live token keep pushing until it expires, and a PR that requires strict verify fails on commits githug hasn't attested.

Commit signing and what attestation proves

githug does not sign commits. Each commit carries trailers naming the accountable human, the agent chain and the run, and hug attests each push. Attestation means the holder of the agent's key reported that commit. Anyone with the key can attest any commit, and the log lives in githug's database. Treat trailers and attestation as an accountability record, not proof of authorship.

What we keep, and how

How it's stored
Agent keys (ghg_…) and CLI keys (hug_…) 256-bit random; we keep only a SHA-256 hash. Shown to you once
Web sessions Random cookie (HttpOnly, Secure, SameSite=Lax); we keep only its hash; 30 days
Your GitHub sign-in (OAuth tokens) Encrypted with AES-256-GCM; the key lives in Cloudflare Workers secrets, not the database
Private keys of agents' own GitHub Apps Encrypted the same way
Tokens agents push with Not stored. Logged as a row (agent, repo, time, run, who minted it, an HMAC-keyed hash of the IP), never the token
Read-only tokens githug uses itself Cached up to 50 minutes, read-only (contents, pull requests, metadata), to run the verify page and track PR outcomes

The CLI key (hug_…) can create agents, change their repos and rotate their keys, so keep it off the machines agents run on.

githug never clones your repository or reads your code. The verify page, the verify Action and PR tracking read commit and pull request metadata only: hashes, messages, authors, dates and states.

If the hosted service were breached

The hosted service holds the shared App's private key, your people's encrypted sign-in tokens and agents' own App keys. The encryption key sits in the Worker's secrets, so it protects a copied database but not a compromised server. Someone who got both could mint tokens, and act as your people, on every repository where the App is installed. The one-hour token limit doesn't cover stored credentials. For private repositories that matter, self-host: one container, your own GitHub App, and none of this leaves your infrastructure.

Cutting access

Open source

The service githug.ai runs is open source at github.com/githug-ai/githug (AGPL-3.0), so you can read exactly how keys, tokens and checks work, or run it yourself. The CLI, hug, is at github.com/githug-ai/hug (Apache-2.0); every release binary on githug.ai has a matching public tag and SHA-256 sums, which the installer checks. The sums are served from the same host as the binaries, so they catch a corrupted download but not a compromised server; build from source if that matters. A self-hosted instance fetches hug binaries from githug.ai unless you set GITHUG_DL_ORIGIN. The verify Action is at github.com/githug-ai/verify. The hosted service runs on Cloudflare Workers.

Reporting a vulnerability

Use Report a vulnerability on the Security tab of githug-ai/githug (or of githug-ai/hug for the CLI), which stays private, or email hello@githug.ai. Please give us a chance to fix it before you publish. We don't run a paid bounty.

For agents: /docs/security.md