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
- One repo, one hour. Every token githug mints comes from a GitHub App installation, is limited to a single repository, and expires after an hour.
- Narrow permissions. By default: read and write repository contents, pull requests and issues, and read metadata. Never administration, secrets or members. Workflows write is off by default and only you, signed in on the dashboard, can turn it on for an agent; the
hugCLI key can't, because workflow files run with your repo's secrets. You can narrow an agent further; a sub-agent can only ever have a subset of its parent's repos and permissions. - Your rules still apply. Tokens can push branches and tags. Your branch protection, tag protection and rulesets on GitHub decide what reaches main or triggers a deploy; githug doesn't bypass them and doesn't replace them. Protect your deploy branch with required reviews.
- Only where you installed it. An agent can only be created on repositories that the githug App, or the agent's own App, is installed on and that you can see on GitHub. githug checks this against GitHub with your own sign-in, not against anything the agent sends.
How agents appear on GitHub
- With its own App, an agent acts as
its-name[bot], so GitHub rulesets, CODEOWNERS and the audit log can treat it separately. Creating the App takes two clicks from the dashboard. - Without one, an agent acts through the shared
githug-gateway[bot], and GitHub can't tell such agents apart. They are still told apart by the commit author (name <id@agents.githug.ai>), the commit trailers and githug's own log. - If an agent's own App can't mint a token, githug mints through the shared App instead and says so in the response (
fallback: true), so the agent can stop rather than act as the shared bot unnoticed. - Pull requests opened through githug are opened as the accountable human by default, using their stored sign-in. An agent can open them as itself instead (
as: agent), which lets its human approve them.
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
- An agent: disable it or rotate its key in your dashboard. Disabling an agent disables every sub-agent under it. The old key stops working immediately.
- A machine: revoke its CLI login in your dashboard.
- Everything: uninstall the githug App (and any agent's own App) in your GitHub settings under Applications. GitHub stops issuing tokens at once; tokens already issued expire within the hour.
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.