cbrowser 18.21.0 → 18.22.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.
- package/dist/cli.js +29 -13
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/lightpanda.d.ts +67 -19
- package/dist/lightpanda.d.ts.map +1 -1
- package/dist/lightpanda.js +164 -41
- package/dist/lightpanda.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,6 @@ export * from "./values/index.js";
|
|
|
38
38
|
export { registerAllPublicTools, registerBaseTools, registerPersonaCreationTools, registerAskUserTool, registerEnterpriseStubs, registerNavigationTools, registerInteractionTools, registerExtractionTools, registerAssertionTools, registerAnalysisTools, registerSessionTools, registerHealingTools, registerVisualTestingTools, registerTestingTools, registerBugAnalysisTools, registerPersonaComparisonTools, registerCognitiveTools, registerValuesTools, registerPerformanceTools, registerAuditTools, registerBrowserManagementTools, registerRemediationTools, registerLlmsTxtTools, } from "./mcp-tools/index.js";
|
|
39
39
|
export type { ToolRegistrationContext } from "./mcp-tools/index.js";
|
|
40
40
|
export * from "./security/index.js";
|
|
41
|
-
export { connectToLightpanda, launchWithLightpandaFallback, getLightpandaStatus, isLightpandaConfigured, shouldUseLightpanda, getLightpandaConfig, LIGHTPANDA_SETUP_GUIDE, LIGHTPANDA_LOCAL_ENDPOINT, LIGHTPANDA_CLOUD_ENDPOINT, } from "./lightpanda.js";
|
|
42
|
-
export type { LightpandaConfig, LightpandaConnectionResult } from "./lightpanda.js";
|
|
41
|
+
export { connectToLightpanda, launchWithLightpandaFallback, getLightpandaStatus, isLightpandaConfigured, shouldUseLightpanda, getLightpandaConfig, isSensitiveOperation, LIGHTPANDA_SETUP_GUIDE, LIGHTPANDA_SECURITY_WARNING, LIGHTPANDA_LOCAL_ENDPOINT, LIGHTPANDA_CLOUD_ENDPOINT, } from "./lightpanda.js";
|
|
42
|
+
export type { LightpandaConfig, LightpandaConnectionResult, SensitiveOperation } from "./lightpanda.js";
|
|
43
43
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,QAAQ,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AACzJ,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACzF,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC9E,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGnE,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAIvH,cAAc,mBAAmB,CAAC;AAGlC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,wBAAwB,CAAC;AAGvC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,wBAAwB,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG1E,cAAc,oBAAoB,CAAC;AAInC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,4BAA4B,CAAC;AAI3C,cAAc,mBAAmB,CAAC;AAIlC,OAA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,wBAAwB,CAAC;AAGvC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,wBAAwB,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG1E,cAAc,oBAAoB,CAAC;AAInC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,4BAA4B,CAAC;AAI3C,cAAc,mBAAmB,CAAC;AAIlC,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,4BAA4B,EAC5B,mBAAmB,EACnB,uBAAuB,EAEvB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EACpB,wBAAwB,EACxB,8BAA8B,EAC9B,sBAAsB,EACtB,mBAAmB,EACnB,wBAAwB,EACxB,kBAAkB,EAClB,8BAA8B,EAC9B,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAGpE,cAAc,qBAAqB,CAAC;AAKpC,OAAO,EACL,mBAAmB,EACnB,4BAA4B,EAC5B,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -56,7 +56,8 @@ export { registerAllPublicTools, registerBaseTools, registerPersonaCreationTools
|
|
|
56
56
|
registerNavigationTools, registerInteractionTools, registerExtractionTools, registerAssertionTools, registerAnalysisTools, registerSessionTools, registerHealingTools, registerVisualTestingTools, registerTestingTools, registerBugAnalysisTools, registerPersonaComparisonTools, registerCognitiveTools, registerValuesTools, registerPerformanceTools, registerAuditTools, registerBrowserManagementTools, registerRemediationTools, registerLlmsTxtTools, } from "./mcp-tools/index.js";
|
|
57
57
|
// Security module (v18.0.0) - Request signing and audit logging
|
|
58
58
|
export * from "./security/index.js";
|
|
59
|
-
// Lightpanda Integration (v18.
|
|
59
|
+
// Lightpanda Integration (v18.20.0) - High-performance headless browser
|
|
60
60
|
// Uses CDP connection for 11x faster, 9x less memory headless browsing
|
|
61
|
-
|
|
61
|
+
// ⚠️ SECURITY: Opt-in only, no security audit, never for sensitive ops
|
|
62
|
+
export { connectToLightpanda, launchWithLightpandaFallback, getLightpandaStatus, isLightpandaConfigured, shouldUseLightpanda, getLightpandaConfig, isSensitiveOperation, LIGHTPANDA_SETUP_GUIDE, LIGHTPANDA_SECURITY_WARNING, LIGHTPANDA_LOCAL_ENDPOINT, LIGHTPANDA_CLOUD_ENDPOINT, } from "./lightpanda.js";
|
|
62
63
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,QAAQ,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AACzJ,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEzF,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEnE,yEAAyE;AACzE,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EA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AC;AAElC,sDAAsD;AACtD,6DAA6D;AAC7D,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,4BAA4B,EAC5B,mBAAmB,EACnB,uBAAuB;AACvB,8CAA8C;AAC9C,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EACpB,wBAAwB,EACxB,8BAA8B,EAC9B,sBAAsB,EACtB,mBAAmB,EACnB,wBAAwB,EACxB,kBAAkB,EAClB,8BAA8B,EAC9B,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAG9B,gEAAgE;AAChE,cAAc,qBAAqB,CAAC;AAEpC,wEAAwE;AACxE,uEAAuE;AACvE,uEAAuE;AACvE,OAAO,EACL,mBAAmB,EACnB,4BAA4B,EAC5B,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC"}
|
package/dist/lightpanda.d.ts
CHANGED
|
@@ -12,8 +12,15 @@
|
|
|
12
12
|
* This module provides CDP-based integration with Playwright, allowing
|
|
13
13
|
* CBrowser to use Lightpanda as an alternative browser backend.
|
|
14
14
|
*
|
|
15
|
+
* ⚠️ SECURITY NOTICE:
|
|
16
|
+
* - Lightpanda is BETA software with no formal security audit
|
|
17
|
+
* - No SECURITY.md or vulnerability disclosure policy
|
|
18
|
+
* - Cloud mode routes traffic through lightpanda.io servers
|
|
19
|
+
* - Never use for credential handling or sensitive operations
|
|
20
|
+
*
|
|
15
21
|
* @see https://lightpanda.io/
|
|
16
|
-
* @
|
|
22
|
+
* @see https://github.com/lightpanda-io/browser
|
|
23
|
+
* @since 18.20.0
|
|
17
24
|
*/
|
|
18
25
|
import { chromium, type Browser } from "playwright";
|
|
19
26
|
/**
|
|
@@ -26,6 +33,8 @@ export interface LightpandaConfig {
|
|
|
26
33
|
token?: string;
|
|
27
34
|
/** Connection timeout in ms (default: 30000) */
|
|
28
35
|
timeout?: number;
|
|
36
|
+
/** Explicitly opt-in to Lightpanda (required for use) */
|
|
37
|
+
explicitOptIn?: boolean;
|
|
29
38
|
}
|
|
30
39
|
/**
|
|
31
40
|
* Lightpanda connection result
|
|
@@ -36,7 +45,13 @@ export interface LightpandaConnectionResult {
|
|
|
36
45
|
endpoint?: string;
|
|
37
46
|
error?: string;
|
|
38
47
|
isCloud: boolean;
|
|
48
|
+
/** Security warning if using cloud mode */
|
|
49
|
+
securityWarning?: string;
|
|
39
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Operations that should NEVER use Lightpanda due to security concerns
|
|
53
|
+
*/
|
|
54
|
+
export type SensitiveOperation = "auth" | "login" | "credential" | "payment" | "checkout" | "password" | "2fa" | "mfa" | "oauth";
|
|
40
55
|
/**
|
|
41
56
|
* Default local endpoint for Lightpanda
|
|
42
57
|
*/
|
|
@@ -50,26 +65,40 @@ export declare const LIGHTPANDA_CLOUD_ENDPOINT = "wss://euwest.cloud.lightpanda.
|
|
|
50
65
|
*/
|
|
51
66
|
export declare function getLightpandaConfig(): LightpandaConfig;
|
|
52
67
|
/**
|
|
53
|
-
* Check if Lightpanda is configured
|
|
68
|
+
* Check if Lightpanda is configured (env vars set)
|
|
54
69
|
*/
|
|
55
70
|
export declare function isLightpandaConfigured(): boolean;
|
|
56
71
|
/**
|
|
57
|
-
* Check if
|
|
72
|
+
* Check if an operation is sensitive and should never use Lightpanda
|
|
73
|
+
*/
|
|
74
|
+
export declare function isSensitiveOperation(operation?: string): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Check if Lightpanda should be used for the current operation
|
|
58
77
|
*
|
|
59
|
-
* Lightpanda is
|
|
60
|
-
*
|
|
61
|
-
*
|
|
78
|
+
* SECURITY: Lightpanda is OPT-IN ONLY. It will NOT be used automatically
|
|
79
|
+
* even if configured. The caller must explicitly set explicitOptIn: true.
|
|
80
|
+
*
|
|
81
|
+
* Lightpanda is suitable for:
|
|
82
|
+
* - Agent-ready audits (public page analysis)
|
|
83
|
+
* - Empathy audits (accessibility testing)
|
|
84
|
+
* - Web scraping of public content
|
|
62
85
|
* - Performance-critical batch operations
|
|
63
86
|
*
|
|
64
87
|
* Lightpanda is NOT suitable for:
|
|
65
|
-
* -
|
|
66
|
-
* -
|
|
67
|
-
* -
|
|
88
|
+
* - Any authentication flows
|
|
89
|
+
* - Credential handling
|
|
90
|
+
* - Payment/checkout flows
|
|
91
|
+
* - Visual regression testing
|
|
92
|
+
* - Cross-browser testing
|
|
68
93
|
*/
|
|
69
94
|
export declare function shouldUseLightpanda(options: {
|
|
70
95
|
headless?: boolean;
|
|
71
96
|
requiresVisualAccuracy?: boolean;
|
|
72
97
|
browserType?: string;
|
|
98
|
+
/** Must be true to enable Lightpanda */
|
|
99
|
+
explicitOptIn?: boolean;
|
|
100
|
+
/** Operation name - checked against sensitive patterns */
|
|
101
|
+
operation?: string;
|
|
73
102
|
}): boolean;
|
|
74
103
|
/**
|
|
75
104
|
* Build the Lightpanda WebSocket URL
|
|
@@ -87,27 +116,36 @@ export declare function checkLightpandaAvailability(endpoint?: string, timeout?:
|
|
|
87
116
|
* Lightpanda exposes a Chrome DevTools Protocol (CDP) interface,
|
|
88
117
|
* which Playwright can connect to using chromium.connectOverCDP().
|
|
89
118
|
*
|
|
119
|
+
* ⚠️ SECURITY: Cloud connections route traffic through lightpanda.io.
|
|
120
|
+
* Never use for sensitive operations.
|
|
121
|
+
*
|
|
90
122
|
* @example
|
|
91
123
|
* ```typescript
|
|
92
|
-
* // Local Lightpanda instance
|
|
124
|
+
* // Local Lightpanda instance (recommended)
|
|
93
125
|
* const result = await connectToLightpanda({ endpoint: "ws://127.0.0.1:9222" });
|
|
94
126
|
*
|
|
95
|
-
* // Lightpanda Cloud
|
|
127
|
+
* // Lightpanda Cloud (⚠️ traffic visible to lightpanda.io)
|
|
96
128
|
* const result = await connectToLightpanda({ token: "your-api-token" });
|
|
97
129
|
* ```
|
|
98
130
|
*/
|
|
99
131
|
export declare function connectToLightpanda(config?: LightpandaConfig): Promise<LightpandaConnectionResult>;
|
|
100
132
|
/**
|
|
101
|
-
* Launch a browser with Lightpanda
|
|
133
|
+
* Launch a browser with Lightpanda (OPT-IN ONLY)
|
|
102
134
|
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
135
|
+
* ⚠️ SECURITY: Lightpanda is NOT used automatically. You must explicitly
|
|
136
|
+
* set explicitOptIn: true to use it. This is a security measure because:
|
|
137
|
+
* - Lightpanda is beta software with no security audit
|
|
138
|
+
* - Cloud mode exposes traffic to third party
|
|
139
|
+
* - It should never be used for sensitive operations
|
|
105
140
|
*
|
|
106
141
|
* @example
|
|
107
142
|
* ```typescript
|
|
108
|
-
* //
|
|
109
|
-
* const browser = await launchWithLightpandaFallback({
|
|
110
|
-
*
|
|
143
|
+
* // Explicit opt-in required
|
|
144
|
+
* const { browser, isLightpanda } = await launchWithLightpandaFallback({
|
|
145
|
+
* headless: true,
|
|
146
|
+
* explicitOptIn: true, // Required!
|
|
147
|
+
* operation: "agent-ready-audit", // Checked against sensitive patterns
|
|
148
|
+
* });
|
|
111
149
|
* ```
|
|
112
150
|
*/
|
|
113
151
|
export declare function launchWithLightpandaFallback(options: {
|
|
@@ -115,9 +153,14 @@ export declare function launchWithLightpandaFallback(options: {
|
|
|
115
153
|
requiresVisualAccuracy?: boolean;
|
|
116
154
|
browserType?: "chromium" | "firefox" | "webkit";
|
|
117
155
|
launchOptions?: Parameters<typeof chromium.launch>[0];
|
|
156
|
+
/** Must be true to enable Lightpanda - OPT-IN ONLY */
|
|
157
|
+
explicitOptIn?: boolean;
|
|
158
|
+
/** Operation name - sensitive operations are blocked */
|
|
159
|
+
operation?: string;
|
|
118
160
|
}): Promise<{
|
|
119
161
|
browser: Browser;
|
|
120
162
|
isLightpanda: boolean;
|
|
163
|
+
securityWarning?: string;
|
|
121
164
|
}>;
|
|
122
165
|
/**
|
|
123
166
|
* Get Lightpanda status information
|
|
@@ -128,9 +171,14 @@ export declare function getLightpandaStatus(): Promise<{
|
|
|
128
171
|
endpoint: string;
|
|
129
172
|
isCloud: boolean;
|
|
130
173
|
error?: string;
|
|
174
|
+
securityWarning?: string;
|
|
131
175
|
}>;
|
|
132
176
|
/**
|
|
133
|
-
* Lightpanda setup instructions
|
|
177
|
+
* Lightpanda setup instructions with security warnings
|
|
178
|
+
*/
|
|
179
|
+
export declare const LIGHTPANDA_SETUP_GUIDE = "\n\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557\n\u2551 Lightpanda Setup - High-Performance Headless Browser \u2551\n\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D\n\nLightpanda is 11x faster and uses 9x less memory than Chrome headless.\nIt's ideal for AI agents, web scraping, and automated testing.\n\n\u2501\u2501\u2501 \u26A0\uFE0F SECURITY NOTICE \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\nLightpanda is BETA software. Before using, understand:\n\n \uD83D\uDD34 NO SECURITY AUDIT - No formal security review or SECURITY.md\n \uD83D\uDD34 BETA STATUS - Crashes and bugs are expected\n \uD83D\uDD34 CLOUD EXPOSURE - Cloud mode routes traffic through lightpanda.io\n \uD83D\uDD34 OPT-IN ONLY - Requires explicit --lightpanda flag\n\nNEVER use Lightpanda for:\n \u2717 Authentication or login flows\n \u2717 Credential or password handling\n \u2717 Payment or checkout processes\n \u2717 Any sensitive data operations\n\n\u2501\u2501\u2501 Option 1: Local Installation (Recommended) \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\nDocker (isolates Lightpanda from your system):\n docker run -d --name lightpanda -p 9222:9222 lightpanda/browser:nightly\n\nBinary (Linux/macOS):\n curl -LO https://github.com/lightpanda-io/browser/releases/latest/download/lightpanda\n chmod +x lightpanda\n ./lightpanda serve --host 127.0.0.1 --port 9222\n\nThen set environment variable:\n export LIGHTPANDA_ENDPOINT=ws://127.0.0.1:9222\n\n\u2501\u2501\u2501 Option 2: Lightpanda Cloud (\u26A0\uFE0F Third-Party Data Exposure) \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\nWARNING: Cloud mode sends ALL browser traffic through lightpanda.io servers.\nThey can see: URLs, page content, cookies, form submissions.\n\nOnly use for PUBLIC content you don't mind sharing.\n\n1. Sign up at https://lightpanda.io/\n2. Get your API token from the dashboard\n3. Set environment variable:\n export LIGHTPANDA_TOKEN=your-api-token\n\n\u2501\u2501\u2501 Usage (OPT-IN REQUIRED) \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\nLightpanda is NOT used automatically. You must explicitly opt-in:\n\n # Check status\n npx cbrowser lightpanda-status\n\n # Take screenshot with Lightpanda (--lightpanda flag required)\n npx cbrowser screenshot https://example.com --lightpanda\n\n # Run audit with Lightpanda\n npx cbrowser agent-ready-audit https://example.com --lightpanda\n\n\u2501\u2501\u2501 When to Use Lightpanda \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\n\u2705 Good for (public, non-sensitive):\n \u2022 Agent-ready audits on public sites\n \u2022 Empathy audits (accessibility testing)\n \u2022 Web scraping public content\n \u2022 Performance benchmarking\n \u2022 Batch operations on public pages\n\n\u274C Never use for:\n \u2022 Visual regression testing (different rendering)\n \u2022 Cross-browser testing (Chromium only)\n \u2022 Authentication flows\n \u2022 Any operation with credentials\n \u2022 Payment or checkout testing\n\n\u2501\u2501\u2501 More Information \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\nGitHub: https://github.com/lightpanda-io/browser\nDocumentation: https://lightpanda.io/docs\nCBrowser Integration: https://cbrowser.ai/docs/lightpanda\n";
|
|
180
|
+
/**
|
|
181
|
+
* Security warning constant for display
|
|
134
182
|
*/
|
|
135
|
-
export declare const
|
|
183
|
+
export declare const LIGHTPANDA_SECURITY_WARNING: string;
|
|
136
184
|
//# sourceMappingURL=lightpanda.d.ts.map
|
package/dist/lightpanda.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightpanda.d.ts","sourceRoot":"","sources":["../src/lightpanda.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH
|
|
1
|
+
{"version":3,"file":"lightpanda.d.ts","sourceRoot":"","sources":["../src/lightpanda.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,QAAQ,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,mFAAmF;IACnF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KA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;;GAkBG;AACH,wBAAsB,4BAA4B,CAAC,OAAO,EAAE;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,WAAW,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;IAChD,aAAa,CAAC,EAAE,UAAU,CAAC,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,sDAAsD;IACtD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,OAAO,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAgDjF;AAED;;GAEG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC;IACnD,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC,CAsCD;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,+yKAkFlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,QAUhC,CAAC"}
|
package/dist/lightpanda.js
CHANGED
|
@@ -12,8 +12,15 @@
|
|
|
12
12
|
* This module provides CDP-based integration with Playwright, allowing
|
|
13
13
|
* CBrowser to use Lightpanda as an alternative browser backend.
|
|
14
14
|
*
|
|
15
|
+
* ⚠️ SECURITY NOTICE:
|
|
16
|
+
* - Lightpanda is BETA software with no formal security audit
|
|
17
|
+
* - No SECURITY.md or vulnerability disclosure policy
|
|
18
|
+
* - Cloud mode routes traffic through lightpanda.io servers
|
|
19
|
+
* - Never use for credential handling or sensitive operations
|
|
20
|
+
*
|
|
15
21
|
* @see https://lightpanda.io/
|
|
16
|
-
* @
|
|
22
|
+
* @see https://github.com/lightpanda-io/browser
|
|
23
|
+
* @since 18.20.0
|
|
17
24
|
*/
|
|
18
25
|
import { chromium } from "playwright";
|
|
19
26
|
/**
|
|
@@ -32,30 +39,67 @@ export function getLightpandaConfig() {
|
|
|
32
39
|
endpoint: process.env.LIGHTPANDA_ENDPOINT,
|
|
33
40
|
token: process.env.LIGHTPANDA_TOKEN,
|
|
34
41
|
timeout: parseInt(process.env.LIGHTPANDA_TIMEOUT || "30000", 10) || 30000,
|
|
42
|
+
explicitOptIn: false, // Must be explicitly set
|
|
35
43
|
};
|
|
36
44
|
}
|
|
37
45
|
/**
|
|
38
|
-
* Check if Lightpanda is configured
|
|
46
|
+
* Check if Lightpanda is configured (env vars set)
|
|
39
47
|
*/
|
|
40
48
|
export function isLightpandaConfigured() {
|
|
41
49
|
const config = getLightpandaConfig();
|
|
42
|
-
// Configured if either local endpoint is set, or cloud token is provided
|
|
43
50
|
return !!(config.endpoint || config.token);
|
|
44
51
|
}
|
|
45
52
|
/**
|
|
46
|
-
* Check if
|
|
53
|
+
* Check if an operation is sensitive and should never use Lightpanda
|
|
54
|
+
*/
|
|
55
|
+
export function isSensitiveOperation(operation) {
|
|
56
|
+
if (!operation)
|
|
57
|
+
return false;
|
|
58
|
+
const lower = operation.toLowerCase();
|
|
59
|
+
const sensitivePatterns = [
|
|
60
|
+
"auth",
|
|
61
|
+
"login",
|
|
62
|
+
"credential",
|
|
63
|
+
"payment",
|
|
64
|
+
"checkout",
|
|
65
|
+
"password",
|
|
66
|
+
"2fa",
|
|
67
|
+
"mfa",
|
|
68
|
+
"oauth",
|
|
69
|
+
];
|
|
70
|
+
return sensitivePatterns.some((pattern) => lower.includes(pattern));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Check if Lightpanda should be used for the current operation
|
|
74
|
+
*
|
|
75
|
+
* SECURITY: Lightpanda is OPT-IN ONLY. It will NOT be used automatically
|
|
76
|
+
* even if configured. The caller must explicitly set explicitOptIn: true.
|
|
47
77
|
*
|
|
48
|
-
* Lightpanda is
|
|
49
|
-
* -
|
|
50
|
-
* -
|
|
78
|
+
* Lightpanda is suitable for:
|
|
79
|
+
* - Agent-ready audits (public page analysis)
|
|
80
|
+
* - Empathy audits (accessibility testing)
|
|
81
|
+
* - Web scraping of public content
|
|
51
82
|
* - Performance-critical batch operations
|
|
52
83
|
*
|
|
53
84
|
* Lightpanda is NOT suitable for:
|
|
54
|
-
* -
|
|
55
|
-
* -
|
|
56
|
-
* -
|
|
85
|
+
* - Any authentication flows
|
|
86
|
+
* - Credential handling
|
|
87
|
+
* - Payment/checkout flows
|
|
88
|
+
* - Visual regression testing
|
|
89
|
+
* - Cross-browser testing
|
|
57
90
|
*/
|
|
58
91
|
export function shouldUseLightpanda(options) {
|
|
92
|
+
// SECURITY: Require explicit opt-in
|
|
93
|
+
if (!options.explicitOptIn) {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
// SECURITY: Block sensitive operations
|
|
97
|
+
if (isSensitiveOperation(options.operation)) {
|
|
98
|
+
if (process.env.CBROWSER_VERBOSE === "true") {
|
|
99
|
+
console.log(`⚠️ Lightpanda blocked for sensitive operation: ${options.operation}`);
|
|
100
|
+
}
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
59
103
|
// Only use Lightpanda for headless chromium operations
|
|
60
104
|
if (options.browserType && options.browserType !== "chromium") {
|
|
61
105
|
return false;
|
|
@@ -107,18 +151,39 @@ export async function checkLightpandaAvailability(endpoint = LIGHTPANDA_LOCAL_EN
|
|
|
107
151
|
return false;
|
|
108
152
|
}
|
|
109
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Get security warning for cloud mode
|
|
156
|
+
*/
|
|
157
|
+
function getCloudSecurityWarning() {
|
|
158
|
+
return `
|
|
159
|
+
⚠️ CLOUD MODE SECURITY WARNING:
|
|
160
|
+
Your browser traffic will be routed through lightpanda.io servers.
|
|
161
|
+
They can see: URLs visited, page content, cookies, and form data.
|
|
162
|
+
|
|
163
|
+
DO NOT use cloud mode for:
|
|
164
|
+
• Authentication flows
|
|
165
|
+
• Handling credentials or passwords
|
|
166
|
+
• Payment or checkout processes
|
|
167
|
+
• Any sensitive data
|
|
168
|
+
|
|
169
|
+
For sensitive operations, use local Lightpanda or Playwright Chromium.
|
|
170
|
+
`.trim();
|
|
171
|
+
}
|
|
110
172
|
/**
|
|
111
173
|
* Connect to Lightpanda via CDP
|
|
112
174
|
*
|
|
113
175
|
* Lightpanda exposes a Chrome DevTools Protocol (CDP) interface,
|
|
114
176
|
* which Playwright can connect to using chromium.connectOverCDP().
|
|
115
177
|
*
|
|
178
|
+
* ⚠️ SECURITY: Cloud connections route traffic through lightpanda.io.
|
|
179
|
+
* Never use for sensitive operations.
|
|
180
|
+
*
|
|
116
181
|
* @example
|
|
117
182
|
* ```typescript
|
|
118
|
-
* // Local Lightpanda instance
|
|
183
|
+
* // Local Lightpanda instance (recommended)
|
|
119
184
|
* const result = await connectToLightpanda({ endpoint: "ws://127.0.0.1:9222" });
|
|
120
185
|
*
|
|
121
|
-
* // Lightpanda Cloud
|
|
186
|
+
* // Lightpanda Cloud (⚠️ traffic visible to lightpanda.io)
|
|
122
187
|
* const result = await connectToLightpanda({ token: "your-api-token" });
|
|
123
188
|
* ```
|
|
124
189
|
*/
|
|
@@ -126,17 +191,23 @@ export async function connectToLightpanda(config) {
|
|
|
126
191
|
const cfg = config || getLightpandaConfig();
|
|
127
192
|
const endpoint = buildLightpandaUrl(cfg);
|
|
128
193
|
const isCloud = endpoint.includes("cloud.lightpanda.io");
|
|
194
|
+
// Add security warning for cloud mode
|
|
195
|
+
const securityWarning = isCloud ? getCloudSecurityWarning() : undefined;
|
|
196
|
+
if (isCloud && process.env.CBROWSER_VERBOSE === "true") {
|
|
197
|
+
console.log(securityWarning);
|
|
198
|
+
}
|
|
129
199
|
try {
|
|
130
200
|
// Use Playwright's CDP connection
|
|
131
201
|
const browser = await chromium.connectOverCDP(endpoint, {
|
|
132
202
|
timeout: cfg.timeout || 30000,
|
|
133
203
|
});
|
|
134
|
-
console.log(`🐼 Connected to Lightpanda ${isCloud ? "(Cloud)" : "(Local)"}`);
|
|
204
|
+
console.log(`🐼 Connected to Lightpanda ${isCloud ? "(Cloud ⚠️)" : "(Local)"}`);
|
|
135
205
|
return {
|
|
136
206
|
success: true,
|
|
137
207
|
browser,
|
|
138
208
|
endpoint,
|
|
139
209
|
isCloud,
|
|
210
|
+
securityWarning,
|
|
140
211
|
};
|
|
141
212
|
}
|
|
142
213
|
catch (error) {
|
|
@@ -146,31 +217,39 @@ export async function connectToLightpanda(config) {
|
|
|
146
217
|
error: `Failed to connect to Lightpanda at ${endpoint}: ${message}`,
|
|
147
218
|
endpoint,
|
|
148
219
|
isCloud,
|
|
220
|
+
securityWarning,
|
|
149
221
|
};
|
|
150
222
|
}
|
|
151
223
|
}
|
|
152
224
|
/**
|
|
153
|
-
* Launch a browser with Lightpanda
|
|
225
|
+
* Launch a browser with Lightpanda (OPT-IN ONLY)
|
|
154
226
|
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
227
|
+
* ⚠️ SECURITY: Lightpanda is NOT used automatically. You must explicitly
|
|
228
|
+
* set explicitOptIn: true to use it. This is a security measure because:
|
|
229
|
+
* - Lightpanda is beta software with no security audit
|
|
230
|
+
* - Cloud mode exposes traffic to third party
|
|
231
|
+
* - It should never be used for sensitive operations
|
|
157
232
|
*
|
|
158
233
|
* @example
|
|
159
234
|
* ```typescript
|
|
160
|
-
* //
|
|
161
|
-
* const browser = await launchWithLightpandaFallback({
|
|
162
|
-
*
|
|
235
|
+
* // Explicit opt-in required
|
|
236
|
+
* const { browser, isLightpanda } = await launchWithLightpandaFallback({
|
|
237
|
+
* headless: true,
|
|
238
|
+
* explicitOptIn: true, // Required!
|
|
239
|
+
* operation: "agent-ready-audit", // Checked against sensitive patterns
|
|
240
|
+
* });
|
|
163
241
|
* ```
|
|
164
242
|
*/
|
|
165
243
|
export async function launchWithLightpandaFallback(options) {
|
|
166
|
-
const { headless = true, requiresVisualAccuracy = false, browserType = "chromium", launchOptions = {} } = options;
|
|
167
|
-
// Check if we should try Lightpanda
|
|
168
|
-
if (shouldUseLightpanda({ headless, requiresVisualAccuracy, browserType })) {
|
|
244
|
+
const { headless = true, requiresVisualAccuracy = false, browserType = "chromium", launchOptions = {}, explicitOptIn = false, operation, } = options;
|
|
245
|
+
// Check if we should try Lightpanda (requires explicit opt-in)
|
|
246
|
+
if (shouldUseLightpanda({ headless, requiresVisualAccuracy, browserType, explicitOptIn, operation })) {
|
|
169
247
|
const result = await connectToLightpanda();
|
|
170
248
|
if (result.success && result.browser) {
|
|
171
249
|
return {
|
|
172
250
|
browser: result.browser,
|
|
173
251
|
isLightpanda: true,
|
|
252
|
+
securityWarning: result.securityWarning,
|
|
174
253
|
};
|
|
175
254
|
}
|
|
176
255
|
// Log fallback reason if verbose
|
|
@@ -204,6 +283,7 @@ export async function getLightpandaStatus() {
|
|
|
204
283
|
const configured = isLightpandaConfigured();
|
|
205
284
|
const endpoint = buildLightpandaUrl(config);
|
|
206
285
|
const isCloud = endpoint.includes("cloud.lightpanda.io");
|
|
286
|
+
const securityWarning = isCloud ? getCloudSecurityWarning() : undefined;
|
|
207
287
|
if (!configured) {
|
|
208
288
|
return {
|
|
209
289
|
configured: false,
|
|
@@ -221,6 +301,7 @@ export async function getLightpandaStatus() {
|
|
|
221
301
|
available: true,
|
|
222
302
|
endpoint,
|
|
223
303
|
isCloud,
|
|
304
|
+
securityWarning,
|
|
224
305
|
};
|
|
225
306
|
}
|
|
226
307
|
return {
|
|
@@ -229,10 +310,11 @@ export async function getLightpandaStatus() {
|
|
|
229
310
|
endpoint,
|
|
230
311
|
isCloud,
|
|
231
312
|
error: result.error,
|
|
313
|
+
securityWarning,
|
|
232
314
|
};
|
|
233
315
|
}
|
|
234
316
|
/**
|
|
235
|
-
* Lightpanda setup instructions
|
|
317
|
+
* Lightpanda setup instructions with security warnings
|
|
236
318
|
*/
|
|
237
319
|
export const LIGHTPANDA_SETUP_GUIDE = `
|
|
238
320
|
╔══════════════════════════════════════════════════════════════════════════════╗
|
|
@@ -242,52 +324,93 @@ export const LIGHTPANDA_SETUP_GUIDE = `
|
|
|
242
324
|
Lightpanda is 11x faster and uses 9x less memory than Chrome headless.
|
|
243
325
|
It's ideal for AI agents, web scraping, and automated testing.
|
|
244
326
|
|
|
245
|
-
━━━
|
|
327
|
+
━━━ ⚠️ SECURITY NOTICE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
328
|
+
|
|
329
|
+
Lightpanda is BETA software. Before using, understand:
|
|
246
330
|
|
|
247
|
-
|
|
331
|
+
🔴 NO SECURITY AUDIT - No formal security review or SECURITY.md
|
|
332
|
+
🔴 BETA STATUS - Crashes and bugs are expected
|
|
333
|
+
🔴 CLOUD EXPOSURE - Cloud mode routes traffic through lightpanda.io
|
|
334
|
+
🔴 OPT-IN ONLY - Requires explicit --lightpanda flag
|
|
335
|
+
|
|
336
|
+
NEVER use Lightpanda for:
|
|
337
|
+
✗ Authentication or login flows
|
|
338
|
+
✗ Credential or password handling
|
|
339
|
+
✗ Payment or checkout processes
|
|
340
|
+
✗ Any sensitive data operations
|
|
341
|
+
|
|
342
|
+
━━━ Option 1: Local Installation (Recommended) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
343
|
+
|
|
344
|
+
Docker (isolates Lightpanda from your system):
|
|
248
345
|
docker run -d --name lightpanda -p 9222:9222 lightpanda/browser:nightly
|
|
249
346
|
|
|
250
347
|
Binary (Linux/macOS):
|
|
251
|
-
curl -LO https://github.com/
|
|
348
|
+
curl -LO https://github.com/lightpanda-io/browser/releases/latest/download/lightpanda
|
|
252
349
|
chmod +x lightpanda
|
|
253
350
|
./lightpanda serve --host 127.0.0.1 --port 9222
|
|
254
351
|
|
|
255
352
|
Then set environment variable:
|
|
256
353
|
export LIGHTPANDA_ENDPOINT=ws://127.0.0.1:9222
|
|
257
354
|
|
|
258
|
-
━━━ Option 2: Lightpanda Cloud
|
|
355
|
+
━━━ Option 2: Lightpanda Cloud (⚠️ Third-Party Data Exposure) ━━━━━━━━━━━━━━━━
|
|
356
|
+
|
|
357
|
+
WARNING: Cloud mode sends ALL browser traffic through lightpanda.io servers.
|
|
358
|
+
They can see: URLs, page content, cookies, form submissions.
|
|
359
|
+
|
|
360
|
+
Only use for PUBLIC content you don't mind sharing.
|
|
259
361
|
|
|
260
362
|
1. Sign up at https://lightpanda.io/
|
|
261
363
|
2. Get your API token from the dashboard
|
|
262
364
|
3. Set environment variable:
|
|
263
365
|
export LIGHTPANDA_TOKEN=your-api-token
|
|
264
366
|
|
|
265
|
-
━━━
|
|
367
|
+
━━━ Usage (OPT-IN REQUIRED) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
368
|
+
|
|
369
|
+
Lightpanda is NOT used automatically. You must explicitly opt-in:
|
|
266
370
|
|
|
267
|
-
Check status
|
|
371
|
+
# Check status
|
|
268
372
|
npx cbrowser lightpanda-status
|
|
269
373
|
|
|
270
|
-
|
|
374
|
+
# Take screenshot with Lightpanda (--lightpanda flag required)
|
|
271
375
|
npx cbrowser screenshot https://example.com --lightpanda
|
|
272
376
|
|
|
377
|
+
# Run audit with Lightpanda
|
|
378
|
+
npx cbrowser agent-ready-audit https://example.com --lightpanda
|
|
379
|
+
|
|
273
380
|
━━━ When to Use Lightpanda ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
274
381
|
|
|
275
|
-
✅
|
|
276
|
-
• Agent-ready audits
|
|
277
|
-
• Empathy audits
|
|
278
|
-
• Web scraping
|
|
279
|
-
•
|
|
280
|
-
•
|
|
382
|
+
✅ Good for (public, non-sensitive):
|
|
383
|
+
• Agent-ready audits on public sites
|
|
384
|
+
• Empathy audits (accessibility testing)
|
|
385
|
+
• Web scraping public content
|
|
386
|
+
• Performance benchmarking
|
|
387
|
+
• Batch operations on public pages
|
|
281
388
|
|
|
282
|
-
❌
|
|
283
|
-
• Visual regression testing (
|
|
284
|
-
• Cross-browser testing (
|
|
285
|
-
•
|
|
389
|
+
❌ Never use for:
|
|
390
|
+
• Visual regression testing (different rendering)
|
|
391
|
+
• Cross-browser testing (Chromium only)
|
|
392
|
+
• Authentication flows
|
|
393
|
+
• Any operation with credentials
|
|
394
|
+
• Payment or checkout testing
|
|
286
395
|
|
|
287
396
|
━━━ More Information ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
288
397
|
|
|
398
|
+
GitHub: https://github.com/lightpanda-io/browser
|
|
289
399
|
Documentation: https://lightpanda.io/docs
|
|
290
|
-
GitHub: https://github.com/nicecoder/lightpanda
|
|
291
400
|
CBrowser Integration: https://cbrowser.ai/docs/lightpanda
|
|
292
401
|
`;
|
|
402
|
+
/**
|
|
403
|
+
* Security warning constant for display
|
|
404
|
+
*/
|
|
405
|
+
export const LIGHTPANDA_SECURITY_WARNING = `
|
|
406
|
+
⚠️ LIGHTPANDA SECURITY NOTICE
|
|
407
|
+
|
|
408
|
+
Lightpanda is beta software with no formal security audit.
|
|
409
|
+
• No SECURITY.md or vulnerability disclosure process
|
|
410
|
+
• No third-party code audit documented
|
|
411
|
+
• Cloud mode exposes traffic to lightpanda.io servers
|
|
412
|
+
|
|
413
|
+
Use only for public, non-sensitive operations.
|
|
414
|
+
Never use for authentication, credentials, or payments.
|
|
415
|
+
`.trim();
|
|
293
416
|
//# sourceMappingURL=lightpanda.js.map
|
package/dist/lightpanda.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightpanda.js","sourceRoot":"","sources":["../src/lightpanda.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH
|
|
1
|
+
{"version":3,"file":"lightpanda.js","sourceRoot":"","sources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,EAAE,yBAAyB;YACnC,OAAO,EAAE,KAAK;SACf,CAAC;IACJ,CAAC;IAED,iBAAiB;IACjB,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAEjD,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACrC,MAAM,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QAC7B,OAAO;YACL,UAAU,EAAE,IAAI;YAChB,SAAS,EAAE,IAAI;YACf,QAAQ;YACR,OAAO;YACP,eAAe;SAChB,CAAC;IACJ,CAAC;IAED,OAAO;QACL,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,QAAQ;QACR,OAAO;QACP,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,eAAe;KAChB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFrC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;;;;;;;;;;CAU1C,CAAC,IAAI,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cbrowser",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.22.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Cognitive browser automation that thinks like your users—and helps AI agents navigate too. Simulate real user cognition with abandonment detection, constitutional safety, chaos engineering, and UX friction discovery. Sites that pass CBrowser's cognitive tests are easier for both humans and AI agents to navigate.",
|
|
6
6
|
"main": "dist/index.js",
|