korext 0.9.12 → 1.0.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/README.md +88 -74
- package/bin/korext.js +5 -2
- package/package.json +23 -12
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# KOREXT CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
AI Code Governance for your terminal and CI/CD pipelines.
|
|
4
|
+
|
|
5
|
+
Enforce compliance policies on human written and AI generated code. 72 policy packs. 532 detection rules. 13 languages. Cryptographically signed proof bundles.
|
|
4
6
|
|
|
5
7
|
## Install
|
|
6
8
|
|
|
@@ -11,115 +13,127 @@ npm install -g korext
|
|
|
11
13
|
## Quick Start
|
|
12
14
|
|
|
13
15
|
```bash
|
|
16
|
+
# Sign in
|
|
14
17
|
korext login
|
|
15
|
-
|
|
18
|
+
|
|
19
|
+
# Initialize your project
|
|
20
|
+
korext init
|
|
21
|
+
|
|
22
|
+
# Enforce policies on your code
|
|
23
|
+
korext enforce .
|
|
24
|
+
|
|
25
|
+
# Enforce with specific packs
|
|
26
|
+
korext enforce . --pack web,pci-dss-v1
|
|
27
|
+
|
|
28
|
+
# Enforce with a specific region
|
|
29
|
+
korext enforce . --region eu --pack web
|
|
30
|
+
|
|
31
|
+
# Generate a signed proof bundle
|
|
32
|
+
korext enforce . --pack web --sign
|
|
16
33
|
```
|
|
17
34
|
|
|
18
35
|
## Commands
|
|
19
36
|
|
|
20
37
|
| Command | Description |
|
|
21
38
|
|---------|-------------|
|
|
22
|
-
| `korext login
|
|
23
|
-
| `korext
|
|
24
|
-
| `korext enforce
|
|
25
|
-
| `korext
|
|
26
|
-
| `korext
|
|
27
|
-
| `korext
|
|
28
|
-
| `korext
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
|
35
|
-
|
|
36
|
-
| `--
|
|
37
|
-
| `--
|
|
39
|
+
| `korext login` | Sign in to your KOREXT account |
|
|
40
|
+
| `korext init` | Initialize a project with korext.json |
|
|
41
|
+
| `korext enforce <path>` | Run policy enforcement on files |
|
|
42
|
+
| `korext packs list` | List all available policy packs |
|
|
43
|
+
| `korext industries` | List industries and their packs |
|
|
44
|
+
| `korext bundle list` | List your recent proof bundles |
|
|
45
|
+
| `korext bundle export <id>` | Download a proof bundle as PDF |
|
|
46
|
+
| `korext bundle verify <id>` | Verify a proof bundle signature |
|
|
47
|
+
| `korext status` | Show current configuration and region |
|
|
48
|
+
|
|
49
|
+
## Enforce Options
|
|
50
|
+
|
|
51
|
+
| Flag | Description | Default |
|
|
52
|
+
|------|-------------|---------|
|
|
53
|
+
| `--pack <ids>` | Comma separated pack IDs | web |
|
|
54
|
+
| `--region <name>` | Data region (us, eu, apac) | us |
|
|
55
|
+
| `--format <type>` | Output format (text, json, sarif) | text |
|
|
56
|
+
| `--sign` | Request signed proof bundle | false |
|
|
57
|
+
| `--industry <name>` | Select packs by industry | (none) |
|
|
58
|
+
| `--offline` | Run with local engine only | false |
|
|
59
|
+
|
|
60
|
+
## Output Formats
|
|
61
|
+
|
|
62
|
+
**Text** (default): Human readable violation list with governance context.
|
|
63
|
+
|
|
64
|
+
**JSON**: Machine readable output with full violation details, confidence scores, and proof bundle metadata.
|
|
65
|
+
|
|
66
|
+
**SARIF**: Static Analysis Results Interchange Format for CI/CD integration. Compatible with GitHub Code Scanning, Azure DevOps, and other SARIF consumers.
|
|
38
67
|
|
|
39
68
|
## CI/CD Integration
|
|
40
69
|
|
|
41
70
|
### GitHub Actions
|
|
42
71
|
|
|
43
72
|
```yaml
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
--pack cmmc-level2-v1 \
|
|
49
|
-
--format sarif
|
|
73
|
+
- uses: korext/enforce-action@v3
|
|
74
|
+
with:
|
|
75
|
+
pack: web,pci-dss-v1
|
|
76
|
+
region: eu
|
|
50
77
|
env:
|
|
51
78
|
KOREXT_API_TOKEN: ${{ secrets.KOREXT_API_TOKEN }}
|
|
52
79
|
```
|
|
53
80
|
|
|
54
|
-
###
|
|
55
|
-
|
|
56
|
-
| Code | Meaning |
|
|
57
|
-
|------|---------|
|
|
58
|
-
| `0` | Clean (no critical or high violations) |
|
|
59
|
-
| `1` | Violations found |
|
|
60
|
-
| `2` | Error |
|
|
61
|
-
|
|
62
|
-
Writes GitHub Actions Step Summary via `GITHUB_STEP_SUMMARY` when detected.
|
|
63
|
-
|
|
64
|
-
## SARIF Output
|
|
81
|
+
### Pre-commit Hook
|
|
65
82
|
|
|
66
83
|
```bash
|
|
67
|
-
|
|
84
|
+
# .husky/pre-commit
|
|
85
|
+
korext enforce . --pack web
|
|
68
86
|
```
|
|
69
87
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
## Offline Mode
|
|
88
|
+
### Generic CI
|
|
73
89
|
|
|
74
90
|
```bash
|
|
75
|
-
|
|
76
|
-
korext
|
|
91
|
+
npm install -g korext
|
|
92
|
+
korext login --token $KOREXT_API_TOKEN
|
|
93
|
+
korext enforce . --pack web --format sarif --sign
|
|
77
94
|
```
|
|
78
95
|
|
|
79
|
-
|
|
96
|
+
## Exit Codes
|
|
97
|
+
|
|
98
|
+
| Code | Meaning |
|
|
99
|
+
|------|---------|
|
|
100
|
+
| 0 | PASS (no violations) |
|
|
101
|
+
| 1 | BLOCK (violations found) |
|
|
102
|
+
| 2 | ERROR (invalid input, network, auth) |
|
|
80
103
|
|
|
81
|
-
|
|
104
|
+
CI pipelines should fail on exit code 1 to block non-compliant code from merging.
|
|
82
105
|
|
|
83
|
-
|
|
106
|
+
## Configuration
|
|
84
107
|
|
|
85
|
-
|
|
108
|
+
### korext.json
|
|
86
109
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"project": "my-app",
|
|
113
|
+
"targetPacks": ["web", "pci-dss-v1"],
|
|
114
|
+
"region": "eu",
|
|
115
|
+
"industry": "finance"
|
|
116
|
+
}
|
|
117
|
+
```
|
|
94
118
|
|
|
95
|
-
|
|
119
|
+
### Environment Variables
|
|
96
120
|
|
|
97
121
|
| Variable | Description |
|
|
98
122
|
|----------|-------------|
|
|
99
|
-
| `KOREXT_API_TOKEN` | API
|
|
100
|
-
| `KOREXT_TOKEN` | Deprecated alias (shows warning) |
|
|
101
|
-
|
|
102
|
-
## Changelog
|
|
123
|
+
| `KOREXT_API_TOKEN` | API token for CI/CD (from dashboard) |
|
|
103
124
|
|
|
104
|
-
|
|
125
|
+
## Data Sovereignty
|
|
105
126
|
|
|
106
|
-
|
|
107
|
-
- Watch mode now detects file changes correctly and scans on startup
|
|
108
|
-
- Enforcing a nonexistent directory now prints an error and exits with code 2 instead of silently passing
|
|
109
|
-
- Offline enforcement prints how many rules are available versus how many require server analysis
|
|
110
|
-
- Policy commands now default to the production API instead of localhost
|
|
127
|
+
Choose your data processing region: US, EU, or Asia Pacific. Set via `--region` flag, `korext.json`, or `korext init`. All enforcement data stays in your chosen region.
|
|
111
128
|
|
|
112
129
|
## Links
|
|
113
130
|
|
|
114
|
-
- Website
|
|
115
|
-
- Dashboard
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
- Support: support@korext.com
|
|
131
|
+
- [Website](https://korext.com)
|
|
132
|
+
- [Dashboard](https://app.korext.com)
|
|
133
|
+
- [Documentation](https://korext.com/docs)
|
|
134
|
+
- [GitHub Action](https://github.com/marketplace/actions/korext-enforce)
|
|
135
|
+
- [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=Korext.korext)
|
|
120
136
|
|
|
121
|
-
|
|
137
|
+
## License
|
|
122
138
|
|
|
123
|
-
|
|
124
|
-
**License**: Proprietary
|
|
125
|
-
**Version**: 0.9.5
|
|
139
|
+
Proprietary. See [Terms of Service](https://korext.com/legal).
|
package/bin/korext.js
CHANGED
|
@@ -585,6 +585,7 @@ program
|
|
|
585
585
|
.command('init')
|
|
586
586
|
.description('Initialize a korext.json configuration file for your project')
|
|
587
587
|
.option('--non-interactive', 'Skip prompts and use defaults', false)
|
|
588
|
+
.option('--region <region>', 'Data processing region (us, eu, apac)')
|
|
588
589
|
.action(async (options) => {
|
|
589
590
|
console.log(chalk.bold.hex('#F27D26')('\n\u25b2 KOREXT PROJECT INIT'));
|
|
590
591
|
console.log(chalk.dim('=======================================\n'));
|
|
@@ -613,13 +614,15 @@ program
|
|
|
613
614
|
const taxonomy = buildTaxonomyFromPacks(defs.packs);
|
|
614
615
|
|
|
615
616
|
if (options.nonInteractive) {
|
|
616
|
-
// Non-interactive: default to web pack
|
|
617
|
+
// Non-interactive: default to web pack, optionally with region
|
|
617
618
|
const config = {
|
|
618
619
|
targetPacks: ['web'],
|
|
620
|
+
...(options.region && { region: options.region }),
|
|
619
621
|
exclude: ['node_modules', 'dist', 'build', '.next']
|
|
620
622
|
};
|
|
621
623
|
fs.writeFileSync(outputPath, JSON.stringify(config, null, 2));
|
|
622
|
-
|
|
624
|
+
const regionNote = options.region ? ` (region: ${options.region})` : '';
|
|
625
|
+
console.log(chalk.green(`Created ${outputPath} with default pack: web${regionNote}\n`));
|
|
623
626
|
process.exit(0);
|
|
624
627
|
}
|
|
625
628
|
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "korext",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"mcpName": "io.github.Korext/governance",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "KOREXT CLI. AI Code Governance. Enforce compliance policies on human written and AI generated code. 72 policy packs. 532 rules. 13 languages. Signed proof bundles.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "bin/korext.js",
|
|
8
8
|
"bin": {
|
|
9
9
|
"korext": "bin/korext.js"
|
|
10
10
|
},
|
|
11
|
-
"author": "Korext <
|
|
12
|
-
"license": "
|
|
11
|
+
"author": "Korext <tombruno@korext.com> (https://korext.com)",
|
|
12
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"chalk": "^4.1.2",
|
|
15
15
|
"commander": "^14.0.3",
|
|
@@ -19,24 +19,35 @@
|
|
|
19
19
|
"ora": "^5.4.1"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
|
-
"bin/"
|
|
22
|
+
"bin/",
|
|
23
|
+
"README.md",
|
|
24
|
+
"LICENSE"
|
|
23
25
|
],
|
|
24
|
-
"homepage": "https://
|
|
26
|
+
"homepage": "https://korext.com",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://korext.com"
|
|
30
|
+
},
|
|
25
31
|
"bugs": {
|
|
32
|
+
"url": "https://korext.com/support",
|
|
26
33
|
"email": "support@korext.com"
|
|
27
34
|
},
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=18.0.0"
|
|
37
|
+
},
|
|
28
38
|
"keywords": [
|
|
29
39
|
"governance",
|
|
30
40
|
"compliance",
|
|
31
41
|
"security",
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
42
|
+
"SAST",
|
|
43
|
+
"linter",
|
|
44
|
+
"code-quality",
|
|
35
45
|
"AI",
|
|
36
|
-
"
|
|
46
|
+
"policy",
|
|
37
47
|
"PCI-DSS",
|
|
38
48
|
"HIPAA",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
49
|
+
"GDPR",
|
|
50
|
+
"proof-bundle",
|
|
51
|
+
"sovereignty"
|
|
41
52
|
]
|
|
42
53
|
}
|