faultmesh 1.0.0 → 1.1.0

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 (43) hide show
  1. package/README.md +61 -19
  2. package/dist/dashboard/app.js +1906 -139
  3. package/dist/dashboard/index.html +393 -99
  4. package/dist/dashboard/styles.css +1191 -23
  5. package/dist/engine/ControlApi.d.ts +13 -1
  6. package/dist/engine/ControlApi.js +304 -14
  7. package/dist/engine/FaultMeshProxy.d.ts +2 -0
  8. package/dist/engine/FaultMeshProxy.js +41 -5
  9. package/dist/engine/TelemetryHub.d.ts +1 -0
  10. package/dist/engine/TelemetryHub.js +3 -0
  11. package/dist/engine/ToxicPipeline.d.ts +5 -4
  12. package/dist/engine/ToxicPipeline.js +17 -4
  13. package/dist/healer/AiHealer.d.ts +30 -0
  14. package/dist/healer/AiHealer.js +188 -0
  15. package/dist/healer/AutoHealer.d.ts +24 -0
  16. package/dist/healer/AutoHealer.js +503 -0
  17. package/dist/healer/DiffGenerator.d.ts +10 -0
  18. package/dist/healer/DiffGenerator.js +63 -0
  19. package/dist/healer/DiffUtil.d.ts +6 -0
  20. package/dist/healer/DiffUtil.js +67 -0
  21. package/dist/healer/transformers/ExpressTransformers.d.ts +43 -0
  22. package/dist/healer/transformers/ExpressTransformers.js +228 -0
  23. package/dist/healer/transformers/FastApiTransformers.d.ts +19 -0
  24. package/dist/healer/transformers/FastApiTransformers.js +93 -0
  25. package/dist/healer/transformers/GoTransformers.d.ts +19 -0
  26. package/dist/healer/transformers/GoTransformers.js +106 -0
  27. package/dist/healer/types.d.ts +59 -0
  28. package/dist/healer/types.js +1 -0
  29. package/dist/redteam/EccAgentBridge.d.ts +20 -0
  30. package/dist/redteam/EccAgentBridge.js +303 -0
  31. package/dist/redteam/RedTeamEngine.d.ts +56 -0
  32. package/dist/redteam/RedTeamEngine.js +709 -0
  33. package/dist/redteam/types.d.ts +117 -0
  34. package/dist/redteam/types.js +5 -0
  35. package/dist/scorer/ResilienceScorer.d.ts +5 -0
  36. package/dist/scorer/ResilienceScorer.js +323 -7
  37. package/dist/scorer/SecurityAuditor.d.ts +8 -0
  38. package/dist/scorer/SecurityAuditor.js +471 -69
  39. package/dist/scorer/TrafficStormAuditor.d.ts +5 -0
  40. package/dist/scorer/TrafficStormAuditor.js +328 -69
  41. package/dist/server.js +17 -10
  42. package/dist/types.d.ts +7 -3
  43. package/package.json +2 -1
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # FaultMesh
2
2
 
3
- High-Precision Network & API Fault Injection Engine and Live Resilience Auditor.
3
+ High-Precision Network & API Fault Injection Engine, Autonomous Red Chaos Team, and Live Resilience Auditor.
4
4
 
5
- FaultMesh is a zero-dependency, lightweight chaos engineering middleman proxy and automated API auditor. It sits between your clients (frontend, mobile apps, microservices) and your backend to simulate real-world network disasters and audit your API for resilience, security headers, data leakage, and DoS defense.
5
+ FaultMesh is a zero-dependency, lightweight chaos engineering middleman proxy and automated API auditor. It sits between your clients (frontend, mobile apps, microservices) and your backend to simulate real-world network disasters, audit your API for resilience and security flaws, and automatically repair discovered vulnerabilities with AST CodeMods.
6
6
 
7
7
  ---
8
8
 
@@ -51,45 +51,87 @@ Examples:
51
51
 
52
52
  ## Core Capabilities
53
53
 
54
- ### 1. Automated 16-Point Audit Suite
55
- FaultMesh executes automated, non-destructive probe batteries against your API and produces a scored diagnostic report card (Grade A+ to F, vulnerability descriptions, and concrete remediation steps).
54
+ ### 1. Autonomous Red Chaos Team Engine
55
+ Deploy automated multi-wave adversarial assault campaigns against your backend:
56
+ * **Tactical Agent Personas:**
57
+ * `VULN-HUNTER` — Surface discovery, host header poisoning, CORS origin checks, auth perimeter bypass.
58
+ * `SILENT-TRAPPER` — Abrupt socket cuts, swallowed exceptions, corrupted JSON stream injections.
59
+ * `NET-FRACTURER` — Latency flutter, jitter fluctuation, gateway 504 hang.
60
+ * `MUTANT-PROBER` — Catastrophic ReDoS, transactional race interleaving, duplicate idempotency probing.
61
+ * `SURGE-STORMER` — Slowloris drip, 1MB buffer overflow, avalanche concurrent bursts.
62
+ * **Live Tactical Telemetry Stream:** Real-time console log tracking probes, responses, and detected breaches.
63
+ * **Survivability Scorecard & Mission Debrief:** Quantitative scoring (Grade A+ to F) with proof-of-exploit snippets and remediation guidelines.
56
64
 
57
- * **Network Resilience Suite (5 Checks):**
65
+ ---
66
+
67
+ ### 2. Auto-Healer & CodeMod Engine
68
+ Repair discovered breaches directly in your codebase with zero guesswork:
69
+ * **Deterministic AST CodeMods:** Surgically injects defensive headers (Helmet), payload limits (413), strict CORS origin validation, centralized error sanitizers, socket timeouts, host whitelist guards, path traversal sanitizers, and idempotency deduplication.
70
+ * **Multi-Framework Support:** Native AST transformers for Express, FastAPI, and Go backends.
71
+ * **Safe Local Execution:** Automatic timestamped backups (`.faultmesh-backup/`), 1-click rollback, and instant live backend re-verification.
72
+
73
+ ---
74
+
75
+ ### 3. Primary Audit Suite (32 Comprehensive Checks)
76
+ FaultMesh executes automated, non-destructive probe batteries and produces scored diagnostic scorecards:
77
+
78
+ * **Network Resilience Suite (10 Checks):**
58
79
  * Latency / Timeout Ingestion (200ms - 5000ms delay handling)
59
80
  * Bandwidth Choking (50 - 500 KB/s stream survival)
60
81
  * TCP Connection Cut (kernel-level `ECONNRESET` recovery)
61
82
  * Payload Truncation (malformed / partial JSON parsing safety)
62
83
  * Server Outage Emulation (HTTP 503 circuit-breaking & backoff)
84
+ * Latency Jitter & Variance
85
+ * Packet Loss & Drops
86
+ * Response Corruption & Garbled Bytes
87
+ * HTTP Header Stripping
88
+ * Premature Connection Reset
63
89
 
64
- * **Security & Protocol Audit Suite (7 Checks):**
90
+ * **Security & Protocol Audit Suite (14 Checks):**
65
91
  * Defensive Headers (`X-Content-Type-Options`, `X-Frame-Options`, `HSTS`)
66
- * CORS Origin & Credential Safety (flags `Access-Control-Allow-Origin: *` with credentials)
92
+ * CORS Origin & Credential Safety
67
93
  * Query Parameter Secret Scanner (flags tokens and passwords in GET URLs)
68
94
  * Outbound Response PII Scanner (scans for leaked API keys, tokens, and database hashes)
69
95
  * Stack Trace Sanitization (ensures 500 errors do not expose file paths or DB schemas)
70
- * Path Traversal Probing (passive `../../etc/passwd` path handling check)
96
+ * Path Traversal Probing (passive directory traversal sequence check)
71
97
  * Safe Canary Syntax Probing (inert SQL quote balancing check without data mutation)
72
-
73
- * **Traffic Storm & DoS Defense Suite (4 Checks):**
98
+ * Host Header Whitelist Validation
99
+ * Unsigned / Malformed Authorization Headers
100
+ * HTTP Method Override Protection
101
+ * Content-Type Mismatch Probing
102
+ * Null Byte Injection Detection
103
+ * Open Redirect Parameter Detection
104
+ * Insecure Cookie Flags (Missing `Secure` / `HttpOnly`)
105
+
106
+ * **Traffic Storm & DoS Defense Suite (8 Checks):**
74
107
  * Rate Limiting & HTTP 429 Backoff (detects missing rate limiters and `Retry-After` headers)
75
108
  * Payload Size Limits & HTTP 413 (tests oversized body handling to prevent buffer OOM crashes)
76
109
  * Slowloris Read Timeout Defense (tests resilience against slow byte-drip socket exhaustion)
77
110
  * Idempotency Deduplication (tests duplicate transaction handling with idempotency keys)
111
+ * Concurrent Burst Avalanche
112
+ * Chunked Transfer Starvation
113
+ * ReDoS Regex Lockup Probe
114
+ * High-Concurrency Connection Pooling Saturation
78
115
 
79
116
  ---
80
117
 
81
- ### 2. Interactive Chaos Proxy (Port 3001)
82
- Point your frontend (React, Vue, iOS, Android) or HTTP client to `http://127.0.0.1:3001`.
83
- Configure fault profiles on the dashboard to test how your frontend handles:
84
- * Simulated 503 outages
85
- * Artificial 2G/3G network latency
86
- * Bandwidth throttling
87
- * Broken connections and truncated responses
118
+ ### 4. Interactive Chaos Proxy & Developer Workbench
119
+ Point your frontend (React, Vue, iOS, Android) or microservices to `http://127.0.0.1:3001`:
120
+ * **1-Click Quick Presets:** Extreme Jitter, Packet Drop, Slow 3G, Corrupted JSON, 503 Outage.
121
+ * **Custom Rule Builder:** Configure latency, error injections, bandwidth throttling, and body corruption with path and method filters.
122
+ * **Live Request Inspector:** Real-time HTTP log with status codes, round-trip durations, active toxic tags, and formatted response viewer.
88
123
 
89
124
  ---
90
125
 
91
- ### 3. Live Traffic Inspector
92
- Inspect every HTTP request passing through the proxy in real time with status pills, measured latency, client IP, and active fault annotations.
126
+ ## Security & Local Confinement
127
+
128
+ FaultMesh runs locally with strict least-privilege principles:
129
+ * **Zero External Runtime Dependencies:** Pure native Node.js (`node:http`, `node:net`, `node:fs`, `node:crypto`).
130
+ * **Strict Path Confinement:** Dashboard HTTP server applies canonical path jailing to prevent directory traversal.
131
+ * **In-Memory Telemetry:** Telemetry and request payloads are kept in an ephemeral in-memory ring buffer; nothing is sent to external servers.
132
+ * **Non-Destructive Probing:** All security probes are read-only and inert.
133
+
134
+ For full details, see [docs/SECURITY.md](docs/SECURITY.md).
93
135
 
94
136
  ---
95
137