korext 0.3.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,13 +1,65 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.0 - 2026-03-19
4
+
5
+ ### Added
6
+ - Three-layer governance context on every
7
+ violation: regulatory compliance, technical
8
+ standards, and security intelligence
9
+ - Per-violation AI explanations with
10
+ individual reasoning for each finding
11
+ - Code snippet extraction showing the exact
12
+ lines around each violation
13
+ - Real Shadow Test verification on dashboard
14
+ fixes for Team and Enterprise tiers
15
+ - Diff preview before applying fixes: see
16
+ exactly what changed before accepting
17
+ - Undo support: restore original code after
18
+ applying a fix
19
+ - Git context (repository, branch, commit)
20
+ included in proof bundles from IDE and CLI
21
+ - Organisation ID on proof bundles for
22
+ enterprise filtering
23
+ - Honest hash type labelling: deterministic
24
+ replay hash for IDE and CLI, session
25
+ identifier for dashboard
26
+ - Publication-quality proof bundle PDF export
27
+ with QR verification, governance coverage
28
+ tables, and three-layer compliance mapping
29
+ - Enterprise branding on proof bundle PDFs
30
+ - Public bundle verification page
31
+ - Expanded knowledge graph sources: MITRE
32
+ ATLAS, CISA KEV, NIST AI RMF, ISO 42001,
33
+ EU AI Act, OWASP Top 10 for LLMs, OSV,
34
+ FIRST EPSS
35
+
36
+ ### Changed
37
+ - HMAC signing consolidated to server-side
38
+ for all paths
39
+ - Governance mappings restructured from flat
40
+ citations to three layer context covering
41
+ US, EU, UK, Canadian, and Australian
42
+ regulatory frameworks
43
+ - Security hardening: environment-aware HMAC
44
+ key validation, Zod validation on all
45
+ endpoints, typed request interfaces
46
+
47
+ ### Fixed
48
+ - Original code preserved in dashboard state
49
+ after applying fixes
50
+ - Shadow Test Protocol section on dashboard
51
+ now shows real results instead of static UI
52
+ - Em dashes removed across entire codebase
53
+ and AI-generated outputs
54
+
3
55
  ## 0.3.0
4
56
  - **New:** Version bump to match extension releases
5
57
  - **Improved:** CLI now reports version 0.3.0
6
58
 
7
59
  ## 0.2.0
8
60
  - Initial release
9
- - `korext login` browser-based authentication
10
- - `korext init` initialize Korext project
11
- - `korext extract` extract rules from PDF/Markdown policy documents
12
- - `korext review` review extracted rules
13
- - `korext publish` activate custom policy packs
61
+ - `korext login` - browser-based authentication
62
+ - `korext init` - initialize Korext project
63
+ - `korext extract` - extract rules from PDF/Markdown policy documents
64
+ - `korext review` - review extracted rules
65
+ - `korext publish` - activate custom policy packs
package/README.md CHANGED
@@ -1,88 +1,41 @@
1
- # Korext CLI
1
+ # KOREXT - AI Code Governance
2
2
 
3
- **The Korext Node.js Command Line Interface.**
4
- Real-time policy enforcement and compliance proof for AI-generated code.
3
+ Real time policy enforcement and compliance proof for AI-generated code.
5
4
 
6
- [![NPM Version](https://img.shields.io/npm/v/korext)](https://www.npmjs.com/package/korext)
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
+ ## What It Does
8
6
 
9
- ---
7
+ KOREXT enforces your compliance policies at the point of code generation. Every file is checked against your selected policy pack. Violations appear as CLI-based error logs with severity, governance context (regulatory, technical standards, security intelligence), and an AI-powered explanation. One click applies a verified fix with diff preview. Every enforcement decision generates a cryptographically signed proof bundle your compliance team can verify.
10
8
 
11
- ## Installation
9
+ ## Core Commands
12
10
 
13
- Install the CLI globally using NPM to access the `korext` command from anywhere:
11
+ - `korext login`: Login via browser (recommended)
12
+ - `korext status`: View your current authentication state and active Policy Pack
13
+ - `korext enforce`: Scan a target directory or file and cross-reference it against your policy pack
14
+ - `korext packs list`: Retrieve and list all available internal Policy Packs
15
+ - `korext policy init`: Initialize a new custom policy workflow
16
+ - `korext policy extract`: Extract rules from a PDF/Markdown policy document
17
+ - `korext policy review`: Interactively review extracted rules
18
+ - `korext policy publish`: Deploy and activate custom policy packs
14
19
 
15
- ```bash
16
- npm install -g korext
17
- ```
20
+ ## Features
18
21
 
19
- ## Authentication
22
+ - CLI violation detection
23
+ - Three-layer governance context: regulatory compliance, technical standards, security intelligence
24
+ - Command line verified code fixes via Shadow Test Protocol
25
+ - Cryptographically signed proof bundles
26
+ - Publication-quality PDF export for auditors
27
+ - Covers PCI-DSS, HIPAA, GDPR, SOC 2, OWASP, NIST, CIS, and more
28
+ - Custom policy packs on Team plan
29
+ - Air-gapped deployment for Enterprise
20
30
 
21
- Before running analysis, you must authenticate the CLI against your Korext account.
31
+ ## Getting Started
22
32
 
23
- ```bash
24
- # Login via browser (Recommended)
25
- korext login
33
+ Install the CLI via `npm install -g korext` and sign in. Select a policy pack. Run `korext enforce`. KOREXT runs in the terminal and surfaces violations instantly.
26
34
 
27
- # Headless CI/CD Login via environment variable
28
- export KOREXT_API_TOKEN="your_personal_access_token"
29
- ```
35
+ Free tier available. Team and Enterprise plans for organisations that need signed proof bundles, PDF export, and compliance reporting.
30
36
 
31
- ## Commands
37
+ ## Links
32
38
 
33
- ### `korext enforce [path]`
34
- Scans a target directory or file and cross-references it against your active Korext Policy Pack in real-time.
35
-
36
- ```bash
37
- # Run against the current directory
38
- korext enforce .
39
-
40
- # Run against a specific file
41
- korext enforce ./src/auth.ts
42
- ```
43
-
44
- ### `korext status`
45
- View your current authentication state, active Cloud storage tier, and active Policy Pack ID.
46
-
47
- ```bash
48
- korext status
49
- ```
50
-
51
- ### `korext packs list`
52
- Retrieves and lists all available internal Policy Packs available for your organization.
53
-
54
- ```bash
55
- korext packs list
56
- ```
57
-
58
- ---
59
-
60
- ## CI/CD Pipeline Integration
61
-
62
- The Korext CLI is built to run headless inside GitHub Actions, GitLab CI, and isolated Docker environments. When a violation is detected during an enforcement run (`korext enforce`), the CLI intentionally exits with a non-zero code (`exit 1`) to fail the build automatically.
63
-
64
- **Example GitHub Action:**
65
- ```yaml
66
- name: Korext Policy Pipeline
67
- on: [push, pull_request]
68
-
69
- jobs:
70
- audit:
71
- runs-on: ubuntu-latest
72
- steps:
73
- - uses: actions/checkout@v4
74
- - uses: actions/setup-node@v4
75
- with:
76
- node-version: '20'
77
-
78
- - name: Install Korext globally
79
- run: npm install -g korext
80
-
81
- - name: Korext Enforce
82
- env:
83
- KOREXT_API_TOKEN: ${{ secrets.KOREXT_API_TOKEN }}
84
- run: korext enforce .
85
- ```
86
-
87
- ## Need Help?
88
- Visit the official documentation at [Korext.com](https://www.korext.com) or reach out to your Account Executive for Enterprise Support.
39
+ - Website: https://www.korext.com
40
+ - Dashboard: https://app.korext.com
41
+ - Documentation: https://www.korext.com/docs
package/bin/korext.js CHANGED
@@ -537,7 +537,7 @@ policyCmd
537
537
  };
538
538
  draft.templateRule = templateRule;
539
539
  saveLatestDraft(draft);
540
- console.log(chalk.yellow('⚡ Airgap mode no network calls made'));
540
+ console.log(chalk.yellow('⚡ Airgap mode: no network calls made'));
541
541
  console.log(chalk.dim('\nNext: korext policy review'));
542
542
  return;
543
543
  }
@@ -561,7 +561,7 @@ policyCmd
561
561
  }
562
562
 
563
563
  if (!textPayload && draft.fileType === 'pdf') {
564
- spinner.info('PDF detected uploading for server-side text extraction only');
564
+ spinner.info('PDF detected. uploading for server-side text extraction only');
565
565
  textPayload = null;
566
566
  }
567
567
 
@@ -730,7 +730,7 @@ function generateReviewHTML(draft) {
730
730
  <head>
731
731
  <meta charset="UTF-8">
732
732
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
733
- <title>Korext Policy Review ${packName}</title>
733
+ <title>Korext Policy Review - ${packName}</title>
734
734
  <style>
735
735
  :root {
736
736
  --bg: #0d1117; --surface: #161b22; --border: #30363d;
@@ -929,7 +929,7 @@ policyCmd
929
929
  process.exit(1);
930
930
  }
931
931
 
932
- const spinner = ora(`Publishing ${approvedRules.length} rules to Korext (rules only no document text)...`).start();
932
+ const spinner = ora(`Publishing ${approvedRules.length} rules to Korext (rules only, no document text)...`).start();
933
933
 
934
934
  // CRITICAL DATA PROTECTION: Only send rule definitions
935
935
  const publishPayload = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "korext",
3
- "version": "0.3.0",
3
+ "version": "0.6.0",
4
4
  "description": "Korext Command Line Interface",
5
5
  "type": "module",
6
6
  "main": "bin/korext.js",
package/test-policy.md CHANGED
@@ -6,7 +6,7 @@ All applications must enforce the following password standards:
6
6
 
7
7
  - Minimum password length of 12 characters
8
8
  - Passwords must include uppercase, lowercase, numbers, and special characters
9
- - Passwords must never be stored in plain text use bcrypt or argon2 with a cost factor of at least 12
9
+ - Passwords must never be stored in plain text: use bcrypt or argon2 with a cost factor of at least 12
10
10
  - Developers must not hardcode passwords, API keys, or secrets in source code
11
11
 
12
12
  ## Data Encryption
@@ -15,14 +15,14 @@ All sensitive data must be encrypted at rest and in transit:
15
15
 
16
16
  - Use AES-256 for encryption at rest
17
17
  - TLS 1.2 or higher required for all network communication
18
- - Do not use MD5 or SHA-1 for cryptographic purposes they are considered broken
18
+ - Do not use MD5 or SHA-1 for cryptographic purposes, as they are considered broken
19
19
  - All database connections must use encrypted transport
20
20
 
21
21
  ## Input Validation
22
22
 
23
23
  All user input must be validated before processing:
24
24
 
25
- - Never concatenate user input directly into SQL queries use parameterized queries
25
+ - Never concatenate user input directly into SQL queries: use parameterized queries
26
26
  - Sanitize all HTML output to prevent cross-site scripting (XSS)
27
27
  - Validate file upload types using magic bytes, not just file extension
28
28
  - Limit request body size to prevent denial of service
@@ -31,7 +31,7 @@ All user input must be validated before processing:
31
31
 
32
32
  Authentication systems must follow these rules:
33
33
 
34
- - Implement rate limiting on login endpoints maximum 10 attempts per minute
34
+ - Implement rate limiting on login endpoints: maximum 10 attempts per minute
35
35
  - Session tokens must be regenerated after successful authentication
36
36
  - Set HttpOnly, Secure, and SameSite flags on all session cookies
37
37
  - Session timeout must not exceed 30 minutes of inactivity