Docs

GitHub connector security model.

z-gateway uses GitHub App installation permissions and runtime token minting so agents authenticate to the gateway, not directly to GitHub.

Why GitHub App installation

GitHub Apps provide repository-scoped installation permissions, auditable installation state, and short-lived installation tokens. That model fits z-gateway because each approved runtime action can be executed server-side without giving agents raw GitHub credentials.

Connector controls

Repo-scoped permissions

The GitHub App can be installed on selected repositories, limiting what the connector can reach.

Runtime installation token minting

z-gateway mints installation access only after policy allows the requested action.

Gateway-first authentication

Agents present z-gateway credentials. They do not authenticate directly to GitHub.

Supported and blocked actions

ActionStatusNotes
read_repoSupportedRead repository metadata and confirm access.
get_fileSupportedRead a file from a connected repository.
create_issueSupportedCreate issues when policy and GitHub permissions allow it.
create_prSupportedAvailable for governed pull request workflows when enabled for the workspace.
list_pull_requestsSupportedList repository pull requests for review workflows.
delete_repoHard-blockedDestructive repository deletion is not exposed as an allowed agent action.
push_protected_branchHard-blockedProtected branch writes should go through branch and pull request policy, not direct pushes.

Runtime flow

StageWhat happens
Agent requestThe AI agent invokes a GitHub tool through the z-gateway MCP server.
Policy checkz-gateway evaluates agent, environment, action, and repository scope.
Token mintFor allowed actions, the server mints a short-lived GitHub installation token.
ExecutionThe connector performs the approved GitHub action server-side.
Audit logThe decision, action, resource, and redacted request context are stored.