shroud-privacy 2.2.9 → 2.2.11
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.
- package/README.md +33 -11
- package/dist/agent-session.d.ts +259 -0
- package/dist/agent-session.js +693 -0
- package/dist/dashboard.d.ts +42 -0
- package/dist/dashboard.js +1558 -0
- package/dist/detectors/context.js +7 -0
- package/dist/detectors/injection-multilingual.d.ts +27 -0
- package/dist/detectors/injection-multilingual.js +399 -0
- package/dist/detectors/injection-signatures.d.ts +26 -0
- package/dist/detectors/injection-signatures.js +508 -0
- package/dist/detectors/injection.d.ts +56 -0
- package/dist/detectors/injection.js +269 -0
- package/dist/detectors/regex.js +2 -2
- package/dist/detectors/tool-guard.d.ts +27 -0
- package/dist/detectors/tool-guard.js +418 -0
- package/dist/event-grader.d.ts +97 -0
- package/dist/event-grader.js +214 -0
- package/dist/policy.d.ts +93 -43
- package/dist/policy.js +193 -86
- package/dist/profiler-analysis.d.ts +35 -0
- package/dist/profiler-analysis.js +230 -0
- package/dist/profiler-store.d.ts +33 -0
- package/dist/profiler-store.js +118 -0
- package/dist/profiler-types.d.ts +128 -0
- package/dist/profiler-types.js +16 -0
- package/dist/profiler.d.ts +81 -0
- package/dist/profiler.js +392 -0
- package/dist/security-event.d.ts +70 -0
- package/dist/security-event.js +80 -0
- package/dist/siem.d.ts +38 -24
- package/dist/siem.js +90 -68
- package/dist/signature-loader.d.ts +113 -0
- package/dist/signature-loader.js +255 -0
- package/openclaw.plugin.json +155 -30
- package/package.json +4 -4
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Real-time security dashboard — lightweight HTTP endpoint.
|
|
3
|
+
*
|
|
4
|
+
* Serves JSON snapshots of all agent sessions, security events,
|
|
5
|
+
* profiling baselines, and injection detection stats. Designed
|
|
6
|
+
* for Grafana, custom UIs, or direct curl consumption.
|
|
7
|
+
*
|
|
8
|
+
* Zero external dependencies — uses Node's built-in http module.
|
|
9
|
+
*
|
|
10
|
+
* Endpoints:
|
|
11
|
+
* GET /health — liveness check
|
|
12
|
+
* GET /api/overview — high-level security summary
|
|
13
|
+
* GET /api/agents — all agent sessions with profiling status
|
|
14
|
+
* GET /api/agents/:buildId — single agent detail
|
|
15
|
+
* GET /api/events — recent security events (last 100)
|
|
16
|
+
* GET /api/events/stream — SSE stream of security events (real-time)
|
|
17
|
+
* GET /api/profiling — profiling baselines for all agents
|
|
18
|
+
* GET /api/profiling/:buildId — single agent baseline detail
|
|
19
|
+
* GET /api/stats — obfuscation + security stats combined
|
|
20
|
+
*/
|
|
21
|
+
import { createServer } from "node:http";
|
|
22
|
+
import type { SecurityEventBus } from "./security-event.js";
|
|
23
|
+
import type { AgentSessionTracker } from "./agent-session.js";
|
|
24
|
+
import type { BaselineStore } from "./profiler-store.js";
|
|
25
|
+
import type { Obfuscator } from "./obfuscator.js";
|
|
26
|
+
import type { BehaviouralProfiler } from "./profiler.js";
|
|
27
|
+
import type { ShroudConfig } from "./types.js";
|
|
28
|
+
import type { PolicyEngine } from "./policy.js";
|
|
29
|
+
export interface DashboardDeps {
|
|
30
|
+
securityBus: SecurityEventBus | null;
|
|
31
|
+
agentTracker: AgentSessionTracker;
|
|
32
|
+
baselineStore: BaselineStore | null;
|
|
33
|
+
obfuscator: Obfuscator;
|
|
34
|
+
profiler: BehaviouralProfiler | null;
|
|
35
|
+
config: ShroudConfig;
|
|
36
|
+
policyEngine: PolicyEngine | null;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Start the dashboard HTTP server.
|
|
40
|
+
* Returns the server instance for cleanup.
|
|
41
|
+
*/
|
|
42
|
+
export declare function startDashboard(port: number, deps: DashboardDeps): ReturnType<typeof createServer>;
|