Endpoint
Overview
This endpoint opens a GitHub PR with a deterministic (non-AI) fix. It works for:- Secret redaction: AWS keys, GitHub tokens, Slack tokens, JWT tokens
.gitignoreadditions for missing.envexclusion patterns
Request
| Field | Type | Required | Description |
|---|---|---|---|
finding | FindingSchema | Yes | The finding to fix |
repository | string | Yes | owner/repo to open the PR against |
token | string | No | GitHub token. Falls back to server GITHUB_TOKEN env var. |
Response
Supported finding types
| Finding title | PR behavior |
|---|---|
AWS access key | Redacts the key value in-place |
GitHub token | Redacts the token value in-place |
Slack token | Redacts the token value in-place |
JWT token | Redacts the token value in-place |
.env not in .gitignore | Adds .env* pattern to .gitignore |
/v1/fix for an AI-generated fix instead.
Example
Error responses
| Status | Error | Cause |
|---|---|---|
400 | Finding not supported | Use /v1/fix for AI-generated fixes |
400 | GitHub token required | Pass token in body or set GITHUB_TOKEN on server |
403 | Permission denied | Token lacks repo write access |
404 | Repository not found | Check repository name and token permissions |
500 | Could not open PR | Unexpected error — retry |