devsecops-radar 0.2.3__tar.gz → 0.2.6__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.6/PKG-INFO +399 -0
- devsecops_radar-0.2.6/README.md +373 -0
- devsecops_radar-0.2.6/devsecops_radar/cli/scanner.py +143 -0
- devsecops_radar-0.2.6/devsecops_radar/core/analyzer.py +158 -0
- devsecops_radar-0.2.6/devsecops_radar/core/attack_simulation.py +22 -0
- devsecops_radar-0.2.6/devsecops_radar/core/database.py +104 -0
- devsecops_radar-0.2.6/devsecops_radar/core/models.py +78 -0
- devsecops_radar-0.2.6/devsecops_radar/core/rag.py +21 -0
- devsecops_radar-0.2.6/devsecops_radar/core/remediation.py +59 -0
- devsecops_radar-0.2.6/devsecops_radar/core/reporting.py +71 -0
- devsecops_radar-0.2.6/devsecops_radar/core/sbom.py +37 -0
- devsecops_radar-0.2.6/devsecops_radar/core/valuation.py +20 -0
- devsecops_radar-0.2.6/devsecops_radar/plugins/__init__.py +20 -0
- devsecops_radar-0.2.6/devsecops_radar/scanners/adapter.py +15 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar/scanners/poutine.py +6 -5
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar/scanners/semgrep.py +6 -5
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar/scanners/trivy.py +9 -4
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar/scanners/zizmor.py +6 -5
- devsecops_radar-0.2.6/devsecops_radar/web/app.py +22 -0
- devsecops_radar-0.2.6/devsecops_radar/web/attack_paths/routes.py +42 -0
- devsecops_radar-0.2.6/devsecops_radar/web/dashboard/__init__.py +0 -0
- devsecops_radar-0.2.3/devsecops_radar/web/app.py → devsecops_radar-0.2.6/devsecops_radar/web/dashboard/routes.py +18 -136
- devsecops_radar-0.2.6/devsecops_radar/web/sentry/routes.py +17 -0
- devsecops_radar-0.2.6/devsecops_radar/web/summary/__init__.py +0 -0
- devsecops_radar-0.2.6/devsecops_radar/web/topology/__init__.py +0 -0
- devsecops_radar-0.2.6/devsecops_radar/web/topology/routes.py +13 -0
- devsecops_radar-0.2.6/devsecops_radar.egg-info/PKG-INFO +399 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar.egg-info/SOURCES.txt +15 -0
- devsecops_radar-0.2.6/devsecops_radar.egg-info/entry_points.txt +9 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar.egg-info/requires.txt +2 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/pyproject.toml +24 -5
- devsecops_radar-0.2.6/tests/test_cli.py +0 -0
- devsecops_radar-0.2.3/PKG-INFO +0 -337
- devsecops_radar-0.2.3/README.md +0 -312
- devsecops_radar-0.2.3/devsecops_radar/cli/scanner.py +0 -138
- devsecops_radar-0.2.3/devsecops_radar/core/analyzer.py +0 -129
- devsecops_radar-0.2.3/devsecops_radar/core/database.py +0 -117
- devsecops_radar-0.2.3/devsecops_radar/core/remediation.py +0 -50
- devsecops_radar-0.2.3/devsecops_radar/core/reporting.py +0 -55
- devsecops_radar-0.2.3/devsecops_radar.egg-info/PKG-INFO +0 -337
- devsecops_radar-0.2.3/devsecops_radar.egg-info/entry_points.txt +0 -3
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/LICENSE +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/MANIFEST.in +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar/__init__.py +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar/cli/__init__.py +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar/core/__init__.py +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar/core/parser.py +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar/core/rule_fusion.py +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar/scanners/base.py +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar/web/__init__.py +0 -0
- /devsecops_radar-0.2.3/tests/test_cli.py → /devsecops_radar-0.2.6/devsecops_radar/web/attack_paths/__init__.py +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar/web/static/css/bootstrap.min.css +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar/web/static/css/style.css +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar/web/static/js/bootstrap.bundle.min.js +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar/web/static/js/chart.umd.min.js +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar/web/static/js/dashboard.js +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar/web/templates/index.html +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar.egg-info/dependency_links.txt +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/devsecops_radar.egg-info/top_level.txt +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/setup.cfg +0 -0
- {devsecops_radar-0.2.3 → devsecops_radar-0.2.6}/tests/test_scanners.py +0 -0
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devsecops-radar
|
|
3
|
+
Version: 0.2.6
|
|
4
|
+
Summary: Unified CI/CD Security Dashboard — Pipeline Sentinel
|
|
5
|
+
Author-email: Mehrdoost <70381337+Mehrdoost@users.noreply.github.com>
|
|
6
|
+
License-Expression: 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: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: flask>=3.0
|
|
17
|
+
Requires-Dist: semgrep>=1.0
|
|
18
|
+
Requires-Dist: pyyaml>=6.0
|
|
19
|
+
Requires-Dist: requests>=2.31
|
|
20
|
+
Requires-Dist: loguru>=0.7
|
|
21
|
+
Requires-Dist: reportlab>=4.0
|
|
22
|
+
Requires-Dist: litellm>=1.50
|
|
23
|
+
Requires-Dist: sqlalchemy>=2.0
|
|
24
|
+
Requires-Dist: pydantic>=2.0
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
<!-- markdownlint-disable MD033 MD041 -->
|
|
28
|
+
<div align="center">
|
|
29
|
+
|
|
30
|
+
# 🛡️ Pipeline Sentinel
|
|
31
|
+
**The Open‑Source DevSecOps Command Center — Unify, Analyse, Remediate.**
|
|
32
|
+
|
|
33
|
+
[](https://pypi.org/project/devsecops-radar/)
|
|
34
|
+
[](LICENSE)
|
|
35
|
+
[](https://github.com/Mehrdoost/devsecops-radar/releases)
|
|
36
|
+
[](https://github.com/Mehrdoost/devsecops-radar/actions)
|
|
37
|
+
[](https://github.com/Mehrdoost/devsecops-radar/stargazers)
|
|
38
|
+
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 📖 Table of Contents
|
|
44
|
+
1. [What Is Pipeline Sentinel?](#-what-is-pipeline-sentinel)
|
|
45
|
+
2. [Roadmap](#️-roadmap)
|
|
46
|
+
3. [Quick Start](#-quick-start)
|
|
47
|
+
4. [Installation](#-installation)
|
|
48
|
+
5. [How to Use](#-how-to-use)
|
|
49
|
+
6. [Complete Command Reference](#-complete-command-reference)
|
|
50
|
+
7. [Core Capabilities](#-core-capabilities)
|
|
51
|
+
8. [Architecture](#️-architecture)
|
|
52
|
+
9. [Security](#-security)
|
|
53
|
+
10. [GitHub Action](#-github-action)
|
|
54
|
+
11. [Contributing](#-contributing)
|
|
55
|
+
12. [Author](#-author)
|
|
56
|
+
13. [License](#-license)
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 📸 What Is Pipeline Sentinel?
|
|
61
|
+
|
|
62
|
+
**Pipeline Sentinel** is a security observability platform built for **CI/CD pipelines**. It takes the fragmented JSON output from popular open‑source scanners — **Trivy** (containers), **Semgrep** (SAST), **Poutine** (GitLab CI), and **Zizmor** (GitHub Actions) — and merges them into a **single, beautiful, offline‑ready dashboard**.
|
|
63
|
+
|
|
64
|
+
> Think of it as **Nuclei for CI/CD security**: define your own rules, feed it JSON, and let it map your attack surface.
|
|
65
|
+
|
|
66
|
+
### 🎯 Who Is This For?
|
|
67
|
+
|
|
68
|
+
| Persona | How Pipeline Sentinel Helps |
|
|
69
|
+
| :--- | :--- |
|
|
70
|
+
| **DevSecOps Engineers** | One dashboard instead of four. Merge scanner reports and see the full picture instantly. |
|
|
71
|
+
| **Penetration Testers** | Feed custom tool JSON, generate AI‑powered attack graphs with MITRE ATT&CK. |
|
|
72
|
+
| **Security Teams (air‑gapped)** | Works 100% offline. No CDN, no external API calls. |
|
|
73
|
+
| **Compliance Officers** | Generate PDF reports aligned to CIS, PCI‑DSS, or ISO 27001. |
|
|
74
|
+
| **CI/CD Pipeline Owners** | Integrate via GitHub Action to get a security summary on every PR. |
|
|
75
|
+
|
|
76
|
+
### 📊 Dashboard Preview
|
|
77
|
+
|
|
78
|
+

|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 🗺️ Roadmap
|
|
83
|
+
|
|
84
|
+
Pipeline Sentinel evolves rapidly. Here is the public roadmap:
|
|
85
|
+
|
|
86
|
+
| Phase | Feature | Status |
|
|
87
|
+
| :--- | :--- | :--- |
|
|
88
|
+
| ✅ **Phase 1** | Multi‑scanner plugin engine (Trivy, Semgrep, Poutine, Zizmor) | Done |
|
|
89
|
+
| ✅ **Phase 1** | LLM‑powered analysis (Ollama + LiteLLM) | Done |
|
|
90
|
+
| ✅ **Phase 1** | Scan history, trend chart, scan diff | Done |
|
|
91
|
+
| ✅ **Phase 1** | GitHub Action (composite) | Done |
|
|
92
|
+
| ✅ **Phase 1** | Docker image (multi‑stage, non‑root) | Done |
|
|
93
|
+
| ✅ **Phase 2** | Attack‑path visualisation with MITRE ATT&CK & topology | Done |
|
|
94
|
+
| ✅ **Phase 2** | Policy‑as‑Code engine (`--policy`) | Done |
|
|
95
|
+
| ✅ **Phase 2** | Auto‑remediation engine (`--fix`) | Done |
|
|
96
|
+
| ✅ **Phase 2** | Compliance reports (PDF) | Done |
|
|
97
|
+
| ✅ **Phase 2** | Hybrid RuleFusion engine (local + community rules) | Done |
|
|
98
|
+
| ✅ **Phase 3** | Web dashboard Blueprint refactor (modular Flask) | Done |
|
|
99
|
+
| ✅ **Phase 3** | Real scanner plugin system with entry points | Done |
|
|
100
|
+
| ✅ **Phase 3** | SQLAlchemy ORM for scan history | Done |
|
|
101
|
+
| ✅ **Phase 3** | SBOM health reports | Done |
|
|
102
|
+
| ✅ **Phase 3** | Pipeline Sentry (live webhook agent) | Done |
|
|
103
|
+
| 🔲 **Phase 4** | Jira / Slack integration | Planned |
|
|
104
|
+
| 🔲 **Phase 4** | SARIF & CycloneDX support | Planned |
|
|
105
|
+
| 🔲 **Phase 4** | Rule Marketplace (community YAML rules) | Planned |
|
|
106
|
+
|
|
107
|
+
> See the [open issues](https://github.com/Mehrdoost/devsecops-radar/issues) for a full list of proposed features.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## 🚀 Quick Start
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
# 1. Install from PyPI
|
|
115
|
+
pip install devsecops-radar
|
|
116
|
+
|
|
117
|
+
# 2. Feed scanner data (sample data is included in the repo)
|
|
118
|
+
devsecops-radar --trivy sample_trivy.json --semgrep sample_semgrep.json
|
|
119
|
+
|
|
120
|
+
# 3. Launch the dashboard
|
|
121
|
+
devsecops-radar-web
|
|
122
|
+
```
|
|
123
|
+
Open http://localhost:8080 — your unified dashboard is live with sample findings.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 📦 Installation
|
|
128
|
+
|
|
129
|
+
### Option 1 — PyPI (Recommended)
|
|
130
|
+
```bash
|
|
131
|
+
pip install devsecops-radar
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Option 2 — From Source
|
|
135
|
+
```bash
|
|
136
|
+
git clone [https://github.com/Mehrdoost/devsecops-radar.git](https://github.com/Mehrdoost/devsecops-radar.git)
|
|
137
|
+
cd devsecops-radar
|
|
138
|
+
pip install -e .
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Option 3 — Docker
|
|
142
|
+
```bash
|
|
143
|
+
docker pull ghcr.io/mehrdoost/devsecops-radar:latest
|
|
144
|
+
docker run -p 8080:8080 ghcr.io/mehrdoost/devsecops-radar:latest
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Mount your own findings file:**
|
|
148
|
+
```bash
|
|
149
|
+
docker run -p 8080:8080 -v $(pwd)/findings.json:/data/findings.json ghcr.io/mehrdoost/devsecops-radar:latest
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Or use Docker Compose:**
|
|
153
|
+
```bash
|
|
154
|
+
docker compose up
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## 🧭 How to Use
|
|
160
|
+
|
|
161
|
+
### Step 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
|
+
### Step 2 — Merge Findings with the CLI
|
|
172
|
+
```bash
|
|
173
|
+
devsecops-radar --trivy trivy.json --semgrep semgrep.json --poutine poutine.json --zizmor zizmor.json
|
|
174
|
+
```
|
|
175
|
+
This produces a single `findings.json` file with all findings merged and normalised.
|
|
176
|
+
|
|
177
|
+
### Step 3 — View the Dashboard
|
|
178
|
+
```bash
|
|
179
|
+
devsecops-radar-web
|
|
180
|
+
```
|
|
181
|
+
The dashboard shows:
|
|
182
|
+
* **Severity Breakdown** — Doughnut chart of CRITICAL, HIGH, MEDIUM, LOW counts
|
|
183
|
+
* **Trend Over Time** — Line chart showing how severity counts evolve across scans
|
|
184
|
+
* **Pipeline Security** — Dedicated Poutine + Zizmor statistics card
|
|
185
|
+
* **Attack Path Graph** — Interactive D3.js force graph (when AI analysis is enabled)
|
|
186
|
+
* **Executive Summary** — Risk score and AI‑generated summary
|
|
187
|
+
* **Findings Table** — Searchable, filterable table of all findings
|
|
188
|
+
|
|
189
|
+
### Step 4 — Enable AI Analysis (Optional)
|
|
190
|
+
```bash
|
|
191
|
+
ollama pull llama3.2:latest
|
|
192
|
+
devsecops-radar --trivy trivy.json --analyze
|
|
193
|
+
devsecops-radar-web
|
|
194
|
+
```
|
|
195
|
+
The LLM generates `findings_ai_summary.json` containing:
|
|
196
|
+
* `executive_summary`, `risk_score`
|
|
197
|
+
* `attack_paths` with MITRE ATT&CK tactics
|
|
198
|
+
* `top_remediations` (some with `fix_diff`)
|
|
199
|
+
* `false_positives_likely`
|
|
200
|
+
|
|
201
|
+
### Step 5 — Auto‑Remediation
|
|
202
|
+
```bash
|
|
203
|
+
devsecops-radar --trivy trivy.json --analyze --fix
|
|
204
|
+
```
|
|
205
|
+
The tool will apply AI‑suggested fixes, create a new git branch `auto-fix`, and push it for review.
|
|
206
|
+
|
|
207
|
+
### Step 6 — Policy Enforcement
|
|
208
|
+
Create a `policy.json` file:
|
|
209
|
+
```json
|
|
210
|
+
{
|
|
211
|
+
"max_critical": 5,
|
|
212
|
+
"on_violation": "fail"
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
devsecops-radar --trivy trivy.json --policy policy.json
|
|
218
|
+
```
|
|
219
|
+
If critical findings exceed 5, the command exits with code 1 — suitable for CI/CD gates.
|
|
220
|
+
|
|
221
|
+
### Step 7 — Generate Compliance Reports
|
|
222
|
+
```bash
|
|
223
|
+
devsecops-radar --trivy trivy.json --analyze --compliance CIS --report cis-report.pdf
|
|
224
|
+
```
|
|
225
|
+
A PDF report is created with an executive summary, risk score, findings table, and compliance mapping.
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## 📋 Complete Command Reference
|
|
230
|
+
|
|
231
|
+
### `devsecops-radar` — CLI Flags
|
|
232
|
+
|
|
233
|
+
| Flag | Description | Example |
|
|
234
|
+
| :--- | :--- | :--- |
|
|
235
|
+
| `--trivy` | Trivy JSON file or image name | `--trivy results.json` or `--trivy nginx:latest` |
|
|
236
|
+
| `--semgrep` | Semgrep JSON file or directory | `--semgrep results.json` or `--semgrep ./src` |
|
|
237
|
+
| `--poutine` | Poutine JSON file or repo path | `--poutine results.json` or `--poutine ./repo` |
|
|
238
|
+
| `--zizmor` | Zizmor JSON file or repo path | `--zizmor results.json` or `--zizmor ./repo` |
|
|
239
|
+
| `--rules` | Directory with custom JSON rule files | `--rules ~/my-security-rules/` |
|
|
240
|
+
| `--policy` | Policy JSON file for gating | `--policy policy.json` |
|
|
241
|
+
| `--analyze` | Enable LLM analysis (Ollama required) | `--analyze` |
|
|
242
|
+
| `--llm-backend` | `ollama` (default) or `litellm` | `--llm-backend litellm` |
|
|
243
|
+
| `--llm-model` | Model name | `--llm-model gpt-4o-mini` |
|
|
244
|
+
| `--fix` | Auto‑apply AI‑suggested fixes | `--fix` |
|
|
245
|
+
| `--topology` | Path to topology JSON file | `--topology topology.json` |
|
|
246
|
+
| `--compliance` | Framework: `CIS`, `PCI-DSS`, `ISO27001` | `--compliance CIS` |
|
|
247
|
+
| `--report` | Generate PDF report (output filename) | `--report security_report.pdf` |
|
|
248
|
+
| `--output` | Output JSON file (default: findings.json) | `--output merged.json` |
|
|
249
|
+
|
|
250
|
+
### `devsecops-radar-web` — Web Server
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
devsecops-radar-web # Launch on http://localhost:8080
|
|
254
|
+
FINDINGS_FILE=my.json devsecops-radar-web # Use a custom findings file
|
|
255
|
+
PIPELINE_API_KEY=secret devsecops-radar-web # Enable API authentication
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Usage Examples
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
# Merge multiple scanner outputs
|
|
262
|
+
devsecops-radar --trivy trivy_scan.json --semgrep semgrep_scan.json
|
|
263
|
+
|
|
264
|
+
# Scan directly (if tools are installed)
|
|
265
|
+
devsecops-radar --trivy nginx:latest --semgrep ./src --poutine ./repo
|
|
266
|
+
|
|
267
|
+
# Merge built‑in scanners with custom rules
|
|
268
|
+
devsecops-radar --trivy trivy_scan.json --rules ~/my-security-rules/
|
|
269
|
+
|
|
270
|
+
# Enable AI analysis (Ollama must be running)
|
|
271
|
+
ollama pull llama3.2:latest
|
|
272
|
+
devsecops-radar --trivy trivy_scan.json --semgrep semgrep_scan.json --analyze
|
|
273
|
+
|
|
274
|
+
# Use OpenAI via LiteLLM
|
|
275
|
+
export OPENAI_API_KEY=sk-...
|
|
276
|
+
devsecops-radar --trivy trivy_scan.json --analyze --llm-backend litellm --llm-model gpt-4o-mini
|
|
277
|
+
|
|
278
|
+
# Build scan history and view trends
|
|
279
|
+
devsecops-radar --trivy sample_trivy.json --semgrep sample_semgrep.json
|
|
280
|
+
devsecops-radar --trivy sample_trivy.json --poutine sample_poutine.json
|
|
281
|
+
devsecops-radar-web # Trend chart now shows multiple data points
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## ✨ Core Capabilities
|
|
287
|
+
|
|
288
|
+
### 🔌 Multi‑Scanner Plugin Architecture
|
|
289
|
+
Built‑in support for four scanners with a real plugin system based on `ScannerPlugin` abstract class. Third‑party scanners can be installed as separate packages and discovered automatically via Python entry points.
|
|
290
|
+
|
|
291
|
+
| Scanner | What It Scans | Flag |
|
|
292
|
+
| :--- | :--- | :--- |
|
|
293
|
+
| **Trivy** | Container images & dependencies | `--trivy` |
|
|
294
|
+
| **Semgrep** | Static Code Analysis (SAST) | `--semgrep` |
|
|
295
|
+
| **Poutine** | GitLab CI/CD configuration security | `--poutine` |
|
|
296
|
+
| **Zizmor** | GitHub Actions workflow security | `--zizmor` |
|
|
297
|
+
|
|
298
|
+
### 🧩 Hybrid RuleFusion Engine
|
|
299
|
+
* **Offline** — Load custom JSON rules from any local directory (`--rules ~/my-rules/`)
|
|
300
|
+
* **Online** — Pull community‑curated rules with `--update-rules`
|
|
301
|
+
* Auto‑detects Trivy, Semgrep, Poutine, Zizmor, and plain‑list formats
|
|
302
|
+
* Policy evaluation built directly into the engine
|
|
303
|
+
|
|
304
|
+
### 🧠 LLM‑Powered Analysis
|
|
305
|
+
* Ollama (local, offline) and LiteLLM (OpenAI, Anthropic, etc.) support
|
|
306
|
+
* Engineered few‑shot prompts with structured JSON output
|
|
307
|
+
* Token‑aware finding selection for large datasets
|
|
308
|
+
* Produces executive summaries, risk scores, attack paths with MITRE ATT&CK mapping, and remediation guidance
|
|
309
|
+
|
|
310
|
+
### 🕸️ Attack Path Visualization
|
|
311
|
+
Interactive D3.js force graph showing how separate vulnerabilities can be chained into an attack scenario. Accepts a topology file to map findings onto your actual infrastructure.
|
|
312
|
+
|
|
313
|
+
### 🛡️ Policy‑as‑Code
|
|
314
|
+
Define security gates as JSON:
|
|
315
|
+
```json
|
|
316
|
+
{
|
|
317
|
+
"max_critical": 5,
|
|
318
|
+
"on_violation": "fail"
|
|
319
|
+
}
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### 🛠️ Auto‑Remediation
|
|
323
|
+
AI‑suggested fixes are applied automatically. The tool creates a new git branch and pushes it for review.
|
|
324
|
+
|
|
325
|
+
### 📊 Compliance Reports
|
|
326
|
+
Generate PDF reports with executive summary, risk score, findings table, and mapping to CIS, PCI‑DSS, or ISO 27001 controls.
|
|
327
|
+
|
|
328
|
+
### 📈 Scan History & Trends
|
|
329
|
+
SQLite‑backed (with SQLAlchemy ORM) history with trend line chart and scan diff API.
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
## 🏗️ Architecture
|
|
334
|
+
|
|
335
|
+
```text
|
|
336
|
+
devsecops_radar/
|
|
337
|
+
├── cli/ # CLI entry point — plugin discovery, policy, remediation
|
|
338
|
+
├── core/ # RuleFusion engine, DB (SQLAlchemy), LLM analysers
|
|
339
|
+
├── scanners/ # Pluggable scanner classes (extend ScannerPlugin)
|
|
340
|
+
├── plugins/ # ScannerPlugin abstract base class
|
|
341
|
+
└── web/ # Flask dashboard (modular Blueprints)
|
|
342
|
+
├── dashboard/ # Main dashboard routes & embedded HTML
|
|
343
|
+
├── attack_paths/
|
|
344
|
+
├── topology/
|
|
345
|
+
├── summary/
|
|
346
|
+
└── sentry/ # Live webhook agent for CI/CD
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## 🔒 Security
|
|
352
|
+
|
|
353
|
+
* **Input validation** — All scanner targets are sanitised against command injection.
|
|
354
|
+
* **Offline‑first** — No data leaves your network.
|
|
355
|
+
* **LLM privacy** — Ollama runs locally; optional LiteLLM for cloud models.
|
|
356
|
+
* **API authentication** — Optional API key for dashboard access.
|
|
357
|
+
* **Non‑root Docker** — Container runs as unprivileged user.
|
|
358
|
+
* **Policy‑as‑Code** — Enforce gates before deployment.
|
|
359
|
+
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
## 🤖 GitHub Action
|
|
363
|
+
|
|
364
|
+
```yaml
|
|
365
|
+
- name: Pipeline Sentinel
|
|
366
|
+
uses: Mehrdoost/devsecops-radar/action@main
|
|
367
|
+
with:
|
|
368
|
+
trivy_report: trivy-results.json
|
|
369
|
+
semgrep_report: semgrep-results.json
|
|
370
|
+
poutine_report: poutine-results.json
|
|
371
|
+
zizmor_report: zizmor-results.json
|
|
372
|
+
```
|
|
373
|
+
*The action merges findings, creates a job summary, and outputs CRITICAL/HIGH counts.*
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## 🤝 Contributing
|
|
378
|
+
|
|
379
|
+
Pull requests and issues are warmly welcome!
|
|
380
|
+
If you would like to integrate a new scanner, open an issue with a sample of its JSON output.
|
|
381
|
+
For permanent scanner plugins, extend the `ScannerPlugin` class and register it via entry points.
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
## 👨💻 Author
|
|
386
|
+
|
|
387
|
+
**Mehrdoost**
|
|
388
|
+
|
|
389
|
+
[](https://github.com/Mehrdoost)
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
## 📜 License
|
|
394
|
+
|
|
395
|
+
MIT — see [LICENSE](LICENSE).
|
|
396
|
+
|
|
397
|
+
<div align="center">
|
|
398
|
+
⭐ If this project helps your team ship safer software, drop a star — it makes a real difference.
|
|
399
|
+
</div>
|