devsecops-radar 0.1.9__tar.gz → 0.2.3__tar.gz

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.
Files changed (41) hide show
  1. devsecops_radar-0.2.3/PKG-INFO +337 -0
  2. devsecops_radar-0.2.3/README.md +312 -0
  3. devsecops_radar-0.2.3/devsecops_radar/cli/scanner.py +138 -0
  4. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/core/analyzer.py +48 -32
  5. devsecops_radar-0.2.3/devsecops_radar/core/remediation.py +50 -0
  6. devsecops_radar-0.2.3/devsecops_radar/core/reporting.py +55 -0
  7. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/web/app.py +169 -58
  8. devsecops_radar-0.2.3/devsecops_radar.egg-info/PKG-INFO +337 -0
  9. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar.egg-info/SOURCES.txt +2 -0
  10. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar.egg-info/requires.txt +3 -0
  11. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/pyproject.toml +5 -2
  12. devsecops_radar-0.1.9/PKG-INFO +0 -375
  13. devsecops_radar-0.1.9/README.md +0 -353
  14. devsecops_radar-0.1.9/devsecops_radar/cli/scanner.py +0 -116
  15. devsecops_radar-0.1.9/devsecops_radar.egg-info/PKG-INFO +0 -375
  16. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/LICENSE +0 -0
  17. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/MANIFEST.in +0 -0
  18. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/__init__.py +0 -0
  19. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/cli/__init__.py +0 -0
  20. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/core/__init__.py +0 -0
  21. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/core/database.py +0 -0
  22. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/core/parser.py +0 -0
  23. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/core/rule_fusion.py +0 -0
  24. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/scanners/base.py +0 -0
  25. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/scanners/poutine.py +0 -0
  26. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/scanners/semgrep.py +0 -0
  27. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/scanners/trivy.py +0 -0
  28. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/scanners/zizmor.py +0 -0
  29. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/web/__init__.py +0 -0
  30. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/web/static/css/bootstrap.min.css +0 -0
  31. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/web/static/css/style.css +0 -0
  32. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/web/static/js/bootstrap.bundle.min.js +0 -0
  33. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/web/static/js/chart.umd.min.js +0 -0
  34. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/web/static/js/dashboard.js +0 -0
  35. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar/web/templates/index.html +0 -0
  36. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar.egg-info/dependency_links.txt +0 -0
  37. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar.egg-info/entry_points.txt +0 -0
  38. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/devsecops_radar.egg-info/top_level.txt +0 -0
  39. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/setup.cfg +0 -0
  40. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/tests/test_cli.py +0 -0
  41. {devsecops_radar-0.1.9 → devsecops_radar-0.2.3}/tests/test_scanners.py +0 -0
@@ -0,0 +1,337 @@
1
+ Metadata-Version: 2.4
2
+ Name: devsecops-radar
3
+ Version: 0.2.3
4
+ Summary: Unified CI/CD Security Dashboard — Pipeline Sentinel
5
+ Author-email: Mehrdoost <70381337+Mehrdoost@users.noreply.github.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/Mehrdoost/devsecops-radar
8
+ Project-URL: Source, https://github.com/Mehrdoost/devsecops-radar
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Topic :: Security
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: flask>=3.0
18
+ Requires-Dist: semgrep>=1.0
19
+ Requires-Dist: pyyaml>=6.0
20
+ Requires-Dist: requests>=2.31
21
+ Requires-Dist: loguru>=0.7
22
+ Requires-Dist: reportlab>=4.0
23
+ Requires-Dist: litellm>=1.50
24
+ Dynamic: license-file
25
+
26
+ # 🛡️ Pipeline Sentinel
27
+
28
+ **Unified CI/CD Security Observability — Offline‑Ready, AI‑Enhanced, Extensible**
29
+
30
+ Pipeline Sentinel is an open‑source DevSecOps command center. It **aggregates, correlates, and visualises** security findings from **Trivy, Semgrep, Poutine, Zizmor** and any custom scanner you plug in. It works **fully offline**, can optionally pull **community‑curated rules**, and now includes:
31
+
32
+ - 🧠 **LLM‑powered analysis** (Ollama & LiteLLM) with auto‑remediation
33
+ - 🕸️ **Deep attack‑path visualisation** with MITRE ATT&CK mapping
34
+ - 📊 **Compliance reports** (PDF) aligned to CIS, PCI‑DSS, ISO 27001
35
+ - 🛡️ **Policy‑as‑Code** engine to enforce security gates
36
+ - 🐳 **Production‑ready Docker** (multi‑stage, non‑root)
37
+
38
+ [![GitHub stars](https://img.shields.io/github/stars/Mehrdoost/devsecops-radar?style=social)](https://github.com/Mehrdoost/devsecops-radar/stargazers)
39
+ [![License](https://img.shields.io/github/license/Mehrdoost/devsecops-radar)](LICENSE)
40
+ [![PyPI version](https://img.shields.io/pypi/v/devsecops-radar.svg)](https://pypi.org/project/devsecops-radar/)
41
+ [![GitHub release](https://img.shields.io/github/v/release/Mehrdoost/devsecops-radar?include_prereleases)](https://github.com/Mehrdoost/devsecops-radar/releases)
42
+ [![CI](https://github.com/Mehrdoost/devsecops-radar/actions/workflows/test-action.yml/badge.svg)](https://github.com/Mehrdoost/devsecops-radar/actions/workflows/test-action.yml)
43
+
44
+ > 📖 **Read this in:** [Русский](README_ru.md) | [中文](README_zh.md)
45
+
46
+ ---
47
+
48
+ ## 📸 Dashboard Preview
49
+
50
+ ![Pipeline Sentinel Dashboard](docs/Demo.gif)
51
+ *(Severity doughnut, trend line chart, attack‑path graph, topology view, executive summary — all fully offline.)*
52
+
53
+ ---
54
+
55
+ ## 🚀 Quick Start (3 Commands)
56
+
57
+ ```bash
58
+ pip install devsecops-radar
59
+ devsecops-radar --trivy sample_trivy.json --semgrep sample_semgrep.json
60
+ devsecops-radar-web
61
+ ```
62
+
63
+ Open http://localhost:8080 – your unified dashboard is live with sample data.
64
+
65
+ ---
66
+
67
+ ## 📖 What Is Pipeline Sentinel?
68
+
69
+ Pipeline Sentinel is a security observability platform for CI/CD pipelines.
70
+ It takes the fragmented JSON output from popular open‑source scanners — Trivy (containers & dependencies), Semgrep (static code analysis), Poutine (GitLab CI security), and Zizmor (GitHub Actions security) — and merges them into a single, dark‑mode dashboard.
71
+
72
+ ### Why It Matters
73
+ In 2026, the DevSecOps community witnessed multiple supply‑chain attacks (CVE‑2026‑33634, Mini Shai‑Hulud, TeamPCP) that compromised scanner tools and CI/CD pipelines themselves.
74
+ Scanning your code is no longer enough — **you must also scan your pipeline**.
75
+ Pipeline Sentinel unifies container scanning, static analysis, and pipeline security checks under one roof, giving you full visibility.
76
+
77
+ ### Who Should Use It
78
+
79
+ | Persona | Benefit |
80
+ | :--- | :--- |
81
+ | **DevSecOps Engineers** | One dashboard for Trivy, Semgrep, Poutine, and Zizmor. Correlate findings, track trends, and enforce policies. |
82
+ | **Penetration Testers** | Feed custom tool JSON, generate AI‑powered attack graphs with MITRE ATT&CK mapping, and create professional reports. |
83
+ | **Security Teams (air‑gapped)** | Works 100% offline. No CDN, no external API calls. All assets embedded. |
84
+ | **Compliance Officers** | Generate PDF reports aligned to CIS, PCI‑DSS, or ISO 27001. |
85
+ | **CI/CD Pipeline Owners** | Integrate via GitHub Action to get a security summary on every PR. |
86
+
87
+ ---
88
+
89
+ ## ✨ What's New in v0.2.0
90
+
91
+ | Capability | Description |
92
+ | :--- | :--- |
93
+ | 🧠 **Auto‑Remediation (`--fix`)** | AI‑suggested fixes applied automatically; creates a git branch for review. |
94
+ | 🕸️ **Deep Attack‑Path Visualisation** | Topology‑aware attack graphs with MITRE ATT&CK tactics/techniques. |
95
+ | 📊 **Compliance Reports** | PDF reports mapped to CIS, PCI‑DSS, and ISO 27001 controls. |
96
+ | 🛡️ **Policy‑as‑Code (`--policy`)** | Enforce rules like “fail if CRITICAL > 5”. |
97
+ | 🔒 **Input Validation** | All scanner targets are sanitised against command injection. |
98
+ | 🪵 **Structured Logging** | Loguru for clear, coloured, and timestamped logs. |
99
+ | 🔐 **API Key Protection** | Simple API key authentication for the web dashboard. |
100
+ | 🐳 **Improved Docker Image** | Multi‑stage build, non‑root user, smaller size. |
101
+
102
+ ---
103
+
104
+ ## 📦 Installation
105
+
106
+ ### Option 1 – PyPI (Recommended)
107
+ ```bash
108
+ pip install devsecops-radar
109
+ ```
110
+
111
+ ### Option 2 – From Source
112
+ ```bash
113
+ git clone [https://github.com/Mehrdoost/devsecops-radar.git](https://github.com/Mehrdoost/devsecops-radar.git)
114
+ cd devsecops-radar
115
+ pip install -e .
116
+ ```
117
+
118
+ ### Option 3 – Docker
119
+ ```bash
120
+ docker pull ghcr.io/mehrdoost/devsecops-radar:latest
121
+ docker run -p 8080:8080 ghcr.io/mehrdoost/devsecops-radar:latest
122
+ ```
123
+
124
+ **With a custom findings file:**
125
+ ```bash
126
+ docker run -p 8080:8080 -v $(pwd)/findings.json:/data/findings.json ghcr.io/mehrdoost/devsecops-radar:latest
127
+ ```
128
+
129
+ ---
130
+
131
+ ## 📋 Complete Command Reference
132
+
133
+ ### `devsecops-radar` – CLI Flags
134
+
135
+ | Flag | Description | Example |
136
+ | :--- | :--- | :--- |
137
+ | `--trivy` | Trivy JSON file or image name | `--trivy results.json` or `--trivy nginx:latest` |
138
+ | `--semgrep` | Semgrep JSON file or directory | `--semgrep results.json` or `--semgrep ./src` |
139
+ | `--poutine` | Poutine JSON file or repository path | `--poutine results.json` or `--poutine ./repo` |
140
+ | `--zizmor` | Zizmor JSON file or repository path | `--zizmor results.json` or `--zizmor ./repo` |
141
+ | `--rules` | Directory with custom JSON rule files | `--rules ~/my-security-rules/` |
142
+ | `--policy` | Policy JSON file for gating | `--policy policy.json` |
143
+ | `--analyze` | Enable LLM analysis (Ollama required) | `--analyze` |
144
+ | `--llm-backend` | `ollama` (default) or `litellm` | `--llm-backend litellm` |
145
+ | `--llm-model` | Model name | `--llm-model gpt-4o-mini` |
146
+ | `--fix` | Auto‑apply AI‑suggested fixes and create a git branch | `--fix` |
147
+ | `--topology` | Path to topology JSON file | `--topology topology.json` |
148
+ | `--compliance` | Compliance framework: `CIS`, `PCI-DSS`, `ISO27001` | `--compliance CIS` |
149
+ | `--report` | Generate PDF report (output filename) | `--report security_report.pdf` |
150
+ | `--output` | Output JSON file (default: findings.json) | `--output merged.json` |
151
+
152
+ ### `devsecops-radar-web` – Web Server
153
+
154
+ ```bash
155
+ devsecops-radar-web # http://localhost:8080
156
+ FINDINGS_FILE=my.json devsecops-radar-web # custom findings file
157
+ PIPELINE_API_KEY=secret devsecops-radar-web # enable API authentication
158
+ ```
159
+
160
+ ---
161
+
162
+ ## 🧭 How to Use Pipeline Sentinel – Step by Step
163
+
164
+ ### 1. Run Your Security Scanners
165
+ Generate JSON output from your tools:
166
+
167
+ ```bash
168
+ trivy image --format json -o trivy.json nginx:latest
169
+ semgrep --config=auto --json --output semgrep.json .
170
+ poutine scan ./repo --format json --output poutine.json
171
+ zizmor scan ./repo --output zizmor.json --format json
172
+ ```
173
+
174
+ ### 2. Merge Findings with the CLI
175
+
176
+ ```bash
177
+ devsecops-radar --trivy trivy.json --semgrep semgrep.json --poutine poutine.json --zizmor zizmor.json
178
+ ```
179
+
180
+ ### 3. View the Dashboard
181
+
182
+ ```bash
183
+ devsecops-radar-web
184
+ ```
185
+ Open http://localhost:8080. The dashboard shows:
186
+ * **Severity Breakdown** (doughnut chart)
187
+ * **Trend Over Time** (line chart from scan history)
188
+ * **Pipeline Security** (Poutine + Zizmor statistics)
189
+ * **Attack Path Graph** (if AI analysis enabled)
190
+ * **Executive Summary** (risk score, AI summary)
191
+ * **Findings Table** (searchable & filterable)
192
+
193
+ ### 4. Enable AI Analysis (Optional)
194
+
195
+ ```bash
196
+ ollama pull llama3.2:latest
197
+ devsecops-radar --trivy trivy.json --analyze
198
+ devsecops-radar-web
199
+ ```
200
+ The LLM generates `findings_ai_summary.json` containing:
201
+ * `executive_summary`, `risk_score`
202
+ * `attack_paths` with MITRE ATT&CK tactics
203
+ * `top_remediations` (some with `fix_diff`)
204
+ * `false_positives_likely`
205
+
206
+ *(The dashboard automatically renders the attack graph and executive summary.)*
207
+
208
+ ### 5. Deep Attack Visualisation with Topology
209
+ Create a `topology.json` describing your assets and connections (see `sample_topology.json`). Then run:
210
+
211
+ ```bash
212
+ devsecops-radar --trivy trivy.json --analyze --topology topology.json
213
+ ```
214
+ The LLM will map findings onto your topology, producing attack paths that reflect lateral movement across servers and subnets.
215
+
216
+ ### 6. Auto‑Remediation (`--fix`)
217
+
218
+ ```bash
219
+ devsecops-radar --trivy trivy.json --analyze --fix
220
+ ```
221
+ The tool will:
222
+ 1. Apply AI‑suggested fixes to vulnerable files.
223
+ 2. Create a new git branch `auto-fix` and push it.
224
+ 3. Print a message to open a Pull Request.
225
+
226
+ ### 7. Policy Enforcement (`--policy`)
227
+ Create a `policy.json` file:
228
+
229
+ ```json
230
+ {
231
+ "max_critical": 5,
232
+ "on_violation": "fail"
233
+ }
234
+ ```
235
+
236
+ Run:
237
+ ```bash
238
+ devsecops-radar --trivy trivy.json --policy policy.json
239
+ ```
240
+ If critical findings exceed 5, the command exits with code 1 – suitable for CI/CD gates.
241
+
242
+ ### 8. Generate Compliance Reports (`--report`)
243
+
244
+ ```bash
245
+ devsecops-radar --trivy trivy.json --analyze --compliance CIS --report cis-report.pdf
246
+ ```
247
+ A PDF report is created with an executive summary, risk score, findings table, and compliance mapping (CIS, PCI‑DSS, or ISO 27001).
248
+
249
+ ---
250
+
251
+ ## 🔌 Offline + Online: Hybrid RuleFusion Engine
252
+
253
+ Pipeline Sentinel is designed for both air‑gapped and connected environments.
254
+
255
+ ### Offline – Local Rules Directory
256
+ ```bash
257
+ devsecops-radar --trivy scan.json --rules ~/my-rules/
258
+ ```
259
+ Place any JSON file in the folder. The engine auto‑detects Trivy, Semgrep, Poutine, Zizmor, or plain‑list formats.
260
+
261
+ ### Online – Community Rules (Optional)
262
+ ```bash
263
+ devsecops-radar --update-rules
264
+ ```
265
+ Clones (or pulls) the `devsecops-radar-rules` repository to `~/.devsecops-radar/community-rules/`.
266
+
267
+ ---
268
+
269
+ ## 🏗️ Architecture
270
+
271
+ ```text
272
+ devsecops_radar/
273
+ ├── cli/ # CLI entry – plugin registry, policy, remediation
274
+ ├── core/ # RuleFusion, DB, analysers, reporting
275
+ ├── scanners/ # Pluggable scanner classes (BaseScanner)
276
+ └── web/ # Flask dashboard (embedded HTML)
277
+ ```
278
+
279
+ *Adding a new scanner is as simple as extending `BaseScanner` and implementing `parse()`.*
280
+
281
+ ---
282
+
283
+ ## 🔒 Security
284
+
285
+ * **Input validation** – scanner targets are sanitised.
286
+ * **Offline‑first** – no data leaves your network.
287
+ * **LLM privacy** – Ollama runs locally; optional LiteLLM for cloud models.
288
+ * **API authentication** – optional API key for dashboard access.
289
+ * **Non‑root Docker** – container runs as unprivileged user.
290
+ * **Policy‑as‑Code** – enforce gates before deployment.
291
+
292
+ ---
293
+
294
+ ## 🤖 GitHub Action
295
+
296
+ ```yaml
297
+ - name: Pipeline Sentinel
298
+ uses: Mehrdoost/devsecops-radar/action@main
299
+ with:
300
+ trivy_report: trivy-results.json
301
+ semgrep_report: semgrep-results.json
302
+ poutine_report: poutine-results.json
303
+ zizmor_report: zizmor-results.json
304
+ ```
305
+ *Merges findings, creates a job summary, and outputs CRITICAL/HIGH counts.*
306
+
307
+ ---
308
+
309
+ ## 🗺️ Roadmap
310
+
311
+ - [x] Multi‑scanner plugin engine
312
+ - [x] LLM analysis (Ollama + LiteLLM) with auto‑remediation
313
+ - [x] Scan history, trend chart, scan diff
314
+ - [x] Attack‑path visualisation with MITRE ATT&CK & topology
315
+ - [x] Policy‑as‑Code engine
316
+ - [x] Compliance reports (PDF)
317
+ - [x] GitHub Action
318
+ - [x] Docker image (multi‑stage, non‑root)
319
+ - [ ] Jira / Slack integration
320
+ - [ ] SARIF & CycloneDX support
321
+
322
+ ---
323
+
324
+ ## 👨‍💻 Author
325
+
326
+ **Mehrdoost**
327
+
328
+ [![GitHub](https://img.shields.io/badge/GitHub-Mehrdoost-181717?logo=github)](https://github.com/Mehrdoost)
329
+
330
+
331
+ ---
332
+
333
+ ## 📜 License
334
+
335
+ MIT – see [LICENSE](LICENSE).
336
+
337
+ ⭐ **If this project helps your team ship safer software, drop a star — it makes a real difference.**
@@ -0,0 +1,312 @@
1
+ # 🛡️ Pipeline Sentinel
2
+
3
+ **Unified CI/CD Security Observability — Offline‑Ready, AI‑Enhanced, Extensible**
4
+
5
+ Pipeline Sentinel is an open‑source DevSecOps command center. It **aggregates, correlates, and visualises** security findings from **Trivy, Semgrep, Poutine, Zizmor** and any custom scanner you plug in. It works **fully offline**, can optionally pull **community‑curated rules**, and now includes:
6
+
7
+ - 🧠 **LLM‑powered analysis** (Ollama & LiteLLM) with auto‑remediation
8
+ - 🕸️ **Deep attack‑path visualisation** with MITRE ATT&CK mapping
9
+ - 📊 **Compliance reports** (PDF) aligned to CIS, PCI‑DSS, ISO 27001
10
+ - 🛡️ **Policy‑as‑Code** engine to enforce security gates
11
+ - 🐳 **Production‑ready Docker** (multi‑stage, non‑root)
12
+
13
+ [![GitHub stars](https://img.shields.io/github/stars/Mehrdoost/devsecops-radar?style=social)](https://github.com/Mehrdoost/devsecops-radar/stargazers)
14
+ [![License](https://img.shields.io/github/license/Mehrdoost/devsecops-radar)](LICENSE)
15
+ [![PyPI version](https://img.shields.io/pypi/v/devsecops-radar.svg)](https://pypi.org/project/devsecops-radar/)
16
+ [![GitHub release](https://img.shields.io/github/v/release/Mehrdoost/devsecops-radar?include_prereleases)](https://github.com/Mehrdoost/devsecops-radar/releases)
17
+ [![CI](https://github.com/Mehrdoost/devsecops-radar/actions/workflows/test-action.yml/badge.svg)](https://github.com/Mehrdoost/devsecops-radar/actions/workflows/test-action.yml)
18
+
19
+ > 📖 **Read this in:** [Русский](README_ru.md) | [中文](README_zh.md)
20
+
21
+ ---
22
+
23
+ ## 📸 Dashboard Preview
24
+
25
+ ![Pipeline Sentinel Dashboard](docs/Demo.gif)
26
+ *(Severity doughnut, trend line chart, attack‑path graph, topology view, executive summary — all fully offline.)*
27
+
28
+ ---
29
+
30
+ ## 🚀 Quick Start (3 Commands)
31
+
32
+ ```bash
33
+ pip install devsecops-radar
34
+ devsecops-radar --trivy sample_trivy.json --semgrep sample_semgrep.json
35
+ devsecops-radar-web
36
+ ```
37
+
38
+ Open http://localhost:8080 – your unified dashboard is live with sample data.
39
+
40
+ ---
41
+
42
+ ## 📖 What Is Pipeline Sentinel?
43
+
44
+ Pipeline Sentinel is a security observability platform for CI/CD pipelines.
45
+ It takes the fragmented JSON output from popular open‑source scanners — Trivy (containers & dependencies), Semgrep (static code analysis), Poutine (GitLab CI security), and Zizmor (GitHub Actions security) — and merges them into a single, dark‑mode dashboard.
46
+
47
+ ### Why It Matters
48
+ In 2026, the DevSecOps community witnessed multiple supply‑chain attacks (CVE‑2026‑33634, Mini Shai‑Hulud, TeamPCP) that compromised scanner tools and CI/CD pipelines themselves.
49
+ Scanning your code is no longer enough — **you must also scan your pipeline**.
50
+ Pipeline Sentinel unifies container scanning, static analysis, and pipeline security checks under one roof, giving you full visibility.
51
+
52
+ ### Who Should Use It
53
+
54
+ | Persona | Benefit |
55
+ | :--- | :--- |
56
+ | **DevSecOps Engineers** | One dashboard for Trivy, Semgrep, Poutine, and Zizmor. Correlate findings, track trends, and enforce policies. |
57
+ | **Penetration Testers** | Feed custom tool JSON, generate AI‑powered attack graphs with MITRE ATT&CK mapping, and create professional reports. |
58
+ | **Security Teams (air‑gapped)** | Works 100% offline. No CDN, no external API calls. All assets embedded. |
59
+ | **Compliance Officers** | Generate PDF reports aligned to CIS, PCI‑DSS, or ISO 27001. |
60
+ | **CI/CD Pipeline Owners** | Integrate via GitHub Action to get a security summary on every PR. |
61
+
62
+ ---
63
+
64
+ ## ✨ What's New in v0.2.0
65
+
66
+ | Capability | Description |
67
+ | :--- | :--- |
68
+ | 🧠 **Auto‑Remediation (`--fix`)** | AI‑suggested fixes applied automatically; creates a git branch for review. |
69
+ | 🕸️ **Deep Attack‑Path Visualisation** | Topology‑aware attack graphs with MITRE ATT&CK tactics/techniques. |
70
+ | 📊 **Compliance Reports** | PDF reports mapped to CIS, PCI‑DSS, and ISO 27001 controls. |
71
+ | 🛡️ **Policy‑as‑Code (`--policy`)** | Enforce rules like “fail if CRITICAL > 5”. |
72
+ | 🔒 **Input Validation** | All scanner targets are sanitised against command injection. |
73
+ | 🪵 **Structured Logging** | Loguru for clear, coloured, and timestamped logs. |
74
+ | 🔐 **API Key Protection** | Simple API key authentication for the web dashboard. |
75
+ | 🐳 **Improved Docker Image** | Multi‑stage build, non‑root user, smaller size. |
76
+
77
+ ---
78
+
79
+ ## 📦 Installation
80
+
81
+ ### Option 1 – PyPI (Recommended)
82
+ ```bash
83
+ pip install devsecops-radar
84
+ ```
85
+
86
+ ### Option 2 – From Source
87
+ ```bash
88
+ git clone [https://github.com/Mehrdoost/devsecops-radar.git](https://github.com/Mehrdoost/devsecops-radar.git)
89
+ cd devsecops-radar
90
+ pip install -e .
91
+ ```
92
+
93
+ ### Option 3 – Docker
94
+ ```bash
95
+ docker pull ghcr.io/mehrdoost/devsecops-radar:latest
96
+ docker run -p 8080:8080 ghcr.io/mehrdoost/devsecops-radar:latest
97
+ ```
98
+
99
+ **With a custom findings file:**
100
+ ```bash
101
+ docker run -p 8080:8080 -v $(pwd)/findings.json:/data/findings.json ghcr.io/mehrdoost/devsecops-radar:latest
102
+ ```
103
+
104
+ ---
105
+
106
+ ## 📋 Complete Command Reference
107
+
108
+ ### `devsecops-radar` – CLI Flags
109
+
110
+ | Flag | Description | Example |
111
+ | :--- | :--- | :--- |
112
+ | `--trivy` | Trivy JSON file or image name | `--trivy results.json` or `--trivy nginx:latest` |
113
+ | `--semgrep` | Semgrep JSON file or directory | `--semgrep results.json` or `--semgrep ./src` |
114
+ | `--poutine` | Poutine JSON file or repository path | `--poutine results.json` or `--poutine ./repo` |
115
+ | `--zizmor` | Zizmor JSON file or repository path | `--zizmor results.json` or `--zizmor ./repo` |
116
+ | `--rules` | Directory with custom JSON rule files | `--rules ~/my-security-rules/` |
117
+ | `--policy` | Policy JSON file for gating | `--policy policy.json` |
118
+ | `--analyze` | Enable LLM analysis (Ollama required) | `--analyze` |
119
+ | `--llm-backend` | `ollama` (default) or `litellm` | `--llm-backend litellm` |
120
+ | `--llm-model` | Model name | `--llm-model gpt-4o-mini` |
121
+ | `--fix` | Auto‑apply AI‑suggested fixes and create a git branch | `--fix` |
122
+ | `--topology` | Path to topology JSON file | `--topology topology.json` |
123
+ | `--compliance` | Compliance framework: `CIS`, `PCI-DSS`, `ISO27001` | `--compliance CIS` |
124
+ | `--report` | Generate PDF report (output filename) | `--report security_report.pdf` |
125
+ | `--output` | Output JSON file (default: findings.json) | `--output merged.json` |
126
+
127
+ ### `devsecops-radar-web` – Web Server
128
+
129
+ ```bash
130
+ devsecops-radar-web # http://localhost:8080
131
+ FINDINGS_FILE=my.json devsecops-radar-web # custom findings file
132
+ PIPELINE_API_KEY=secret devsecops-radar-web # enable API authentication
133
+ ```
134
+
135
+ ---
136
+
137
+ ## 🧭 How to Use Pipeline Sentinel – Step by Step
138
+
139
+ ### 1. Run Your Security Scanners
140
+ Generate JSON output from your tools:
141
+
142
+ ```bash
143
+ trivy image --format json -o trivy.json nginx:latest
144
+ semgrep --config=auto --json --output semgrep.json .
145
+ poutine scan ./repo --format json --output poutine.json
146
+ zizmor scan ./repo --output zizmor.json --format json
147
+ ```
148
+
149
+ ### 2. Merge Findings with the CLI
150
+
151
+ ```bash
152
+ devsecops-radar --trivy trivy.json --semgrep semgrep.json --poutine poutine.json --zizmor zizmor.json
153
+ ```
154
+
155
+ ### 3. View the Dashboard
156
+
157
+ ```bash
158
+ devsecops-radar-web
159
+ ```
160
+ Open http://localhost:8080. The dashboard shows:
161
+ * **Severity Breakdown** (doughnut chart)
162
+ * **Trend Over Time** (line chart from scan history)
163
+ * **Pipeline Security** (Poutine + Zizmor statistics)
164
+ * **Attack Path Graph** (if AI analysis enabled)
165
+ * **Executive Summary** (risk score, AI summary)
166
+ * **Findings Table** (searchable & filterable)
167
+
168
+ ### 4. Enable AI Analysis (Optional)
169
+
170
+ ```bash
171
+ ollama pull llama3.2:latest
172
+ devsecops-radar --trivy trivy.json --analyze
173
+ devsecops-radar-web
174
+ ```
175
+ The LLM generates `findings_ai_summary.json` containing:
176
+ * `executive_summary`, `risk_score`
177
+ * `attack_paths` with MITRE ATT&CK tactics
178
+ * `top_remediations` (some with `fix_diff`)
179
+ * `false_positives_likely`
180
+
181
+ *(The dashboard automatically renders the attack graph and executive summary.)*
182
+
183
+ ### 5. Deep Attack Visualisation with Topology
184
+ Create a `topology.json` describing your assets and connections (see `sample_topology.json`). Then run:
185
+
186
+ ```bash
187
+ devsecops-radar --trivy trivy.json --analyze --topology topology.json
188
+ ```
189
+ The LLM will map findings onto your topology, producing attack paths that reflect lateral movement across servers and subnets.
190
+
191
+ ### 6. Auto‑Remediation (`--fix`)
192
+
193
+ ```bash
194
+ devsecops-radar --trivy trivy.json --analyze --fix
195
+ ```
196
+ The tool will:
197
+ 1. Apply AI‑suggested fixes to vulnerable files.
198
+ 2. Create a new git branch `auto-fix` and push it.
199
+ 3. Print a message to open a Pull Request.
200
+
201
+ ### 7. Policy Enforcement (`--policy`)
202
+ Create a `policy.json` file:
203
+
204
+ ```json
205
+ {
206
+ "max_critical": 5,
207
+ "on_violation": "fail"
208
+ }
209
+ ```
210
+
211
+ Run:
212
+ ```bash
213
+ devsecops-radar --trivy trivy.json --policy policy.json
214
+ ```
215
+ If critical findings exceed 5, the command exits with code 1 – suitable for CI/CD gates.
216
+
217
+ ### 8. Generate Compliance Reports (`--report`)
218
+
219
+ ```bash
220
+ devsecops-radar --trivy trivy.json --analyze --compliance CIS --report cis-report.pdf
221
+ ```
222
+ A PDF report is created with an executive summary, risk score, findings table, and compliance mapping (CIS, PCI‑DSS, or ISO 27001).
223
+
224
+ ---
225
+
226
+ ## 🔌 Offline + Online: Hybrid RuleFusion Engine
227
+
228
+ Pipeline Sentinel is designed for both air‑gapped and connected environments.
229
+
230
+ ### Offline – Local Rules Directory
231
+ ```bash
232
+ devsecops-radar --trivy scan.json --rules ~/my-rules/
233
+ ```
234
+ Place any JSON file in the folder. The engine auto‑detects Trivy, Semgrep, Poutine, Zizmor, or plain‑list formats.
235
+
236
+ ### Online – Community Rules (Optional)
237
+ ```bash
238
+ devsecops-radar --update-rules
239
+ ```
240
+ Clones (or pulls) the `devsecops-radar-rules` repository to `~/.devsecops-radar/community-rules/`.
241
+
242
+ ---
243
+
244
+ ## 🏗️ Architecture
245
+
246
+ ```text
247
+ devsecops_radar/
248
+ ├── cli/ # CLI entry – plugin registry, policy, remediation
249
+ ├── core/ # RuleFusion, DB, analysers, reporting
250
+ ├── scanners/ # Pluggable scanner classes (BaseScanner)
251
+ └── web/ # Flask dashboard (embedded HTML)
252
+ ```
253
+
254
+ *Adding a new scanner is as simple as extending `BaseScanner` and implementing `parse()`.*
255
+
256
+ ---
257
+
258
+ ## 🔒 Security
259
+
260
+ * **Input validation** – scanner targets are sanitised.
261
+ * **Offline‑first** – no data leaves your network.
262
+ * **LLM privacy** – Ollama runs locally; optional LiteLLM for cloud models.
263
+ * **API authentication** – optional API key for dashboard access.
264
+ * **Non‑root Docker** – container runs as unprivileged user.
265
+ * **Policy‑as‑Code** – enforce gates before deployment.
266
+
267
+ ---
268
+
269
+ ## 🤖 GitHub Action
270
+
271
+ ```yaml
272
+ - name: Pipeline Sentinel
273
+ uses: Mehrdoost/devsecops-radar/action@main
274
+ with:
275
+ trivy_report: trivy-results.json
276
+ semgrep_report: semgrep-results.json
277
+ poutine_report: poutine-results.json
278
+ zizmor_report: zizmor-results.json
279
+ ```
280
+ *Merges findings, creates a job summary, and outputs CRITICAL/HIGH counts.*
281
+
282
+ ---
283
+
284
+ ## 🗺️ Roadmap
285
+
286
+ - [x] Multi‑scanner plugin engine
287
+ - [x] LLM analysis (Ollama + LiteLLM) with auto‑remediation
288
+ - [x] Scan history, trend chart, scan diff
289
+ - [x] Attack‑path visualisation with MITRE ATT&CK & topology
290
+ - [x] Policy‑as‑Code engine
291
+ - [x] Compliance reports (PDF)
292
+ - [x] GitHub Action
293
+ - [x] Docker image (multi‑stage, non‑root)
294
+ - [ ] Jira / Slack integration
295
+ - [ ] SARIF & CycloneDX support
296
+
297
+ ---
298
+
299
+ ## 👨‍💻 Author
300
+
301
+ **Mehrdoost**
302
+
303
+ [![GitHub](https://img.shields.io/badge/GitHub-Mehrdoost-181717?logo=github)](https://github.com/Mehrdoost)
304
+
305
+
306
+ ---
307
+
308
+ ## 📜 License
309
+
310
+ MIT – see [LICENSE](LICENSE).
311
+
312
+ ⭐ **If this project helps your team ship safer software, drop a star — it makes a real difference.**