@pensar/apex 2.0.0-canary.241920ad → 2.0.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/README.md +0 -20
- package/build/agent-84enr6xn.js +22 -0
- package/build/{agent-7866ka7b.js → agent-x1tnsg7n.js} +10 -7
- package/build/{agent-aj7jpehp.js → agent-z8043nrm.js} +12 -9
- package/build/{apps-hse35c2d.js → apps-gdze0s68.js} +18 -15
- package/build/{auth-15rkvgam.js → auth-24ca1qwx.js} +19 -16
- package/build/authentication-0k43jay4.js +22 -0
- package/build/blackboxAgent-76tnwwg7.js +22 -0
- package/build/{blackboxPentest-vmtnnp5d.js → blackboxPentest-xwc031xm.js} +16 -13
- package/build/{cli-23xtyah8.js → cli-0v9x0eby.js} +1 -1
- package/build/cli-1yavz2pb.js +17 -0
- package/build/{cli-6gge86w5.js → cli-31cara07.js} +6 -8
- package/build/cli-3knnkdps.js +666 -0
- package/build/{cli-cbw2rmv7.js → cli-5fr9k6m4.js} +35 -58
- package/build/{cli-78s9w64j.js → cli-948dk60p.js} +1 -1
- package/build/{cli-k1vsv3qh.js → cli-a20jcpmp.js} +1 -1
- package/build/{cli-0svsmc2c.js → cli-cb5va0cs.js} +1 -10
- package/build/{cli-rtbry75t.js → cli-h6nw89zf.js} +1 -1
- package/build/{cli-5h1kv0v4.js → cli-h825qzmd.js} +53 -1492
- package/build/{cli-gtepvg8s.js → cli-k8mvghe1.js} +921 -444
- package/build/{cli-4dpc999m.js → cli-mswm4k81.js} +1 -11
- package/build/{cli-zyk3xsth.js → cli-ntd42071.js} +1 -1
- package/build/{cli-mb837pv4.js → cli-pkdjamer.js} +5 -15
- package/build/cli-s1nckt4k.js +20 -0
- package/build/{cli-4ez6yssj.js → cli-sw5swz40.js} +3 -3
- package/build/{cli-ft17f9nh.js → cli-wdmqkshz.js} +2 -2
- package/build/{cli-demg7sj2.js → cli-zpvmaxem.js} +2 -2
- package/build/{cli-r0s5br0a.js → cli-zvq4gy61.js} +6 -13
- package/build/cli.js +45 -105
- package/build/{config-bb6q79q0.js → config-cmq1cxz3.js} +3 -3
- package/build/{doctor-tkz0a0g4.js → doctor-2bkpddws.js} +1 -8
- package/build/{fixes-krvbkbey.js → fixes-a4qscvkx.js} +18 -15
- package/build/{index-pamhzcx3.js → index-0fnbx38r.js} +14 -20
- package/build/{index-ah3cm7hf.js → index-2a1x5nnv.js} +3 -3
- package/build/{index-v4sz6cee.js → index-48pjf9d2.js} +124 -76
- package/build/{index-tknvj68q.js → index-54ep0ery.js} +12 -9
- package/build/{index-wsp4kqtm.js → index-aymt8k9w.js} +2 -2
- package/build/{index-a9ea9c1q.js → index-hfhkjj2g.js} +11 -8
- package/build/{index-4gk224ac.js → index-s17r2akv.js} +4 -4
- package/build/{issues-m2me70rs.js → issues-5pnrspt7.js} +18 -15
- package/build/{logs-rxf1a0be.js → logs-1mfm901x.js} +18 -15
- package/build/{offesecAgent-hmxcpch7.js → offesecAgent-mrbyc93d.js} +11 -8
- package/build/pentest-wy4eeagc.js +31 -0
- package/build/{pentests-201vfsn6.js → pentests-htmtq66d.js} +18 -15
- package/build/{targetedPentest-85b1dndy.js → targetedPentest-cpbd87rc.js} +12 -9
- package/build/threatModel-9n56z6a6.js +29 -0
- package/build/{uninstall-qa8jvrj1.js → uninstall-6y9dkgyt.js} +1 -1
- package/build/{upload-p58nxxvf.js → upload-7wtbr768.js} +1 -8
- package/build/{utils-hsde107p.js → utils-trqnyj77.js} +8 -6
- package/package.json +1 -1
- package/build/agent-mjyx1amj.js +0 -19
- package/build/authentication-b8p1afqq.js +0 -19
- package/build/blackboxAgent-z1h2cgyg.js +0 -19
- package/build/pentest-r6hfzf8n.js +0 -28
- package/build/threatModel-hbpz15y7.js +0 -26
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BlackboxAttackSurfaceAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-sw5swz40.js";
|
|
4
4
|
import {
|
|
5
5
|
TargetedPentestAgent,
|
|
6
6
|
buildPentestSystemPrompt
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-cb5va0cs.js";
|
|
8
8
|
import {
|
|
9
9
|
CodeAgent
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-zpvmaxem.js";
|
|
11
11
|
import {
|
|
12
12
|
AppsDiscoveryResultSchema,
|
|
13
13
|
DiscoverySummarySchema,
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
WHITEBOX_APPS_DISCOVERY_SYSTEM_PROMPT,
|
|
16
16
|
WHITEBOX_DISCOVERY_SYSTEM_PROMPT,
|
|
17
17
|
WHITEBOX_ENDPOINT_DOCUMENTATION_SYSTEM_PROMPT
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-wdmqkshz.js";
|
|
19
19
|
import {
|
|
20
20
|
EvidenceFileEntrySchema
|
|
21
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-ntd42071.js";
|
|
22
22
|
import {
|
|
23
23
|
CweEntrySchema,
|
|
24
24
|
FindingsRegistry,
|
|
@@ -27,18 +27,14 @@ import {
|
|
|
27
27
|
ValidatedCweEntrySchema,
|
|
28
28
|
hasCanonicalName,
|
|
29
29
|
runWithBoundedConcurrency
|
|
30
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-k8mvghe1.js";
|
|
31
31
|
import {
|
|
32
32
|
createThreatModelPrompt
|
|
33
33
|
} from "./cli-fw5r7pfj.js";
|
|
34
34
|
import {
|
|
35
|
-
createLogger,
|
|
36
35
|
hasToolCall,
|
|
37
|
-
init_dist
|
|
38
|
-
|
|
39
|
-
init_structured,
|
|
40
|
-
scopedLogger
|
|
41
|
-
} from "./cli-5h1kv0v4.js";
|
|
36
|
+
init_dist
|
|
37
|
+
} from "./cli-h825qzmd.js";
|
|
42
38
|
import {
|
|
43
39
|
exports_external1 as exports_external,
|
|
44
40
|
init_zod
|
|
@@ -92,9 +88,6 @@ ${objectiveList}
|
|
|
92
88
|
4. Submit the plan via submit_plan when complete`;
|
|
93
89
|
}
|
|
94
90
|
|
|
95
|
-
// src/core/workflows/pentest.ts
|
|
96
|
-
init_structured();
|
|
97
|
-
|
|
98
91
|
// src/core/report/schemas.ts
|
|
99
92
|
init_zod();
|
|
100
93
|
var PentestReportFindingSchema = exports_external.object({
|
|
@@ -350,14 +343,10 @@ function formatDurationHmsFromMs(durationMs) {
|
|
|
350
343
|
}
|
|
351
344
|
|
|
352
345
|
// src/core/session/loader.ts
|
|
353
|
-
init_structured();
|
|
354
346
|
import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
|
|
355
347
|
import { join as join3 } from "path";
|
|
356
|
-
init_lazyLogger();
|
|
357
348
|
|
|
358
349
|
// src/core/session/persistence.ts
|
|
359
|
-
init_structured();
|
|
360
|
-
init_lazyLogger();
|
|
361
350
|
import {
|
|
362
351
|
existsSync as existsSync2,
|
|
363
352
|
mkdirSync,
|
|
@@ -367,7 +356,6 @@ import {
|
|
|
367
356
|
writeFileSync as writeFileSync2
|
|
368
357
|
} from "fs";
|
|
369
358
|
import { join as join2 } from "path";
|
|
370
|
-
var log = scopedLogger(() => createLogger("session:persistence"));
|
|
371
359
|
var SUBAGENTS_DIR = "subagents";
|
|
372
360
|
var MANIFEST_FILE = "agent-manifest.json";
|
|
373
361
|
function loadSubagentMessages(session, agentName) {
|
|
@@ -653,7 +641,7 @@ function loadSubagents(rootPath) {
|
|
|
653
641
|
status
|
|
654
642
|
});
|
|
655
643
|
} catch (e) {
|
|
656
|
-
|
|
644
|
+
console.error(`Failed to load subagent file ${file}:`, e);
|
|
657
645
|
}
|
|
658
646
|
}
|
|
659
647
|
const entries = readdirSync(subagentsPath, { withFileTypes: true });
|
|
@@ -720,14 +708,13 @@ function loadSubagents(rootPath) {
|
|
|
720
708
|
}
|
|
721
709
|
}
|
|
722
710
|
} catch (e) {
|
|
723
|
-
|
|
711
|
+
console.error("Failed to load agent manifest:", e);
|
|
724
712
|
}
|
|
725
713
|
}
|
|
726
714
|
return subagents;
|
|
727
715
|
}
|
|
728
716
|
|
|
729
717
|
// src/core/session/loader.ts
|
|
730
|
-
var log2 = scopedLogger(() => createLogger("session:loader"));
|
|
731
718
|
function loadAttackSurfaceResults(rootPath) {
|
|
732
719
|
const resultsPath = join3(rootPath, "attack-surface-results.json");
|
|
733
720
|
if (!existsSync3(resultsPath)) {
|
|
@@ -736,14 +723,11 @@ function loadAttackSurfaceResults(rootPath) {
|
|
|
736
723
|
try {
|
|
737
724
|
return JSON.parse(readFileSync3(resultsPath, "utf-8"));
|
|
738
725
|
} catch (e) {
|
|
739
|
-
|
|
726
|
+
console.error("Failed to load attack surface results:", e);
|
|
740
727
|
return null;
|
|
741
728
|
}
|
|
742
729
|
}
|
|
743
730
|
|
|
744
|
-
// src/core/workflows/pentest.ts
|
|
745
|
-
init_lazyLogger();
|
|
746
|
-
|
|
747
731
|
// src/core/workflows/whiteboxAttackSurface.ts
|
|
748
732
|
import {
|
|
749
733
|
existsSync as existsSync12,
|
|
@@ -756,9 +740,6 @@ import {
|
|
|
756
740
|
import { join as join15 } from "path";
|
|
757
741
|
|
|
758
742
|
// src/core/agents/specialized/whiteboxAttackSurface/endpointDocumentationAgent.ts
|
|
759
|
-
init_structured();
|
|
760
|
-
init_lazyLogger();
|
|
761
|
-
var log3 = scopedLogger(() => createLogger("endpoint-documentation-agent"));
|
|
762
743
|
var ENDPOINT_DOCUMENTATION_CONCURRENCY = 10;
|
|
763
744
|
function slug(name) {
|
|
764
745
|
return name.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_|_$/g, "");
|
|
@@ -880,7 +861,7 @@ async function runEndpointDocumentationAgent(opts) {
|
|
|
880
861
|
});
|
|
881
862
|
return true;
|
|
882
863
|
} catch (error) {
|
|
883
|
-
|
|
864
|
+
console.error(`[endpoint-documentation-agent] "${subagentId}" FAILED:`, error instanceof Error ? error.message : String(error));
|
|
884
865
|
eventBus?.emit("subagent-complete", {
|
|
885
866
|
subagentId,
|
|
886
867
|
status: "failed",
|
|
@@ -6187,9 +6168,6 @@ function mapAppWithSurface(appPath, repoRoot, options) {
|
|
|
6187
6168
|
}
|
|
6188
6169
|
|
|
6189
6170
|
// src/core/workflows/whiteboxAttackSurface.ts
|
|
6190
|
-
init_structured();
|
|
6191
|
-
init_lazyLogger();
|
|
6192
|
-
var log4 = scopedLogger(() => createLogger("whitebox-workflow"));
|
|
6193
6171
|
var DEFAULT_CONCURRENCY = 5;
|
|
6194
6172
|
var TASK_TYPE_LABELS = {
|
|
6195
6173
|
pages: "Pages",
|
|
@@ -6243,7 +6221,7 @@ async function runWhiteboxAttackSurfaceWorkflow(input) {
|
|
|
6243
6221
|
projectThreatModel,
|
|
6244
6222
|
excludeTools: ["document_endpoint"]
|
|
6245
6223
|
});
|
|
6246
|
-
|
|
6224
|
+
console.log(`[whitebox-workflow] Phase 1: discovering apps in ${codebasePath}${domains?.length ? ` (${domains.length} known domains)` : ""}`);
|
|
6247
6225
|
const WORKFLOW_UMBRELLA_ID = "whitebox-apps-discovery";
|
|
6248
6226
|
eventBus?.emit("subagent-spawn", {
|
|
6249
6227
|
subagentId: WORKFLOW_UMBRELLA_ID,
|
|
@@ -6251,10 +6229,10 @@ async function runWhiteboxAttackSurfaceWorkflow(input) {
|
|
|
6251
6229
|
input: { codebasePath }
|
|
6252
6230
|
});
|
|
6253
6231
|
const appsResult = await appsAgent.consume();
|
|
6254
|
-
|
|
6232
|
+
console.log(`[whitebox-workflow] Phase 1 complete: ${appsResult?.apps.length ?? 0} apps discovered` + (appsResult ? ` (repoType=${appsResult.repoType}, packageManager=${appsResult.packageManager})` : " (no result returned)"));
|
|
6255
6233
|
if (appsResult?.apps.length) {
|
|
6256
6234
|
for (const app of appsResult.apps) {
|
|
6257
|
-
|
|
6235
|
+
console.log(`[whitebox-workflow] app: "${app.name}" type=${app.type} framework="${app.framework}" location="${app.location}"`);
|
|
6258
6236
|
}
|
|
6259
6237
|
}
|
|
6260
6238
|
if (!appsResult || appsResult.apps.length === 0) {
|
|
@@ -6281,11 +6259,11 @@ async function runWhiteboxAttackSurfaceWorkflow(input) {
|
|
|
6281
6259
|
mkdirSync2(appDir, { recursive: true });
|
|
6282
6260
|
writeFileSync3(join15(appDir, "app.json"), JSON.stringify(toAppMetadata(app), null, 2), "utf-8");
|
|
6283
6261
|
}
|
|
6284
|
-
|
|
6262
|
+
console.log(`[whitebox-workflow] Phase 2: surfaceIntegrationEnabled=${surfaceIntegrationEnabled}`);
|
|
6285
6263
|
const NON_SERVICE_TYPES = ["cloud_resource", "storage", "database"];
|
|
6286
6264
|
const serviceApps = appsResult.apps.filter((app) => !NON_SERVICE_TYPES.includes(app.type));
|
|
6287
6265
|
const cloudApps = appsResult.apps.filter((app) => NON_SERVICE_TYPES.includes(app.type));
|
|
6288
|
-
|
|
6266
|
+
console.log(`[whitebox-workflow] Phase 2: ${serviceApps.length} service apps (surface or fallback per app), ${cloudApps.length} cloud resources → ${appsResult.apps.length} total apps`);
|
|
6289
6267
|
const totalApps = appsResult.apps.length;
|
|
6290
6268
|
let completedAppCount = 0;
|
|
6291
6269
|
eventBus?.emit("app-analysis-progress", {
|
|
@@ -6307,7 +6285,7 @@ async function runWhiteboxAttackSurfaceWorkflow(input) {
|
|
|
6307
6285
|
const spawnDiscoveryAgent = async (app, type2, objective) => {
|
|
6308
6286
|
const subagentId = `${type2}-${app.name}`;
|
|
6309
6287
|
const appNodeId = appNodeIdFor(app.name);
|
|
6310
|
-
|
|
6288
|
+
console.log(`[whitebox-workflow] Phase 2: spawning agent id="${subagentId}" parent="${appNodeId}" (app="${app.name}", type=${type2}, appType=${app.type})`);
|
|
6311
6289
|
eventBus?.emit("subagent-spawn", {
|
|
6312
6290
|
subagentId,
|
|
6313
6291
|
name: TASK_TYPE_LABELS[type2],
|
|
@@ -6334,14 +6312,14 @@ async function runWhiteboxAttackSurfaceWorkflow(input) {
|
|
|
6334
6312
|
});
|
|
6335
6313
|
try {
|
|
6336
6314
|
await agent.consume();
|
|
6337
|
-
|
|
6315
|
+
console.log(`[whitebox-workflow] Phase 2: agent "${subagentId}" completed`);
|
|
6338
6316
|
eventBus?.emit("subagent-complete", {
|
|
6339
6317
|
subagentId,
|
|
6340
6318
|
status: "completed",
|
|
6341
6319
|
parentSubagentId: appNodeId
|
|
6342
6320
|
});
|
|
6343
6321
|
} catch (error) {
|
|
6344
|
-
|
|
6322
|
+
console.error(`[whitebox-workflow] Phase 2: agent "${subagentId}" FAILED:`, error instanceof Error ? error.message : String(error));
|
|
6345
6323
|
appAnyTaskFailed.set(app.name, true);
|
|
6346
6324
|
eventBus?.emit("subagent-complete", {
|
|
6347
6325
|
subagentId,
|
|
@@ -6359,7 +6337,7 @@ async function runWhiteboxAttackSurfaceWorkflow(input) {
|
|
|
6359
6337
|
if (NON_SERVICE_TYPES.includes(app.type)) {
|
|
6360
6338
|
await spawnCloudResourceAgent(app);
|
|
6361
6339
|
} else if (!surfaceIntegrationEnabled) {
|
|
6362
|
-
|
|
6340
|
+
console.log(`[whitebox] ${app.name}: legacy (surfaceIntegrationEnabled=false)`);
|
|
6363
6341
|
await Promise.all([
|
|
6364
6342
|
spawnPagesAgent(app),
|
|
6365
6343
|
spawnApiEndpointsAgent(app)
|
|
@@ -6367,7 +6345,7 @@ async function runWhiteboxAttackSurfaceWorkflow(input) {
|
|
|
6367
6345
|
} else {
|
|
6368
6346
|
const surfaceResult = mapAppWithSurface(join15(codebasePath, app.location), codebasePath, { isSingleAppRepo: serviceApps.length === 1 });
|
|
6369
6347
|
if (surfaceResult.mode === "surface") {
|
|
6370
|
-
|
|
6348
|
+
console.log(`[whitebox] ${app.name}: surface-driven (${surfaceResult.endpoints.length} endpoints, frameworks=${surfaceResult.frameworks.join(",")})`);
|
|
6371
6349
|
await runAppEndpointDocumentation({
|
|
6372
6350
|
codebasePath,
|
|
6373
6351
|
app,
|
|
@@ -6386,7 +6364,7 @@ async function runWhiteboxAttackSurfaceWorkflow(input) {
|
|
|
6386
6364
|
parentSubagentId: appNodeId
|
|
6387
6365
|
});
|
|
6388
6366
|
} else {
|
|
6389
|
-
|
|
6367
|
+
console.log(`[whitebox] ${app.name}: fallback (${surfaceResult.reason})`);
|
|
6390
6368
|
await Promise.all([
|
|
6391
6369
|
spawnPagesAgent(app),
|
|
6392
6370
|
spawnApiEndpointsAgent(app)
|
|
@@ -6414,14 +6392,14 @@ async function runWhiteboxAttackSurfaceWorkflow(input) {
|
|
|
6414
6392
|
subagentId: WORKFLOW_UMBRELLA_ID,
|
|
6415
6393
|
status: "completed"
|
|
6416
6394
|
});
|
|
6417
|
-
|
|
6395
|
+
console.log(`[whitebox-workflow] Phase 3: reading assets from ${assetsPath}`);
|
|
6418
6396
|
const {
|
|
6419
6397
|
apps: parsedApps,
|
|
6420
6398
|
repoType,
|
|
6421
6399
|
packageManager
|
|
6422
6400
|
} = readAppsFromAssetsDirectory(assetsPath, appsResult);
|
|
6423
6401
|
for (const app of parsedApps) {
|
|
6424
|
-
|
|
6402
|
+
console.log(`[whitebox-workflow] Phase 3: "${app.name}" → ${app.pages.length} pages, ${app.apiEndpoints.length} API endpoints`);
|
|
6425
6403
|
}
|
|
6426
6404
|
const apps = parsedApps;
|
|
6427
6405
|
const totalPages = apps.reduce((sum, a) => sum + a.pages.length, 0);
|
|
@@ -6443,16 +6421,16 @@ function readAppsFromAssetsDirectory(assetsPath, appsDiscovery) {
|
|
|
6443
6421
|
const repoType = appsDiscovery?.repoType ?? "unknown";
|
|
6444
6422
|
const packageManager = appsDiscovery?.packageManager ?? "unknown";
|
|
6445
6423
|
if (!existsSync12(assetsPath)) {
|
|
6446
|
-
|
|
6424
|
+
console.log(`[readAssets] Assets directory does not exist: ${assetsPath}`);
|
|
6447
6425
|
return { apps: [], repoType, packageManager };
|
|
6448
6426
|
}
|
|
6449
6427
|
const entries = readdirSync10(assetsPath);
|
|
6450
|
-
|
|
6428
|
+
console.log(`[readAssets] Found ${entries.length} entries in ${assetsPath}: [${entries.join(", ")}]`);
|
|
6451
6429
|
const apps = [];
|
|
6452
6430
|
for (const entry of entries) {
|
|
6453
6431
|
const entryPath = join15(assetsPath, entry);
|
|
6454
6432
|
if (!statSync2(entryPath).isDirectory()) {
|
|
6455
|
-
|
|
6433
|
+
console.log(`[readAssets] Skipping non-directory: ${entry}`);
|
|
6456
6434
|
continue;
|
|
6457
6435
|
}
|
|
6458
6436
|
const appJsonPath = join15(entryPath, "app.json");
|
|
@@ -6461,17 +6439,17 @@ function readAppsFromAssetsDirectory(assetsPath, appsDiscovery) {
|
|
|
6461
6439
|
try {
|
|
6462
6440
|
metadata = JSON.parse(readFileSync9(appJsonPath, "utf-8"));
|
|
6463
6441
|
} catch {
|
|
6464
|
-
|
|
6442
|
+
console.warn(`[readAssets] Skipping app folder with unreadable app.json: ${entry}`);
|
|
6465
6443
|
continue;
|
|
6466
6444
|
}
|
|
6467
6445
|
} else {
|
|
6468
|
-
|
|
6446
|
+
console.log(`[readAssets] Skipping folder without app.json: ${entry}`);
|
|
6469
6447
|
continue;
|
|
6470
6448
|
}
|
|
6471
6449
|
const pages = [];
|
|
6472
6450
|
const apiEndpoints = [];
|
|
6473
6451
|
const assetFiles = readdirSync10(entryPath).filter((f) => f.endsWith(".json") && f !== "app.json");
|
|
6474
|
-
|
|
6452
|
+
console.log(`[readAssets] App "${metadata.name}" (${entry}): ${assetFiles.length} asset files`);
|
|
6475
6453
|
let parseFailed = 0;
|
|
6476
6454
|
for (const file of assetFiles) {
|
|
6477
6455
|
try {
|
|
@@ -6479,7 +6457,7 @@ function readAppsFromAssetsDirectory(assetsPath, appsDiscovery) {
|
|
|
6479
6457
|
const data = JSON.parse(raw);
|
|
6480
6458
|
const endpoint2 = assetRecordToEndpoint(data);
|
|
6481
6459
|
if (!endpoint2) {
|
|
6482
|
-
|
|
6460
|
+
console.log(`[readAssets] ${file}: failed schema validation (assetRecordToEndpoint returned null)`);
|
|
6483
6461
|
parseFailed++;
|
|
6484
6462
|
continue;
|
|
6485
6463
|
}
|
|
@@ -6489,11 +6467,11 @@ function readAppsFromAssetsDirectory(assetsPath, appsDiscovery) {
|
|
|
6489
6467
|
apiEndpoints.push(endpoint2);
|
|
6490
6468
|
}
|
|
6491
6469
|
} catch {
|
|
6492
|
-
|
|
6470
|
+
console.warn(`[readAssets] Skipping unreadable asset file: ${entry}/${file}`);
|
|
6493
6471
|
parseFailed++;
|
|
6494
6472
|
}
|
|
6495
6473
|
}
|
|
6496
|
-
|
|
6474
|
+
console.log(`[readAssets] App "${metadata.name}": ${pages.length} pages, ${apiEndpoints.length} API endpoints, ${parseFailed} failed`);
|
|
6497
6475
|
apps.push({
|
|
6498
6476
|
name: metadata.name,
|
|
6499
6477
|
type: metadata.type ?? "web_application",
|
|
@@ -6819,7 +6797,6 @@ When finished, call \`response\` with a summary of how many entry points you doc
|
|
|
6819
6797
|
}
|
|
6820
6798
|
|
|
6821
6799
|
// src/core/workflows/pentest.ts
|
|
6822
|
-
var log5 = scopedLogger(() => createLogger("pentest-swarm"));
|
|
6823
6800
|
var DEFAULT_CONCURRENCY2 = 10;
|
|
6824
6801
|
function addUsageTotals(totals, usage) {
|
|
6825
6802
|
if (!usage)
|
|
@@ -6897,7 +6874,7 @@ async function runPentestSwarm(input) {
|
|
|
6897
6874
|
});
|
|
6898
6875
|
await planAgent.consume();
|
|
6899
6876
|
} catch (planErr) {
|
|
6900
|
-
|
|
6877
|
+
console.error(`[pentest-swarm] Plan phase failed for ${subagentId}: ${planErr}`);
|
|
6901
6878
|
}
|
|
6902
6879
|
}
|
|
6903
6880
|
const objectiveStr = target.objectives.join("; ");
|
|
@@ -2,13 +2,7 @@ import {
|
|
|
2
2
|
OffensiveSecurityAgent,
|
|
3
3
|
isMemoryEnabled,
|
|
4
4
|
readPlan
|
|
5
|
-
} from "./cli-
|
|
6
|
-
import {
|
|
7
|
-
createLogger,
|
|
8
|
-
init_lazyLogger,
|
|
9
|
-
init_structured,
|
|
10
|
-
scopedLogger
|
|
11
|
-
} from "./cli-5h1kv0v4.js";
|
|
5
|
+
} from "./cli-k8mvghe1.js";
|
|
12
6
|
import {
|
|
13
7
|
exports_external1 as exports_external,
|
|
14
8
|
init_zod
|
|
@@ -16,11 +10,8 @@ import {
|
|
|
16
10
|
|
|
17
11
|
// src/core/agents/specialized/pentest/agent.ts
|
|
18
12
|
init_zod();
|
|
19
|
-
init_structured();
|
|
20
13
|
import { existsSync, readdirSync, readFileSync } from "fs";
|
|
21
14
|
import { join } from "path";
|
|
22
|
-
init_lazyLogger();
|
|
23
|
-
var log = scopedLogger(() => createLogger("pentest-agent"));
|
|
24
15
|
var ObjectiveResultSchema = exports_external.object({
|
|
25
16
|
objective: exports_external.string().describe("The objective text, exactly as it was provided or a refined version"),
|
|
26
17
|
completed: exports_external.boolean().describe("true if this objective was thoroughly tested and can be considered done for this endpoint; false if it still needs further testing in future runs"),
|