MCP Hub
Back to servers

Korext: AI Code Governance

Governance copilot for AI-assisted coding. 71 packs, 532 rules, proof bundles.

Registry
Updated
Apr 11, 2026

Quick Install

npx -y korext

Korext Enforce Action

GitHub Marketplace License: MIT

Enforce security, compliance, and quality standards on AI-generated code directly in your GitHub workflows. Korext scans your codebase against policy packs and surfaces violations as GitHub Code Scanning annotations on pull requests.

Quick Start

Add this to .github/workflows/korext.yml:

name: Korext Enforcement
on: [push, pull_request]

permissions:
  contents: read
  security-events: write

jobs:
  enforce:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: Korext/enforce-action@v1

That's it. Korext scans your code on every push and PR using the default web policy pack.

How It Works

  1. Install -- The action installs the Korext CLI (v0.9.5)
  2. Scan -- Runs korext enforce against your codebase with the selected policy pack
  3. Report -- Generates a SARIF file and uploads it to GitHub Code Scanning
  4. Gate -- Fails the workflow if critical or high severity violations are found

Violations appear as annotations directly on the PR diff, powered by GitHub Code Scanning.

Inputs

InputDescriptionRequiredDefault
directoryDirectory to scan for policy violationsNo.
packPolicy Pack ID to enforceNoweb
api-tokenKorext API token for authenticated modeNo(anonymous)
fail-on-violationsFail workflow on critical/high violationsNotrue
sarif-uploadUpload SARIF to GitHub Code ScanningNotrue

Outputs

OutputDescription
violationsTotal number of policy violations found
sarif-filePath to the generated SARIF results file

Examples

Basic usage (anonymous mode)

- uses: actions/checkout@v4
- uses: Korext/enforce-action@v1

With authentication

- uses: actions/checkout@v4
- uses: Korext/enforce-action@v1
  with:
    api-token: ${{ secrets.KOREXT_API_TOKEN }}

Custom policy pack

- uses: actions/checkout@v4
- uses: Korext/enforce-action@v1
  with:
    pack: owasp-top-10

Scan a subdirectory

- uses: actions/checkout@v4
- uses: Korext/enforce-action@v1
  with:
    directory: src/

Warn but don't fail

- uses: actions/checkout@v4
- uses: Korext/enforce-action@v1
  with:
    fail-on-violations: 'false'

PR-only enforcement

name: Korext PR Check
on: pull_request

permissions:
  contents: read
  security-events: write

jobs:
  enforce:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: Korext/enforce-action@v1
        with:
          pack: web

Use violation count in downstream steps

- uses: actions/checkout@v4
- uses: Korext/enforce-action@v1
  id: korext
  with:
    fail-on-violations: 'false'
- run: echo "Found ${{ steps.korext.outputs.violations }} violations"

Permissions

Your workflow must include:

permissions:
  contents: read          # Checkout repository
  security-events: write  # Upload SARIF to Code Scanning

Without security-events: write, SARIF upload will be skipped.

Rate Limits

ModeLimitHow to use
Anonymous (no token)20 requests per hour per IPDefault, no setup needed
Authenticated500+ requests per periodSet api-token input

Each workflow run consumes 1 request (one korext enforce call). Anonymous mode is sufficient for most open-source projects. For high-traffic repos with many PRs, use an API token.

Code Scanning

When sarif-upload is true (the default), the action uploads SARIF results to GitHub Code Scanning. Violations appear as annotations on the PR diff with severity levels:

  • Error -- Critical and high severity violations
  • Warning -- Medium severity violations
  • Note -- Low severity violations

Note: GitHub Code Scanning is free for public repositories. Private repositories require GitHub Advanced Security.

Supported File Types

Korext scans the following file types:

.ts .tsx .js .jsx .py .go .java .rs

The scanner automatically skips node_modules, .git, dist, build, and .next directories.

Exit Codes

Exit CodeMeaningAction Behavior
0No violations, or only medium/low severityWorkflow passes
1Critical or high severity violations foundWorkflow fails (if fail-on-violations is true)
2Errors analyzing some filesWorkflow fails

Links

License

MIT

Reviews

No reviews yet

Sign in to write a review