- Outbound proxy — agent calls go through
gateway-proxy/github/*instead ofapi.github.comdirectly - Inbound webhooks — GitHub pushes events to Sentrail, which evaluates them against your policies
OAuth setup
Go to Tools → GitHub → Connect. Sentrail redirects to GitHub OAuth. After authorization, the access token is stored server-side intool_connections.config.access_token and never returned to the frontend.
The OAuth callback URL is:
Webhook configuration
After connecting, configure a webhook in your GitHub repository or organization:| Field | Value |
|---|---|
| Payload URL | https://<project-ref>.supabase.co/functions/v1/webhook-github |
| Content type | application/json |
| Secret | Copy from Sentrail → Tools → GitHub → Webhook Secret |
| Events | Select the events you want to evaluate |
X-Hub-Signature-256 header. Requests with invalid signatures are rejected with 401.
Workspace matching
Sentrail matches incoming webhooks to workspaces by comparing the repositoryfull_name or organization login to the values stored in tool_connections.config:
config.repos: array of"owner/repo"stringsconfig.org: organization login string
webhook_events with workspace_id = null and processed = false.
Supported proxy actions
These action strings are classified by the policy engine based on the HTTP method and path:| Method + Path pattern | Action string | Risk level |
|---|---|---|
GET /repos/** | read | low |
POST /repos/:owner/:repo/issues | issues.create | medium |
PATCH /repos/:owner/:repo/issues/:id | issues.update | medium |
POST /repos/:owner/:repo/issues/:id/comments | issues.comment.create | medium |
POST /repos/:owner/:repo/pulls | pull_request.create | high |
PATCH /repos/:owner/:repo/pulls/:id | pull_request.update | medium |
PUT /repos/:owner/:repo/pulls/:id/merge | pull_request.merge | high |
PUT /repos/:owner/:repo/contents/:path | file.write | high |
DELETE /repos/:owner/:repo/contents/:path | file.delete | critical |
POST /repos/:owner/:repo/releases | release.create | high |
DELETE /repos/:owner/:repo/git/refs/heads/:branch | ref.delete | critical |
POST /repos/:owner/:repo/actions/workflows/:id/dispatches | workflow.dispatch | high |
Proxy usage
Replacehttps://api.github.com with the gateway URL and add your tool segment:
Authorization: token <access_token> when forwarding to GitHub and sets User-Agent: Sentrail/1.0 and Accept: application/vnd.github.v3+json.
Webhook deduplication
Sentrail deduplicates webhook deliveries using theX-GitHub-Delivery header. If a delivery ID has been seen before, the webhook returns { ok: true, duplicate: true } without re-evaluating.