devsecops-radar 0.1.9__tar.gz → 0.2.0__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.
- devsecops_radar-0.2.0/PKG-INFO +334 -0
- devsecops_radar-0.2.0/README.md +312 -0
- devsecops_radar-0.2.0/devsecops_radar/cli/scanner.py +138 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/core/analyzer.py +48 -32
- devsecops_radar-0.2.0/devsecops_radar/core/remediation.py +50 -0
- devsecops_radar-0.2.0/devsecops_radar/core/reporting.py +55 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/web/app.py +169 -58
- devsecops_radar-0.2.0/devsecops_radar.egg-info/PKG-INFO +334 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar.egg-info/SOURCES.txt +2 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/pyproject.toml +1 -1
- devsecops_radar-0.1.9/PKG-INFO +0 -375
- devsecops_radar-0.1.9/README.md +0 -353
- devsecops_radar-0.1.9/devsecops_radar/cli/scanner.py +0 -116
- devsecops_radar-0.1.9/devsecops_radar.egg-info/PKG-INFO +0 -375
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/LICENSE +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/MANIFEST.in +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/__init__.py +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/cli/__init__.py +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/core/__init__.py +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/core/database.py +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/core/parser.py +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/core/rule_fusion.py +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/scanners/base.py +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/scanners/poutine.py +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/scanners/semgrep.py +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/scanners/trivy.py +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/scanners/zizmor.py +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/web/__init__.py +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/web/static/css/bootstrap.min.css +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/web/static/css/style.css +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/web/static/js/bootstrap.bundle.min.js +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/web/static/js/chart.umd.min.js +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/web/static/js/dashboard.js +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar/web/templates/index.html +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar.egg-info/dependency_links.txt +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar.egg-info/entry_points.txt +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar.egg-info/requires.txt +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/devsecops_radar.egg-info/top_level.txt +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/setup.cfg +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/tests/test_cli.py +0 -0
- {devsecops_radar-0.1.9 → devsecops_radar-0.2.0}/tests/test_scanners.py +0 -0
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devsecops-radar
|
|
3
|
+
Version: 0.2.0
|
|
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
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# 🛡️ Pipeline Sentinel
|
|
24
|
+
|
|
25
|
+
**Unified CI/CD Security Observability — Offline‑Ready, AI‑Enhanced, Extensible**
|
|
26
|
+
|
|
27
|
+
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:
|
|
28
|
+
|
|
29
|
+
- 🧠 **LLM‑powered analysis** (Ollama & LiteLLM) with auto‑remediation
|
|
30
|
+
- 🕸️ **Deep attack‑path visualisation** with MITRE ATT&CK mapping
|
|
31
|
+
- 📊 **Compliance reports** (PDF) aligned to CIS, PCI‑DSS, ISO 27001
|
|
32
|
+
- 🛡️ **Policy‑as‑Code** engine to enforce security gates
|
|
33
|
+
- 🐳 **Production‑ready Docker** (multi‑stage, non‑root)
|
|
34
|
+
|
|
35
|
+
[](https://github.com/Mehrdoost/devsecops-radar/stargazers)
|
|
36
|
+
[](LICENSE)
|
|
37
|
+
[](https://pypi.org/project/devsecops-radar/)
|
|
38
|
+
[](https://github.com/Mehrdoost/devsecops-radar/releases)
|
|
39
|
+
[](https://github.com/Mehrdoost/devsecops-radar/actions/workflows/test-action.yml)
|
|
40
|
+
|
|
41
|
+
> 📖 **Read this in:** [Русский](README_ru.md) | [中文](README_zh.md)
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 📸 Dashboard Preview
|
|
46
|
+
|
|
47
|
+

|
|
48
|
+
*(Severity doughnut, trend line chart, attack‑path graph, topology view, executive summary — all fully offline.)*
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 🚀 Quick Start (3 Commands)
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pip install devsecops-radar
|
|
56
|
+
devsecops-radar --trivy sample_trivy.json --semgrep sample_semgrep.json
|
|
57
|
+
devsecops-radar-web
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Open http://localhost:8080 – your unified dashboard is live with sample data.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 📖 What Is Pipeline Sentinel?
|
|
65
|
+
|
|
66
|
+
Pipeline Sentinel is a security observability platform for CI/CD pipelines.
|
|
67
|
+
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.
|
|
68
|
+
|
|
69
|
+
### Why It Matters
|
|
70
|
+
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.
|
|
71
|
+
Scanning your code is no longer enough — **you must also scan your pipeline**.
|
|
72
|
+
Pipeline Sentinel unifies container scanning, static analysis, and pipeline security checks under one roof, giving you full visibility.
|
|
73
|
+
|
|
74
|
+
### Who Should Use It
|
|
75
|
+
|
|
76
|
+
| Persona | Benefit |
|
|
77
|
+
| :--- | :--- |
|
|
78
|
+
| **DevSecOps Engineers** | One dashboard for Trivy, Semgrep, Poutine, and Zizmor. Correlate findings, track trends, and enforce policies. |
|
|
79
|
+
| **Penetration Testers** | Feed custom tool JSON, generate AI‑powered attack graphs with MITRE ATT&CK mapping, and create professional reports. |
|
|
80
|
+
| **Security Teams (air‑gapped)** | Works 100% offline. No CDN, no external API calls. All assets embedded. |
|
|
81
|
+
| **Compliance Officers** | Generate PDF reports aligned to CIS, PCI‑DSS, or ISO 27001. |
|
|
82
|
+
| **CI/CD Pipeline Owners** | Integrate via GitHub Action to get a security summary on every PR. |
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## ✨ What's New in v0.3.0
|
|
87
|
+
|
|
88
|
+
| Capability | Description |
|
|
89
|
+
| :--- | :--- |
|
|
90
|
+
| 🧠 **Auto‑Remediation (`--fix`)** | AI‑suggested fixes applied automatically; creates a git branch for review. |
|
|
91
|
+
| 🕸️ **Deep Attack‑Path Visualisation** | Topology‑aware attack graphs with MITRE ATT&CK tactics/techniques. |
|
|
92
|
+
| 📊 **Compliance Reports** | PDF reports mapped to CIS, PCI‑DSS, and ISO 27001 controls. |
|
|
93
|
+
| 🛡️ **Policy‑as‑Code (`--policy`)** | Enforce rules like “fail if CRITICAL > 5”. |
|
|
94
|
+
| 🔒 **Input Validation** | All scanner targets are sanitised against command injection. |
|
|
95
|
+
| 🪵 **Structured Logging** | Loguru for clear, coloured, and timestamped logs. |
|
|
96
|
+
| 🔐 **API Key Protection** | Simple API key authentication for the web dashboard. |
|
|
97
|
+
| 🐳 **Improved Docker Image** | Multi‑stage build, non‑root user, smaller size. |
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 📦 Installation
|
|
102
|
+
|
|
103
|
+
### Option 1 – PyPI (Recommended)
|
|
104
|
+
```bash
|
|
105
|
+
pip install devsecops-radar
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Option 2 – From Source
|
|
109
|
+
```bash
|
|
110
|
+
git clone [https://github.com/Mehrdoost/devsecops-radar.git](https://github.com/Mehrdoost/devsecops-radar.git)
|
|
111
|
+
cd devsecops-radar
|
|
112
|
+
pip install -e .
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Option 3 – Docker
|
|
116
|
+
```bash
|
|
117
|
+
docker pull ghcr.io/mehrdoost/devsecops-radar:latest
|
|
118
|
+
docker run -p 8080:8080 ghcr.io/mehrdoost/devsecops-radar:latest
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**With a custom findings file:**
|
|
122
|
+
```bash
|
|
123
|
+
docker run -p 8080:8080 -v $(pwd)/findings.json:/data/findings.json ghcr.io/mehrdoost/devsecops-radar:latest
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## 📋 Complete Command Reference
|
|
129
|
+
|
|
130
|
+
### `devsecops-radar` – CLI Flags
|
|
131
|
+
|
|
132
|
+
| Flag | Description | Example |
|
|
133
|
+
| :--- | :--- | :--- |
|
|
134
|
+
| `--trivy` | Trivy JSON file or image name | `--trivy results.json` or `--trivy nginx:latest` |
|
|
135
|
+
| `--semgrep` | Semgrep JSON file or directory | `--semgrep results.json` or `--semgrep ./src` |
|
|
136
|
+
| `--poutine` | Poutine JSON file or repository path | `--poutine results.json` or `--poutine ./repo` |
|
|
137
|
+
| `--zizmor` | Zizmor JSON file or repository path | `--zizmor results.json` or `--zizmor ./repo` |
|
|
138
|
+
| `--rules` | Directory with custom JSON rule files | `--rules ~/my-security-rules/` |
|
|
139
|
+
| `--policy` | Policy JSON file for gating | `--policy policy.json` |
|
|
140
|
+
| `--analyze` | Enable LLM analysis (Ollama required) | `--analyze` |
|
|
141
|
+
| `--llm-backend` | `ollama` (default) or `litellm` | `--llm-backend litellm` |
|
|
142
|
+
| `--llm-model` | Model name | `--llm-model gpt-4o-mini` |
|
|
143
|
+
| `--fix` | Auto‑apply AI‑suggested fixes and create a git branch | `--fix` |
|
|
144
|
+
| `--topology` | Path to topology JSON file | `--topology topology.json` |
|
|
145
|
+
| `--compliance` | Compliance framework: `CIS`, `PCI-DSS`, `ISO27001` | `--compliance CIS` |
|
|
146
|
+
| `--report` | Generate PDF report (output filename) | `--report security_report.pdf` |
|
|
147
|
+
| `--output` | Output JSON file (default: findings.json) | `--output merged.json` |
|
|
148
|
+
|
|
149
|
+
### `devsecops-radar-web` – Web Server
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
devsecops-radar-web # http://localhost:8080
|
|
153
|
+
FINDINGS_FILE=my.json devsecops-radar-web # custom findings file
|
|
154
|
+
PIPELINE_API_KEY=secret devsecops-radar-web # enable API authentication
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## 🧭 How to Use Pipeline Sentinel – Step by Step
|
|
160
|
+
|
|
161
|
+
### 1. Run Your Security Scanners
|
|
162
|
+
Generate JSON output from your tools:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
trivy image --format json -o trivy.json nginx:latest
|
|
166
|
+
semgrep --config=auto --json --output semgrep.json .
|
|
167
|
+
poutine scan ./repo --format json --output poutine.json
|
|
168
|
+
zizmor scan ./repo --output zizmor.json --format json
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### 2. Merge Findings with the CLI
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
devsecops-radar --trivy trivy.json --semgrep semgrep.json --poutine poutine.json --zizmor zizmor.json
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### 3. View the Dashboard
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
devsecops-radar-web
|
|
181
|
+
```
|
|
182
|
+
Open http://localhost:8080. The dashboard shows:
|
|
183
|
+
* **Severity Breakdown** (doughnut chart)
|
|
184
|
+
* **Trend Over Time** (line chart from scan history)
|
|
185
|
+
* **Pipeline Security** (Poutine + Zizmor statistics)
|
|
186
|
+
* **Attack Path Graph** (if AI analysis enabled)
|
|
187
|
+
* **Executive Summary** (risk score, AI summary)
|
|
188
|
+
* **Findings Table** (searchable & filterable)
|
|
189
|
+
|
|
190
|
+
### 4. Enable AI Analysis (Optional)
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
ollama pull llama3.2:latest
|
|
194
|
+
devsecops-radar --trivy trivy.json --analyze
|
|
195
|
+
devsecops-radar-web
|
|
196
|
+
```
|
|
197
|
+
The LLM generates `findings_ai_summary.json` containing:
|
|
198
|
+
* `executive_summary`, `risk_score`
|
|
199
|
+
* `attack_paths` with MITRE ATT&CK tactics
|
|
200
|
+
* `top_remediations` (some with `fix_diff`)
|
|
201
|
+
* `false_positives_likely`
|
|
202
|
+
|
|
203
|
+
*(The dashboard automatically renders the attack graph and executive summary.)*
|
|
204
|
+
|
|
205
|
+
### 5. Deep Attack Visualisation with Topology
|
|
206
|
+
Create a `topology.json` describing your assets and connections (see `sample_topology.json`). Then run:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
devsecops-radar --trivy trivy.json --analyze --topology topology.json
|
|
210
|
+
```
|
|
211
|
+
The LLM will map findings onto your topology, producing attack paths that reflect lateral movement across servers and subnets.
|
|
212
|
+
|
|
213
|
+
### 6. Auto‑Remediation (`--fix`)
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
devsecops-radar --trivy trivy.json --analyze --fix
|
|
217
|
+
```
|
|
218
|
+
The tool will:
|
|
219
|
+
1. Apply AI‑suggested fixes to vulnerable files.
|
|
220
|
+
2. Create a new git branch `auto-fix` and push it.
|
|
221
|
+
3. Print a message to open a Pull Request.
|
|
222
|
+
|
|
223
|
+
### 7. Policy Enforcement (`--policy`)
|
|
224
|
+
Create a `policy.json` file:
|
|
225
|
+
|
|
226
|
+
```json
|
|
227
|
+
{
|
|
228
|
+
"max_critical": 5,
|
|
229
|
+
"on_violation": "fail"
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Run:
|
|
234
|
+
```bash
|
|
235
|
+
devsecops-radar --trivy trivy.json --policy policy.json
|
|
236
|
+
```
|
|
237
|
+
If critical findings exceed 5, the command exits with code 1 – suitable for CI/CD gates.
|
|
238
|
+
|
|
239
|
+
### 8. Generate Compliance Reports (`--report`)
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
devsecops-radar --trivy trivy.json --analyze --compliance CIS --report cis-report.pdf
|
|
243
|
+
```
|
|
244
|
+
A PDF report is created with an executive summary, risk score, findings table, and compliance mapping (CIS, PCI‑DSS, or ISO 27001).
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## 🔌 Offline + Online: Hybrid RuleFusion Engine
|
|
249
|
+
|
|
250
|
+
Pipeline Sentinel is designed for both air‑gapped and connected environments.
|
|
251
|
+
|
|
252
|
+
### Offline – Local Rules Directory
|
|
253
|
+
```bash
|
|
254
|
+
devsecops-radar --trivy scan.json --rules ~/my-rules/
|
|
255
|
+
```
|
|
256
|
+
Place any JSON file in the folder. The engine auto‑detects Trivy, Semgrep, Poutine, Zizmor, or plain‑list formats.
|
|
257
|
+
|
|
258
|
+
### Online – Community Rules (Optional)
|
|
259
|
+
```bash
|
|
260
|
+
devsecops-radar --update-rules
|
|
261
|
+
```
|
|
262
|
+
Clones (or pulls) the `devsecops-radar-rules` repository to `~/.devsecops-radar/community-rules/`.
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## 🏗️ Architecture
|
|
267
|
+
|
|
268
|
+
```text
|
|
269
|
+
devsecops_radar/
|
|
270
|
+
├── cli/ # CLI entry – plugin registry, policy, remediation
|
|
271
|
+
├── core/ # RuleFusion, DB, analysers, reporting
|
|
272
|
+
├── scanners/ # Pluggable scanner classes (BaseScanner)
|
|
273
|
+
└── web/ # Flask dashboard (embedded HTML)
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
*Adding a new scanner is as simple as extending `BaseScanner` and implementing `parse()`.*
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## 🔒 Security
|
|
281
|
+
|
|
282
|
+
* **Input validation** – scanner targets are sanitised.
|
|
283
|
+
* **Offline‑first** – no data leaves your network.
|
|
284
|
+
* **LLM privacy** – Ollama runs locally; optional LiteLLM for cloud models.
|
|
285
|
+
* **API authentication** – optional API key for dashboard access.
|
|
286
|
+
* **Non‑root Docker** – container runs as unprivileged user.
|
|
287
|
+
* **Policy‑as‑Code** – enforce gates before deployment.
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## 🤖 GitHub Action
|
|
292
|
+
|
|
293
|
+
```yaml
|
|
294
|
+
- name: Pipeline Sentinel
|
|
295
|
+
uses: Mehrdoost/devsecops-radar/action@main
|
|
296
|
+
with:
|
|
297
|
+
trivy_report: trivy-results.json
|
|
298
|
+
semgrep_report: semgrep-results.json
|
|
299
|
+
poutine_report: poutine-results.json
|
|
300
|
+
zizmor_report: zizmor-results.json
|
|
301
|
+
```
|
|
302
|
+
*Merges findings, creates a job summary, and outputs CRITICAL/HIGH counts.*
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## 🗺️ Roadmap
|
|
307
|
+
|
|
308
|
+
- [x] Multi‑scanner plugin engine
|
|
309
|
+
- [x] LLM analysis (Ollama + LiteLLM) with auto‑remediation
|
|
310
|
+
- [x] Scan history, trend chart, scan diff
|
|
311
|
+
- [x] Attack‑path visualisation with MITRE ATT&CK & topology
|
|
312
|
+
- [x] Policy‑as‑Code engine
|
|
313
|
+
- [x] Compliance reports (PDF)
|
|
314
|
+
- [x] GitHub Action
|
|
315
|
+
- [x] Docker image (multi‑stage, non‑root)
|
|
316
|
+
- [ ] Jira / Slack integration
|
|
317
|
+
- [ ] SARIF & CycloneDX support
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## 👨💻 Author
|
|
322
|
+
|
|
323
|
+
**Mehrdoost**
|
|
324
|
+
|
|
325
|
+
[](https://github.com/Mehrdoost)
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## 📜 License
|
|
331
|
+
|
|
332
|
+
MIT – see [LICENSE](LICENSE).
|
|
333
|
+
|
|
334
|
+
⭐ **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
|
+
[](https://github.com/Mehrdoost/devsecops-radar/stargazers)
|
|
14
|
+
[](LICENSE)
|
|
15
|
+
[](https://pypi.org/project/devsecops-radar/)
|
|
16
|
+
[](https://github.com/Mehrdoost/devsecops-radar/releases)
|
|
17
|
+
[](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
|
+

|
|
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.3.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
|
+
[](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.**
|