devsecops-radar 0.3.9__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.
Files changed (61) hide show
  1. {devsecops_radar-0.3.9/devsecops_radar.egg-info → devsecops_radar-0.3.10}/PKG-INFO +136 -64
  2. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/README.md +129 -62
  3. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/cli/scanner.py +7 -1
  4. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/core/remediation.py +11 -0
  5. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/core/rule_fusion.py +33 -9
  6. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/core/sbom.py +14 -1
  7. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/core/valuation.py +15 -1
  8. devsecops_radar-0.3.10/devsecops_radar/web/dashboard/routes.py +603 -0
  9. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10/devsecops_radar.egg-info}/PKG-INFO +136 -64
  10. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar.egg-info/SOURCES.txt +0 -1
  11. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar.egg-info/requires.txt +6 -0
  12. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/pyproject.toml +23 -2
  13. devsecops_radar-0.3.9/MANIFEST.in +0 -2
  14. devsecops_radar-0.3.9/devsecops_radar/web/dashboard/routes.py +0 -467
  15. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/LICENSE +0 -0
  16. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/__init__.py +0 -0
  17. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/cli/__init__.py +0 -0
  18. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/core/__init__.py +0 -0
  19. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/core/analyzer.py +0 -0
  20. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/core/attack_simulation.py +0 -0
  21. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/core/auth.py +0 -0
  22. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/core/database.py +0 -0
  23. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/core/models.py +0 -0
  24. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/core/parser.py +0 -0
  25. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/core/rag.py +0 -0
  26. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/core/reporting.py +0 -0
  27. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/core/settings.py +0 -0
  28. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/plugins/__init__.py +0 -0
  29. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/scanners/adapter.py +0 -0
  30. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/scanners/base.py +0 -0
  31. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/scanners/gitleaks.py +0 -0
  32. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/scanners/poutine.py +0 -0
  33. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/scanners/semgrep.py +0 -0
  34. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/scanners/trivy.py +0 -0
  35. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/scanners/zizmor.py +0 -0
  36. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/web/__init__.py +0 -0
  37. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/web/app.py +0 -0
  38. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/web/attack_paths/__init__.py +0 -0
  39. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/web/attack_paths/routes.py +0 -0
  40. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/web/dashboard/__init__.py +0 -0
  41. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/web/sentry/routes.py +0 -0
  42. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/web/static/css/bootstrap.min.css +0 -0
  43. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/web/static/css/style.css +0 -0
  44. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/web/static/js/bootstrap.bundle.min.js +0 -0
  45. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/web/static/js/chart.umd.min.js +0 -0
  46. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/web/static/js/dashboard.js +0 -0
  47. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/web/summary/__init__.py +0 -0
  48. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/web/summary/routes.py +0 -0
  49. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/web/templates/index.html +0 -0
  50. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/web/topology/__init__.py +0 -0
  51. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar/web/topology/routes.py +0 -0
  52. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar.egg-info/dependency_links.txt +0 -0
  53. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar.egg-info/entry_points.txt +0 -0
  54. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/devsecops_radar.egg-info/top_level.txt +0 -0
  55. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/setup.cfg +0 -0
  56. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/tests/test_analyzer.py +0 -0
  57. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/tests/test_api.py +0 -0
  58. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/tests/test_cli.py +0 -0
  59. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/tests/test_database.py +0 -0
  60. {devsecops_radar-0.3.9 → devsecops_radar-0.3.10}/tests/test_rule_fusion.py +0 -0
  61. {devsecops_radar-0.3.9 → 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.9
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,10 +23,20 @@ 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
- Requires-Dist: pytest>=8.0
27
- Requires-Dist: pytest-flask>=1.3
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
 
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
30
40
  <div align="center">
31
41
 
32
42
  # 🛡️ Pipeline Sentinel
@@ -37,6 +47,7 @@ Dynamic: license-file
37
47
  [![License](https://img.shields.io/github/license/Mehrdoost/devsecops-radar?style=flat-square)](LICENSE)
38
48
  [![GitHub release](https://img.shields.io/github/v/release/Mehrdoost/devsecops-radar?include_prereleases&style=flat-square)](https://github.com/Mehrdoost/devsecops-radar/releases)
39
49
  [![CI](https://img.shields.io/github/actions/workflow/status/Mehrdoost/devsecops-radar/ci.yml?branch=main&style=flat-square)](https://github.com/Mehrdoost/devsecops-radar/actions)
50
+ [![codecov](https://codecov.io/gh/Mehrdoost/devsecops-radar/branch/main/graph/badge.svg?token=TOKEN)](https://codecov.io/gh/Mehrdoost/devsecops-radar)
40
51
  [![Stars](https://img.shields.io/github/stars/Mehrdoost/devsecops-radar?style=flat-square)](https://github.com/Mehrdoost/devsecops-radar/stargazers)
41
52
 
42
53
  </div>
@@ -58,12 +69,15 @@ Dynamic: license-file
58
69
  9. [Complete Command Reference](#-complete-command-reference)
59
70
  10. [Core Capabilities](#-core-capabilities)
60
71
  11. [Community Rules & Online Updates](#-community-rules--online-updates)
61
- 12. [Architecture](#️-architecture)
62
- 13. [Roadmap](#️-roadmap)
63
- 14. [Testing & CI](#-testing--ci)
64
- 15. [Contributing](#-contributing)
65
- 16. [Author](#-author)
66
- 17. [License](#-license)
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)
67
81
 
68
82
  ---
69
83
 
@@ -71,9 +85,9 @@ Dynamic: license-file
71
85
 
72
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.
73
87
 
74
- **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.
75
89
 
76
- 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.
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.
77
91
 
78
92
  ---
79
93
 
@@ -84,11 +98,13 @@ In 2026, **supply chain attacks** have become the #1 threat. Tools like Trivy th
84
98
  Pipeline Sentinel gives you:
85
99
  * **One screen for all scanners** – stop juggling log files.
86
100
  * **AI that understands attack chains** – “A leaked secret + an old library = a disaster.”
87
- * **Automatic fixes** – with a single flag, it patches files and opens a pull request.
101
+ * **Automatic fixes** – with a single flag, it patches files and opens a pull request (with **backup**).
88
102
  * **Human review mode** – inspect each fix before applying.
89
103
  * **Compliance reports** – generate a PDF for your boss or auditor.
104
+ * **Attack simulation** – tick a few findings and see a generated attack script.
90
105
  * **100% offline capable** – works in air‑gapped environments where security matters most.
91
106
  * **Interactive wizard** – one command to get everything running.
107
+ * **Community rules marketplace** – pull curated detection rules from the community.
92
108
 
93
109
  ---
94
110
 
@@ -122,7 +138,7 @@ Pipeline Sentinel is designed to be **flexible** — you decide where it fits be
122
138
 
123
139
  ![Pipeline Sentinel Dashboard](docs/Demo.gif)
124
140
 
125
- *(Severity doughnut, trend line chart, attack‑path graph (clickable nodes), topology view, executive summary — all fully offline.)*
141
+ *Severity doughnut, trend line chart, attack‑path graph (clickable nodes), topology view, executive summary, and attack simulation panel — all fully offline.*
126
142
 
127
143
  ---
128
144
 
@@ -139,7 +155,7 @@ devsecops-radar --trivy sample_trivy.json --semgrep sample_semgrep.json
139
155
  devsecops-radar-web
140
156
  ```
141
157
 
142
- Open http://localhost:8080 — your unified dashboard is live with sample findings.
158
+ Open http://localhost:8080 — your unified command center is live with sample findings.
143
159
 
144
160
  🧙 **Want a fully guided setup? Run the wizard:**
145
161
  ```bash
@@ -159,8 +175,10 @@ Pipeline Sentinel relies on external security tools to produce the JSON reports
159
175
  * Zizmor (installation)
160
176
  * Gitleaks (installation)
161
177
 
162
- **Optional (for AI analysis):**
163
- * Ollama (installation)
178
+ **Optional:**
179
+ * Ollama – for AI‑powered analysis (installation)
180
+ * Docker – for attack sandboxing and container scanning
181
+ * OPA – for advanced Rego policy evaluation
164
182
 
165
183
  > 📖 **See `PREREQUISITES.md` for more details.**
166
184
 
@@ -177,7 +195,7 @@ pip install devsecops-radar
177
195
  ```bash
178
196
  git clone [https://github.com/Mehrdoost/devsecops-radar.git](https://github.com/Mehrdoost/devsecops-radar.git)
179
197
  cd devsecops-radar
180
- pip install -e .
198
+ pip install -e ".[dev]"
181
199
  ```
182
200
 
183
201
  ### Option 3 — Docker
@@ -221,7 +239,7 @@ gitleaks detect --source . --report-format json --report-path gitleaks.json
221
239
  ```bash
222
240
  devsecops-radar --trivy trivy.json --semgrep semgrep.json --poutine poutine.json --zizmor zizmor.json --gitleaks gitleaks.json
223
241
  ```
224
- *This produces a single `findings.json` with all findings merged and normalised.*
242
+ *This produces a single findings.json with all findings merged and normalised.*
225
243
 
226
244
  ### 3. View the Dashboard
227
245
  ```bash
@@ -233,7 +251,7 @@ The dashboard shows:
233
251
  * **Pipeline Security** – Poutine + Zizmor statistics card
234
252
  * **Attack Path Graph** – Interactive D3.js graph (click nodes for details)
235
253
  * **Executive Summary** – Risk score and AI‑generated summary
236
- * **Findings Table** – Searchable, filterable, paginated
254
+ * **Findings Table** – Searchable, filterable, paginated, with checkboxes for simulation
237
255
 
238
256
  ### 4. Enable AI Analysis (Optional)
239
257
  ```bash
@@ -255,22 +273,23 @@ devsecops-radar --trivy trivy.json --analyze --fix
255
273
  # Review each fix before applying
256
274
  devsecops-radar --trivy trivy.json --analyze --fix --review
257
275
  ```
258
- *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.*
259
277
 
260
278
  ### 6. Policy Enforcement
261
279
  Create a `policy.json` file:
262
280
  ```json
263
- {
264
- "max_critical": 5,
265
- "on_violation": "fail"
266
- }
281
+ {"max_critical": 5, "on_violation": "fail"}
267
282
  ```
268
-
269
283
  ```bash
270
284
  devsecops-radar --trivy trivy.json --policy policy.json
271
285
  ```
272
286
  *If critical findings exceed 5, the command exits with code 1 — perfect for CI/CD gates.*
273
287
 
288
+ **You can also use OPA Rego policies:**
289
+ ```bash
290
+ devsecops-radar --trivy trivy.json --rego-policy policy.rego
291
+ ```
292
+
274
293
  ### 7. Generate Compliance Reports
275
294
  ```bash
276
295
  devsecops-radar --trivy trivy.json --analyze --compliance CIS --report cis-report.pdf
@@ -278,7 +297,7 @@ devsecops-radar --trivy trivy.json --analyze --compliance CIS --report cis-repor
278
297
  A PDF report is created with an executive summary, risk score, findings table, and compliance mapping. Sensitive data can be redacted automatically.
279
298
 
280
299
  ### 8. Security Badge for Your Project
281
- After running a scan, you can embed a dynamic security badge in your `README`:
300
+ After running a scan, you can embed a dynamic security badge in your README:
282
301
  ```markdown
283
302
  [![Security Status](https://your-server/badge/1.svg)](https://github.com/Mehrdoost/devsecops-radar)
284
303
  ```
@@ -299,10 +318,11 @@ The badge color changes based on the number of critical findings (green/yellow/r
299
318
  | `--gitleaks` | Gitleaks JSON file or repo path | `--gitleaks results.json` or `--gitleaks ./repo` |
300
319
  | `--rules` | Directory with custom JSON rule files | `--rules ~/my-security-rules/` |
301
320
  | `--policy` | Policy JSON file for gating | `--policy policy.json` |
321
+ | `--rego-policy` | OPA Rego policy file | `--rego-policy policy.rego` |
302
322
  | `--analyze` | Enable LLM analysis (Ollama required) | `--analyze` |
303
323
  | `--llm-backend` | `ollama` (default) or `litellm` | `--llm-backend litellm` |
304
324
  | `--llm-model` | Model name | `--llm-model gpt-4o-mini` |
305
- | `--fix` | Auto‑apply AI‑suggested fixes | `--fix` |
325
+ | `--fix` | Auto‑apply AI‑suggested fixes (with backup) | `--fix` |
306
326
  | `--review` | Review each AI fix before applying | `--review` |
307
327
  | `--topology` | Path to topology JSON file | `--topology topology.json` |
308
328
  | `--compliance` | Framework: `CIS`, `PCI-DSS`, `ISO27001` | `--compliance CIS` |
@@ -313,11 +333,37 @@ The badge color changes based on the number of critical findings (green/yellow/r
313
333
  ### `devsecops-radar-web` — Web Server
314
334
 
315
335
  ```bash
316
- devsecops-radar-web # Launch on http://localhost:8080
317
- FINDINGS_FILE=my.json devsecops-radar-web # Use a custom findings file
336
+ devsecops-radar-web # Launch on http://localhost:8080
337
+ FINDINGS_FILE=my.json devsecops-radar-web # Use a custom findings file
318
338
  PIPELINE_API_KEY=secret devsecops-radar-web # Enable API authentication
319
339
  ```
320
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
+
321
367
  ---
322
368
 
323
369
  ## ✨ Core Capabilities
@@ -337,7 +383,7 @@ Built‑in support for five scanners with a real plugin system. Third‑party sc
337
383
  * **Offline** – Load custom JSON rules from any local directory (`--rules ~/my-rules/`)
338
384
  * **Online** – Pull community‑curated rules from a configurable Git repository (`--update-rules`)
339
385
  * Auto‑detects Trivy, Semgrep, Poutine, Zizmor, and plain‑list formats
340
- * Policy evaluation built directly into the engine
386
+ * Policy evaluation built directly into the engine (JSON and OPA Rego)
341
387
  * Community rules repo: `devsecops-radar-rules` (configurable via `COMMUNITY_RULES_REPO`)
342
388
 
343
389
  ### 🧠 LLM‑Powered Analysis
@@ -348,20 +394,13 @@ Built‑in support for five scanners with a real plugin system. Third‑party sc
348
394
  * Ollama (local, offline) and LiteLLM (OpenAI, Anthropic, etc.) support
349
395
 
350
396
  ### 🕸️ Multi‑Step Attack Path Visualization
351
- 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.
352
398
 
353
- ### 🛡️ Policy‑as‑Code
354
- Define security gates as simple JSON:
355
- ```json
356
- {
357
- "max_critical": 5,
358
- "on_violation": "fail"
359
- }
360
- ```
361
- *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.
362
401
 
363
- ### 🛠️ Auto‑Remediation with Human‑in‑the‑Loop
364
- 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.
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.
365
404
 
366
405
  ### 📊 Compliance & Executive Reports (with Redaction)
367
406
  Generate professional PDF reports (`--report report.pdf`) with:
@@ -375,16 +414,17 @@ SQLAlchemy‑backed database with server‑side pagination (`/api/findings?page=
375
414
 
376
415
  ### 🧪 SBOM & Dependency Confusion Detection
377
416
  * Generate a CycloneDX SBOM from your project using `syft`
417
+ * Apply VEX (Vulnerability Exploitability eXchange) files to filter false positives
378
418
  * Detect dependency confusion risks in `package.json` and `requirements.txt` — internal packages that could be impersonated by public registries
379
419
 
380
420
  ### 🔍 RAG‑Powered Security Search
381
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.
382
422
 
383
- ### ⚔️ Attack Simulation (Sandbox)
384
- 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.
385
-
386
423
  ### 📉 Dynamic Risk Scoring
387
- 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.
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
388
428
 
389
429
  ### 🧙 Interactive Wizard
390
430
  A `--wizard` flag walks new users through installing dependencies, pulling AI models, and running their first scan — all in one go.
@@ -402,9 +442,8 @@ A `--wizard` flag walks new users through installing dependencies, pulling AI mo
402
442
  Pipeline Sentinel features a community‑driven rule marketplace housed in a separate repository: `devsecops-radar-rules`.
403
443
 
404
444
  ### How It Works
405
- 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.
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:
406
446
 
407
- Users can pull the latest rules with a single command:
408
447
  ```bash
409
448
  devsecops-radar --update-rules
410
449
  ```
@@ -421,6 +460,20 @@ You can even point to your own fork or a private repository by setting the `COMM
421
460
 
422
461
  ---
423
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.
474
+
475
+ ---
476
+
424
477
  ## 🏗️ Architecture
425
478
 
426
479
  ```text
@@ -437,8 +490,8 @@ devsecops_radar/
437
490
  └── sentry/ # Live webhook agent for CI/CD
438
491
  ```
439
492
 
440
- > **📌 Diagram Placeholder:**
441
- ![Architecture Diagram](docs/architecture.png)
493
+ > **📌 Diagram Placeholder:** Add your architecture diagram here as `docs/architecture.png`.
494
+ > `![Architecture Diagram](docs/architecture.png)`
442
495
 
443
496
  ---
444
497
 
@@ -453,7 +506,7 @@ devsecops_radar/
453
506
  | ✅ **Phase 1** | Docker image (multi‑stage, non‑root) | Done |
454
507
  | ✅ **Phase 2** | Attack‑path visualization with MITRE ATT&CK & topology | Done |
455
508
  | ✅ **Phase 2** | Policy‑as‑Code engine (`--policy`) | Done |
456
- | ✅ **Phase 2** | Auto‑remediation engine (`--fix`) | Done |
509
+ | ✅ **Phase 2** | Auto‑remediation engine (`--fix`) with backup | Done |
457
510
  | ✅ **Phase 2** | Compliance reports (PDF) with redaction | Done |
458
511
  | ✅ **Phase 2** | Hybrid RuleFusion engine (local + community rules) | Done |
459
512
  | ✅ **Phase 3** | Web dashboard Blueprint refactor (modular Flask) | Done |
@@ -461,38 +514,56 @@ devsecops_radar/
461
514
  | ✅ **Phase 3** | SQLAlchemy ORM with pagination | Done |
462
515
  | ✅ **Phase 3** | SBOM & Dependency Confusion Detection | Done |
463
516
  | ✅ **Phase 3** | RAG‑powered security search | Done |
464
- | ✅ **Phase 3** | Attack Simulation (sandbox) | Done |
465
517
  | ✅ **Phase 3** | Dynamic Risk Scoring | Done |
466
518
  | ✅ **Phase 3** | Interactive wizard (`--wizard`) | Done |
467
519
  | ✅ **Phase 3** | Human review mode (`--review`) | Done |
468
520
  | ✅ **Phase 3** | Gitleaks secret scanner | Done |
469
521
  | ✅ **Phase 3** | Security badge endpoint | Done |
470
522
  | ✅ **Phase 3** | Full test suite & CI pipeline | Done |
471
- | 🔲 **Phase 4** | Jira / Slack integration | Planned |
472
- | 🔲 **Phase 4** | SARIF & CycloneDX support | Planned |
473
- | 🔲 **Phase 4** | Pull Request assistant (GitHub App) | Planned |
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 |
529
+
530
+ > See the [open issues](https://github.com/Mehrdoost/devsecops-radar/issues) for a full list of proposed features.
474
531
 
475
532
  ---
476
533
 
477
534
  ## 🧪 Testing & CI
478
535
 
479
536
  Pipeline Sentinel is thoroughly tested to ensure reliability for production use.
480
- * **Unit & Integration Tests:** 23 tests covering scanners, rule engine, database, analyzer, API, and CLI.
481
- * **CI Pipeline:** Every push and pull request triggers automated testing (pytest) and linting (ruff) via GitHub Actions.
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).
482
540
 
483
541
  You can run the tests locally:
484
542
  ```bash
485
- pip install -e .
543
+ pip install -e ".[dev]"
486
544
  pip install pytest pytest-flask ruff
487
- pytest tests/ -v
545
+ pytest tests/ -v --cov=devsecops_radar --cov-report=term-missing
488
546
  ruff check .
547
+ mypy .
489
548
  ```
490
549
 
491
550
  ---
492
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.
555
+
556
+ ---
557
+
493
558
  ## 🤝 Contributing
494
559
 
495
- We welcome contributions of all kinds! Please read our `CONTRIBUTING.md` 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.
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.
561
+
562
+ ---
563
+
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.
496
567
 
497
568
  ---
498
569
 
@@ -500,10 +571,9 @@ We welcome contributions of all kinds! Please read our `CONTRIBUTING.md` for det
500
571
 
501
572
  **ReverseForge** — ( Mehrdoost And Mi0r4 )
502
573
 
503
- [cite_start][![GitHub](https://img.shields.io/badge/GitHub-Mehrdoost-181717?logo=github)](https://github.com/ReverseForge)
504
- [cite_start][![GitHub](https://img.shields.io/badge/GitHub-Mehrdoost-181717?logo=github)](https://github.com/Mehrdoost)
505
- [cite_start][![GitHub](https://img.shields.io/badge/GitHub-Mehrdoost-181717?logo=github)](https://github.com/miora-sora)
506
-
574
+ [![GitHub](https://img.shields.io/badge/GitHub-ReverseForge-181717?logo=github)](https://github.com/ReverseForge)
575
+ [![GitHub](https://img.shields.io/badge/GitHub-Mehrdoost-181717?logo=github)](https://github.com/Mehrdoost)
576
+ [![GitHub](https://img.shields.io/badge/GitHub-miora-sora?logo=github)](https://github.com/miora-sora)
507
577
 
508
578
  ---
509
579
 
@@ -514,3 +584,5 @@ MIT — see [LICENSE](LICENSE).
514
584
  <div align="center">
515
585
  ⭐ If this project helps your team ship safer software, drop a star — it makes a real difference.
516
586
  </div>
587
+
588
+ ```