GitHub agent guardrails
By the end, your agent reads repos and opens pull requests through Deedglass, and anything that merges or writes to a protected branch waits for a person.
Before you start
- A fine-grained GitHub token (or a GitHub App) with access to the repos the agent may touch.
- A Deedglass server and an org admin key.
1. Create the connector
Section titled “1. Create the connector”deedglass connector create --config github.yamldeedglass connector credentials set github --from-env GITHUB_TOKENdeedglass connector test githubThe token lives in the vault. The agent never sees it.
2. Use the github-read-mostly starter
Section titled “2. Use the github-read-mostly starter”Reads run. Opening a pull request runs and is read back from GitHub (L1). Merging, and anything that writes to a default or protected branch, waits for an admin. The policy reads the repository and the pull request from GitHub first (request.github.*), so a rule can name real facts, such as the base branch.
3. Watch it work
Section titled “3. Watch it work”Ask the agent to open a pull request, then to merge it. The first is L1 · VERIFIED: GitHub’s own record matches. The merge waits in Console › Approvals.
What it doesn’t do
Section titled “What it doesn’t do”- It governs the calls the agent makes through Deedglass. A token the agent holds elsewhere isn’t governed.
- L1 confirms what GitHub reports. It doesn’t review the code in the pull request.
- Branch protection on GitHub still applies. Use both.