/workspace so the agent can use git normally, while keeping your token out of the agent’s container and attaching it only on outbound traffic to that repository.
Mount the repository
access: "read_only" on the resource to block pushes (see Create a session).
The Session’s Environment must allow github.com. The default unrestricted networking does; under limited networking, add github.com to allowed_hosts. See Environments.
What the agent can do
origin points to the https://github.com/... URL, so git fetch, pull, and push work normally through bash. The initial clone is shallow (--depth 1).
Checkfu attaches the token only to HTTPS requests targeting the mounted repository on github.com. Other repositories and api.github.com do not receive it, so the agent cannot open a pull request with it. Open the PR from your app after the push, or attach a GitHub MCP server to the Agent.
Rotate the token
GitHub App installation tokens expire quickly. To replace a token, setSESSION_ID to the live Session and NEW_GITHUB_TOKEN to the replacement token. Use the same SDK client and set repositoryUrl to the full URL of the mounted repository.