shieldops-cli 1.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,351 @@
1
+ Metadata-Version: 2.4
2
+ Name: shieldops-cli
3
+ Version: 1.0.0
4
+ Summary: ShieldOps AI — Security scanner CLI for Docker, Kubernetes, Compose, SBOM, and more.
5
+ Author-email: ShieldOps AI <support@shieldops.ai>
6
+ License: MIT
7
+ Project-URL: Homepage, https://shieldops-ai.onrender.com
8
+ Project-URL: Documentation, https://github.com/mohammedabdallahcv-creator/shieldops-cli
9
+ Project-URL: Repository, https://github.com/mohammedabdallahcv-creator/shieldops-cli
10
+ Project-URL: Changelog, https://github.com/mohammedabdallahcv-creator/shieldops-cli/releases
11
+ Keywords: docker,kubernetes,security,devsecops,sbom,cli
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Topic :: Security
16
+ Classifier: Topic :: Software Development :: Quality Assurance
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Programming Language :: Python :: 3
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: click>=8.1
23
+ Requires-Dist: requests>=2.28
24
+ Requires-Dist: rich>=13.0
25
+ Provides-Extra: dev
26
+ Requires-Dist: pytest; extra == "dev"
27
+ Requires-Dist: pytest-cov; extra == "dev"
28
+ Requires-Dist: responses; extra == "dev"
29
+ Provides-Extra: tui
30
+ Requires-Dist: prompt_toolkit>=3.0.43; extra == "tui"
31
+ Dynamic: license-file
32
+
33
+ # ShieldOps CLI
34
+
35
+ > AI-powered security scanner for Dockerfiles, Kubernetes, Docker Compose, and more. Scan, fix, and secure your infrastructure from the terminal.
36
+
37
+ [![PyPI version](https://img.shields.io/pypi/v/shieldops-cli.svg)](https://pypi.org/project/shieldops-cli/)
38
+ [![Python](https://img.shields.io/pypi/pyversions/shieldops-cli.svg)](https://pypi.org/project/shieldops-cli/)
39
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
40
+ [![GitHub Stars](https://img.shields.io/github/stars/mohammedabdallahcv-creator/shieldops-cli?style=social)](https://github.com/mohammedabdallahcv-creator/shieldops-cli)
41
+ [![Powered by ShieldOps AI](https://img.shields.io/badge/powered%20by-ShieldOps%20AI-8B5CF6)](https://shieldops-ai.onrender.com)
42
+
43
+ <p align="center">
44
+ <img src="docs/screenshots/cli-output.svg" alt="ShieldOps CLI in action" width="800">
45
+ </p>
46
+
47
+ ---
48
+
49
+ ## Why ShieldOps CLI
50
+
51
+ Most Dockerfile/K8s scanners tell you **what** is wrong. ShieldOps CLI also tells you **how to fix it** — using AI that understands your specific configuration, not generic rule text.
52
+
53
+ | Feature | ShieldOps CLI | Hadolint | Trivy |
54
+ |---|---|---|---|
55
+ | Dockerfile scan | Yes | Yes | Partial |
56
+ | Docker Compose scan | Yes | No | No |
57
+ | K8s manifest scan | Yes | No | Yes |
58
+ | AI-powered autofix | Yes | No | No |
59
+ | SBOM generation | Yes | No | Yes |
60
+ | Compose file generation | Yes | No | No |
61
+ | Docker image scan | Yes | No | Yes (built-in) |
62
+ | Interactive TUI | Yes | No | No |
63
+ | CI/CD ready (`--fail-on`) | Yes | Yes | Yes |
64
+ | Free tier | Yes (5 scans/day) | Yes | Yes |
65
+
66
+ ### What makes it different
67
+
68
+ 1. **AI Autofix** — not just "you have a problem" but "here's your fixed Dockerfile, ready to apply"
69
+ 2. **Interactive TUI** — slash-command interface with fuzzy completion, history, and live spinner (think Claude Code but for security scans)
70
+ 3. **One tool, many inputs** — Dockerfile, docker-compose.yml, K8s YAML, requirements.txt, package.json, Docker images
71
+ 4. **CI/CD gate** — `--fail-on high` exits non-zero in pipelines so bad configs never merge
72
+
73
+ ---
74
+
75
+ ## Quick Start
76
+
77
+ ```bash
78
+ # 1. Install
79
+ pip install shieldops-cli
80
+
81
+ # 2. Login (free tier — 5 scans/day)
82
+ shieldops login
83
+
84
+ # 3. Scan your Dockerfile
85
+ shieldops analyze Dockerfile
86
+ ```
87
+
88
+ That's it. You get severity-graded findings, compliance mapping (CIS, SOC 2, NIST), and AI remediation guidance.
89
+
90
+ ---
91
+
92
+ ## Installation
93
+
94
+ ### From PyPI
95
+
96
+ ```bash
97
+ pip install shieldops-cli
98
+ ```
99
+
100
+ ### With TUI (interactive terminal)
101
+
102
+ ```bash
103
+ pip install 'shieldops-cli[tui]'
104
+ ```
105
+
106
+ ### CI/CD (no TUI)
107
+
108
+ ```bash
109
+ pip install shieldops-cli
110
+ ```
111
+
112
+ ---
113
+
114
+ ## Commands
115
+
116
+ ### `analyze` — Dockerfile Security Scan
117
+
118
+ ```bash
119
+ shieldops analyze Dockerfile
120
+ shieldops analyze Dockerfile --format json
121
+ shieldops analyze Dockerfile --fail-on high # CI/CD gate
122
+ shieldops analyze Dockerfile --open-report # open browser report
123
+ ```
124
+
125
+ ### `autofix` — AI-Powered Dockerfile Fix
126
+
127
+ ```bash
128
+ shieldops autofix Dockerfile # see suggested fix
129
+ shieldops autofix Dockerfile --apply # apply fix in-place (.bak backup)
130
+ shieldops autofix Dockerfile --format json -o fix.json
131
+ ```
132
+
133
+ ### `sbom` — Software Bill of Materials
134
+
135
+ ```bash
136
+ shieldops sbom requirements.txt
137
+ shieldops sbom package.json
138
+ shieldops sbom Dockerfile --format json
139
+ ```
140
+
141
+ ### `compose-scan` — Docker Compose Scan
142
+
143
+ ```bash
144
+ shieldops compose-scan docker-compose.yml
145
+ shieldops compose-scan docker-compose.yml --fail-on high
146
+ ```
147
+
148
+ ### `compose-generate` — Generate Compose from Dockerfile
149
+
150
+ ```bash
151
+ shieldops compose-generate Dockerfile
152
+ shieldops compose-generate Dockerfile --output docker-compose.yml
153
+ ```
154
+
155
+ ### `k8s-scan` — Kubernetes Manifest Scan
156
+
157
+ ```bash
158
+ shieldops k8s-scan deployment.yaml
159
+ shieldops k8s-scan pod.yaml --format sarif
160
+ ```
161
+
162
+ ### `scan-image` — Docker Image Scan
163
+
164
+ ```bash
165
+ shieldops scan-image nginx:latest
166
+ shieldops scan-image myapp:v1.2.3 --format json
167
+ ```
168
+
169
+ ### `login` / `logout` / `whoami`
170
+
171
+ ```bash
172
+ shieldops login # interactive prompt
173
+ shieldops login --key sk-... # direct key
174
+ export SHIELDOPS_API_KEY=sk-... # or env var (CI/CD)
175
+ shieldops whoami
176
+ shieldops logout
177
+ ```
178
+
179
+ ---
180
+
181
+ ## Output Formats
182
+
183
+ | Format | Best For |
184
+ |---|---|
185
+ | `table` (default) | Terminal reading |
186
+ | `json` | Scripting, API integration |
187
+ | `sarif` | GitHub Security tab, CodeQL |
188
+ | `summary` | One-line pipeline status |
189
+
190
+ ```bash
191
+ shieldops analyze Dockerfile --format json --output scan.json
192
+ shieldops analyze Dockerfile --format sarif --output results.sarif
193
+ shieldops analyze Dockerfile --format summary
194
+ ```
195
+
196
+ ---
197
+
198
+ ## TUI — Interactive Terminal Interface
199
+
200
+ ```bash
201
+ shieldops tui
202
+ ```
203
+
204
+ Slash-command interface with fuzzy completion, command history, and live loading spinner:
205
+
206
+ ```
207
+ shieldops> /analyze
208
+ Path to Dockerfile: ./Dockerfile
209
+ Analyzing... [results]
210
+ Completed
211
+
212
+ shieldops> /autofix
213
+ Path to Dockerfile: ./Dockerfile
214
+ [AI fix suggestions]
215
+
216
+ shieldops> /save
217
+ Report saved: reports/autofix_20260528_143022.txt
218
+
219
+ shieldops> /exit
220
+ Session closed.
221
+ ```
222
+
223
+ **Available commands**: `/analyze`, `/autofix`, `/sbom`, `/compose-scan`, `/compose-generate`, `/k8s-scan`, `/scan-image`, `/login`, `/logout`, `/whoami`, `/config`, `/save`, `/help`, `/clear`, `/exit`
224
+
225
+ Append `-json` to any scan command for JSON output (e.g., `/analyze-json`).
226
+
227
+ **Tab** = autocomplete, **Up/Down** = history, **/save** = write to file, **/exit** = return to normal terminal for scroll/copy.
228
+
229
+ ---
230
+
231
+ ## CI/CD Integration
232
+
233
+ ### GitHub Actions
234
+
235
+ ```yaml
236
+ name: ShieldOps Security Scan
237
+ on: [push, pull_request]
238
+
239
+ jobs:
240
+ security:
241
+ runs-on: ubuntu-latest
242
+ steps:
243
+ - uses: actions/checkout@v4
244
+ - name: Install ShieldOps CLI
245
+ run: pip install shieldops-cli
246
+ - name: Scan Dockerfile
247
+ env:
248
+ SHIELDOPS_API_KEY: ${{ secrets.SHIELDOPS_API_KEY }}
249
+ run: shieldops analyze Dockerfile --fail-on high --format sarif --output results.sarif
250
+ - name: Upload SARIF
251
+ uses: github/codeql-action/upload-sarif@v3
252
+ with:
253
+ sarif_file: results.sarif
254
+ ```
255
+
256
+ ### GitLab CI
257
+
258
+ ```yaml
259
+ shieldops-scan:
260
+ image: python:3.11-slim
261
+ stage: test
262
+ before_script:
263
+ - pip install shieldops-cli
264
+ script:
265
+ - shieldops analyze Dockerfile --fail-on high --format summary
266
+ variables:
267
+ SHIELDOPS_API_KEY: $SHIELDOPS_API_KEY
268
+ ```
269
+
270
+ ### Exit Codes
271
+
272
+ | Code | Meaning |
273
+ |---|---|
274
+ | `0` | Pass — no issues above threshold |
275
+ | `1` | Fail — issues found at or above `--fail-on` severity |
276
+ | `2` | Error — auth, network, or configuration problem |
277
+
278
+ ---
279
+
280
+ ## Free vs Pro
281
+
282
+ | Feature | Free | Pro |
283
+ |---|---|---|
284
+ | Scans per day | 5 | Unlimited |
285
+ | Dockerfile analysis | Yes | Yes |
286
+ | K8s / Compose scan | Yes | Yes |
287
+ | SBOM | Yes | Yes |
288
+ | AI Autofix | Yes | Yes + `--apply` |
289
+ | Image scan | Yes | Yes |
290
+ | HTML reports | Yes | Yes + PDF |
291
+ | Browser reports | Yes | Yes |
292
+ | Team access | No | Yes |
293
+ | Policy engine | No | Yes |
294
+ | Priority queue | No | Yes |
295
+
296
+ Get your API key at [shieldops-ai.onrender.com](https://shieldops-ai.onrender.com).
297
+
298
+ ---
299
+
300
+ ## Configuration
301
+
302
+ ```bash
303
+ shieldops config list # show all settings
304
+ shieldops config set api_url ... # custom API endpoint
305
+ shieldops config get api_key # check stored key
306
+ ```
307
+
308
+ Config is stored in `~/.shieldops/config.json`. API keys are stored as-is (encrypt at rest on your machine if needed).
309
+
310
+ ---
311
+
312
+ ## What Runs Where
313
+
314
+ | Component | Runs Locally | Requires API Key |
315
+ |---|---|---|
316
+ | CLI argument parsing | Yes | No |
317
+ | File reading & validation | Yes | No |
318
+ | Output formatting (table/json/sarif) | Yes | No |
319
+ | Security analysis | No | Yes — sent to ShieldOps AI backend |
320
+ | AI autofix | No | Yes |
321
+ | SBOM generation | No | Yes |
322
+ | Report generation | No | Yes |
323
+
324
+ The CLI reads your file locally and sends only the file content (never secrets, env vars, or other system data) to the ShieldOps AI backend for analysis. Your file is not stored on our servers beyond the scan session.
325
+
326
+ ---
327
+
328
+ ## Development
329
+
330
+ ```bash
331
+ git clone https://github.com/mohammedabdallahcv-creator/shieldops-cli.git
332
+ cd shieldops-cli
333
+ pip install -e '.[dev]'
334
+ pytest
335
+ ```
336
+
337
+ Run the CLI from source:
338
+
339
+ ```bash
340
+ python -m shieldops_cli.main analyze Dockerfile
341
+ ```
342
+
343
+ ---
344
+
345
+ ## License
346
+
347
+ MIT
348
+
349
+ ---
350
+
351
+ ShieldOps CLI is open-source. The analysis backend is proprietary and hosted at [shieldops-ai.onrender.com](https://shieldops-ai.onrender.com).
@@ -0,0 +1,26 @@
1
+ shieldops_cli/__init__.py,sha256=XWZSGf8dnDVdBR6-H6oTv27z-Eox5o1xWNHSfv-HmV8,119
2
+ shieldops_cli/api_client.py,sha256=UuFIw0svXWh3Mi315k1tggXozGsF-EX65lJ_wzZuDMI,3994
3
+ shieldops_cli/auth.py,sha256=8HiREyD2MhQsI4VYaOc16EuFOnrWeSvkp5LsxqKefU0,2286
4
+ shieldops_cli/config.py,sha256=EACVTLRY-aDU8qwRYr-prF6vI_OUpb5yIIjamBvQkO4,1386
5
+ shieldops_cli/main.py,sha256=gwq3yYaq_VMRpE1qwwe6UzT_PnMhOx1G9atH5bjMH_c,1485
6
+ shieldops_cli/commands/__init__.py,sha256=kBboS9CwfrhV21yszdAhoKVLwWmC8xYEZneFOHEZRUw,31
7
+ shieldops_cli/commands/analyze.py,sha256=NSdODbquSAQCFaGe56B0rCfEqhj93wuGCAjYgHh-xNw,4011
8
+ shieldops_cli/commands/autofix.py,sha256=qyZXw6KoZMNwJ9cEmHMnl1s6Px1avxIEZtZm5W54Lts,2315
9
+ shieldops_cli/commands/compose_gen.py,sha256=Kwleu9wWFOPQBYM-KIneFXhGXZzAazoiXYAhpVt6XYM,2028
10
+ shieldops_cli/commands/compose_scan.py,sha256=gnGkcYLNcBl0Qa3D420J-MEL-D6UbgZkYIAywrRIvng,2120
11
+ shieldops_cli/commands/config_cmd.py,sha256=_tDIctf7njErsFQKxXpG9iyw5LX6eYEtQxC3rmRKtPA,1268
12
+ shieldops_cli/commands/k8s_scan.py,sha256=9FitPRbl_uyz_Dn24yy3q7XDsU6Hn4druyXXXLygBSw,2649
13
+ shieldops_cli/commands/sbom.py,sha256=RodelbARMrDBr9iVsInAEqX-0iRUbZ2xNgdhbc0_2qA,1551
14
+ shieldops_cli/commands/scan_image.py,sha256=SHn11PKe7YyYd-ScS6cNTNXHXShHZU_OAtv15T1xEEI,4494
15
+ shieldops_cli/commands/tui.py,sha256=MTB4KO2JjMM-S8K6iQzfWP1Gyt4kqc1ssOSbY4v8hSM,741
16
+ shieldops_cli/formatters/__init__.py,sha256=FgJfnkDlz7QUHB3sJe06rXAOEWeH7tzcpzM_u6owIDA,680
17
+ shieldops_cli/formatters/json_fmt.py,sha256=lvPxM5A__rUC3cfGX66DM7947ojNFUXjSJVQ0nEaqs8,156
18
+ shieldops_cli/formatters/sarif.py,sha256=PsqvfluUfQHJ8eopqyDqG9pgFubwuyIPjb5dt_JByHU,2042
19
+ shieldops_cli/formatters/summary.py,sha256=jITqXqSSNwUYWOJDKNX_nCxZCaguW95T7A64bGQ7OOc,1493
20
+ shieldops_cli/formatters/table.py,sha256=BNcUIHe3Ap0ToVuzlp3csVIu8jllkinzuoxki3-oAsQ,8367
21
+ shieldops_cli-1.0.0.dist-info/licenses/LICENSE,sha256=KYUS0m4oNS9bL8lU1plkvjvxJvbWs3oHz8iS0Pyscq4,1069
22
+ shieldops_cli-1.0.0.dist-info/METADATA,sha256=7nVJuiuRwlEs0Z8s8x4SUUAyWLj1KCS0bEPV7mvwD7U,9967
23
+ shieldops_cli-1.0.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
24
+ shieldops_cli-1.0.0.dist-info/entry_points.txt,sha256=tjEHeg4I8CD0ET51Ubmtk_xM70F2AGXrD7g7K8-1k9w,53
25
+ shieldops_cli-1.0.0.dist-info/top_level.txt,sha256=dGoQsQLNWDwVfg8B8FG-VEnkrhmPnStZR2V-X3wnNMo,14
26
+ shieldops_cli-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ shieldops = shieldops_cli.main:cli
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ShieldOps AI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ shieldops_cli