Skip to main content

🚀 Beta: All Pro and Team features are free. Install on GitHub →

Documentation

Everything you need to get started with CodeRifts — from one-click install to full configuration reference.

Quick Start

Get CodeRifts running in 30 seconds:

1

Install the GitHub AppInstall on GitHub

2

Open a pull request that modifies an OpenAPI spec file

3

CodeRifts automatically posts a governance report as a PR comment

That's it. No config file needed. No CI setup. No API keys.

Want to see what a report looks like? Check the live demo PR.

What Gets Analyzed

CodeRifts triggers automatically when a pull request modifies files matching these patterns:

Pattern Example
**/openapi*.yamlopenapi.yaml, api/openapi-v2.yaml
**/openapi*.jsonopenapi.json, docs/openapi-spec.json
**/swagger*.yamlswagger.yaml, api/swagger-v1.yaml
**/swagger*.jsonswagger.json

You can also define custom patterns in .coderifts.yml using the schema or spec_patterns fields (see Configuration).

Supported Formats

Understanding the Report

Every PR comment from CodeRifts includes several sections. Here's what each one means:

Risk Score (0–100)

An overall risk assessment based on 4 dimensions:

Dimension Weight What It Measures
Revenue Impact30%Are payment, billing, or critical domain endpoints affected?
Blast Radius30%How many endpoints and consumers are impacted?
Compatibility20%Can existing clients continue working without changes?
Security20%Are authentication, authorization, or sensitive fields affected?

Scores map to grades: A (0–19), B (20–39), C (40–59), D (60–79), F (80–100).

Breaking Changes Table

Lists every breaking change detected, including:

Policy Violations

If you have policies configured in .coderifts.yml, this section shows which rules were violated:

Security Analysis

Scans for security-sensitive changes:

Semver Suggestion

Recommends a semantic version bump based on the changes detected:

API Changelog

An auto-generated changelog grouped by: breaking, added, changed, and deprecated. Copy-paste ready for your release notes.

See all of these sections in action on the live demo PR.

Configuration Reference

All settings are optional. CodeRifts works without a config file. To customize behavior, create a .coderifts.yml file in the root of your repository.

# .coderifts.yml — Full Configuration Reference
# All settings are optional. CodeRifts works without this file.

# ─── Schema Paths ─────────────────────────────────────────────
# Explicit paths to your OpenAPI spec files.
# If omitted, CodeRifts auto-discovers using default glob patterns.
schema:
  - openapi/api.yaml
  - docs/swagger.json

# Custom glob patterns for spec file discovery (optional)
spec_patterns:
  - "**/api-spec*.yaml"
  - "docs/openapi/**"

# ─── Breaking Change Budget ───────────────────────────────────
# Maximum allowed breaking changes per PR (default: unlimited)
breaking_budget: 3

# Fail the GitHub check when breaking changes are found (default: true)
fail_on_breaking: true

# ─── Policy Rules ─────────────────────────────────────────────
policy:
  # Paths where endpoint deletion is blocked
  no_delete: ["/payments/*", "/auth/*"]

  # Block deletion of required fields
  no_delete_required_fields: true

  # Require deprecation before removal
  require_deprecation_before_removal: true

  # Freeze window — block breaking changes during this period
  freeze:
    start: "2026-03-01"
    end: "2026-03-15"
    reason: "Q1 release freeze"

  # Require semver bump when breaking changes are detected
  require_version_bump: true

  # Auto-trigger freeze when risk score exceeds threshold (0-100)
  freeze_on_risk_score: 80

# ─── Domain Ownership ─────────────────────────────────────────
# Map API paths to teams for accurate risk scoring
domains:
  - name: payments
    paths: ["/payments/*"]
    owners: ["@payments-team"]
    sensitivity: critical

  - name: users
    paths: ["/users/*", "/auth/*"]
    owners: ["@platform-team"]
    sensitivity: high

# ─── Security Analysis ────────────────────────────────────────
security:
  # Additional patterns to flag as sensitive (regex)
  sensitive_patterns: ["ssn", "tax_id", "passport"]
  # Fail the check on critical security findings
  fail_on_critical: true

# ─── Notifications ────────────────────────────────────────────
# Send alerts to Slack and/or Microsoft Teams
notifications:
  on: breaking          # Options: breaking (default), all, high_risk
  slack:
    webhook_url: "https://hooks.slack.com/services/..."
  teams:
    webhook_url: "https://outlook.office.com/webhook/..."
  mute:                 # Repos to exclude from notifications
    - "internal-tools"

# ─── Schema Overlap Detection ─────────────────────────────────
# Warn when other open PRs modify the same spec files (Pro only)
overlap_detection: true
overlap_ignore_branches:
  - "dependabot/*"
  - "renovate/*"

# ─── Risk Scoring Weights ─────────────────────────────────────
# Customize the weight of each risk dimension (must sum to 1.0)
risk_weights:
  revenue_impact: 0.3
  blast_radius: 0.3
  compatibility: 0.2
  security: 0.2

# ─── Comment Mode ─────────────────────────────────────────────
# "full" shows all sections inline; "summary" collapses details
comment_mode: full

# ─── Fun Mode ─────────────────────────────────────────────────
# Adds a haiku to the PR comment based on the analysis
fun_mode: true

Option Reference

Option Type Default Tier Description
schemastring[]auto-discoverFreeExplicit paths to OpenAPI spec files
spec_patternsstring[]built-in globsFreeCustom glob patterns for spec discovery
fail_on_breakingbooleantrueFreeFail the GitHub check on breaking changes
breaking_budgetnumberunlimitedFreeMax breaking changes allowed per PR
policyobjectall disabledProGovernance policy rules
domainsobject[]heuristicProMap API paths to teams for risk scoring
securityobjectdefaultsProSecurity analysis configuration
notificationsobjectdisabledFreeSlack/Teams webhook notifications
overlap_detectionbooleantrueProWarn when other PRs modify same specs
overlap_ignore_branchesstring[][]ProBranch patterns to exclude from overlap check
risk_weightsobjectequal weightsProCustomize risk dimension weights
comment_modestringfullFreefull or summary
fun_modebooleanfalseFreeAdds a haiku to the PR comment

Delivery Channels

CodeRifts is available through 4 channels. Choose the one that fits your workflow:

Channel Best For Status Link
GitHub AppPrimary use — automatic PR analysisAvailableInstall
Web UITry without installing — paste a spec URLAvailableTry Now
REST APICI/CD integration — programmatic accessAvailableAPI Reference
CLILocal analysis — run from your terminalAvailablenpm package

FAQ

Does CodeRifts read my source code?

No. CodeRifts only reads OpenAPI spec files (YAML/JSON). It does not access, analyze, or store your application source code, tests, or any other files.

What permissions does it need?

Permission Level Why
ContentsReadRead OpenAPI spec files from your repository
Pull RequestsWritePost the governance report as a PR comment
ChecksWriteCreate a check run with pass/fail status
MetadataReadRequired by GitHub for all App installations

Is it free?

Yes. The Free tier includes unlimited public repositories and up to 3 private repositories. All Pro features (risk scoring, governance, security analysis, deprecation enforcement) are included free during the beta. See pricing.

What happens if my spec file is not in the root directory?

CodeRifts auto-discovers spec files using glob patterns that search all directories. If your file is at api/v2/openapi.yaml, it will be found automatically. You can also configure explicit paths in .coderifts.yml:

schema:
  - api/v2/openapi.yaml
  - docs/swagger.json

Can I use it with GitLab or Bitbucket?

The GitHub App is GitHub-only. However, the REST API and CLI work with any Git platform. You can integrate them into GitLab CI, Bitbucket Pipelines, or any CI/CD system.

How do I disable it for a specific PR?

Add [skip coderifts] to the PR title. CodeRifts will skip the analysis entirely for that PR.

Where is the API Reference?

The interactive API reference (Swagger UI) is available at app.coderifts.com/api/docs.

Ready to get started?

Install CodeRifts in one click and get your first governance report on the next PR.