Agent Platform
Pull requests: setup and security
How Alloy reaches your private packages, what its workspace can and cannot do, and how to set your build and test commands yourself
Use this page to see how Alloy keeps your code and credentials safe when it writes a pull request, and how to tell it how to build your repository.
Security
- Draft pull requests only. Alloy commits to its own branch and opens a draft pull request. It never pushes to your default branch.
- Your CI stays yours. Alloy cannot change your GitHub Actions workflow files. If a fix needs a workflow change, Alloy says so and a person makes it.
- Credentials stay on Alloy's servers. Alloy reaches your private packages with your organisation's credentials. They are never stored in the workspace where the change is made.
- No internet while it writes the change. While Alloy makes the change, the workspace cannot reach the internet.
- Temporary workspaces. Each change gets its own workspace. If no pull request opens, it is deleted when the job ends. If one opens, Alloy keeps the workspace for up to five days so it can update that pull request, then deletes it.
- Only when you ask. Alloy opens a pull request only when a member of your organisation asks for one in the Alloy app or in Slack. A request inside a ticket, a log or a document does not start one.
- Only your connected repositories. Alloy works only on repositories in the GitHub account you connected, and only on the ones you chose. See GitHub.
Private dependencies
Many robot repositories build against private packages. Alloy installs them with your organisation's own read-only logins while it prepares the workspace.
- Add a login. An admin opens the GitHub section of Integrations in Alloy and adds it under Private packages: a service account key for Google Artifact Registry, or a token for another registry, such as npm, PyPI or Cargo.
- Use a bot account. Use a dedicated, read-only account, not a person's.
- Sent only where it belongs. Each login is sent only to its own registry, and only while Alloy installs and checks packages. It never enters the workspace.
Set the commands yourself
Alloy works out how to build and test your repository on its own. To set the commands yourself, add a file called .alloy/coding-job.yml to your repository, on the branch Alloy works from (usually your default branch):
build: colcon build
checks:
unit-tests: colcon test --packages-select flight_ctrlbuildis the command that builds your code.checkslists the test commands Alloy runs before it opens a pull request, each with a short name.
Alloy uses the file on the next change. It never changes files under .alloy/ itself.