Skip to content

feat(platform): sign agents' Git and gh with per-turn GitHub App tokens #5295

Open

Description

@tale-code-bot

Part 2 of #5252, split by task TALE-332 under the Lead's decision on #5252 (a "Tale" GitHub App registered per deployment, as an optional github-app auth method next to the token).

Part 1 (TALE-332, branch feat/github-app-connector, its commit says Refs #5252) adds the method: registration from Tale's connector settings through GitHub's manifest flow, installation on selected repositories, the private key stored encrypted, Tale's own GitHub actions signing with installation tokens, settings, audit, docs and a manual box. Until this part lands, a GitHub App credential hands no token to an agent's sandbox.

This part

  • Per-turn token. A turn of an agent bound to a GitHub App credential gets an installation token minted for that turn (POST /app/installations/{id}/access_tokens), narrowed to the connector's declared permissions and to the binding's repositories when it names any. It reaches the turn as GITHUB_TOKEN/GH_TOKEN and through the Git credential helper (session_credentials.ts).
  • Revoked at turn end. The token is recorded per exec, so every turn-end path (settle, cancel, orphan) revokes it with DELETE /installation/token; its one-hour expiry is the backstop.
  • No fallback. A failed mint gives the turn no GitHub credential and says so in the turn's guidance: never a stored token, a cached connector token or another credential. Keep it out of resolveCredentialRowForShim's warn-and-hand-back path.
  • Mint log. Each mint logs the run, the installation, the repositories and the expiry, never the token.
  • Bot identity. When an app is bound and the agent has no commit identity of its own, commits carry <slug>[bot] <<bot-id>+<slug>[bot]@users.noreply.github.com> instead of Tale <[email protected]>; the agent's own identity still wins.
  • Docs (project agents' repository access, environment reference) in EN, DE and FR, SBX- spec rules with their tests, and a manual box: a task-agent run pushes a commit, and the repository's commit and pull request views show the app's logo.

Order

It changes session_credentials.ts, turn_equipment.ts and agent_run_host.ts, which TALE-113 (#4687, branch feat/agent-commit-author) changes too: start it once that change is on feature-train, and after part 1.

Acceptance

The boxes of #5252 that part 1 leaves open: a commit pushed by a task-agent run shows Tale's image, and what an agent creates with gh in its sandbox is owned by the app's bot. Its commit closes #5252.

Activity

  1. added
    feat
    agent-ready
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyfeat

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions