devsecops-radar 0.4.0__tar.gz → 0.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. devsecops_radar-0.4.2/PKG-INFO +614 -0
  2. devsecops_radar-0.4.2/README.md +569 -0
  3. devsecops_radar-0.4.2/devsecops_radar/cli/scanner.py +398 -0
  4. devsecops_radar-0.4.2/devsecops_radar/core/analyzer.py +235 -0
  5. devsecops_radar-0.4.2/devsecops_radar/core/attack_simulation.py +159 -0
  6. devsecops_radar-0.4.2/devsecops_radar/core/auth.py +85 -0
  7. devsecops_radar-0.4.2/devsecops_radar/core/database.py +183 -0
  8. devsecops_radar-0.4.2/devsecops_radar/core/models.py +135 -0
  9. devsecops_radar-0.4.2/devsecops_radar/core/notifier.py +158 -0
  10. devsecops_radar-0.4.2/devsecops_radar/core/rag.py +65 -0
  11. devsecops_radar-0.4.2/devsecops_radar/core/remediation.py +192 -0
  12. devsecops_radar-0.4.2/devsecops_radar/core/reporting.py +175 -0
  13. devsecops_radar-0.4.2/devsecops_radar/core/rule_fusion.py +179 -0
  14. devsecops_radar-0.4.2/devsecops_radar/core/sarif_export.py +145 -0
  15. devsecops_radar-0.4.2/devsecops_radar/core/sbom.py +152 -0
  16. devsecops_radar-0.4.2/devsecops_radar/core/settings.py +69 -0
  17. devsecops_radar-0.4.2/devsecops_radar/core/valuation.py +111 -0
  18. devsecops_radar-0.4.2/devsecops_radar/scanners/adapter.py +84 -0
  19. devsecops_radar-0.4.2/devsecops_radar/scanners/base.py +100 -0
  20. devsecops_radar-0.4.2/devsecops_radar/scanners/gitleaks.py +85 -0
  21. devsecops_radar-0.4.2/devsecops_radar/scanners/poutine.py +80 -0
  22. devsecops_radar-0.4.2/devsecops_radar/scanners/semgrep.py +92 -0
  23. devsecops_radar-0.4.2/devsecops_radar/scanners/trivy.py +119 -0
  24. devsecops_radar-0.4.2/devsecops_radar/scanners/zizmor.py +82 -0
  25. devsecops_radar-0.4.2/devsecops_radar/web/app.py +226 -0
  26. devsecops_radar-0.4.2/devsecops_radar/web/attack_paths/routes.py +59 -0
  27. devsecops_radar-0.4.2/devsecops_radar/web/dashboard/routes.py +2138 -0
  28. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar/web/sentry/routes.py +2 -2
  29. devsecops_radar-0.4.2/devsecops_radar/web/static/js/d3.v7.min.js +2 -0
  30. devsecops_radar-0.4.2/devsecops_radar/web/static/js/echarts.min.js +45 -0
  31. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar/web/summary/routes.py +1 -1
  32. devsecops_radar-0.4.2/devsecops_radar/web/topology/__init__.py +0 -0
  33. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar/web/topology/routes.py +1 -1
  34. devsecops_radar-0.4.2/devsecops_radar.egg-info/PKG-INFO +614 -0
  35. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar.egg-info/SOURCES.txt +24 -4
  36. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar.egg-info/requires.txt +11 -0
  37. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/pyproject.toml +14 -2
  38. devsecops_radar-0.4.2/tests/test_adapter.py +170 -0
  39. devsecops_radar-0.4.2/tests/test_analyzer.py +391 -0
  40. devsecops_radar-0.4.2/tests/test_app.py +169 -0
  41. devsecops_radar-0.4.2/tests/test_attack_simulation.py +237 -0
  42. devsecops_radar-0.4.2/tests/test_auth.py +173 -0
  43. devsecops_radar-0.4.2/tests/test_base.py +140 -0
  44. devsecops_radar-0.4.2/tests/test_dashboard.py +211 -0
  45. devsecops_radar-0.4.2/tests/test_database.py +260 -0
  46. devsecops_radar-0.4.2/tests/test_models.py +181 -0
  47. devsecops_radar-0.4.2/tests/test_notifier.py +249 -0
  48. devsecops_radar-0.4.2/tests/test_rag.py +137 -0
  49. devsecops_radar-0.4.2/tests/test_remediation.py +398 -0
  50. devsecops_radar-0.4.2/tests/test_reporting.py +237 -0
  51. devsecops_radar-0.4.2/tests/test_rule_fusion.py +438 -0
  52. devsecops_radar-0.4.2/tests/test_sarif_export.py +238 -0
  53. devsecops_radar-0.4.2/tests/test_sbom.py +278 -0
  54. devsecops_radar-0.4.2/tests/test_scanner.py +412 -0
  55. devsecops_radar-0.4.2/tests/test_scanners.py +434 -0
  56. devsecops_radar-0.4.2/tests/test_sentry.py +41 -0
  57. devsecops_radar-0.4.2/tests/test_settings.py +137 -0
  58. devsecops_radar-0.4.2/tests/test_topology.py +44 -0
  59. devsecops_radar-0.4.2/tests/test_valuation.py +171 -0
  60. devsecops_radar-0.4.0/PKG-INFO +0 -583
  61. devsecops_radar-0.4.0/README.md +0 -549
  62. devsecops_radar-0.4.0/devsecops_radar/cli/scanner.py +0 -215
  63. devsecops_radar-0.4.0/devsecops_radar/core/analyzer.py +0 -183
  64. devsecops_radar-0.4.0/devsecops_radar/core/attack_simulation.py +0 -23
  65. devsecops_radar-0.4.0/devsecops_radar/core/auth.py +0 -32
  66. devsecops_radar-0.4.0/devsecops_radar/core/database.py +0 -104
  67. devsecops_radar-0.4.0/devsecops_radar/core/models.py +0 -73
  68. devsecops_radar-0.4.0/devsecops_radar/core/parser.py +0 -60
  69. devsecops_radar-0.4.0/devsecops_radar/core/rag.py +0 -23
  70. devsecops_radar-0.4.0/devsecops_radar/core/remediation.py +0 -81
  71. devsecops_radar-0.4.0/devsecops_radar/core/reporting.py +0 -80
  72. devsecops_radar-0.4.0/devsecops_radar/core/rule_fusion.py +0 -281
  73. devsecops_radar-0.4.0/devsecops_radar/core/sbom.py +0 -49
  74. devsecops_radar-0.4.0/devsecops_radar/core/settings.py +0 -20
  75. devsecops_radar-0.4.0/devsecops_radar/core/valuation.py +0 -35
  76. devsecops_radar-0.4.0/devsecops_radar/scanners/adapter.py +0 -16
  77. devsecops_radar-0.4.0/devsecops_radar/scanners/base.py +0 -12
  78. devsecops_radar-0.4.0/devsecops_radar/scanners/gitleaks.py +0 -49
  79. devsecops_radar-0.4.0/devsecops_radar/scanners/poutine.py +0 -49
  80. devsecops_radar-0.4.0/devsecops_radar/scanners/semgrep.py +0 -49
  81. devsecops_radar-0.4.0/devsecops_radar/scanners/trivy.py +0 -53
  82. devsecops_radar-0.4.0/devsecops_radar/scanners/zizmor.py +0 -49
  83. devsecops_radar-0.4.0/devsecops_radar/web/app.py +0 -35
  84. devsecops_radar-0.4.0/devsecops_radar/web/attack_paths/routes.py +0 -43
  85. devsecops_radar-0.4.0/devsecops_radar/web/dashboard/routes.py +0 -664
  86. devsecops_radar-0.4.0/devsecops_radar.egg-info/PKG-INFO +0 -583
  87. devsecops_radar-0.4.0/tests/test_analyzer.py +0 -53
  88. devsecops_radar-0.4.0/tests/test_api.py +0 -39
  89. devsecops_radar-0.4.0/tests/test_cli.py +0 -33
  90. devsecops_radar-0.4.0/tests/test_database.py +0 -41
  91. devsecops_radar-0.4.0/tests/test_rule_fusion.py +0 -32
  92. devsecops_radar-0.4.0/tests/test_scanners.py +0 -123
  93. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/LICENSE +0 -0
  94. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar/__init__.py +0 -0
  95. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar/cli/__init__.py +0 -0
  96. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar/core/__init__.py +0 -0
  97. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar/plugins/__init__.py +0 -0
  98. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar/web/__init__.py +0 -0
  99. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar/web/attack_paths/__init__.py +0 -0
  100. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar/web/dashboard/__init__.py +0 -0
  101. {devsecops_radar-0.4.0/devsecops_radar/web/summary → devsecops_radar-0.4.2/devsecops_radar/web/sentry}/__init__.py +0 -0
  102. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar/web/static/css/bootstrap.min.css +0 -0
  103. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar/web/static/css/style.css +0 -0
  104. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar/web/static/js/bootstrap.bundle.min.js +0 -0
  105. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar/web/static/js/chart.umd.min.js +0 -0
  106. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar/web/static/js/dashboard.js +0 -0
  107. {devsecops_radar-0.4.0/devsecops_radar/web/topology → devsecops_radar-0.4.2/devsecops_radar/web/summary}/__init__.py +0 -0
  108. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar/web/templates/index.html +0 -0
  109. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar.egg-info/dependency_links.txt +0 -0
  110. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar.egg-info/entry_points.txt +0 -0
  111. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/devsecops_radar.egg-info/top_level.txt +0 -0
  112. {devsecops_radar-0.4.0 → devsecops_radar-0.4.2}/setup.cfg +0 -0
@@ -0,0 +1,614 @@
1
+ Metadata-Version: 2.4
2
+ Name: devsecops-radar
3
+ Version: 0.4.2
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: flask-cors>=4.0
18
+ Requires-Dist: waitress>=3.0
19
+ Requires-Dist: psutil>=5.9
20
+ Requires-Dist: semgrep>=1.0
21
+ Requires-Dist: tenacity>=8.0
22
+ Requires-Dist: pyyaml>=6.0
23
+ Requires-Dist: requests>=2.31
24
+ Requires-Dist: rich>=13.0
25
+ Requires-Dist: loguru>=0.7
26
+ Requires-Dist: reportlab>=4.0
27
+ Requires-Dist: litellm>=1.50
28
+ Requires-Dist: sqlalchemy>=2.0
29
+ Requires-Dist: pydantic>=2.0
30
+ Requires-Dist: pyjwt>=2.8
31
+ Requires-Dist: httpx>=0.27
32
+ Requires-Dist: werkzeug>=3.0
33
+ Requires-Dist: python-dotenv>=1.0
34
+ Provides-Extra: dev
35
+ Requires-Dist: pytest>=8.0; extra == "dev"
36
+ Requires-Dist: pytest-flask>=1.3; extra == "dev"
37
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
38
+ Requires-Dist: ruff>=0.3.0; extra == "dev"
39
+ Requires-Dist: mypy>=1.9; extra == "dev"
40
+ Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
41
+ Requires-Dist: pytest-mock>=3.10; extra == "dev"
42
+ Requires-Dist: httpx>=0.24.0; extra == "dev"
43
+ Requires-Dist: pre-commit>=3.5; extra == "dev"
44
+ Dynamic: license-file
45
+
46
+ <div align="center">
47
+
48
+ # 🛡️ Pipeline Sentinel
49
+
50
+ ### *The Open‑Source DevSecOps Command Center — Unify, Analyse, Remediate.*
51
+
52
+ [![PyPI version](https://img.shields.io/pypi/v/devsecops-radar?style=for-the-badge&color=2196F3)](https://pypi.org/project/devsecops-radar/)
53
+ [![License](https://img.shields.io/github/license/Mehrdoost/devsecops-radar?style=for-the-badge&color=4CAF50)](LICENSE)
54
+ [![GitHub release](https://img.shields.io/github/v/release/Mehrdoost/devsecops-radar?include_prereleases&style=for-the-badge&color=FF9800)](https://github.com/Mehrdoost/devsecops-radar/releases)
55
+ [![CI](https://img.shields.io/github/actions/workflow/status/Mehrdoost/devsecops-radar/ci.yml?branch=main&style=for-the-badge&color=9C27B0)](https://github.com/Mehrdoost/devsecops-radar/actions)
56
+ [![codecov](https://codecov.io/gh/Mehrdoost/devsecops-radar/branch/main/graph/badge.svg?token=TOKEN&style=for-the-badge)](https://codecov.io/gh/Mehrdoost/devsecops-radar)
57
+ [![Stars](https://img.shields.io/github/stars/Mehrdoost/devsecops-radar?style=for-the-badge&color=FFEB3B)](https://github.com/Mehrdoost/devsecops-radar/stargazers)
58
+
59
+ <br>
60
+
61
+ > 📖 **Read this in:** [Русский](README_ru.md) | [中文](README_zh.md) | [العربية](README_ar.md)
62
+
63
+ <br>
64
+
65
+ *Severity doughnut, trend line chart, attack‑path graph (clickable nodes), topology view, executive summary, and attack simulation panel — all fully offline.*
66
+
67
+ ![Pipeline Sentinel Dashboard](docs/Demo.gif)
68
+
69
+ </div>
70
+
71
+ ---
72
+
73
+ <details>
74
+ <summary><b>📑 Table of Contents (Click to expand)</b></summary>
75
+
76
+ 1. [What Is Pipeline Sentinel? (Simple Explanation)](#-what-is-pipeline-sentinel-simple-explanation)
77
+ 2. [Why You Need It](#-why-you-need-it)
78
+ 3. [Where to Run It in Your Network](#-where-to-run-it-in-your-network)
79
+ 4. [Network Flow & Topology](#-network-flow--topology)
80
+ 5. [Dashboard Preview](#-dashboard-preview)
81
+ 6. [Quick Start](#-quick-start)
82
+ 7. [Prerequisites](#-prerequisites)
83
+ 8. [Installation](#-installation)
84
+ 9. [How to Use (Step‑by‑Step)](#-how-to-use-stepbystep)
85
+ 10. [Complete Command Reference](#-complete-command-reference)
86
+ 11. [Core Capabilities](#-core-capabilities)
87
+ 12. [Community Rules & Online Updates](#-community-rules--online-updates)
88
+ 13. [Attack Simulation & What‑If Analysis](#-attack-simulation--what‑if-analysis)
89
+ 14. [Security Improvements in v0.4.2](#-security-improvements-in-v042)
90
+ 15. [Architecture](#-architecture)
91
+ 16. [Roadmap](#-roadmap)
92
+ 17. [Testing & CI](#-testing--ci)
93
+ 18. [Security Policy](#-security-policy)
94
+ 19. [Contributing](#-contributing)
95
+ 20. [Code of Conduct](#-code-of-conduct)
96
+ 21. [Support Development](#-support-development)
97
+ 22. [Author](#-author)
98
+ 23. [License](#-license)
99
+
100
+ </details>
101
+
102
+ ---
103
+
104
+ ## 👨‍👩‍👧 What Is Pipeline Sentinel? (Simple Explanation)
105
+
106
+ > **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.
107
+
108
+ **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).
109
+
110
+ 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.
111
+
112
+ *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.*
113
+
114
+ ---
115
+
116
+ ## 💥 Why You Need It
117
+
118
+ 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.**
119
+
120
+ **Pipeline Sentinel gives you:**
121
+ * 🎯 **Unified Aggregation:** One screen for all scanners – stop juggling log files.
122
+ * 🧠 **Graph AI Insights:** AI that understands attack chains – *"A leaked secret + an old library = a disaster."*
123
+ * ⚡ **Auto-Remediation:** Automatically patches files and opens a pull request (with automated backups) with a single flag.
124
+ * 👥 **Human Review Mode:** Step-by-step interactive interface to inspect each fix before applying it to production.
125
+ * 📊 **Compliance-Ready Reports:** Instantly generate beautiful, executive-ready PDF summaries for auditors or stakeholders.
126
+ * ⚔️ **Attack Simulation:** Select security findings and automatically generate operational proof-of-concept scripts.
127
+ * 🔒 **Air-Gapped Privacy:** 100% offline capable. Perfect for highly restricted environments where data residency is paramount.
128
+ * 🧙 **Interactive Wizard:** A single command leads you through the entire initialization and onboarding process.
129
+ * 🛒 **Rules Marketplace:** Dynamically fetch and update curated detection definitions directly from the community.
130
+
131
+ ---
132
+
133
+ ## 📍 Where to Run It in Your Network
134
+
135
+ Pipeline Sentinel is designed to adapt to your setup. You decide where it fits best:
136
+
137
+ | Deployment Mode | Operational Profile & Context |
138
+ | :--- | :--- |
139
+ | 🖥️ **Local Dev Machine** | Run the CLI and dashboard right on your laptop. Perfect for individual pentesters or developers who want instant, localized feedback. |
140
+ | 🔧 **CI/CD Runner Pipeline** | Integrate directly into Jenkins/GitLab CI or GitHub Actions. Fail builds automatically if critical vulnerabilities exceed your security policy rules. |
141
+ | 🏢 **Central Security Operations** | Deploy via Docker on a central server to collect scan history across multiple teams, unifying visibility into a shared security console. |
142
+ | 🌐 **Air‑Gapped Environments** | Air-gap friendly. Deploy the standalone Docker bundle to isolated networks with zero external asset dependencies or tracker requests. |
143
+
144
+ ---
145
+
146
+ ## 🔍 Network Flow & Topology
147
+
148
+ ### 🔄 Logical Data Lifecycle
149
+ The functional flow below maps exactly how raw multi-scanner inputs route through our parsing engine to be normalized and centralized:
150
+
151
+ ```mermaid
152
+ graph LR
153
+ subgraph Scanners [Multi-Scanner Core Inputs]
154
+ T[Trivy Scan]
155
+ S[Semgrep Scan]
156
+ P[Poutine Scan]
157
+ Z[Zizmor Scan]
158
+ G[Gitleaks Scan]
159
+ end
160
+
161
+ Scanners --->|Raw Reports| CLI(🛡️ devsecops-radar CLI Engine)
162
+ CLI --->|Normalize & Deduplicate| Out[findings.json]
163
+ Out ---> Web(📊 Flask Dashboard App)
164
+ Web ---> UI[🌐 Modern Browser Command Center]
165
+
166
+ style CLI fill:#1e1e2e,stroke:#3b82f6,stroke-width:2px,color:#cdd6f4
167
+ style Web fill:#1e1e2e,stroke:#10b981,stroke-width:2px,color:#cdd6f4
168
+ style Out fill:#181825,stroke:#fab387,stroke-width:1px,color:#a6e3a1
169
+ style UI fill:#11111b,stroke:#a6e3a1,stroke-width:2px,color:#cdd6f4
170
+ ```
171
+
172
+ ### 🌐 Operational Infrastructure Mapping
173
+ Once processed, the centralized findings are rendered inside your topology mapping network boundaries, visualising the operational relationship between distinct pipeline segments:
174
+
175
+ ![Network Flow Diagram](docs/architecture-1.png)
176
+
177
+ ---
178
+
179
+ ## 📸 Dashboard Preview
180
+
181
+ *(See the animated demo at the top of this README for a live preview of the UI in action!)*
182
+
183
+ ---
184
+
185
+ ## 🚀 Quick Start
186
+
187
+ Get up and running in 3 simple steps:
188
+
189
+ ```bash
190
+ # 1. Install from PyPI
191
+ pip install devsecops-radar
192
+
193
+ # 2. Feed scanner data (sample data is included in the repo)
194
+ devsecops-radar --trivy sample_trivy.json --semgrep sample_semgrep.json
195
+
196
+ # 3. Launch the dashboard
197
+ devsecops-radar-web
198
+ ```
199
+
200
+ Open **http://localhost:8080** — your unified command center is live with sample findings.
201
+
202
+ > [!TIP]
203
+ > 🧙 **Want a fully guided setup?** Run the interactive wizard:
204
+ > ```bash
205
+ > devsecops-radar --wizard
206
+ > ```
207
+
208
+ ---
209
+
210
+ ## 📦 Installation
211
+
212
+ <details>
213
+ <summary><b>View All Installation Options (PyPI, Docker, Source, One-Command)</b></summary>
214
+ <br>
215
+
216
+ ### Option 1 — PyPI (Recommended)
217
+ ```bash
218
+ pip install devsecops-radar
219
+ ```
220
+
221
+ ### Option 2 — From Source
222
+ ```bash
223
+ git clone https://github.com/Mehrdoost/devsecops-radar.git
224
+ cd devsecops-radar
225
+ pip install -e ".[dev]"
226
+ ```
227
+
228
+ ### Option 3 — Docker
229
+ ```bash
230
+ docker pull ghcr.io/mehrdoost/devsecops-radar:latest
231
+ docker run -p 8080:8080 ghcr.io/mehrdoost/devsecops-radar:latest
232
+ ```
233
+ **Mount your own findings file:**
234
+ ```bash
235
+ docker run -p 8080:8080 -v $(pwd)/findings.json:/data/findings.json ghcr.io/mehrdoost/devsecops-radar:latest
236
+ ```
237
+ **Or use Docker Compose:**
238
+ ```bash
239
+ docker compose up
240
+ ```
241
+
242
+ ### 🧙 One‑Command Install (curl)
243
+ ```bash
244
+ curl -fsSL https://raw.githubusercontent.com/Mehrdoost/devsecops-radar/main/install.sh | bash
245
+ ```
246
+ *This script installs Python dependencies, Ollama, pulls the AI model, and starts the wizard.*
247
+
248
+ </details>
249
+
250
+ ---
251
+
252
+ ## 📋 Prerequisites
253
+
254
+ > [!IMPORTANT]
255
+ > Pipeline Sentinel relies on external security tools to produce the JSON reports it consumes. You must install these tools separately according to your needs.
256
+
257
+ - **Required for offline scanning:** Trivy, Semgrep, Poutine, Zizmor, Gitleaks.
258
+ - **Optional:** Ollama (AI analysis), Docker (Sandboxing), OPA (Rego policy).
259
+
260
+ > 📖 **See `PREREQUISITES.md` for full installation details of these tools.**
261
+
262
+ ---
263
+
264
+ ## 🧭 How to Use (Step‑by‑Step)
265
+
266
+ <details open>
267
+ <summary><b>1. Run Your Security Scanners</b></summary>
268
+ <br>
269
+
270
+ Generate JSON output from your tools:
271
+ ```bash
272
+ trivy image --format json -o trivy.json nginx:latest
273
+ semgrep --config=auto --json --output semgrep.json .
274
+ poutine scan ./repo --format json --output poutine.json
275
+ zizmor scan ./repo --output zizmor.json --format json
276
+ gitleaks detect --source . --report-format json --report-path gitleaks.json
277
+ ```
278
+ </details>
279
+
280
+ <details open>
281
+ <summary><b>2. Merge Findings with the CLI</b></summary>
282
+ <br>
283
+
284
+ ```bash
285
+ devsecops-radar --trivy trivy.json --semgrep semgrep.json --poutine poutine.json --zizmor zizmor.json --gitleaks gitleaks.json
286
+ ```
287
+ *This produces a single `findings.json` with all findings merged and normalised.*
288
+ </details>
289
+
290
+ <details open>
291
+ <summary><b>3. View the Dashboard Engine</b></summary>
292
+ <br>
293
+
294
+ Execute the web wrapper to spin up your centralized analytics engine:
295
+ ```bash
296
+ devsecops-radar-web
297
+ ```
298
+
299
+ ### 📊 Tactical Web Console Architecture
300
+ The single-page real-time dashboard elegantly partitions telemetry into high-impact actionable items:
301
+
302
+ | Dashboard Component | Interface Visualization Type | Core Operational Value |
303
+ | :--- | :--- | :--- |
304
+ | **Severity Breakdown** | Dynamic Doughnut Charts | Instant tracking of global exposure density and total counts. |
305
+ | **Trend Over Time** | Aggregated Line Timelines | Historical trajectory graphs drawn from persistent scan logs. |
306
+ | **Pipeline Security** | Specialized Poutine + Zizmor Matrix | Micro-telemetry analyzing supply chain health and meta-workflows. |
307
+ | **Attack Path Graph** | Interactive D3.js Force Nodes | Clickable chain mapping demonstrating structural flaw correlations. |
308
+ | **Executive Summary** | Context-Rich Summary & Risk Scoring | Algorithmic threat intelligence translated into executive-ready metrics. |
309
+ | **Findings Datagrid** | Searchable Paginated Checkbox Tables | Granular configuration control built for isolating entities for target simulations. |
310
+
311
+ </details>
312
+
313
+ <details>
314
+ <summary><b>4. Enable AI Analysis (Optional)</b></summary>
315
+ <br>
316
+
317
+ ```bash
318
+ ollama pull llama3.2:latest
319
+ devsecops-radar --trivy trivy.json --analyze
320
+ devsecops-radar-web
321
+ ```
322
+ The LLM generates `findings_ai_summary.json` containing: `executive_summary`, `risk_score`, `attack_paths` (with MITRE ATT&CK), `top_remediations`, and `false_positives_likely`.
323
+ </details>
324
+
325
+ <details>
326
+ <summary><b>5. Auto‑Remediation (with Human Review)</b></summary>
327
+ <br>
328
+
329
+ ```bash
330
+ # Apply fixes automatically
331
+ devsecops-radar --trivy trivy.json --analyze --fix
332
+
333
+ # Interactive step‑by‑step review
334
+ devsecops-radar --trivy trivy.json --analyze --fix --review
335
+ ```
336
+ > [!NOTE]
337
+ > All modified files are backed up to `~/.devsecops-radar/backups/`. The tool creates a new git branch `auto-fix` and pushes it for review.
338
+ </details>
339
+
340
+ <details>
341
+ <summary><b>6. Policy Enforcement</b></summary>
342
+ <br>
343
+
344
+ Create a `policy.json` file:
345
+ ```json
346
+ {
347
+ "max_critical": 5,
348
+ "on_violation": "fail"
349
+ }
350
+ ```
351
+ ```bash
352
+ devsecops-radar --trivy trivy.json --policy policy.json
353
+ ```
354
+ *If critical findings exceed 5, the command exits with code 1. You can also use OPA Rego policies (`--rego-policy`).*
355
+ </details>
356
+
357
+ <details>
358
+ <summary><b>7. Generate Compliance & Standard Reports</b></summary>
359
+ <br>
360
+
361
+ ```bash
362
+ # PDF report with compliance mapping
363
+ devsecops-radar --trivy trivy.json --analyze --compliance CIS --report cis-report.pdf
364
+
365
+ # Export as SARIF for GitHub Code Scanning
366
+ devsecops-radar --trivy trivy.json --export-sarif report.sarif
367
+
368
+ # Export as CycloneDX SBOM
369
+ devsecops-radar --trivy trivy.json --export-cyclonedx report.cdx.json
370
+ ```
371
+ </details>
372
+
373
+ <details>
374
+ <summary><b>8. Security Badge for Your Project</b></summary>
375
+ <br>
376
+
377
+ Embed a dynamic security badge in your README:
378
+ ```markdown
379
+ [![Security Status](https://your-server/badge/1.svg)](https://github.com/Mehrdoost/devsecops-radar)
380
+ ```
381
+ </details>
382
+
383
+ <details>
384
+ <summary><b>9. Jira / Asana Integration (New!)</b></summary>
385
+ <br>
386
+
387
+ Set environment variables to create issues automatically:
388
+ ```bash
389
+ export JIRA_URL="https://your-domain.atlassian.net"
390
+ export JIRA_TOKEN="your-api-token"
391
+ devsecops-radar --trivy trivy.json --analyze --notify-jira
392
+
393
+ export ASANA_TOKEN="your-asana-token"
394
+ export ASANA_WORKSPACE="your-workspace-gid"
395
+ devsecops-radar --trivy trivy.json --analyze --notify-asana
396
+ ```
397
+ </details>
398
+
399
+ ---
400
+
401
+ ## 📋 Complete Command Reference
402
+
403
+ <details open>
404
+ <summary><b>Click to Expand Command Categories</b></summary>
405
+ <br>
406
+
407
+ ### 🔎 Scanners & Inputs
408
+ | Flag | Description | Example |
409
+ | :--- | :--- | :--- |
410
+ | `--trivy` | Trivy JSON file or image name | `--trivy` <kbd>results.json</kbd> or <kbd>nginx:latest</kbd> |
411
+ | `--semgrep` | Semgrep JSON file or directory | `--semgrep` <kbd>results.json</kbd> or <kbd>./src</kbd> |
412
+ | `--poutine` | Poutine JSON file or repo path | `--poutine` <kbd>results.json</kbd> or <kbd>./repo</kbd> |
413
+ | `--zizmor` | Zizmor JSON file or repo path | `--zizmor` <kbd>results.json</kbd> or <kbd>./repo</kbd> |
414
+ | `--gitleaks`| Gitleaks JSON file or repo path | `--gitleaks` <kbd>results.json</kbd> or <kbd>./repo</kbd> |
415
+ | `--rules` | Directory with custom JSON rules | `--rules` <kbd>~/my-rules/</kbd> |
416
+ | `--topology`| Path to topology JSON file | `--topology` <kbd>topology.json</kbd> |
417
+
418
+ ### 🧠 AI, Policies & Remediation
419
+ | Flag | Description | Example |
420
+ | :--- | :--- | :--- |
421
+ | `--analyze` | Enable async LLM analysis (Ollama required) | `--analyze` |
422
+ | `--llm-backend`| `ollama` (default) or `litellm` | `--llm-backend` <kbd>litellm</kbd> |
423
+ | `--llm-model` | Model name | `--llm-model` <kbd>gpt-4o-mini</kbd> |
424
+ | `--fix` | Auto‑apply AI‑suggested fixes (with backup) | `--fix` |
425
+ | `--review` | Interactive step‑by‑step remediation | `--review` |
426
+ | `--policy` | Policy JSON file for gating | `--policy` <kbd>policy.json</kbd> |
427
+ | `--rego-policy`| OPA Rego policy file | `--rego-policy` <kbd>policy.rego</kbd> |
428
+
429
+ ### 📊 Reports & Exports
430
+ | Flag | Description | Example |
431
+ | :--- | :--- | :--- |
432
+ | `--output` | Output JSON file (default: findings.json)| `--output` <kbd>merged.json</kbd> |
433
+ | `--report` | Generate PDF/JSON/HTML report | `--report` <kbd>report.pdf</kbd> |
434
+ | `--export-sarif`| Export findings as SARIF | `--export-sarif` <kbd>report.sarif</kbd> |
435
+ | `--export-cyclonedx`| Export findings as CycloneDX | `--export-cyclonedx` <kbd>report.cdx</kbd> |
436
+ | `--compliance`| Framework: `CIS`, `PCI-DSS`, `ISO27001` | `--compliance` <kbd>CIS</kbd> |
437
+
438
+ ### ⚙️ Integrations & Setup
439
+ | Flag | Description | Example |
440
+ | :--- | :--- | :--- |
441
+ | `--notify-jira` | Create Jira issues for criticals | `--notify-jira` |
442
+ | `--notify-asana`| Create Asana tasks for criticals | `--notify-asana` |
443
+ | `--wizard` | Interactive first‑time setup wizard | `--wizard` |
444
+ | `--update-rules`| Download/update community rules | `--update-rules` |
445
+
446
+ <br>
447
+
448
+ > [!TIP]
449
+ > **`devsecops-radar-web` — Web Server Options**
450
+
451
+ ```bash
452
+ devsecops-radar-web # Launch on http://localhost:8080
453
+ FINDINGS_FILE=my.json devsecops-radar-web # Use a custom findings file
454
+ PIPELINE_API_KEY=secret devsecops-radar-web # Enable API authentication
455
+ ```
456
+
457
+ </details>
458
+
459
+ ---
460
+
461
+ ## ✨ Core Capabilities
462
+
463
+ ### 🔌 Multi-Scanner Ingestion Engine
464
+ * **Pluggable Architecture:** Native modular decoders ingest structured data seamlessly from Trivy, Semgrep, Poutine, Zizmor, and Gitleaks.
465
+ * **Hybrid RuleFusion Layer:** Dynamically evaluation of custom local JSON policies mapped on top of live community-driven git feeds.
466
+ * **Scan History Optimization:** Persistent historical compilation powered by SQLAlchemy featuring sub-second result slicing.
467
+
468
+ ### 🧠 Advanced Intelligence & Active Remediation
469
+ * **Asynchronous Context Enriched LLM:** Multi-backend integration hooks (Ollama/LiteLLM) mapping structural CVE configurations to real-world MITRE ATT&CK vectors.
470
+ * **Interactive Remediation Tracks:** Intelligent mutation options applying autonomous hotfixes (`--fix`) balanced by modular human verification checklines (`--review`).
471
+ * **Exploit-Aware Scoring:** Modern analytical calculations analyzing vector severities alongside real-time asset exposure and dynamic surface reachability.
472
+
473
+ ### 🛡️ Enterprise Policy & Supply-Chain Governance
474
+ * **Policy-as-Code Frameworks:** Advanced control assertions parsing validation rules via strict local JSON constraints or distributed Open Policy Agent (OPA) Rego scripts.
475
+ * **Supply Chain Verification:** Comprehensive CycloneDX SBOM data compilation complete with proactive VEX vulnerability masking layers.
476
+ * **Air-Gapped Absolute Confidentiality:** Complete dependency localization guaranteeing data processing loops execute with zero external request callbacks.
477
+
478
+ ---
479
+
480
+ ## 🌍 Community Rules & Online Updates
481
+
482
+ Pipeline Sentinel features a community‑driven rule marketplace housed in a separate repository: `devsecops-radar-rules`.
483
+
484
+ **How It Works:**
485
+ The repository contains curated JSON rule files for all supported scanners. You can pull the latest rules with a single command:
486
+ ```bash
487
+ devsecops-radar --update-rules
488
+ ```
489
+ Rules are stored locally in `~/.devsecops-radar/community-rules/`. To use them alongside your scanner results:
490
+ ```bash
491
+ devsecops-radar --trivy scan.json --rules ~/.devsecops-radar/community-rules/
492
+ ```
493
+
494
+ > [!NOTE]
495
+ > You can even point to your own private repository via `COMMUNITY_RULES_REPO`!
496
+
497
+ ---
498
+
499
+ ## ⚔️ Attack Simulation & What‑If Analysis
500
+
501
+ **Interactive attack simulation directly from the dashboard:**
502
+ 1. Tick the checkboxes next to the findings you want to investigate.
503
+ 2. Click **“⚡ Simulate Selected”**.
504
+ 3. A modal displays a generated attack script (`bash`), attack chain description, and (if Docker is available) the sandbox output.
505
+
506
+ *(You can also click any node in the Attack Path Graph and press **“Simulate this attack”**)*.
507
+
508
+ ---
509
+
510
+ ## 🔐 Security Improvements in v0.4.2
511
+
512
+ - **Path Traversal Prevention:** All file operations (rules, manifests, SBOM, backups) now strictly validate that paths remain within the allowed base directory.
513
+ - **Input Sanitization for Attack Simulation:** Bash script generation now safely escapes all user-controlled data, eliminating command injection risks in sandboxed PoCs.
514
+ - **Hardened Docker Sandbox:** Attack simulation containers run with `--cap-drop=ALL`, `--read-only` filesystem, `--network=none`, and as non-root user `nobody`.
515
+ - **Constant-time API Key Comparison:** Login and API key verification use `hmac.compare_digest` to prevent timing attacks.
516
+ - **Database Connection Security:** SQLite WAL mode enabled, foreign keys enforced, and `pool_pre_ping` configured for connection health checks.
517
+ - **Input Size Limits:** Payload size restricted (1MB), database field lengths truncated to prevent DoS and log bloat.
518
+ - **Safe Community Rule Updates:** Git operations are restricted to whitelisted `https://github.com` URLs only, with strict argument validation.
519
+ - **Secrets Redaction:** PDF reports and logs automatically redact passwords, tokens, and keys.
520
+ - **Mandatory Environment Secrets:** JWT secret and API key must be provided; the server fails fast if they are missing or weak.
521
+
522
+ ---
523
+
524
+ ## 🏗️ Architecture
525
+
526
+ ```text
527
+ devsecops_radar/
528
+ ├── cli/ # CLI entry point – plugin discovery, policy, remediation
529
+ ├── core/ # RuleFusion engine, DB (SQLAlchemy), async LLM analysers
530
+ ├── scanners/ # Pluggable scanner classes (extend ScannerPlugin)
531
+ ├── plugins/ # ScannerPlugin abstract base class & entry points
532
+ └── web/ # Flask dashboard (modular Blueprints, WCAG 2.1 AA)
533
+ ├── dashboard/ # Main dashboard routes & embedded HTML
534
+ ├── attack_paths/
535
+ ├── topology/
536
+ ├── summary/
537
+ └── sentry/ # Live webhook agent for CI/CD
538
+ ```
539
+
540
+ ![Architecture Diagram](docs/architecture-2.png)
541
+
542
+ ---
543
+
544
+ ## 🗺️ Roadmap
545
+
546
+ | Phase | Feature | Status |
547
+ | :--- | :--- | :--- |
548
+ | ✅ **Phase 1** | Multi‑scanner engine (Trivy, Semgrep, Poutine, Zizmor), LLM analysis, GH Actions | Done |
549
+ | ✅ **Phase 2** | Attack‑path visualization, Policy‑as‑Code, Auto‑remediation, Compliance reports | Done |
550
+ | ✅ **Phase 3** | Web dashboard Blueprint, ORM pagination, SBOM, Dynamic Risk Scoring, Gitleaks | Done |
551
+ | ✅ **Phase 4** | Advanced attack simulation, VEX filtering, Async LLM, SARIF/CycloneDX | Done |
552
+ | 🔲 **Phase 5** | eBPF runtime security agent | Planned |
553
+ | 🔲 **Phase 5** | Rule marketplace with YAML | Planned |
554
+ | 🔲 **Phase 5** | Pull Request assistant (GitHub App) | Planned |
555
+
556
+ > [!NOTE]
557
+ > See the [open issues](https://github.com/Mehrdoost/devsecops-radar/issues) for a full list of proposed features.
558
+
559
+ ---
560
+
561
+ ## 🧪 Testing & CI
562
+
563
+ Pipeline Sentinel is thoroughly tested to ensure reliability for production use.
564
+ * **Unit & Integration Tests:** 23+ tests covering scanners, rule engine, database, analyzer, API, and CLI.
565
+ * **CI Pipeline:** Every push and pull request triggers automated testing (`pytest` with coverage) and linting (`ruff`, `mypy`) via GitHub Actions.
566
+
567
+ Run tests locally:
568
+ ```bash
569
+ pip install -e ".[dev]"
570
+ pip install pytest pytest-flask ruff
571
+ pytest tests/ -v --cov=devsecops_radar --cov-report=term-missing
572
+ ruff check .
573
+ mypy .
574
+ ```
575
+
576
+ ---
577
+
578
+ ## 🤝 Community & Support
579
+
580
+ * **Security Policy:** We take security seriously. If you discover a vulnerability, please report it privately. See our full Security Policy for details.
581
+ * **Contributing:** We welcome contributions of all kinds! Please read our Contributing Guide. For adding new rules, see the Community Rules section.
582
+ * **Code of Conduct:** This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
583
+
584
+ ---
585
+
586
+ ## ⚡ Support Development
587
+
588
+ Sponsor this project with a crypto donation.
589
+ All funds go directly to the developer.
590
+
591
+ **[🔗 Donate USDC (Polygon)](https://polygonscan.com/address/0x6b7c1c572D45575Fa5409CB52F25B750B3097c8b)** <sub>`0x1234...5678`</sub> · <sub><img src="docs/donate-qr.png" width="90" alt="QR" valign="middle" /></sub>
592
+
593
+ ---
594
+
595
+ ## 👨‍💻 Author
596
+
597
+ **ReverseForge** — ( Mehrdoost And Mi0r4 )
598
+
599
+ [![GitHub](https://img.shields.io/badge/GitHub-ReverseForge-181717?style=for-the-badge&logo=github)](https://github.com/ReverseForge)
600
+ [![GitHub](https://img.shields.io/badge/GitHub-Mehrdoost-181717?style=for-the-badge&logo=github)](https://github.com/Mehrdoost)
601
+ [![GitHub](https://img.shields.io/badge/GitHub-miora--sora-181717?style=for-the-badge&logo=github)](https://github.com/miora-sora)
602
+
603
+ ---
604
+
605
+ ## 📜 License
606
+
607
+ MIT — see [LICENSE](LICENSE).
608
+
609
+ <div align="center">
610
+ <br>
611
+
612
+ ⭐ **If this project helps your team ship safer software, drop a star — it makes a real difference.**
613
+
614
+ </div>