Back to Home

ReviewFlow AI Documentation

Architecture, installation guides, review policies, prompt injection defenses, and API reference.

1. Installing the GitHub App

ReviewFlow AI integrates via a native GitHub App rather than asking developers to paste personal access tokens. Once installed on your personal account or organization, GitHub delivers signed webhook events on pull_request.opened and synchronize.

# Required GitHub App Permissions (Least Privilege):
• Pull Requests: Read & Write (for line-level inline review comments)
• Checks: Read & Write (for check runs and status badges)
• Repository Metadata: Read-only

2. Prompt-Injection Defense & Sandboxing

Because pull requests can originate from external or untrusted contributors, diff contents may contain adversarial jailbreaks (e.g., hidden comments attempting to command the AI to approve the PR).

  • •Quarantine Delimiters: All diff lines are strictly enclosed in <UNTRUSTED_DIFF> tags.
  • •Adversarial Flagging: If an injection command is identified, ReviewFlow AI halts and creates a CRITICAL security alert.
  • •Zero Code Execution: ReviewFlow AI never runs the untrusted pull request code. Static AST scanning and tokenized diff parsing run in a read-only environment.

3. REST API Reference

ReviewFlow AI provides an OpenAPI 3.0 documented REST API. Authenticate using Bearer tokens in the Authorization header.

GET /api/v1/healthService health check
GET /api/v1/pull-requestsList PRs with severity filter & pagination
GET /api/v1/reviews/:idFetch review job, summary, & findings
POST /api/v1/webhooks/githubGitHub App HMAC webhook endpoint