devsecops-radar 0.2.5__tar.gz → 0.2.7__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.7/PKG-INFO +469 -0
- devsecops_radar-0.2.7/README.md +443 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/cli/scanner.py +51 -2
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/core/analyzer.py +37 -14
- devsecops_radar-0.2.7/devsecops_radar/core/attack_simulation.py +22 -0
- devsecops_radar-0.2.7/devsecops_radar/core/database.py +104 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/core/models.py +42 -15
- devsecops_radar-0.2.7/devsecops_radar/core/rag.py +21 -0
- devsecops_radar-0.2.7/devsecops_radar/core/reporting.py +71 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/core/rule_fusion.py +26 -10
- devsecops_radar-0.2.7/devsecops_radar/core/sbom.py +37 -0
- devsecops_radar-0.2.7/devsecops_radar/core/valuation.py +20 -0
- devsecops_radar-0.2.7/devsecops_radar/scanners/adapter.py +15 -0
- devsecops_radar-0.2.7/devsecops_radar/scanners/gitleaks.py +38 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/web/dashboard/routes.py +27 -9
- devsecops_radar-0.2.7/devsecops_radar/web/summary/routes.py +21 -0
- devsecops_radar-0.2.7/devsecops_radar.egg-info/PKG-INFO +469 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar.egg-info/SOURCES.txt +5 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar.egg-info/entry_points.txt +1 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar.egg-info/requires.txt +1 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/pyproject.toml +3 -1
- devsecops_radar-0.2.5/PKG-INFO +0 -398
- devsecops_radar-0.2.5/README.md +0 -373
- devsecops_radar-0.2.5/devsecops_radar/core/database.py +0 -92
- devsecops_radar-0.2.5/devsecops_radar/core/reporting.py +0 -55
- devsecops_radar-0.2.5/devsecops_radar/core/sbom.py +0 -27
- devsecops_radar-0.2.5/devsecops_radar/core/valuation.py +0 -10
- devsecops_radar-0.2.5/devsecops_radar.egg-info/PKG-INFO +0 -398
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/LICENSE +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/MANIFEST.in +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/__init__.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/cli/__init__.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/core/__init__.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/core/parser.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/core/remediation.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/plugins/__init__.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/scanners/base.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/scanners/poutine.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/scanners/semgrep.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/scanners/trivy.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/scanners/zizmor.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/web/__init__.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/web/app.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/web/attack_paths/__init__.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/web/attack_paths/routes.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/web/dashboard/__init__.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/web/sentry/routes.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/web/static/css/bootstrap.min.css +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/web/static/css/style.css +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/web/static/js/bootstrap.bundle.min.js +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/web/static/js/chart.umd.min.js +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/web/static/js/dashboard.js +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/web/summary/__init__.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/web/templates/index.html +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/web/topology/__init__.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar/web/topology/routes.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar.egg-info/dependency_links.txt +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/devsecops_radar.egg-info/top_level.txt +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/setup.cfg +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/tests/test_cli.py +0 -0
- {devsecops_radar-0.2.5 → devsecops_radar-0.2.7}/tests/test_scanners.py +0 -0
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devsecops-radar
|
|
3
|
+
Version: 0.2.7
|
|
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
|
+
> 📖 **Read this in:** [Русский](README_ru.md) | [中文](README_zh.md)
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 📖 Table of Contents
|
|
46
|
+
1. [What Is Pipeline Sentinel? (Simple Explanation)](#-what-is-pipeline-sentinel-simple-explanation)
|
|
47
|
+
2. [Why You Need It](#-why-you-need-it)
|
|
48
|
+
3. [Where to Run It in Your Network](#-where-to-run-it-in-your-network)
|
|
49
|
+
4. [Dashboard Preview](#-dashboard-preview)
|
|
50
|
+
5. [Quick Start](#-quick-start)
|
|
51
|
+
6. [Installation](#-installation)
|
|
52
|
+
7. [How to Use (Step‑by‑Step)](#-how-to-use-stepbystep)
|
|
53
|
+
8. [Complete Command Reference](#-complete-command-reference)
|
|
54
|
+
9. [Core Capabilities](#-core-capabilities)
|
|
55
|
+
10. [Architecture](#️-architecture)
|
|
56
|
+
11. [Roadmap](#️-roadmap)
|
|
57
|
+
12. [GitHub Action](#-github-action)
|
|
58
|
+
13. [Contributing](#-contributing)
|
|
59
|
+
14. [Author](#-author)
|
|
60
|
+
15. [License](#-license)
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 👨👩👧 What Is Pipeline Sentinel? (Simple Explanation)
|
|
65
|
+
|
|
66
|
+
Imagine you have several security guards, each watching a different door of a building. They all shout their findings in different languages, and you have to run around to understand what’s going on.
|
|
67
|
+
|
|
68
|
+
**Pipeline Sentinel** puts them all in one room, translates their reports, and shows you a single, clear screen with the full picture. It connects to tools like **Trivy** (checks your containers), **Semgrep** (scans your code), **Poutine** (audits your GitLab pipelines), **Zizmor** (secures your GitHub Actions), and **Gitleaks** (finds secrets). Instead of digging through multiple JSON files, you get a **beautiful, dark‑mode dashboard** that tells you what’s critical, how risks are trending, and even how an attacker might chain several small issues into a big problem.
|
|
69
|
+
|
|
70
|
+
Think of it as a **security camera system for your entire CI/CD pipeline** — it watches everything, alerts you, and even suggests fixes, all without needing internet access if you want.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## 💥 Why You Need It
|
|
75
|
+
|
|
76
|
+
In 2026, **supply chain attacks** have become the #1 threat. Tools like Trivy themselves were compromised, and attackers now inject malicious code directly into build pipelines. **You can no longer just scan your code; you must scan your pipeline.**
|
|
77
|
+
|
|
78
|
+
Pipeline Sentinel gives you:
|
|
79
|
+
* **One screen for all scanners** – stop juggling log files.
|
|
80
|
+
* **AI that understands attack chains** – “A leaked secret + an old library = a disaster.”
|
|
81
|
+
* **Automatic fixes** – with a single flag, it patches files and opens a pull request.
|
|
82
|
+
* **Human review mode** – inspect each fix before applying.
|
|
83
|
+
* **Compliance reports** – generate a PDF for your boss or auditor.
|
|
84
|
+
* **100% offline capable** – works in air‑gapped environments where security matters most.
|
|
85
|
+
* **Interactive wizard** – one command to get everything running.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 📍 Where to Run It in Your Network
|
|
90
|
+
|
|
91
|
+
Pipeline Sentinel is designed to be **flexible** — you decide where it fits best:
|
|
92
|
+
|
|
93
|
+
| Deployment | Description |
|
|
94
|
+
| :--- | :--- |
|
|
95
|
+
| 🖥️ **Local Developer Machine** | Run the CLI and dashboard right on your laptop. Perfect for individual pentesters or developers who want instant feedback. |
|
|
96
|
+
| 🔧 **CI/CD Runner** | Use the GitHub Action or call `devsecops-radar` directly in your Jenkins/GitLab CI scripts. It can fail the build if critical vulnerabilities exceed your policy (`--policy`). |
|
|
97
|
+
| 🏢 **Central Security Server** | Install on a dedicated server (via Docker or pip) that collects scan results from multiple teams. The dashboard becomes a shared security operations console. |
|
|
98
|
+
| 🌐 **Air‑Gapped Networks** | Copy the Docker image and sample data to an offline server. The dashboard works with zero external calls — all assets are embedded. |
|
|
99
|
+
|
|
100
|
+
### Typical Network Flow
|
|
101
|
+
|
|
102
|
+
```text
|
|
103
|
+
[Trivy scan] ──┐
|
|
104
|
+
[Semgrep scan] ─┤
|
|
105
|
+
[Poutine scan] ─┼──> devsecops-radar (CLI) ──> findings.json ──> Dashboard (Flask) ──> Browser
|
|
106
|
+
[Zizmor scan] ─┘
|
|
107
|
+
[Gitleaks scan] ┘
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
> **📌 Diagram Placeholder:** Add your network flow diagram here as `docs/network_flow.png`.
|
|
111
|
+
> ``
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## 📸 Dashboard Preview
|
|
116
|
+
|
|
117
|
+

|
|
118
|
+
*(Severity doughnut, trend line chart, attack‑path graph (clickable nodes), topology view, executive summary — all fully offline.)*
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 🚀 Quick Start
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# 1. Install from PyPI
|
|
126
|
+
pip install devsecops-radar
|
|
127
|
+
|
|
128
|
+
# 2. Feed scanner data (sample data is included in the repo)
|
|
129
|
+
devsecops-radar --trivy sample_trivy.json --semgrep sample_semgrep.json
|
|
130
|
+
|
|
131
|
+
# 3. Launch the dashboard
|
|
132
|
+
devsecops-radar-web
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Open http://localhost:8080 — your unified dashboard is live with sample findings.
|
|
136
|
+
|
|
137
|
+
🧙 **Want a fully guided setup? Run the wizard:**
|
|
138
|
+
```bash
|
|
139
|
+
devsecops-radar --wizard
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## 📦 Installation
|
|
145
|
+
|
|
146
|
+
### Option 1 — PyPI (Recommended)
|
|
147
|
+
```bash
|
|
148
|
+
pip install devsecops-radar
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Option 2 — From Source
|
|
152
|
+
```bash
|
|
153
|
+
git clone [https://github.com/Mehrdoost/devsecops-radar.git](https://github.com/Mehrdoost/devsecops-radar.git)
|
|
154
|
+
cd devsecops-radar
|
|
155
|
+
pip install -e .
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Option 3 — Docker
|
|
159
|
+
```bash
|
|
160
|
+
docker pull ghcr.io/mehrdoost/devsecops-radar:latest
|
|
161
|
+
docker run -p 8080:8080 ghcr.io/mehrdoost/devsecops-radar:latest
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Mount your own findings file:**
|
|
165
|
+
```bash
|
|
166
|
+
docker run -p 8080:8080 -v $(pwd)/findings.json:/data/findings.json ghcr.io/mehrdoost/devsecops-radar:latest
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Or use Docker Compose:**
|
|
170
|
+
```bash
|
|
171
|
+
docker compose up
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### 🧙 One‑Command Install (curl)
|
|
175
|
+
```bash
|
|
176
|
+
curl -fsSL [https://raw.githubusercontent.com/Mehrdoost/devsecops-radar/main/install.sh](https://raw.githubusercontent.com/Mehrdoost/devsecops-radar/main/install.sh) | bash
|
|
177
|
+
```
|
|
178
|
+
*This script installs Python dependencies, Ollama, pulls the AI model, and starts the wizard.*
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 🧭 How to Use (Step‑by‑Step)
|
|
183
|
+
|
|
184
|
+
### 1. Run Your Security Scanners
|
|
185
|
+
Generate JSON output from your tools:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
trivy image --format json -o trivy.json nginx:latest
|
|
189
|
+
semgrep --config=auto --json --output semgrep.json .
|
|
190
|
+
poutine scan ./repo --format json --output poutine.json
|
|
191
|
+
zizmor scan ./repo --output zizmor.json --format json
|
|
192
|
+
gitleaks detect --source . --report-format json --report-path gitleaks.json
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### 2. Merge Findings with the CLI
|
|
196
|
+
```bash
|
|
197
|
+
devsecops-radar --trivy trivy.json --semgrep semgrep.json --poutine poutine.json --zizmor zizmor.json --gitleaks gitleaks.json
|
|
198
|
+
```
|
|
199
|
+
This produces a single `findings.json` with all findings merged and normalised.
|
|
200
|
+
|
|
201
|
+
### 3. View the Dashboard
|
|
202
|
+
```bash
|
|
203
|
+
devsecops-radar-web
|
|
204
|
+
```
|
|
205
|
+
The dashboard shows:
|
|
206
|
+
* **Severity Breakdown** – Doughnut chart
|
|
207
|
+
* **Trend Over Time** – Line chart from scan history
|
|
208
|
+
* **Pipeline Security** – Poutine + Zizmor statistics card
|
|
209
|
+
* **Attack Path Graph** – Interactive D3.js graph (click nodes for details)
|
|
210
|
+
* **Executive Summary** – Risk score and AI‑generated summary
|
|
211
|
+
* **Findings Table** – Searchable, filterable, paginated
|
|
212
|
+
|
|
213
|
+
### 4. Enable AI Analysis (Optional)
|
|
214
|
+
```bash
|
|
215
|
+
ollama pull llama3.2:latest
|
|
216
|
+
devsecops-radar --trivy trivy.json --analyze
|
|
217
|
+
devsecops-radar-web
|
|
218
|
+
```
|
|
219
|
+
The LLM generates `findings_ai_summary.json` containing:
|
|
220
|
+
* `executive_summary`, `risk_score`
|
|
221
|
+
* `attack_paths` with MITRE ATT&CK tactics
|
|
222
|
+
* `top_remediations` (some with `fix_diff`)
|
|
223
|
+
* `false_positives_likely`
|
|
224
|
+
|
|
225
|
+
### 5. Auto‑Remediation (with Human Review)
|
|
226
|
+
```bash
|
|
227
|
+
# Apply fixes automatically
|
|
228
|
+
devsecops-radar --trivy trivy.json --analyze --fix
|
|
229
|
+
|
|
230
|
+
# Review each fix before applying
|
|
231
|
+
devsecops-radar --trivy trivy.json --analyze --fix --review
|
|
232
|
+
```
|
|
233
|
+
The tool creates a new git branch `auto-fix` and pushes it for review.
|
|
234
|
+
|
|
235
|
+
### 6. Policy Enforcement
|
|
236
|
+
Create a `policy.json` file:
|
|
237
|
+
```json
|
|
238
|
+
{
|
|
239
|
+
"max_critical": 5,
|
|
240
|
+
"on_violation": "fail"
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
devsecops-radar --trivy trivy.json --policy policy.json
|
|
246
|
+
```
|
|
247
|
+
If critical findings exceed 5, the command exits with code 1 — perfect for CI/CD gates.
|
|
248
|
+
|
|
249
|
+
### 7. Generate Compliance Reports
|
|
250
|
+
```bash
|
|
251
|
+
devsecops-radar --trivy trivy.json --analyze --compliance CIS --report cis-report.pdf
|
|
252
|
+
```
|
|
253
|
+
A PDF report is created with an executive summary, risk score, findings table, and compliance mapping. Sensitive data can be redacted automatically.
|
|
254
|
+
|
|
255
|
+
### 8. Security Badge for Your Project
|
|
256
|
+
After running a scan, you can embed a dynamic security badge in your `README`:
|
|
257
|
+
```markdown
|
|
258
|
+
[](https://github.com/Mehrdoost/devsecops-radar)
|
|
259
|
+
```
|
|
260
|
+
The badge color changes based on the number of critical findings (green/yellow/red).
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## 📋 Complete Command Reference
|
|
265
|
+
|
|
266
|
+
### `devsecops-radar` — CLI Flags
|
|
267
|
+
|
|
268
|
+
| Flag | Description | Example |
|
|
269
|
+
| :--- | :--- | :--- |
|
|
270
|
+
| `--trivy` | Trivy JSON file or image name | `--trivy results.json` or `--trivy nginx:latest` |
|
|
271
|
+
| `--semgrep` | Semgrep JSON file or directory | `--semgrep results.json` or `--semgrep ./src` |
|
|
272
|
+
| `--poutine` | Poutine JSON file or repo path | `--poutine results.json` or `--poutine ./repo` |
|
|
273
|
+
| `--zizmor` | Zizmor JSON file or repo path | `--zizmor results.json` or `--zizmor ./repo` |
|
|
274
|
+
| `--gitleaks` | Gitleaks JSON file or repo path | `--gitleaks results.json` or `--gitleaks ./repo` |
|
|
275
|
+
| `--rules` | Directory with custom JSON rule files | `--rules ~/my-security-rules/` |
|
|
276
|
+
| `--policy` | Policy JSON file for gating | `--policy policy.json` |
|
|
277
|
+
| `--analyze` | Enable LLM analysis (Ollama required) | `--analyze` |
|
|
278
|
+
| `--llm-backend` | `ollama` (default) or `litellm` | `--llm-backend litellm` |
|
|
279
|
+
| `--llm-model` | Model name | `--llm-model gpt-4o-mini` |
|
|
280
|
+
| `--fix` | Auto‑apply AI‑suggested fixes | `--fix` |
|
|
281
|
+
| `--review` | Review each AI fix before applying | `--review` |
|
|
282
|
+
| `--topology` | Path to topology JSON file | `--topology topology.json` |
|
|
283
|
+
| `--compliance` | Framework: `CIS`, `PCI-DSS`, `ISO27001` | `--compliance CIS` |
|
|
284
|
+
| `--report` | Generate PDF report (output filename) | `--report security_report.pdf` |
|
|
285
|
+
| `--output` | Output JSON file (default: findings.json) | `--output merged.json` |
|
|
286
|
+
| `--wizard` | Interactive first‑time setup wizard | `--wizard` |
|
|
287
|
+
|
|
288
|
+
### `devsecops-radar-web` — Web Server
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
devsecops-radar-web # Launch on http://localhost:8080
|
|
292
|
+
FINDINGS_FILE=my.json devsecops-radar-web # Use a custom findings file
|
|
293
|
+
PIPELINE_API_KEY=secret devsecops-radar-web # Enable API authentication
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## ✨ Core Capabilities
|
|
299
|
+
|
|
300
|
+
### 🔌 Multi‑Scanner Plugin Architecture
|
|
301
|
+
Built‑in support for five scanners with a real plugin system. Third‑party scanners can be installed as separate packages and discovered automatically via Python entry points. An adapter pattern validates all findings with Pydantic.
|
|
302
|
+
|
|
303
|
+
| Scanner | What It Scans | Flag |
|
|
304
|
+
| :--- | :--- | :--- |
|
|
305
|
+
| **Trivy** | Container images & dependencies | `--trivy` |
|
|
306
|
+
| **Semgrep** | Static Code Analysis (SAST) | `--semgrep` |
|
|
307
|
+
| **Poutine** | GitLab CI/CD configuration security | `--poutine` |
|
|
308
|
+
| **Zizmor** | GitHub Actions workflow security | `--zizmor` |
|
|
309
|
+
| **Gitleaks**| Secrets detection | `--gitleaks` |
|
|
310
|
+
|
|
311
|
+
### 🧩 Hybrid RuleFusion Engine
|
|
312
|
+
* **Offline** – Load custom JSON rules from any local directory (`--rules ~/my-rules/`)
|
|
313
|
+
* **Online** – Pull community‑curated rules from a configurable Git repository (`--update-rules`)
|
|
314
|
+
* Auto‑detects Trivy, Semgrep, Poutine, Zizmor, and plain‑list formats
|
|
315
|
+
* Policy evaluation built directly into the engine
|
|
316
|
+
* Community rules repo: `devsecops-radar-rules` (configurable via `COMMUNITY_RULES_REPO`)
|
|
317
|
+
|
|
318
|
+
### 🧠 LLM‑Powered Analysis
|
|
319
|
+
* Retry logic with exponential backoff for unstable endpoints
|
|
320
|
+
* Few‑shot examples covering real‑world supply chain attack chains
|
|
321
|
+
* Token‑aware selection (max items configurable via `ANALYZER_MAX_FINDINGS`)
|
|
322
|
+
* Structured JSON output: `executive_summary`, `risk_score`, `attack_paths` (MITRE ATT&CK), `top_remediations`, `false_positives_likely`
|
|
323
|
+
* Ollama (local, offline) and LiteLLM (OpenAI, Anthropic, etc.) support
|
|
324
|
+
|
|
325
|
+
### 🕸️ Multi‑Step Attack Path Visualization
|
|
326
|
+
Interactive D3.js force graph that chains findings into realistic attack scenarios. Click any node to see detailed finding information. Accepts a topology file to map findings onto your actual infrastructure, showing lateral movement across servers and subnets.
|
|
327
|
+
|
|
328
|
+
### 🛡️ Policy‑as‑Code
|
|
329
|
+
Define security gates as simple JSON:
|
|
330
|
+
```json
|
|
331
|
+
{
|
|
332
|
+
"max_critical": 5,
|
|
333
|
+
"on_violation": "fail"
|
|
334
|
+
}
|
|
335
|
+
```
|
|
336
|
+
*If critical findings exceed the threshold, the CLI exits with code 1 — perfect for failing CI/CD pipelines.*
|
|
337
|
+
|
|
338
|
+
### 🛠️ Auto‑Remediation with Human‑in‑the‑Loop
|
|
339
|
+
AI‑suggested fixes can be applied automatically (`--fix`) or reviewed one‑by‑one (`--review`). The tool creates a new git branch and pushes it for review. A `fix.sh` script is also generated for manual commands.
|
|
340
|
+
|
|
341
|
+
### 📊 Compliance & Executive Reports (with Redaction)
|
|
342
|
+
Generate professional PDF reports (`--report report.pdf`) with:
|
|
343
|
+
* Executive summary and risk score
|
|
344
|
+
* Findings table (first 50 items)
|
|
345
|
+
* Compliance mapping (CIS, PCI‑DSS, ISO 27001)
|
|
346
|
+
* Automatic redaction of passwords, tokens, JWTs
|
|
347
|
+
|
|
348
|
+
### 📈 Scan History & Trends (with Pagination)
|
|
349
|
+
SQLAlchemy‑backed database with server‑side pagination (`/api/findings?page=1&per_page=50`). Scan history is stored efficiently, enabling fast trend charts and historical comparisons.
|
|
350
|
+
|
|
351
|
+
### 🧪 SBOM & Dependency Confusion Detection
|
|
352
|
+
* Generate a CycloneDX SBOM from your project using `syft`
|
|
353
|
+
* Detect dependency confusion risks in `package.json` and `requirements.txt` — internal packages that could be impersonated by public registries
|
|
354
|
+
|
|
355
|
+
### 🔍 RAG‑Powered Security Search
|
|
356
|
+
Ask natural language questions about your scan history: *“When was the last Log4j vulnerability found?”* The built‑in RAG endpoint (`/api/rag?q=...`) searches stored findings and returns matches.
|
|
357
|
+
|
|
358
|
+
### ⚔️ Attack Simulation (Sandbox)
|
|
359
|
+
Generate a simple proof‑of‑concept script for any finding and execute it inside a disposable Docker container to demonstrate the risk without harming your system.
|
|
360
|
+
|
|
361
|
+
### 📉 Dynamic Risk Scoring
|
|
362
|
+
Beyond CVSS, each finding gets a dynamic risk score based on asset exposure (from topology) and exploit availability — helping teams prioritise what to fix first.
|
|
363
|
+
|
|
364
|
+
### 🧙 Interactive Wizard
|
|
365
|
+
A `--wizard` flag walks new users through installing dependencies, pulling AI models, and running their first scan — all in one go.
|
|
366
|
+
|
|
367
|
+
### 🔒 Privacy & Offline‑First
|
|
368
|
+
* All assets (CSS, JS) are embedded — zero CDN calls
|
|
369
|
+
* LLM analysis runs locally with Ollama; no data leaves your network
|
|
370
|
+
* Optional API key authentication for the dashboard
|
|
371
|
+
* Docker image runs as non‑root user
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
## 🏗️ Architecture
|
|
376
|
+
|
|
377
|
+
```text
|
|
378
|
+
devsecops_radar/
|
|
379
|
+
├── cli/ # CLI entry point – plugin discovery, policy, remediation
|
|
380
|
+
├── core/ # RuleFusion engine, DB (SQLAlchemy), LLM analysers
|
|
381
|
+
├── scanners/ # Pluggable scanner classes (extend ScannerPlugin)
|
|
382
|
+
├── plugins/ # ScannerPlugin abstract base class & entry points
|
|
383
|
+
└── web/ # Flask dashboard (modular Blueprints)
|
|
384
|
+
├── dashboard/ # Main dashboard routes & embedded HTML
|
|
385
|
+
├── attack_paths/
|
|
386
|
+
├── topology/
|
|
387
|
+
├── summary/
|
|
388
|
+
└── sentry/ # Live webhook agent for CI/CD
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
> **📌 Diagram Placeholder:**
|
|
392
|
+
> ``
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
## 🗺️ Roadmap
|
|
397
|
+
|
|
398
|
+
| Phase | Feature | Status |
|
|
399
|
+
| :--- | :--- | :--- |
|
|
400
|
+
| ✅ **Phase 1** | Multi‑scanner engine (Trivy, Semgrep, Poutine, Zizmor) | Done |
|
|
401
|
+
| ✅ **Phase 1** | LLM analysis (Ollama + LiteLLM) | Done |
|
|
402
|
+
| ✅ **Phase 1** | Scan history, trend chart, scan diff | Done |
|
|
403
|
+
| ✅ **Phase 1** | GitHub Action (composite) | Done |
|
|
404
|
+
| ✅ **Phase 1** | Docker image (multi‑stage, non‑root) | Done |
|
|
405
|
+
| ✅ **Phase 2** | Attack‑path visualization with MITRE ATT&CK & topology | Done |
|
|
406
|
+
| ✅ **Phase 2** | Policy‑as‑Code engine (`--policy`) | Done |
|
|
407
|
+
| ✅ **Phase 2** | Auto‑remediation engine (`--fix`) | Done |
|
|
408
|
+
| ✅ **Phase 2** | Compliance reports (PDF) with redaction | Done |
|
|
409
|
+
| ✅ **Phase 2** | Hybrid RuleFusion engine (local + community rules) | Done |
|
|
410
|
+
| ✅ **Phase 3** | Web dashboard Blueprint refactor (modular Flask) | Done |
|
|
411
|
+
| ✅ **Phase 3** | Real scanner plugin system with entry points | Done |
|
|
412
|
+
| ✅ **Phase 3** | SQLAlchemy ORM with pagination | Done |
|
|
413
|
+
| ✅ **Phase 3** | SBOM & Dependency Confusion Detection | Done |
|
|
414
|
+
| ✅ **Phase 3** | RAG‑powered security search | Done |
|
|
415
|
+
| ✅ **Phase 3** | Attack Simulation (sandbox) | Done |
|
|
416
|
+
| ✅ **Phase 3** | Dynamic Risk Scoring | Done |
|
|
417
|
+
| ✅ **Phase 3** | Interactive wizard (`--wizard`) | Done |
|
|
418
|
+
| ✅ **Phase 3** | Human review mode (`--review`) | Done |
|
|
419
|
+
| ✅ **Phase 3** | Gitleaks secret scanner | Done |
|
|
420
|
+
| ✅ **Phase 3** | Security badge endpoint | Done |
|
|
421
|
+
| 🔲 **Phase 4** | Jira / Slack integration | Planned |
|
|
422
|
+
| 🔲 **Phase 4** | SARIF & CycloneDX support | Planned |
|
|
423
|
+
| 🔲 **Phase 4** | Rule Marketplace (community YAML rules) | Planned |
|
|
424
|
+
| 🔲 **Phase 4** | Pull Request assistant (GitHub App) | Planned |
|
|
425
|
+
|
|
426
|
+
> See the [open issues](https://github.com/Mehrdoost/devsecops-radar/issues) for a full list of proposed features.
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
## 🤖 GitHub Action
|
|
431
|
+
|
|
432
|
+
```yaml
|
|
433
|
+
- name: Pipeline Sentinel
|
|
434
|
+
uses: Mehrdoost/devsecops-radar/action@main
|
|
435
|
+
with:
|
|
436
|
+
trivy_report: trivy-results.json
|
|
437
|
+
semgrep_report: semgrep-results.json
|
|
438
|
+
poutine_report: poutine-results.json
|
|
439
|
+
zizmor_report: zizmor-results.json
|
|
440
|
+
gitleaks_report: gitleaks-results.json
|
|
441
|
+
```
|
|
442
|
+
*The action merges findings, creates a job summary, and outputs CRITICAL/HIGH counts.*
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
446
|
+
## 🤝 Contributing
|
|
447
|
+
|
|
448
|
+
Pull requests and issues are warmly welcome!
|
|
449
|
+
If you would like to integrate a new scanner, open an issue with a sample of its JSON output.
|
|
450
|
+
For permanent scanner plugins, extend the `ScannerPlugin` class and register it via entry points.
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
## 👨💻 Author
|
|
455
|
+
|
|
456
|
+
**Mehrdoost**
|
|
457
|
+
|
|
458
|
+
[](https://github.com/Mehrdoost)
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
---
|
|
462
|
+
|
|
463
|
+
## 📜 License
|
|
464
|
+
|
|
465
|
+
MIT — see [LICENSE](LICENSE).
|
|
466
|
+
|
|
467
|
+
<div align="center">
|
|
468
|
+
⭐ If this project helps your team ship safer software, drop a star — it makes a real difference.
|
|
469
|
+
</div>
|