Security
The agents that write code run in sandboxes that hold no credentials. Everything they send to GitHub or a model host passes through the Worker, which adds the credential only to requests its policy allows.
Sandboxes
- Each job's builder gets a fresh sandbox for the whole job, and each review round gets a new one. Nothing a job writes outlives it.
- A sandbox is destroyed when its job ends, or after 20 idle minutes.
- Only files from your base branch configure it:
.factory/setup.shandREVIEW.mdare never read from the pull request under review.
GitHub egress
The sandbox uses plain git and gh with no token. Its HTTPS traffic to github.com, api.github.com, and raw.githubusercontent.com is routed through the Worker, which adds your installation's token, limited to your one repository and minted for an hour at a time, to requests that pass its policy:
- Reads of anything the token can see are allowed.
- Pushes may only update
factory/*branches (andslipway/*branches from before the rename). - API writes are limited to opening, editing, reviewing, and commenting on pull requests and issues.
- Merges, changing a pull request's base branch, closing or reopening issues, branch and repository changes, and other GraphQL mutations get HTTP 403. Merges happen in the Worker, after its own checks.
- Only
gitandghget the token. Requests from the sandbox's browser carryOriginorSec-Fetch-*headers and go out without it.
The GitHub App asks for contents, pull requests, and issues (read and write), and CI results (read). It has no workflows permission, so the factory cannot change your CI.
Model egress
Coding harnesses in the sandbox get placeholder keys. Their requests to model hosts are intercepted, and the Worker adds the real header per request. Your API keys and subscription tokens never enter a container. The built-in agent runs in the Worker and calls the model from there.
Who can start work
- Only maintainers start builds and merge: on GitHub and the web, people with write access to the repository; in Discord, the owner, admins, and one role you choose. Everyone else can talk and report. API and MCP calls need a workspace key.
- On GitHub, comment commands count only from the repository's owner, members, and collaborators.
- Community text can become issue text, never an instruction: building and merging still need a maintainer, a rule, or your policy.
- The merge classifier never sees text the bot read or wrote, so a pull request or issue cannot talk it into a merge.
What this does not protect against
The builder and the reviewer post as the same GitHub App, so GitHub sees the review as a comment and the factory's review gate checks that a separate review pass happened, not who wrote it. Keep CI and branch protection you trust, and choose an automatic merge policy only where the people who can talk to the factory may ship code.