kekkai-cli 1.1.0__py3-none-any.whl → 2.0.0__py3-none-any.whl

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.
@@ -0,0 +1,317 @@
1
+ Metadata-Version: 2.4
2
+ Name: kekkai-cli
3
+ Version: 2.0.0
4
+ Summary: Terminal UI for Trivy/Semgrep/Gitleaks. Local-first security triage.
5
+ Requires-Python: >=3.12
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: rich>=13.0.0
8
+ Requires-Dist: jsonschema>=4.20.0
9
+ Requires-Dist: textual>=0.50.0
10
+ Requires-Dist: httpx>=0.24.0
11
+
12
+ <p align="center">
13
+ <img src="https://raw.githubusercontent.com/kademoslabs/assets/main/logos/kekkai-slim.png" alt="Kekkai CLI Logo" width="250"/>
14
+ </p>
15
+
16
+ <p align="center"><strong>Stop parsing JSON. Security triage in your terminal.</strong></p>
17
+
18
+ <p align="center">
19
+ <img src="https://img.shields.io/github/actions/workflow/status/kademoslabs/kekkai/docker-publish.yml?logo=github"/>
20
+ <img src="https://img.shields.io/circleci/build/github/kademoslabs/kekkai?logo=circleci"/>
21
+ <img src="https://img.shields.io/pypi/v/kekkai-cli?pypiBaseUrl=https%3A%2F%2Fpypi.org&logo=pypi"/>
22
+ </p>
23
+
24
+ ---
25
+
26
+ # Kekkai
27
+
28
+ **Interactive security triage in the terminal.**
29
+
30
+ Kekkai is a small open-source CLI that wraps existing security scanners (Trivy, Semgrep, Gitleaks) and focuses on the part that tends to be slow and frustrating: reviewing and triaging results.
31
+
32
+ Running scanners is easy. Interpreting noisy output, dealing with false positives, and making CI usable is not. Kekkai exists to make that part tolerable..
33
+
34
+ ![Hero GIF](https://raw.githubusercontent.com/kademoslabs/assets/main/screenshots/kekkai-start.gif)
35
+
36
+ ---
37
+
38
+ ## What it does
39
+
40
+ - Runs Trivy (dependencies), Semgrep (code), and Gitleaks (secrets)
41
+ - Normalizes their outputs into a single report format
42
+ - Provides an interactive terminal UI for reviewing findings
43
+ - Lets you mark findings as false positives and persist decisions locally
44
+ - Supports CI mode with severity-based failure thresholds
45
+
46
+ Kekkai does not replace scanners or introduce proprietary detection logic. It sits on top of existing tools and focuses on workflow and UX.
47
+
48
+ ---
49
+
50
+ ## Quick Start
51
+
52
+ > Requires Docker and Python 3.12
53
+
54
+ ### 1. Install
55
+
56
+ ```bash
57
+ pipx install kekkai-cli
58
+ ```
59
+
60
+ ### 2. Scan
61
+
62
+ ```bash
63
+ kekkai scan
64
+ # Runs Trivy (CVEs), Semgrep (code), Gitleaks (secrets)
65
+ # Outputs unified kekkai-report.json
66
+ ```
67
+
68
+ ### 3. Triage
69
+
70
+ ```bash
71
+ kekkai triage
72
+ # Interactive TUI to review findings with keyboard navigation
73
+ ```
74
+
75
+ No signup, no cloud service required.
76
+
77
+ ---
78
+
79
+ ## Why Kekkai?
80
+
81
+ | Problem | Kekkai Solution |
82
+ |---------|-----------------|
83
+ | **Juggling 3+ tools** | One CLI for Trivy, Semgrep, Gitleaks |
84
+ | **Reading JSON logs** | Interactive terminal UI |
85
+ | **Installing scanners** | Auto-pulls Docker containers |
86
+ | **Parsing different formats** | Unified `kekkai-report.json` |
87
+ | **False positives** | Mark and ignore with `.kekkaiignore` |
88
+ | **CI/CD integration** | `kekkai scan --ci --fail-on high` |
89
+
90
+ ---
91
+
92
+ ## Features
93
+
94
+ ### Interactive Triage TUI
95
+
96
+ Stop reading JSON. Use keyboard navigation to review findings, mark false positives, and generate ignore files.
97
+
98
+ ```bash
99
+ kekkai triage
100
+ ```
101
+
102
+ **Controls:**
103
+ - `j/k` or `↑/↓`: Navigate findings
104
+ - `f`: Mark as false positive
105
+ - `c`: Confirm finding
106
+ - `d`: Defer/ignore
107
+ - `Ctrl+S`: Save decisions
108
+ - `q`: Quit
109
+
110
+ <!-- Screenshot placeholder: ![Triage TUI](https://raw.githubusercontent.com/kademoslabs/assets/main/screenshots/triage-tui.png) -->
111
+
112
+ [Full Triage Documentation →](docs/triage/README.md)
113
+
114
+ ---
115
+
116
+ ### CI/CD Policy Gate
117
+
118
+ Break builds on severity thresholds.
119
+
120
+ Kekkai can be used as a CI gate based on severity thresholds.
121
+
122
+ ```bash
123
+ # Fail on any critical or high findings
124
+ kekkai scan --ci --fail-on high
125
+
126
+ # Fail only on critical
127
+ kekkai scan --ci --fail-on critical
128
+ ```
129
+
130
+ **Exit Codes:**
131
+ | Code | Meaning |
132
+ |------|---------|
133
+ | 0 | No findings above threshold |
134
+ | 1 | Findings exceed threshold |
135
+ | 2 | Scanner error |
136
+
137
+ **GitHub Actions Example:**
138
+
139
+ ```yaml
140
+ - name: Security Scan
141
+ run: |
142
+ pipx install kekkai-cli
143
+ kekkai scan --ci --fail-on high
144
+ ```
145
+
146
+ [Full CI Documentation →](docs/ci/ci-mode.md)
147
+
148
+ ---
149
+
150
+ ### GitHub PR Comments
151
+
152
+ Get security feedback directly in pull requests.
153
+
154
+ ```bash
155
+ export GITHUB_TOKEN="ghp_..."
156
+ kekkai scan --pr-comment
157
+ ```
158
+ ---
159
+
160
+ ### Unified Scanning
161
+
162
+ Run industry-standard scanners without installing them individually. Each scanner runs in an isolated Docker container.
163
+
164
+ ```bash
165
+ kekkai scan # Scan current directory
166
+ kekkai scan --repo /path/to/project # Scan specific path
167
+ kekkai scan --output results.json # Custom output path
168
+ ```
169
+
170
+ **Scanners Included:**
171
+ | Scanner | Finds | Image |
172
+ |---------|-------|-------|
173
+ | Trivy | CVEs in dependencies | `aquasec/trivy:latest` |
174
+ | Semgrep | Code vulnerabilities | `semgrep/semgrep:latest` |
175
+ | Gitleaks | Hardcoded secrets | `zricethezav/gitleaks:latest` |
176
+
177
+ **Container Security:**
178
+ - Read-only filesystem
179
+ - No network access
180
+ - Memory limited (2GB)
181
+ - No privilege escalation
182
+
183
+ ---
184
+
185
+ #### Design choices
186
+
187
+ - Local-first: no SaaS required, runs entirely on your machine or CI
188
+ - No network access for scanner containers
189
+ - Read-only filesystems, memory-limited containers
190
+ - Uses existing tools instead of reimplementing scanners
191
+ - Terminal-first UX instead of dashboards
192
+
193
+ ---
194
+
195
+ ## Optional features
196
+
197
+ These are opt-in and not required for basic use:
198
+
199
+ ### Local-First AI Threat Modeling
200
+
201
+ Generate STRIDE threat models with AI that runs on **your machine**. No API keys. No cloud.
202
+
203
+ ```bash
204
+ # Ollama (recommended - easy setup, privacy-preserving)
205
+ ollama pull mistral
206
+ kekkai threatflow --repo . --model-mode ollama --model-name mistral
207
+
208
+ # Output: THREATS.md with attack surface analysis and Mermaid.js diagrams
209
+ ```
210
+
211
+ **Supports:**
212
+ - Ollama (recommended)
213
+ - Local GGUF models (llama.cpp)
214
+ - OpenAI/Anthropic (if you trust them with your code)
215
+
216
+ [Full Local-First AI Threat Modeling Documentation →](docs/threatflow/README.md)
217
+
218
+ ---
219
+
220
+ ### DefectDojo Integration
221
+
222
+ Spin up a vulnerability management dashboard locally if you need it.
223
+
224
+ ```bash
225
+ kekkai dojo up --wait # Start DefectDojo
226
+ kekkai upload # Import scan results
227
+ ```
228
+
229
+ **What You Get:**
230
+ - DefectDojo web UI at `http://localhost:8080`
231
+ - Automatic credential generation
232
+ - Pre-configured for Kekkai imports
233
+
234
+ [DefectDojo Quick Start →](docs/dojo/dojo-quickstart.md)
235
+
236
+ ---
237
+
238
+ ### AI-Powered Fix Engine
239
+
240
+ Generate code patches for findings (experimental).
241
+
242
+ ```bash
243
+ kekkai fix --input scan-results.json --apply
244
+ ```
245
+
246
+ ---
247
+
248
+ ### Compliance Reporting
249
+
250
+ Map findings to PCI-DSS, OWASP, HIPAA, SOC 2.
251
+
252
+ ```bash
253
+ kekkai report --input scan-results.json --format pdf --frameworks PCI-DSS,OWASP
254
+ ```
255
+
256
+ ---
257
+
258
+ ## What this is not
259
+
260
+ - Not a replacement for commercial AppSec platforms
261
+ - Not a new scanner or detection engine
262
+ - Not optimized for large enterprises (yet)
263
+ - Not a hosted service
264
+
265
+ Right now, Kekkai is aimed at individual developers and small teams who already run scanners but want better triage and less noise.
266
+
267
+ ---
268
+
269
+ ## Security
270
+
271
+ Kekkai is designed with security as a core principle:
272
+
273
+ - **Container Isolation**: Scanners run in hardened Docker containers
274
+ - **No Network Access**: Containers cannot reach external networks
275
+ - **Local-First AI**: run entirely on your machine
276
+ - **SLSA Level 3**: Release artifacts include provenance attestations
277
+ - **Signed Images**: Docker images are Cosign-signed
278
+
279
+ For vulnerability reports, see [SECURITY.md](SECURITY.md).
280
+
281
+ ---
282
+
283
+ ## Documentation
284
+
285
+ | Guide | Description |
286
+ |-------|-------------|
287
+ | [Installation](docs/README.md#installation-methods) | All installation methods |
288
+ | [ThreatFlow](docs/threatflow/README.md) | AI threat modeling setup |
289
+ | [Triage TUI](docs/triage/README.md) | Interactive finding review |
290
+ | [CI Mode](docs/ci/ci-mode.md) | Pipeline integration |
291
+ | [DefectDojo](docs/dojo/dojo-quickstart.md) | Optional vulnerability management |
292
+ | [Security](docs/security/slsa-provenance.md) | SLSA provenance verification |
293
+
294
+ ---
295
+
296
+ ## Roadmap (short-term)
297
+
298
+ 1. Persistent triage state across runs (baselines)
299
+ 2. “New findings only” diffs
300
+ 3. Better PR-level workflows
301
+ 4. Cleaner reporting for small teams
302
+
303
+ ---
304
+
305
+ ## Contributing
306
+
307
+ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
308
+
309
+ ---
310
+
311
+ ## License
312
+
313
+ Apache-2.0 — See [LICENSE](LICENSE) for details.
314
+
315
+ ---
316
+
317
+ <p align="center"><i>Built by <a href="https://kademos.org">Kademos Labs</a></i></p>
@@ -1,10 +1,10 @@
1
1
  kekkai/__init__.py,sha256=_VrBvJRyqHiXs31S8HOhATk_O2iy-ac0_9X7rHH75j8,143
2
- kekkai/cli.py,sha256=uCqs5KBqmOjNn9dCkj04H3Vq2lixQRsy2R4lCf_TJv8,60141
2
+ kekkai/cli.py,sha256=Y99dHzSRLV4sqbFiSe81nJRtvx2dQWmRDPyOVdghIIQ,66616
3
3
  kekkai/config.py,sha256=LE7bKsmv5dim5KnZya0V7_LtviNQ1V0pMN_6FyAsMpc,13084
4
4
  kekkai/dojo.py,sha256=erLdTMOioTyzVhXYW8xgdbU5Ro-KQx1OcTQN7_zemmY,18634
5
- kekkai/dojo_import.py,sha256=oI-vwpLITA7-U2_MxhaTp_PYfr5HqvcFy3VzKsWA6IY,6911
5
+ kekkai/dojo_import.py,sha256=D0ZQM_0JYHqUqJA3l4nKD-RkpvcOcgj-4zv59HRcQ6k,7274
6
6
  kekkai/manifest.py,sha256=Ph5xGDKuVxMW1GVIisRhxUelaiVZQe-W5sZWsq4lHqs,1887
7
- kekkai/output.py,sha256=R-yyJm6tdD_uTA_8LoD6JHHO518vsQqZc4_jT7mGV-I,5500
7
+ kekkai/output.py,sha256=QdIFsXCRb9aT5PaKmj0j0y2fg3IRjcLXQMzuGlASNFY,5426
8
8
  kekkai/paths.py,sha256=EcyG3CEOQFQygowu7O5Mp85dKkXWWvnm1h0j_BetGxY,1190
9
9
  kekkai/policy.py,sha256=0XCUH-SbnO1PsM-exjSFHYHRnLkiNa50QfkyPakwNko,9792
10
10
  kekkai/runner.py,sha256=MBFUiJ4sSVEGNbJ6cv-8p1WHaHqjio6yWEfr_K4GuTs,2037
@@ -35,6 +35,7 @@ kekkai/report/compliance_matrix.py,sha256=WOz7Fr6Hkfl7agY2DKea7Ir0z6PtC2qT0RQgfU
35
35
  kekkai/report/generator.py,sha256=E1hMqUm_tB1jFLa6yWQFytukl4w-LIgTQ9gsA1LpCsc,11893
36
36
  kekkai/report/html.py,sha256=6VJoyW08qPUWotzA0pDoO3s1Ll8E-2ypA7ldwBD_Pig,2363
37
37
  kekkai/report/pdf.py,sha256=zGwfEQo6419MpNz2TeB5sgLG_bsLsok0v6ellCMd0FA,1751
38
+ kekkai/report/unified.py,sha256=2MaqwTuNRAQtGl-CtSXmsaxSLjuxh7aN1kTe7eD0mRM,6623
38
39
  kekkai/scanners/__init__.py,sha256=uKJqnBgcf47eJlDB3mvHpLsobR6M6N6uO2L0Dor1MaE,1552
39
40
  kekkai/scanners/base.py,sha256=uy7HgOaQxNcp6-X1gfXAecSYpKXaEsuVeluf6SwkbwM,2678
40
41
  kekkai/scanners/container.py,sha256=A_qBZkUNVAowWeEQUVn8VPW4obRM8KtOk9rSqX7GQUA,5328
@@ -57,12 +58,14 @@ kekkai/threatflow/model_adapter.py,sha256=Vl0wBWvBUxEGTmFghjwpp-N7Zt3qkpUSxrPVjK
57
58
  kekkai/threatflow/prompts.py,sha256=lgbj7FJ1c3UYj4ofGnlLoRmywYBfdAKY0QEHmIB_JFw,8525
58
59
  kekkai/threatflow/redaction.py,sha256=mGUcNQB6YPVKArtMrEYcXCWslgUiCkloiowY9IlZ1iY,7622
59
60
  kekkai/threatflow/sanitizer.py,sha256=uQsxYZ5VDXutZoj-WMl7fo5T07uHuQZqgVzoVMoaKec,22688
60
- kekkai/triage/__init__.py,sha256=5La5HUnO6ehoUoRbOfZ_QvRj0U4ud4W2o79oraBhpCg,798
61
+ kekkai/triage/__init__.py,sha256=gYf4XPIYZTthU0Q0kaptbgMKulkjLxWQWG0HQvtlu-o,2182
61
62
  kekkai/triage/app.py,sha256=MU2tBI50d8sOdDKESGNrWYiREG9bBtrSccaMoiMv5gM,5027
62
63
  kekkai/triage/audit.py,sha256=UVaSKKC6tZkHxEoMcnIZkMOT_ngj7QzHWYuDAHas_sc,5842
64
+ kekkai/triage/fix_screen.py,sha256=mj_waXwKPCrT01bVSSu5Ohi-3JvN2lT18Yy44xICItY,7667
63
65
  kekkai/triage/ignore.py,sha256=uBKM7zKyzORj9LJ5AAnoYWZQTRy57P0ZofSapiDWcfI,7305
66
+ kekkai/triage/loader.py,sha256=vywhS8fcre7PiBX3H2CpKXFxzvO7LcDnIHIB0kzG3R4,5850
64
67
  kekkai/triage/models.py,sha256=nRmWtELMqHWHX1NqZ2upH2ZAJVeBxa3Wh8f3kkB9WYo,5384
65
- kekkai/triage/screens.py,sha256=6eEiHvuuS_gGESS_K3NjPiQx8G7CR18-j9upU1p5nRg,11004
68
+ kekkai/triage/screens.py,sha256=MbudQkdQ4JFt5c80V3LtqCeXxAIu7nIfZpm7G5wRXT0,11061
66
69
  kekkai/triage/widgets.py,sha256=eOF6Qoo5uBqjxiEkbpgcO1tbIOGBQBKn75wP9Jw_AaE,4733
67
70
  kekkai_core/__init__.py,sha256=gREN4oarM0azTkSTWTnlDnPZGgv1msai2Deq9Frj3gc,122
68
71
  kekkai_core/redaction.py,sha256=EeWYPjAs2hIXlLKGmGn_PRdK08G4KcOBmbRCoFklbHc,2893
@@ -82,26 +85,8 @@ kekkai_core/windows/chocolatey.py,sha256=tF5S5eN-HeENRt6yQ4TZgwng0oRMX_ScskQ3-eb
82
85
  kekkai_core/windows/installer.py,sha256=MePAywHH3JTIAENv52XtkUMOGqmYqZqkH77VW5PST8o,6945
83
86
  kekkai_core/windows/scoop.py,sha256=lvothICrAoB3lGfkvhqVeNTB50eMmVGA0BE7JNCfHdI,5284
84
87
  kekkai_core/windows/validators.py,sha256=45xUuAbHcKc0WLIZ-0rByPeDD88MAV8KvopngyYBHpQ,6525
85
- portal/__init__.py,sha256=vLjCqUgIqzHbT-oIMMWuWQ-lDA5jvuOOEa9qdBRLcIY,507
86
- portal/api.py,sha256=4_hQwkUnP8P3EjCdB5Tb7uRcuH3H7M6GxTvwTTmhLv4,4066
87
- portal/auth.py,sha256=4K_Ya9W_2sZl2MF0FNVr9QASjTOKAO3CMdgGUuYbb9s,3102
88
- portal/tenants.py,sha256=91SOqzjGefcHXodfN8LIHER8boeSB-Jb-WoHPTWI5GI,11394
89
- portal/uploads.py,sha256=WhosreaTKFYHNKXW9F4jOmB_OwUl1YGtT5DeaXnRMqk,7352
90
- portal/web.py,sha256=_9td07YYRiuCZZTpTzeKeoZzRBIwCXfWrjA7RBtJ5_8,14495
91
- portal/enterprise/__init__.py,sha256=V_JYiIaVv46MynUAhXs_w2aWjfY9x_WZ9tjOqUESaeQ,1000
92
- portal/enterprise/audit.py,sha256=VTm-M4gVKOxcBREqIJBs4r5wyqqqf1eCOsHi3FFiDcI,13772
93
- portal/enterprise/licensing.py,sha256=RSs_gPrJ33a3DDfAQY8VDJj51uXg4av43AgNsaGl-1Q,13775
94
- portal/enterprise/rbac.py,sha256=vrZoyIVmWM0C90CIgZaprwqhiDbAM-ggNNg36Zu-5lU,8548
95
- portal/enterprise/saml.py,sha256=TXHBbILI7qMe0ertcFPnuSUSPbJzEeBiHmZzhY9-Ix8,20367
96
- portal/ops/__init__.py,sha256=ZyEYmFM_4LFWfQfgp9Kh2vqmolSjVKFdk1vX1vkhjqc,1391
97
- portal/ops/backup.py,sha256=eLUnZcUtS0svEoagb0jQQmT7TcAGjBA3fUlM2YoCfLg,20102
98
- portal/ops/log_shipper.py,sha256=Age3YfvsJ5YWrPQYdHELr4Qa9jJCATHiwv3Q-rMJwJs,15237
99
- portal/ops/monitoring.py,sha256=xhLbKjVaob709K4x0dEsOo4lh7Ddm2A4UE2ZmhfmMtI,17908
100
- portal/ops/restore.py,sha256=rgzKoBIilgoPPv5gZhSSBuLKG1skKw5ryoCRR3d7CPQ,17058
101
- portal/ops/secrets.py,sha256=wu2bUfJGctbGjyuGUgvUc_Y6IH1SCW16dExtqcKu_kg,14338
102
- portal/ops/upgrade.py,sha256=fXsIXCJYYABdWDECDXkt7F2PidzNtO6Zr-g0Y5PLlVU,20106
103
- kekkai_cli-1.1.0.dist-info/METADATA,sha256=-5dvVJg243pTFzu4MPaQQPICRaWzIwZTPXMH0h9hvC0,10828
104
- kekkai_cli-1.1.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
105
- kekkai_cli-1.1.0.dist-info/entry_points.txt,sha256=WUEX6IISnRcwlQAdhisPfIIV3Us2MYCwtJoyPpLJO44,75
106
- kekkai_cli-1.1.0.dist-info/top_level.txt,sha256=u0J4T-Rnb0cgs0LfzZAUNt6nx1d5l7wKn8vOuo9FBEY,26
107
- kekkai_cli-1.1.0.dist-info/RECORD,,
88
+ kekkai_cli-2.0.0.dist-info/METADATA,sha256=FiwQoECQj5ks2uQEiZ3oMkOSlkf7QE0d9ke-UNRnbPw,8125
89
+ kekkai_cli-2.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
90
+ kekkai_cli-2.0.0.dist-info/entry_points.txt,sha256=MBV1OIfxJmT2oJvzeeFKIH1eh8M9kKAn7JqFBeuMfWA,43
91
+ kekkai_cli-2.0.0.dist-info/top_level.txt,sha256=wWwh7GGPaUjcaCRmt70ueL3WQoQbeGa5L0T0hgOh-MY,19
92
+ kekkai_cli-2.0.0.dist-info/RECORD,,
@@ -1,3 +1,2 @@
1
1
  [console_scripts]
2
2
  kekkai = kekkai.cli:main
3
- kekkai-portal = portal.web:main
@@ -1,3 +1,2 @@
1
1
  kekkai
2
2
  kekkai_core
3
- portal