devsecops-radar 0.3.7__tar.gz → 0.3.10__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.3.7/devsecops_radar.egg-info → devsecops_radar-0.3.10}/PKG-INFO +229 -113
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/README.md +221 -110
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/cli/scanner.py +7 -1
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/core/remediation.py +11 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/core/rule_fusion.py +33 -9
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/core/sbom.py +14 -1
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/core/valuation.py +15 -1
- devsecops_radar-0.3.10/devsecops_radar/web/dashboard/routes.py +603 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10/devsecops_radar.egg-info}/PKG-INFO +229 -113
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar.egg-info/SOURCES.txt +0 -1
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar.egg-info/requires.txt +6 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/pyproject.toml +23 -2
- devsecops_radar-0.3.7/MANIFEST.in +0 -2
- devsecops_radar-0.3.7/devsecops_radar/web/dashboard/routes.py +0 -467
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/LICENSE +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/__init__.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/cli/__init__.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/core/__init__.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/core/analyzer.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/core/attack_simulation.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/core/auth.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/core/database.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/core/models.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/core/parser.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/core/rag.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/core/reporting.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/core/settings.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/plugins/__init__.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/scanners/adapter.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/scanners/base.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/scanners/gitleaks.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/scanners/poutine.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/scanners/semgrep.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/scanners/trivy.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/scanners/zizmor.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/web/__init__.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/web/app.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/web/attack_paths/__init__.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/web/attack_paths/routes.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/web/dashboard/__init__.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/web/sentry/routes.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/web/static/css/bootstrap.min.css +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/web/static/css/style.css +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/web/static/js/bootstrap.bundle.min.js +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/web/static/js/chart.umd.min.js +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/web/static/js/dashboard.js +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/web/summary/__init__.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/web/summary/routes.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/web/templates/index.html +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/web/topology/__init__.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar/web/topology/routes.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar.egg-info/dependency_links.txt +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar.egg-info/entry_points.txt +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/devsecops_radar.egg-info/top_level.txt +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/setup.cfg +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/tests/test_analyzer.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/tests/test_api.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/tests/test_cli.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/tests/test_database.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/tests/test_rule_fusion.py +0 -0
- {devsecops_radar-0.3.7 → devsecops_radar-0.3.10}/tests/test_scanners.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: devsecops-radar
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.10
|
|
4
4
|
Summary: Unified CI/CD Security Dashboard — Pipeline Sentinel
|
|
5
5
|
Author-email: Mehrdoost <70381337+Mehrdoost@users.noreply.github.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -23,20 +23,31 @@ Requires-Dist: litellm>=1.50
|
|
|
23
23
|
Requires-Dist: sqlalchemy>=2.0
|
|
24
24
|
Requires-Dist: pydantic>=2.0
|
|
25
25
|
Requires-Dist: pyjwt>=2.8
|
|
26
|
-
|
|
27
|
-
Requires-Dist: pytest
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
28
|
+
Requires-Dist: pytest-flask>=1.3; extra == "dev"
|
|
29
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
30
|
+
Requires-Dist: ruff>=0.3.0; extra == "dev"
|
|
31
|
+
Requires-Dist: mypy>=1.9; extra == "dev"
|
|
32
|
+
Requires-Dist: pre-commit>=3.5; extra == "dev"
|
|
28
33
|
Dynamic: license-file
|
|
29
34
|
|
|
30
|
-
|
|
35
|
+
Here is the fully fixed, standardized, and perfectly formatted English version of your comprehensive `README.md` file. I have corrected the Markdown syntax errors, repaired the broken code blocks, properly aligned the tables, and integrated the new features (such as OPA Rego policies, What-If simulation, Codecov, and VEX support).
|
|
36
|
+
|
|
37
|
+
You can copy the entire block below using the **Copy** button and paste it directly into your file:
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
31
40
|
<div align="center">
|
|
32
41
|
|
|
33
42
|
# 🛡️ Pipeline Sentinel
|
|
43
|
+
|
|
34
44
|
**The Open‑Source DevSecOps Command Center — Unify, Analyse, Remediate.**
|
|
35
45
|
|
|
36
46
|
[](https://pypi.org/project/devsecops-radar/)
|
|
37
47
|
[](LICENSE)
|
|
38
48
|
[](https://github.com/Mehrdoost/devsecops-radar/releases)
|
|
39
|
-
[](https://github.com/Mehrdoost/devsecops-radar/actions)
|
|
50
|
+
[](https://codecov.io/gh/Mehrdoost/devsecops-radar)
|
|
40
51
|
[](https://github.com/Mehrdoost/devsecops-radar/stargazers)
|
|
41
52
|
|
|
42
53
|
</div>
|
|
@@ -46,21 +57,27 @@ Dynamic: license-file
|
|
|
46
57
|
---
|
|
47
58
|
|
|
48
59
|
## 📖 Table of Contents
|
|
60
|
+
|
|
49
61
|
1. [What Is Pipeline Sentinel? (Simple Explanation)](#-what-is-pipeline-sentinel-simple-explanation)
|
|
50
62
|
2. [Why You Need It](#-why-you-need-it)
|
|
51
63
|
3. [Where to Run It in Your Network](#-where-to-run-it-in-your-network)
|
|
52
64
|
4. [Dashboard Preview](#-dashboard-preview)
|
|
53
65
|
5. [Quick Start](#-quick-start)
|
|
54
|
-
6. [
|
|
55
|
-
7. [
|
|
56
|
-
8. [
|
|
57
|
-
9. [
|
|
58
|
-
10. [
|
|
59
|
-
11. [
|
|
60
|
-
12. [
|
|
61
|
-
13. [
|
|
62
|
-
14. [
|
|
63
|
-
15. [
|
|
66
|
+
6. [Prerequisites](#-prerequisites)
|
|
67
|
+
7. [Installation](#-installation)
|
|
68
|
+
8. [How to Use (Step‑by‑Step)](#-how-to-use-stepbystep)
|
|
69
|
+
9. [Complete Command Reference](#-complete-command-reference)
|
|
70
|
+
10. [Core Capabilities](#-core-capabilities)
|
|
71
|
+
11. [Community Rules & Online Updates](#-community-rules--online-updates)
|
|
72
|
+
12. [Attack Simulation & What‑If Analysis](#-attack-simulation--what-if-analysis)
|
|
73
|
+
13. [Architecture](#-architecture)
|
|
74
|
+
14. [Roadmap](#-roadmap)
|
|
75
|
+
15. [Testing & CI](#-testing--ci)
|
|
76
|
+
16. [Security Policy](#-security-policy)
|
|
77
|
+
17. [Contributing](#-contributing)
|
|
78
|
+
18. [Code of Conduct](#-code-of-conduct)
|
|
79
|
+
19. [Author](#-author)
|
|
80
|
+
20. [License](#-license)
|
|
64
81
|
|
|
65
82
|
---
|
|
66
83
|
|
|
@@ -68,9 +85,9 @@ Dynamic: license-file
|
|
|
68
85
|
|
|
69
86
|
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.
|
|
70
87
|
|
|
71
|
-
**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.
|
|
88
|
+
**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 command‑center 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.
|
|
72
89
|
|
|
73
|
-
Think of it as a **security camera system for your entire CI/CD pipeline** — it watches everything, alerts you, and even
|
|
90
|
+
Think of it as a **security camera system for your entire CI/CD pipeline** — it watches everything, alerts you, suggests fixes, and even lets you simulate attack chains, all without needing internet access if you want.
|
|
74
91
|
|
|
75
92
|
---
|
|
76
93
|
|
|
@@ -79,13 +96,15 @@ Think of it as a **security camera system for your entire CI/CD pipeline** — i
|
|
|
79
96
|
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.**
|
|
80
97
|
|
|
81
98
|
Pipeline Sentinel gives you:
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
99
|
+
* **One screen for all scanners** – stop juggling log files.
|
|
100
|
+
* **AI that understands attack chains** – “A leaked secret + an old library = a disaster.”
|
|
101
|
+
* **Automatic fixes** – with a single flag, it patches files and opens a pull request (with **backup**).
|
|
102
|
+
* **Human review mode** – inspect each fix before applying.
|
|
103
|
+
* **Compliance reports** – generate a PDF for your boss or auditor.
|
|
104
|
+
* **Attack simulation** – tick a few findings and see a generated attack script.
|
|
105
|
+
* **100% offline capable** – works in air‑gapped environments where security matters most.
|
|
106
|
+
* **Interactive wizard** – one command to get everything running.
|
|
107
|
+
* **Community rules marketplace** – pull curated detection rules from the community.
|
|
89
108
|
|
|
90
109
|
---
|
|
91
110
|
|
|
@@ -110,15 +129,16 @@ Pipeline Sentinel is designed to be **flexible** — you decide where it fits be
|
|
|
110
129
|
[Gitleaks scan] ┘
|
|
111
130
|
```
|
|
112
131
|
|
|
113
|
-
> **📌 Diagram Placeholder:**
|
|
114
|
-
|
|
132
|
+
> **📌 Diagram Placeholder:** Add your network flow diagram here as `docs/network_flow.png`.
|
|
133
|
+
> ``
|
|
115
134
|
|
|
116
135
|
---
|
|
117
136
|
|
|
118
137
|
## 📸 Dashboard Preview
|
|
119
138
|
|
|
120
139
|

|
|
121
|
-
|
|
140
|
+
|
|
141
|
+
*Severity doughnut, trend line chart, attack‑path graph (clickable nodes), topology view, executive summary, and attack simulation panel — all fully offline.*
|
|
122
142
|
|
|
123
143
|
---
|
|
124
144
|
|
|
@@ -135,7 +155,7 @@ devsecops-radar --trivy sample_trivy.json --semgrep sample_semgrep.json
|
|
|
135
155
|
devsecops-radar-web
|
|
136
156
|
```
|
|
137
157
|
|
|
138
|
-
Open http://localhost:8080 — your unified
|
|
158
|
+
Open http://localhost:8080 — your unified command center is live with sample findings.
|
|
139
159
|
|
|
140
160
|
🧙 **Want a fully guided setup? Run the wizard:**
|
|
141
161
|
```bash
|
|
@@ -144,6 +164,26 @@ devsecops-radar --wizard
|
|
|
144
164
|
|
|
145
165
|
---
|
|
146
166
|
|
|
167
|
+
## 📋 Prerequisites
|
|
168
|
+
|
|
169
|
+
Pipeline Sentinel relies on external security tools to produce the JSON reports it consumes. You must install these tools separately according to your needs.
|
|
170
|
+
|
|
171
|
+
**Required for offline scanning:**
|
|
172
|
+
* Trivy (installation)
|
|
173
|
+
* Semgrep (installation)
|
|
174
|
+
* Poutine (installation)
|
|
175
|
+
* Zizmor (installation)
|
|
176
|
+
* Gitleaks (installation)
|
|
177
|
+
|
|
178
|
+
**Optional:**
|
|
179
|
+
* Ollama – for AI‑powered analysis (installation)
|
|
180
|
+
* Docker – for attack sandboxing and container scanning
|
|
181
|
+
* OPA – for advanced Rego policy evaluation
|
|
182
|
+
|
|
183
|
+
> 📖 **See `PREREQUISITES.md` for more details.**
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
147
187
|
## 📦 Installation
|
|
148
188
|
|
|
149
189
|
### Option 1 — PyPI (Recommended)
|
|
@@ -155,7 +195,7 @@ pip install devsecops-radar
|
|
|
155
195
|
```bash
|
|
156
196
|
git clone [https://github.com/Mehrdoost/devsecops-radar.git](https://github.com/Mehrdoost/devsecops-radar.git)
|
|
157
197
|
cd devsecops-radar
|
|
158
|
-
pip install -e .
|
|
198
|
+
pip install -e ".[dev]"
|
|
159
199
|
```
|
|
160
200
|
|
|
161
201
|
### Option 3 — Docker
|
|
@@ -199,19 +239,19 @@ gitleaks detect --source . --report-format json --report-path gitleaks.json
|
|
|
199
239
|
```bash
|
|
200
240
|
devsecops-radar --trivy trivy.json --semgrep semgrep.json --poutine poutine.json --zizmor zizmor.json --gitleaks gitleaks.json
|
|
201
241
|
```
|
|
202
|
-
This produces a single
|
|
242
|
+
*This produces a single findings.json with all findings merged and normalised.*
|
|
203
243
|
|
|
204
244
|
### 3. View the Dashboard
|
|
205
245
|
```bash
|
|
206
246
|
devsecops-radar-web
|
|
207
247
|
```
|
|
208
248
|
The dashboard shows:
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
249
|
+
* **Severity Breakdown** – Doughnut chart
|
|
250
|
+
* **Trend Over Time** – Line chart from scan history
|
|
251
|
+
* **Pipeline Security** – Poutine + Zizmor statistics card
|
|
252
|
+
* **Attack Path Graph** – Interactive D3.js graph (click nodes for details)
|
|
253
|
+
* **Executive Summary** – Risk score and AI‑generated summary
|
|
254
|
+
* **Findings Table** – Searchable, filterable, paginated, with checkboxes for simulation
|
|
215
255
|
|
|
216
256
|
### 4. Enable AI Analysis (Optional)
|
|
217
257
|
```bash
|
|
@@ -220,10 +260,10 @@ devsecops-radar --trivy trivy.json --analyze
|
|
|
220
260
|
devsecops-radar-web
|
|
221
261
|
```
|
|
222
262
|
The LLM generates `findings_ai_summary.json` containing:
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
*
|
|
263
|
+
* `executive_summary`, `risk_score`
|
|
264
|
+
* `attack_paths` with MITRE ATT&CK tactics
|
|
265
|
+
* `top_remediations` (some with `fix_diff`)
|
|
266
|
+
* `false_positives_likely`
|
|
227
267
|
|
|
228
268
|
### 5. Auto‑Remediation (with Human Review)
|
|
229
269
|
```bash
|
|
@@ -233,21 +273,22 @@ devsecops-radar --trivy trivy.json --analyze --fix
|
|
|
233
273
|
# Review each fix before applying
|
|
234
274
|
devsecops-radar --trivy trivy.json --analyze --fix --review
|
|
235
275
|
```
|
|
236
|
-
The tool creates a new git branch `auto-fix` and pushes it for review
|
|
276
|
+
*All modified files are backed up to `~/.devsecops-radar/backups/` before any change. The tool creates a new git branch `auto-fix` and pushes it for review.*
|
|
237
277
|
|
|
238
278
|
### 6. Policy Enforcement
|
|
239
279
|
Create a `policy.json` file:
|
|
240
280
|
```json
|
|
241
|
-
{
|
|
242
|
-
"max_critical": 5,
|
|
243
|
-
"on_violation": "fail"
|
|
244
|
-
}
|
|
281
|
+
{"max_critical": 5, "on_violation": "fail"}
|
|
245
282
|
```
|
|
246
|
-
|
|
247
283
|
```bash
|
|
248
284
|
devsecops-radar --trivy trivy.json --policy policy.json
|
|
249
285
|
```
|
|
250
|
-
If critical findings exceed 5, the command exits with code 1 — perfect for CI/CD gates
|
|
286
|
+
*If critical findings exceed 5, the command exits with code 1 — perfect for CI/CD gates.*
|
|
287
|
+
|
|
288
|
+
**You can also use OPA Rego policies:**
|
|
289
|
+
```bash
|
|
290
|
+
devsecops-radar --trivy trivy.json --rego-policy policy.rego
|
|
291
|
+
```
|
|
251
292
|
|
|
252
293
|
### 7. Generate Compliance Reports
|
|
253
294
|
```bash
|
|
@@ -256,7 +297,7 @@ devsecops-radar --trivy trivy.json --analyze --compliance CIS --report cis-repor
|
|
|
256
297
|
A PDF report is created with an executive summary, risk score, findings table, and compliance mapping. Sensitive data can be redacted automatically.
|
|
257
298
|
|
|
258
299
|
### 8. Security Badge for Your Project
|
|
259
|
-
After running a scan, you can embed a dynamic security badge in your
|
|
300
|
+
After running a scan, you can embed a dynamic security badge in your README:
|
|
260
301
|
```markdown
|
|
261
302
|
[](https://github.com/Mehrdoost/devsecops-radar)
|
|
262
303
|
```
|
|
@@ -277,10 +318,11 @@ The badge color changes based on the number of critical findings (green/yellow/r
|
|
|
277
318
|
| `--gitleaks` | Gitleaks JSON file or repo path | `--gitleaks results.json` or `--gitleaks ./repo` |
|
|
278
319
|
| `--rules` | Directory with custom JSON rule files | `--rules ~/my-security-rules/` |
|
|
279
320
|
| `--policy` | Policy JSON file for gating | `--policy policy.json` |
|
|
321
|
+
| `--rego-policy` | OPA Rego policy file | `--rego-policy policy.rego` |
|
|
280
322
|
| `--analyze` | Enable LLM analysis (Ollama required) | `--analyze` |
|
|
281
323
|
| `--llm-backend` | `ollama` (default) or `litellm` | `--llm-backend litellm` |
|
|
282
324
|
| `--llm-model` | Model name | `--llm-model gpt-4o-mini` |
|
|
283
|
-
| `--fix` | Auto‑apply AI‑suggested fixes | `--fix` |
|
|
325
|
+
| `--fix` | Auto‑apply AI‑suggested fixes (with backup) | `--fix` |
|
|
284
326
|
| `--review` | Review each AI fix before applying | `--review` |
|
|
285
327
|
| `--topology` | Path to topology JSON file | `--topology topology.json` |
|
|
286
328
|
| `--compliance` | Framework: `CIS`, `PCI-DSS`, `ISO27001` | `--compliance CIS` |
|
|
@@ -291,11 +333,37 @@ The badge color changes based on the number of critical findings (green/yellow/r
|
|
|
291
333
|
### `devsecops-radar-web` — Web Server
|
|
292
334
|
|
|
293
335
|
```bash
|
|
294
|
-
devsecops-radar-web
|
|
295
|
-
FINDINGS_FILE=my.json devsecops-radar-web
|
|
336
|
+
devsecops-radar-web # Launch on http://localhost:8080
|
|
337
|
+
FINDINGS_FILE=my.json devsecops-radar-web # Use a custom findings file
|
|
296
338
|
PIPELINE_API_KEY=secret devsecops-radar-web # Enable API authentication
|
|
297
339
|
```
|
|
298
340
|
|
|
341
|
+
### Usage Examples
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
# Merge multiple scanner outputs
|
|
345
|
+
devsecops-radar --trivy trivy_scan.json --semgrep semgrep_scan.json
|
|
346
|
+
|
|
347
|
+
# Scan directly (if tools are installed)
|
|
348
|
+
devsecops-radar --trivy nginx:latest --semgrep ./src --poutine ./repo
|
|
349
|
+
|
|
350
|
+
# Merge built‑in scanners with custom rules
|
|
351
|
+
devsecops-radar --trivy trivy_scan.json --rules ~/my-security-rules/
|
|
352
|
+
|
|
353
|
+
# Enable AI analysis (Ollama must be running)
|
|
354
|
+
ollama pull llama3.2:latest
|
|
355
|
+
devsecops-radar --trivy trivy_scan.json --semgrep semgrep_scan.json --analyze
|
|
356
|
+
|
|
357
|
+
# Use OpenAI via LiteLLM
|
|
358
|
+
export OPENAI_API_KEY=sk-...
|
|
359
|
+
devsecops-radar --trivy trivy_scan.json --analyze --llm-backend litellm --llm-model gpt-4o-mini
|
|
360
|
+
|
|
361
|
+
# Build scan history and view trends
|
|
362
|
+
devsecops-radar --trivy sample_trivy.json --semgrep sample_semgrep.json
|
|
363
|
+
devsecops-radar --trivy sample_trivy.json --poutine sample_poutine.json
|
|
364
|
+
devsecops-radar-web # Trend chart now shows multiple data points
|
|
365
|
+
```
|
|
366
|
+
|
|
299
367
|
---
|
|
300
368
|
|
|
301
369
|
## ✨ Core Capabilities
|
|
@@ -312,66 +380,97 @@ Built‑in support for five scanners with a real plugin system. Third‑party sc
|
|
|
312
380
|
| **Gitleaks**| Secrets detection | `--gitleaks` |
|
|
313
381
|
|
|
314
382
|
### 🧩 Hybrid RuleFusion Engine
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
383
|
+
* **Offline** – Load custom JSON rules from any local directory (`--rules ~/my-rules/`)
|
|
384
|
+
* **Online** – Pull community‑curated rules from a configurable Git repository (`--update-rules`)
|
|
385
|
+
* Auto‑detects Trivy, Semgrep, Poutine, Zizmor, and plain‑list formats
|
|
386
|
+
* Policy evaluation built directly into the engine (JSON and OPA Rego)
|
|
387
|
+
* Community rules repo: `devsecops-radar-rules` (configurable via `COMMUNITY_RULES_REPO`)
|
|
320
388
|
|
|
321
389
|
### 🧠 LLM‑Powered Analysis
|
|
322
|
-
*
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
*
|
|
390
|
+
* Retry logic with exponential backoff for unstable endpoints
|
|
391
|
+
* Few‑shot examples covering real‑world supply chain attack chains
|
|
392
|
+
* Token‑aware selection (max items configurable via `ANALYZER_MAX_FINDINGS`)
|
|
393
|
+
* Structured JSON output: `executive_summary`, `risk_score`, `attack_paths` (MITRE ATT&CK), `top_remediations`, `false_positives_likely`
|
|
394
|
+
* Ollama (local, offline) and LiteLLM (OpenAI, Anthropic, etc.) support
|
|
327
395
|
|
|
328
396
|
### 🕸️ Multi‑Step Attack Path Visualization
|
|
329
|
-
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.
|
|
397
|
+
Interactive D3.js force graph that chains findings into realistic attack scenarios. Click any node to see detailed finding information or to trigger a simulation. Accepts a topology file to map findings onto your actual infrastructure, showing lateral movement across servers and subnets.
|
|
330
398
|
|
|
331
|
-
### 🛡️ Policy‑as‑Code
|
|
332
|
-
Define security gates
|
|
333
|
-
```json
|
|
334
|
-
{
|
|
335
|
-
"max_critical": 5,
|
|
336
|
-
"on_violation": "fail"
|
|
337
|
-
}
|
|
338
|
-
```
|
|
339
|
-
*If critical findings exceed the threshold, the CLI exits with code 1 — perfect for failing CI/CD pipelines.*
|
|
399
|
+
### 🛡️ Policy‑as‑Code (JSON & Rego)
|
|
400
|
+
Define simple security gates with a JSON file, or write complex rules in Rego for OPA. Fail the pipeline when policies are violated.
|
|
340
401
|
|
|
341
|
-
### 🛠️ Auto‑Remediation with Human‑in‑the‑Loop
|
|
342
|
-
AI‑suggested fixes
|
|
402
|
+
### 🛠️ Auto‑Remediation with Backup & Human‑in‑the‑Loop
|
|
403
|
+
AI‑suggested fixes are applied automatically (`--fix`) or reviewed one‑by‑one (`--review`). Every modified file is backed up to `~/.devsecops-radar/backups/` before any change. A new git branch is pushed for review.
|
|
343
404
|
|
|
344
405
|
### 📊 Compliance & Executive Reports (with Redaction)
|
|
345
406
|
Generate professional PDF reports (`--report report.pdf`) with:
|
|
346
|
-
*
|
|
347
|
-
*
|
|
348
|
-
*
|
|
349
|
-
*
|
|
407
|
+
* Executive summary and risk score
|
|
408
|
+
* Findings table (first 50 items)
|
|
409
|
+
* Compliance mapping (CIS, PCI‑DSS, ISO 27001)
|
|
410
|
+
* Automatic redaction of passwords, tokens, JWTs
|
|
350
411
|
|
|
351
412
|
### 📈 Scan History & Trends (with Pagination)
|
|
352
413
|
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.
|
|
353
414
|
|
|
354
415
|
### 🧪 SBOM & Dependency Confusion Detection
|
|
355
|
-
*
|
|
356
|
-
*
|
|
416
|
+
* Generate a CycloneDX SBOM from your project using `syft`
|
|
417
|
+
* Apply VEX (Vulnerability Exploitability eXchange) files to filter false positives
|
|
418
|
+
* Detect dependency confusion risks in `package.json` and `requirements.txt` — internal packages that could be impersonated by public registries
|
|
357
419
|
|
|
358
420
|
### 🔍 RAG‑Powered Security Search
|
|
359
421
|
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.
|
|
360
422
|
|
|
361
|
-
### ⚔️ Attack Simulation (Sandbox)
|
|
362
|
-
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.
|
|
363
|
-
|
|
364
423
|
### 📉 Dynamic Risk Scoring
|
|
365
|
-
Beyond CVSS, each finding gets a dynamic risk score based on
|
|
424
|
+
Beyond CVSS, each finding gets a dynamic risk score based on:
|
|
425
|
+
* Asset exposure (from topology)
|
|
426
|
+
* Exploit availability
|
|
427
|
+
* Active threat intelligence feeds
|
|
366
428
|
|
|
367
429
|
### 🧙 Interactive Wizard
|
|
368
430
|
A `--wizard` flag walks new users through installing dependencies, pulling AI models, and running their first scan — all in one go.
|
|
369
431
|
|
|
370
432
|
### 🔒 Privacy & Offline‑First
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
433
|
+
* All assets (CSS, JS) are embedded — zero CDN calls
|
|
434
|
+
* LLM analysis runs locally with Ollama; no data leaves your network
|
|
435
|
+
* Optional API key authentication for the dashboard (JWT supported)
|
|
436
|
+
* Docker image runs as non‑root user
|
|
437
|
+
|
|
438
|
+
---
|
|
439
|
+
|
|
440
|
+
## 🌍 Community Rules & Online Updates
|
|
441
|
+
|
|
442
|
+
Pipeline Sentinel features a community‑driven rule marketplace housed in a separate repository: `devsecops-radar-rules`.
|
|
443
|
+
|
|
444
|
+
### How It Works
|
|
445
|
+
The repository contains curated JSON rule files for all supported scanners (Trivy, Semgrep, Poutine, Zizmor, Gitleaks) and generic compliance checks. Anyone can contribute by submitting a Pull Request with new or improved rules. Users can pull the latest rules with a single command:
|
|
446
|
+
|
|
447
|
+
```bash
|
|
448
|
+
devsecops-radar --update-rules
|
|
449
|
+
```
|
|
450
|
+
Rules are stored locally in `~/.devsecops-radar/community-rules/`. To use them alongside your scanner results:
|
|
451
|
+
```bash
|
|
452
|
+
devsecops-radar --trivy scan.json --rules ~/.devsecops-radar/community-rules/
|
|
453
|
+
```
|
|
454
|
+
You can even point to your own fork or a private repository by setting the `COMMUNITY_RULES_REPO` environment variable. This turns Pipeline Sentinel into a living, community‑improved security platform — just like Nuclei Templates or Semgrep Registry.
|
|
455
|
+
|
|
456
|
+
### Contributing a Rule
|
|
457
|
+
1. Fork the `devsecops-radar-rules` repository.
|
|
458
|
+
2. Add a new JSON file to the `rules/` directory (or modify an existing one). Follow the standard Pipeline Sentinel finding format (see the repo’s README).
|
|
459
|
+
3. Open a Pull Request — our maintainers will review and merge.
|
|
460
|
+
|
|
461
|
+
---
|
|
462
|
+
|
|
463
|
+
## ⚔️ Attack Simulation & What‑If Analysis
|
|
464
|
+
|
|
465
|
+
**New in v0.4.0:** Interactive attack simulation directly from the dashboard.
|
|
466
|
+
1. Tick the checkboxes next to the findings you want to investigate.
|
|
467
|
+
2. Click **“⚡ Simulate Selected”**.
|
|
468
|
+
3. A modal will display a generated attack script (`bash`), a description of the attack chain, and — if Docker is available — the output of running the script in a sandbox container.
|
|
469
|
+
|
|
470
|
+
You can also click any node in the Attack Path Graph and press **“Simulate this attack”** for the same functionality. This feature helps security teams:
|
|
471
|
+
* Understand how multiple vulnerabilities can be chained.
|
|
472
|
+
* Generate proof‑of‑concept scripts for stakeholders.
|
|
473
|
+
* Test mitigations without risking production systems.
|
|
375
474
|
|
|
376
475
|
---
|
|
377
476
|
|
|
@@ -391,8 +490,8 @@ devsecops_radar/
|
|
|
391
490
|
└── sentry/ # Live webhook agent for CI/CD
|
|
392
491
|
```
|
|
393
492
|
|
|
394
|
-
> **📌 Diagram Placeholder:**
|
|
395
|
-
|
|
493
|
+
> **📌 Diagram Placeholder:** Add your architecture diagram here as `docs/architecture.png`.
|
|
494
|
+
> ``
|
|
396
495
|
|
|
397
496
|
---
|
|
398
497
|
|
|
@@ -407,7 +506,7 @@ devsecops_radar/
|
|
|
407
506
|
| ✅ **Phase 1** | Docker image (multi‑stage, non‑root) | Done |
|
|
408
507
|
| ✅ **Phase 2** | Attack‑path visualization with MITRE ATT&CK & topology | Done |
|
|
409
508
|
| ✅ **Phase 2** | Policy‑as‑Code engine (`--policy`) | Done |
|
|
410
|
-
| ✅ **Phase 2** | Auto‑remediation engine (`--fix`) | Done |
|
|
509
|
+
| ✅ **Phase 2** | Auto‑remediation engine (`--fix`) with backup | Done |
|
|
411
510
|
| ✅ **Phase 2** | Compliance reports (PDF) with redaction | Done |
|
|
412
511
|
| ✅ **Phase 2** | Hybrid RuleFusion engine (local + community rules) | Done |
|
|
413
512
|
| ✅ **Phase 3** | Web dashboard Blueprint refactor (modular Flask) | Done |
|
|
@@ -415,51 +514,66 @@ devsecops_radar/
|
|
|
415
514
|
| ✅ **Phase 3** | SQLAlchemy ORM with pagination | Done |
|
|
416
515
|
| ✅ **Phase 3** | SBOM & Dependency Confusion Detection | Done |
|
|
417
516
|
| ✅ **Phase 3** | RAG‑powered security search | Done |
|
|
418
|
-
| ✅ **Phase 3** | Attack Simulation (sandbox) | Done |
|
|
419
517
|
| ✅ **Phase 3** | Dynamic Risk Scoring | Done |
|
|
420
518
|
| ✅ **Phase 3** | Interactive wizard (`--wizard`) | Done |
|
|
421
519
|
| ✅ **Phase 3** | Human review mode (`--review`) | Done |
|
|
422
520
|
| ✅ **Phase 3** | Gitleaks secret scanner | Done |
|
|
423
521
|
| ✅ **Phase 3** | Security badge endpoint | Done |
|
|
424
|
-
|
|
|
425
|
-
|
|
|
426
|
-
|
|
|
427
|
-
| 🔲 **Phase
|
|
522
|
+
| ✅ **Phase 3** | Full test suite & CI pipeline | Done |
|
|
523
|
+
| ✅ **Phase 4** | Advanced attack simulation (What‑If) | Done |
|
|
524
|
+
| ✅ **Phase 4** | VEX filtering & OPA Rego policies | Done |
|
|
525
|
+
| 🔲 **Phase 5** | Jira / Slack integration | Planned |
|
|
526
|
+
| 🔲 **Phase 5** | SARIF & CycloneDX support | Planned |
|
|
527
|
+
| 🔲 **Phase 5** | Pull Request assistant (GitHub App) | Planned |
|
|
528
|
+
| 🔲 **Phase 5** | eBPF runtime security agent | Planned |
|
|
428
529
|
|
|
429
530
|
> See the [open issues](https://github.com/Mehrdoost/devsecops-radar/issues) for a full list of proposed features.
|
|
430
531
|
|
|
431
532
|
---
|
|
432
533
|
|
|
433
|
-
##
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
534
|
+
## 🧪 Testing & CI
|
|
535
|
+
|
|
536
|
+
Pipeline Sentinel is thoroughly tested to ensure reliability for production use.
|
|
537
|
+
* **Unit & Integration Tests:** 23+ tests covering scanners, rule engine, database, analyzer, API, and CLI.
|
|
538
|
+
* **CI Pipeline:** Every push and pull request triggers automated testing (`pytest` with coverage) and linting (`ruff`, `mypy`) via GitHub Actions.
|
|
539
|
+
* **Code Coverage:** We track coverage with Codecov (see badge above).
|
|
540
|
+
|
|
541
|
+
You can run the tests locally:
|
|
542
|
+
```bash
|
|
543
|
+
pip install -e ".[dev]"
|
|
544
|
+
pip install pytest pytest-flask ruff
|
|
545
|
+
pytest tests/ -v --cov=devsecops_radar --cov-report=term-missing
|
|
546
|
+
ruff check .
|
|
547
|
+
mypy .
|
|
444
548
|
```
|
|
445
|
-
|
|
549
|
+
|
|
550
|
+
---
|
|
551
|
+
|
|
552
|
+
## 🔒 Security Policy
|
|
553
|
+
|
|
554
|
+
We take security seriously. If you discover a vulnerability, please report it privately. See our full Security Policy for details on reporting, supported versions, and disclosure procedures.
|
|
446
555
|
|
|
447
556
|
---
|
|
448
557
|
|
|
449
558
|
## 🤝 Contributing
|
|
450
559
|
|
|
451
|
-
|
|
452
|
-
If you would like to integrate a new scanner, open an issue with a sample of its JSON output.
|
|
453
|
-
For permanent scanner plugins, extend the `ScannerPlugin` class and register it via entry points.
|
|
560
|
+
We welcome contributions of all kinds! Please read our Contributing Guide for detailed guidelines on how to set up the project, add new scanners, or submit rule changes. For contributing community rules, see the Community Rules section above. We also have Issue Templates and a Pull Request Template to make the process smooth for everyone.
|
|
454
561
|
|
|
455
562
|
---
|
|
456
563
|
|
|
457
|
-
##
|
|
564
|
+
## 💬 Code of Conduct
|
|
565
|
+
|
|
566
|
+
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the maintainers.
|
|
458
567
|
|
|
459
|
-
|
|
568
|
+
---
|
|
460
569
|
|
|
461
|
-
|
|
570
|
+
## 👨💻 Author
|
|
462
571
|
|
|
572
|
+
**ReverseForge** — ( Mehrdoost And Mi0r4 )
|
|
573
|
+
|
|
574
|
+
[](https://github.com/ReverseForge)
|
|
575
|
+
[](https://github.com/Mehrdoost)
|
|
576
|
+
[](https://github.com/miora-sora)
|
|
463
577
|
|
|
464
578
|
---
|
|
465
579
|
|
|
@@ -470,3 +584,5 @@ MIT — see [LICENSE](LICENSE).
|
|
|
470
584
|
<div align="center">
|
|
471
585
|
⭐ If this project helps your team ship safer software, drop a star — it makes a real difference.
|
|
472
586
|
</div>
|
|
587
|
+
|
|
588
|
+
```
|