Korext CLI
Enforce compliance on AI-generated code from the command line and CI/CD pipelines. 478 rules across 44 policy packs with real detection logic. Every violation mapped to specific regulatory clauses. SARIF output for CI scanner integration.
Install
npm install -g korext
Quick Start
korext login
korext enforce ./src --pack web-platform-v2
Commands
korext login [token] | Save API token |
korext status | Check connection and subscription |
korext enforce [dir] | Scan files for violations |
korext policy init | Initialize a policy document |
korext policy extract | AI rule extraction from documents |
korext policy review | Review extracted rules |
korext rules sync | Cache rules for offline use |
Enforce Options
--pack <id> | Select a policy pack |
--format text|json|sarif | Output format |
--offline | Use cached rules only |
--sync-rules | Download rule cache before scan |
CI/CD Integration
GitHub Actions
- name: Korext Compliance Check
run: |
npm install -g korext
korext enforce ./src \
--pack cmmc-level2-v1 \
--format sarif
env:
KOREXT_API_TOKEN: ${{ secrets.KOREXT_API_TOKEN }}
Exit Codes
0 | Clean (no critical or high violations) |
1 | Violations found |
2 | Error |
Writes GitHub Actions Step Summary via GITHUB_STEP_SUMMARY when detected.
SARIF Output
korext enforce ./src --format sarif > results.sarif
Generates OASIS SARIF 2.1.0 for CI scanner integration (GitHub Code Scanning, Azure DevOps, etc.).
Offline Mode
korext rules sync
korext enforce ./src --offline
Cached rules enforce locally with zero network calls. Status output shows "Offline (local rules only)".
Supported Compliance Frameworks
OWASP Top 10 | PCI-DSS | HIPAA | GDPR | SOC 2 | NIST SP 800-53 | NIST SP 800-171 | CMMC Level 2/3 | FedRAMP | ISO 27001 | DORA | NIS2 | CIS Benchmarks | UK DPA | Australian Privacy Act | APPI (Japan) | PDPA (Singapore, Taiwan) | and 25+ more
Key Features
- 478 rules across 44 policy packs
- Three-layer governance: regulatory, technical standards (CWE, OWASP), security intelligence (MITRE ATT&CK)
- 9 jurisdiction coverage (US, EU, UK, Canada, Australia, New Zealand, Japan, Taiwan, Singapore)
- SARIF 2.1.0 output for CI scanner integration
- GitHub Actions Step Summary generation
- Offline mode with cached rules
- Custom policy packs from uploaded documents
Environment Variables
KOREXT_API_TOKEN | API authentication token (recommended) |
KOREXT_TOKEN | Deprecated alias (shows warning) |
Changelog
v0.9.5
Fixed
- Watch mode now detects file changes correctly and scans on startup
- Enforcing a nonexistent directory now prints an error and exits with code 2 instead of silently passing
- Offline enforcement prints how many rules are available versus how many require server analysis
- Policy commands now default to the production API instead of localhost
Links
Publisher: Korext
License: Proprietary
Version: 0.9.5