Permissions
Say what a session can do on GitHub and with the Ellipsis API.
Permissions say what a session can do on GitHub and with the Ellipsis API. Each of github and ellipsis is all, read_only, or a list of entries, and a request goes through only when an entry allows it. Leave one out and every request to it is refused. The environment decides which repositories are checked out and which secrets are set, and a checkout needs no permission.
Allow everything
The agent can do everything the GitHub App installation allows and use every operation a session token can. A session you start from the dashboard, or with the CLI and no config file, asks for this.
Read every repository
The agent can read code, pull requests, issues, checks, and Actions runs in every repository the GitHub App can see. It can't push, open pull requests, or comment, but it can still edit files in its environment.
Read everything and push to one repository
The agent reads every repository and pushes only to web-repo. A list entry is an action name by itself, or a rule that names its actions in allow and narrows them with the fields under Fields.
Read code in one repository
The agent can clone and read api-repo. It can't read its pull requests or issues, or any other repository.
Open one pull request from its own branch
The agent reads both repositories, pushes only to branches that start with ellipsis/ and the session's id, and opens at most one pull request in web-repo. {session_id} becomes the session's id, so two sessions never push to each other's branches.
Push to one pull request
The agent can push once, and only to the branch of pull request 12. A push counts once however many commits it carries.
Allow Ellipsis API operations
Entries are operation names as the SDKs call them. read_only allows every read operation, and sessions.* allows every sessions operation. Anything no entry allows fails with a 403 that names the operation. The token can always read its own identity, which the CLI uses to print links.
What a refused request does
A refused request never reaches GitHub. git push prints the reason next to the branch, and other GitHub calls fail with a 403 that names the action and the repository. A request GitHub refuses doesn't count toward a limit.
Unless permissions.github is all, these are refused whatever the entries say.
- A GitHub write that isn't an action under Fields, such as a commit status or a release asset.
- GitHub's GraphQL API, so
gh prandgh issuecommands fail. Use the REST API instead, such asgh api repos/your-org/api-repo/pulls. - A read that isn't under a repository, such as a code search.
Secrets
The agent and its tools can read every secret the environment sets, and GitHub permissions don't limit what those credentials can do. Keep secret values out of prompts, committed YAML, and command output, because session logs record what tools print.
Fields
A request passes when any entry allows it, and GitHub entries can't allow more than the GitHub App installation has.
all for everything the GitHub App installation allows, read_only for every read in every repository, or a list. A list entry is an action name, or a rule with the fields below that limits what it allows. A request passes when any entry allows it. Default no GitHub access.
all for every operation a session token can use, read_only for every read operation, or a list. A list entry is an operation name, read_only, or a resource with .*. A request passes when any entry allows it. Default no Ellipsis API access.
| Action | Allows | Takes |
|---|---|---|
read_only | Every read action below | repository |
contents.write | Every contents action, reads included | repository |
pull_requests.write | Every pull_requests action, reads included | repository |
issues.write | Every issues action, reads included | repository |
actions.write | Every actions action, reads included | repository |
contents.read | Cloning and reading code | repository |
pull_requests.read | Reading pull requests | repository |
issues.read | Reading issues | repository |
checks.read | Reading check runs | repository |
statuses.read | Reading commit statuses | repository |
actions.read | Reading Actions runs and logs | repository |
contents.push | Pushing commits and creating branches | branch, pull_request |
contents.delete_branch | Deleting branches | branch |
pull_requests.create | Opening pull requests | branch, base |
pull_requests.update | Editing, closing, and reopening pull requests, labels, and reviewers | pull_request |
pull_requests.comment | Commenting on pull requests | pull_request |
pull_requests.review | Submitting reviews, approvals included | pull_request |
pull_requests.merge | Merging pull requests | base, pull_request |
issues.create | Opening issues | |
issues.comment | Commenting on issues | issue |
issues.update | Editing, closing, and labeling issues | issue |
actions.run | Starting and rerunning workflows |
Every action also takes repository and limit. A field an action doesn't take fails validation, so put actions that need different fields in separate rules. An action written by itself takes no fields. The names before the dot are GitHub's own permission names.