The credential model
- No per-user OAuth. Installing the app does not ask a user to authorize it against their GitHub account. The bot-authored flow uses no user OAuth at all.
- The app private key is the only stored credential. It lives only in the control plane (as
GITHUB_LANGY_PRIVATE_KEY) and never reaches a worker. When it is unset, the GitHub feature is silently off. - Installation tokens are minted per turn. Each turn mints a fresh 1-hour installation token, cached in Redis just under its lifetime and never persisted. The worker receives it as the
GH_TOKENenvironment variable only; nothing is written to disk. - Least privilege at mint time. Tokens are minted with only
contents:writeandpull_requests:write, scoped to the installation’s repositories, or to a single repository when the turn targets one.
git config credential.helper '!gh auth git-credential' wires git to read the token from the environment, so there is no .gitconfig or .git-credentials on disk.
Commits are authored by langwatch[bot], and the requesting user is credited with a Co-authored-by trailer plus a Requested by @<login> via LangWatch note in the PR body.
The install is the access boundary
Langy can open pull requests only on the repositories the app is installed on. Installing the app on a repository is what grants access; there is no separate grant. A single LangWatch organization can install the app on several GitHub accounts, and each installation is listed separately. If the app is not installed when Langy reaches forgit or gh, the platform stops the turn, shows an install card in chat, and re-runs the turn once the app is installed.
App permissions
These are the only repository permissions the app requests:
The app subscribes to no events beyond the installation lifecycle that GitHub sends automatically (
installation, installation_repositories).
Contents: Read and write is what lets Langy clone a repository, create a branch, and push commits to that branch. It does not let Langy merge; merging a pull request is a separate action that a human takes in GitHub after review.Disconnecting
Disconnect from Settings, Integrations, GitHub, Disconnect, which opens GitHub’s uninstall page (an app cannot be uninstalled through the API). Once GitHub confirms, theinstallation.deleted webhook removes the local record.
Install and disconnect actions are recorded in the audit log as langy.github.install and langy.github.disconnect.
Reference
- Register the Langy GitHub App for the setup steps (registering the app, plumbing the secrets, and installing it).
- How Langy is isolated
- Data flow and privacy