Skip to content

Security model

gh-maintainer holds a token that can merge pull requests and push to branches in all your repositories, and it runs an AI coding agent on untrusted input (CI logs and dependency code). This page describes what protects you, and where the limits are.

Component Trusts Treats as untrusted
Agent Its config and secret files PR titles, CI logs, repository contents, the fixer’s output
Claude Code (fixer) Nothing; it runs in a stripped environment Everything it reads
Status server The agent (via EVENT_TOKEN), the ingress (basic auth) Request bodies; it re-checks GitHub before every merge
Widget and desktop app The status server origin Links in events (only http: and https: open, in the system browser)

The agent and the status server share one fine-grained personal access token:

  • Contents and Pull requests: read and write.
  • Administration, Actions, Dependabot alerts, Code scanning alerts, Secret scanning alerts and Metadata: read-only.
  • No Workflows permission. GitHub then rejects any push that adds or changes a file under .github/workflows, even if the fixer’s own .github/ check failed.

The exact list is in the installation guide.

  • Files, not environment variables. The agent reads GITHUB_TOKEN, EVENT_TOKEN and CLAUDE_CODE_OAUTH_TOKEN from files under /secrets (a secret volume, mode 0400, group 10001). No secret enters the agent’s process environment.
  • Kept away from Claude. The fixer starts Claude Code with an environment that has GITHUB_TOKEN, GH_TOKEN and EVENT_TOKEN removed. Only the Claude OAuth token is added, for Claude itself.
  • Kept out of git config. Clones use the token only in the clone and push command lines. Right after cloning, the remote URL is reset to the public URL without credentials.
  • Scrubbed from messages. Every error message, fix summary and event is scrubbed of all three tokens and of any x-access-token:...@ credential before it leaves the agent.
  • Never in findings. Secret scanning findings never copy the secret value, and scanner output is never included in error messages.
  • Redacted in logs. The status server redacts Authorization headers from its request log. The desktop app logs only the server URL without credentials.

The fixer runs Claude Code on a failing Dependabot PR. CI logs and PR titles are attacker-controllable input, so the fixer assumes Claude may be prompt-injected and checks its work from the outside:

  1. Untrusted input is fenced. The prompt puts the PR title and the CI logs in fenced blocks marked as untrusted data, and tells Claude never to follow instructions inside them.
  2. No repository metadata in Claude’s tree. After cloning, .git is moved to an unpredictable temporary directory outside the working tree. Claude never sees or edits git metadata.
  3. Tamper checks after Claude. The fixer aborts if a .git file or directory appeared in the working tree, if the git config changed, or if the git directory gained a redirect file (commondir, config.worktree, objects/info/alternates).
  4. Hardened git. Every git command after Claude runs with an explicit GIT_DIR and GIT_WORK_TREE, hooks and fsmonitor disabled, global and system config ignored, no tokens in the environment, and --no-verify.
  5. Diff checks. The fixer refuses a change that touches .github/, stages a gitlink or a .git path, or contains any of the agent’s tokens anywhere in the diff.
  6. Limits. Each run has a timeout (fixer.timeoutMinutes) and a turn limit (fixer.maxTurns), and each PR gets at most one attempt per fixer.cooldownHours.
  7. A human decides. A PR with a fixer commit is never merged automatically. It goes to the approval queue with reason ai-fix.

The fixer’s commits use the identity gh-maintainer[bot] with the email gh-maintainer@users.noreply.github.com, which is always treated as foreign.

  • No default owner. owner and the status server’s OWNER have no usable default. The shared manifests carry the placeholder CHANGE_ME, which fails validation, so an unedited install stops at start instead of acting on someone else’s account.
  • Only Dependabot’s own PRs are considered: the author must be dependabot[bot].
  • Foreign-commit detection. Every commit must be authored by dependabot[bot] and committed by dependabot[bot] or GitHub itself. Any other commit sends the PR to the approval queue.
  • Conservative classification. Only plain numeric versions in the PR title are parsed. Grouped updates and anything unparseable count as major.
  • Pinned merges. The agent and the Approve button pass the head SHA whose checks they read. A push in between makes GitHub refuse the merge.
  • Re-check on Approve. The status server checks that the PR is still open, green, mergeable and not blocked by branch protection before it merges.
  • Basic auth at the ingress. The UI routes are behind HTTP basic auth (bcrypt htpasswd), through the ingress-nginx annotations in the base or the Traefik Middleware of the deploy/components/traefik component, and served over TLS only.
  • Allow-listed paths. The Ingress routes only /, /state, /info, /stream, /approve/*, /reject/* and /assets/*. Agent routes such as /events are not routed, and a new route stays unreachable until it is added to the list.
  • Bearer token for ingest. /events and the agent’s meta routes require Authorization: Bearer <EVENT_TOKEN>, compared in constant time, before the request body is parsed.
  • CSRF protection. /approve and /reject require Content-Type: application/json. A cross-site form cannot send that without a CORS preflight, which the server never answers.
  • No error details leak. GitHub failures on approve and reject answer a generic 502 or 503; details stay in the server log.

Both workloads run with:

  • a non-root user (uid and gid 10001; the Dockerfiles also set USER 10001),
  • a read-only root filesystem, with writable emptyDir volumes only where needed,
  • allowPrivilegeEscalation: false, all capabilities dropped and the RuntimeDefault seccomp profile,
  • no mounted service account token,
  • CPU and memory limits (agent: 2 CPU, 3 Gi; status server: 500m, 512 Mi).

NetworkPolicies deny all ingress traffic in the namespace by default, and let the status server accept traffic only from the ingress controller’s namespace and from agent pods. Egress stays open, because the agent needs GitHub and Anthropic, and the status server needs GitHub. NetworkPolicy only works with a CNI that enforces it, such as Calico.

These are documented limitations. Read them before you enable the fixer broadly.

  • A fixer push runs CI with your Actions secrets. The fixer pushes to the Dependabot branch as you, the token owner. GitHub then runs the PR’s workflows with the repository’s full Actions secrets, while Dependabot-triggered runs only get Dependabot secrets. The new dependency’s code and Claude’s edits execute in that CI before any human approval. The fixer’s checks do not stop malicious dependency code from reading CI secrets. Enable the fixer only for repositories without Actions secrets (fixer.repos), or turn it off (fixer.enabled: false).
  • Claude can read the secret files. Claude Code runs as the same uid as the agent. Tokens are kept out of its environment and out of .git/config, but the files under /secrets are readable by that uid. A prompt-injected session could read them. Mitigations: the token is fine-grained without Workflows permission, .github/ changes are never pushed, AI fixes always need approval, and the job is short-lived. If a token leaks, rotate it.
  • The token is in the clone command line. While a clone runs, the token is visible in /proc/<pid>/cmdline to processes in the same pod.
  • Git identities can be forged. The foreign-commit check protects against the fixer and casual edits, not against a malicious collaborator with push access who forges Dependabot’s identity.
  • 0.x minor bumps auto-merge. Plain semver treats 0.4.1 → 0.5.0 as minor.
  • Approve merges even in dry run. Dry run only affects the agent.
  • The desktop app stores the basic-auth password in plain text in its settings.json. Use a dedicated htpasswd user.
  • Base images are not digest-pinned. node:22-slim is a tag, and apt packages and Claude Code’s transitive npm dependencies float. The scanner binaries (checked by SHA-256) and the Claude Code version are pinned.
  • Single status-server replica. There is no high availability; the widget is down during restarts while the agent keeps working.
  • The desktop app is not code-signed. Verify that you download it from the project’s GitHub releases or Actions runs.

Don’t open a public issue for a security problem. Report it privately through GitHub private vulnerability reporting: open the repository’s Security tab and click Report a vulnerability. Only the latest release receives fixes. The full policy is in SECURITY.md.