@pensar/apex 2.7.0-canary.52c132f4 → 2.7.0-canary.91cc2d52
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/build/agent-dwb90wfs.js +13 -0
- package/build/{agent-ydy5fq92.js → agent-fm79ysyz.js} +5 -5
- package/build/agent-j2h5dgcj.js +13 -0
- package/build/{agent-112gdg69.js → agent-q7hcmhg5.js} +6 -6
- package/build/{agent-runs-hhjzsysf.js → agent-runs-6nyk8hjx.js} +16 -16
- package/build/{apps-v4jc7eqb.js → apps-8athj8ek.js} +13 -13
- package/build/{auth-bxkn5pcb.js → auth-xeyjgbvt.js} +13 -13
- package/build/{blackboxAgent-260yqknt.js → blackboxAgent-g034embj.js} +6 -6
- package/build/{blackboxPentest-nbn588pb.js → blackboxPentest-jds43wyq.js} +11 -11
- package/build/{cli-3158x9wb.js → cli-05arm5mj.js} +82 -72
- package/build/{cli-cs7hsb1w.js → cli-1dm8x61n.js} +2 -2
- package/build/{cli-1wtxf161.js → cli-3cw5r290.js} +2 -1
- package/build/{cli-mpmpfce6.js → cli-72p3tb5s.js} +3 -3
- package/build/{cli-ene4g09p.js → cli-ae6crt8f.js} +145 -47
- package/build/{cli-ahk627k3.js → cli-d47vhcxp.js} +6 -6
- package/build/{cli-35gz0ahm.js → cli-e4a4h158.js} +1 -1
- package/build/{cli-5xdefy58.js → cli-ee1z711x.js} +1 -1
- package/build/{cli-wa52mx4p.js → cli-hpbpzy5k.js} +6 -6
- package/build/{cli-mm2vxyne.js → cli-hsk2jkfx.js} +183 -16
- package/build/{cli-6vpprmxb.js → cli-j1nfpen0.js} +1 -1
- package/build/{cli-np9x97h3.js → cli-m2wpnmhx.js} +2 -2
- package/build/{cli-xe4wq07r.js → cli-nm0nqnn7.js} +1 -1
- package/build/{cli-087apjgk.js → cli-rx9g88ws.js} +2 -2
- package/build/{cli-k8m6737j.js → cli-sfpjmf8c.js} +1 -1
- package/build/{cli-bc793xfp.js → cli-w14rjr2a.js} +1 -1
- package/build/{cli-tb77javm.js → cli-w3mk93a4.js} +2 -2
- package/build/{cli-8hrdnq0e.js → cli-yht2f4ny.js} +1 -1
- package/build/cli.js +39 -37
- package/build/{config-gpxx6m5z.js → config-efytsw1q.js} +1 -1
- package/build/{fastStrike-v0r461wn.js → fastStrike-67ajjp5k.js} +5 -5
- package/build/{fixes-c51d83b4.js → fixes-ky44pmnw.js} +13 -13
- package/build/{index-kmaq2ym2.js → index-0arjc1nx.js} +2 -2
- package/build/{index-ffay4gb2.js → index-2f8jbjwh.js} +6 -6
- package/build/{index-kkt51z6t.js → index-3tw03tns.js} +1 -1
- package/build/{index-3ggmqh6x.js → index-5p68zt2w.js} +5 -5
- package/build/{index-wgas3zgb.js → index-88w63fck.js} +1 -1
- package/build/{index-gw6t92t5.js → index-mncyhwse.js} +5 -4
- package/build/{index-xfqh0wte.js → index-mt1gtyb6.js} +4 -4
- package/build/{index-269a90mm.js → index-pbftr2x4.js} +13 -13
- package/build/{index-e97991ve.js → index-tgxp9dc7.js} +19 -19
- package/build/{issues-sq3zya6y.js → issues-7cj54b0a.js} +13 -13
- package/build/{knowledge-kzd0cgcm.js → knowledge-4at10yy7.js} +13 -13
- package/build/lib/{chunk-ajfd3s37.js → chunk-157sd6t0.js} +1 -1
- package/build/lib/{chunk-bgnq735r.js → chunk-4hzpxw9v.js} +1 -1
- package/build/lib/{chunk-83nets1m.js → chunk-4thgemts.js} +39 -6
- package/build/lib/{chunk-k6erk6fv.js → chunk-661qwc3d.js} +10 -10
- package/build/lib/{chunk-f28sa6x2.js → chunk-7hed7dp5.js} +1 -1
- package/build/lib/{chunk-fy3bbbqy.js → chunk-97gfejgq.js} +7 -1
- package/build/lib/{chunk-5qdc4rc6.js → chunk-bg0xbv05.js} +1 -1
- package/build/lib/{chunk-2rcfbtpx.js → chunk-br01h7k0.js} +11 -11
- package/build/lib/{chunk-5axh2ztr.js → chunk-c7xhgcx9.js} +2 -1
- package/build/lib/{chunk-se6sk7e4.js → chunk-c9kbxavp.js} +1 -1
- package/build/lib/{chunk-fy2a1dm3.js → chunk-f8gkbqxj.js} +49 -34
- package/build/lib/{chunk-fvgehnst.js → chunk-fjt5bj5c.js} +7 -7
- package/build/lib/{chunk-eaanxcjj.js → chunk-fq3m5ykd.js} +1 -1
- package/build/lib/{chunk-61pnyq94.js → chunk-jzz08pg8.js} +2 -2
- package/build/lib/{chunk-0parq6kp.js → chunk-nf5e4gjf.js} +51 -5
- package/build/lib/{chunk-wbt03786.js → chunk-nw1j8jnc.js} +1 -1
- package/build/lib/{chunk-s338j54x.js → chunk-p0a7ayrq.js} +12 -12
- package/build/lib/{chunk-tdprhz5x.js → chunk-pxp1r7yn.js} +2 -1
- package/build/lib/{chunk-jqy0ftnp.js → chunk-rr1j6nmf.js} +1 -1
- package/build/lib/{chunk-yk43cvgb.js → chunk-s89qgbb7.js} +11 -11
- package/build/lib/{chunk-f6xde44n.js → chunk-satv5p0s.js} +1 -1
- package/build/lib/{chunk-ay1fx18z.js → chunk-twxwf5bn.js} +1 -1
- package/build/lib/{chunk-7gjdygcx.js → chunk-vwr9w3ab.js} +2 -0
- package/build/lib/{chunk-7zayxxn6.js → chunk-vwx9vhdz.js} +177 -10
- package/build/lib/{chunk-7p9f6cxx.js → chunk-xk9wrskq.js} +1 -1
- package/build/lib/{chunk-7sexq62c.js → chunk-z5ndygcp.js} +80 -70
- package/build/lib/core/agents/agentRuntime.d.ts +1 -0
- package/build/lib/core/agents/offSecAgent/index.js +12 -12
- package/build/lib/core/agents/offSecAgent/subagentSpawner.d.ts +12 -0
- package/build/lib/core/agents/offSecAgent/subagentSpawner.js +9 -7
- package/build/lib/core/agents/offSecAgent/toolExecutionContext.d.ts +3 -0
- package/build/lib/core/agents/offSecAgent/toolLifecycle.d.ts +1 -0
- package/build/lib/core/agents/offSecAgent/tools/index.js +9 -5
- package/build/lib/core/agents/offSecAgent/tools/types.d.ts +3 -2
- package/build/lib/core/agents/offSecAgent/tools/whiteboxCandidates.d.ts +2 -2
- package/build/lib/core/agents/offSecAgent/types.d.ts +7 -0
- package/build/lib/core/agents/specialized/attackSurface/blackboxAgent.js +12 -12
- package/build/lib/core/agents/specialized/attackSurface/schemas.js +11 -11
- package/build/lib/core/agents/specialized/authenticationAgent/index.js +13 -13
- package/build/lib/core/agents/specialized/codeAgent/agent.js +12 -12
- package/build/lib/core/agents/specialized/findingJudge/agent.js +10 -10
- package/build/lib/core/agents/specialized/findingJudge/index.d.ts +1 -1
- package/build/lib/core/agents/specialized/findingJudge/index.js +3 -3
- package/build/lib/core/agents/specialized/patching/index.js +13 -13
- package/build/lib/core/agents/specialized/pentest/agent.js +12 -12
- package/build/lib/core/agents/specialized/whiteboxAttackSurface/index.js +12 -12
- package/build/lib/core/ai/ai.d.ts +1 -0
- package/build/lib/core/ai/ai.js +2 -2
- package/build/lib/core/ai/index.js +2 -2
- package/build/lib/core/ai/models/concentrate.d.ts +1 -0
- package/build/lib/core/ai/providers/concentrate.d.ts +1 -0
- package/build/lib/core/ai/utils.js +2 -2
- package/build/lib/core/api/index.js +22 -22
- package/build/lib/core/api/targetedPentest.js +13 -13
- package/build/lib/core/config/index.js +1 -1
- package/build/lib/core/eventBus.js +1 -1
- package/build/lib/core/findings/registry.js +3 -3
- package/build/lib/core/session/index.js +2 -2
- package/build/lib/core/session/persistence.js +3 -3
- package/build/lib/core/tools/backends/index.js +1 -1
- package/build/lib/core/tools/backends/resolve.d.ts +1 -0
- package/build/lib/core/workflows/pentest.js +18 -18
- package/build/lib/core/workflows/seams.js +4 -4
- package/build/lib/core/workflows/whiteboxAttackSurface.js +14 -14
- package/build/lib/index.js +24 -24
- package/build/{logs-yk8dk6aa.js → logs-6nb7m4vw.js} +13 -13
- package/build/{native-rollout-evidence-krpdfdv7.js → native-rollout-evidence-ydak98sd.js} +3 -3
- package/build/{offesecAgent-aw87gf37.js → offesecAgent-zbmmy8g0.js} +4 -4
- package/build/pentest-65jff81b.js +22 -0
- package/build/{pentests-577n3x75.js → pentests-kkz46fs0.js} +13 -13
- package/build/recordedRunClient-647rnnet.js +11 -0
- package/build/{targetedPentest-7v849dtm.js → targetedPentest-3cz4q1f8.js} +6 -6
- package/build/{targets-3vjxv3yj.js → targets-ry3zsbxp.js} +13 -13
- package/build/threatModel-y60sp2kr.js +21 -0
- package/build/{uninstall-ctv33v8j.js → uninstall-34wqhj3r.js} +1 -1
- package/build/{upload-rnec235r.js → upload-da6k0r99.js} +4 -4
- package/build/{utils-6420gkkg.js → utils-19f5wsay.js} +3 -3
- package/package.json +1 -1
- package/src/core/agents/agentRuntime.test.ts +4 -0
- package/src/core/agents/agentRuntime.ts +2 -0
- package/src/core/agents/offSecAgent/interruptedStepFinalization.test.ts +51 -0
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.ts +6 -0
- package/src/core/agents/offSecAgent/subagentSpawner.hooks.test.ts +11 -3
- package/src/core/agents/offSecAgent/subagentSpawner.ts +57 -0
- package/src/core/agents/offSecAgent/toolExecutionContext.test.ts +230 -0
- package/src/core/agents/offSecAgent/toolExecutionContext.ts +56 -0
- package/src/core/agents/offSecAgent/toolLifecycle.ts +2 -0
- package/src/core/agents/offSecAgent/tools/delegateAuth.ts +1 -0
- package/src/core/agents/offSecAgent/tools/documentFinding.test.ts +9 -4
- package/src/core/agents/offSecAgent/tools/documentFinding.ts +7 -4
- package/src/core/agents/offSecAgent/tools/runAttackSurface.ts +2 -0
- package/src/core/agents/offSecAgent/tools/runPentestWorkflow.ts +1 -0
- package/src/core/agents/offSecAgent/tools/spawnCodingAgent.ts +47 -62
- package/src/core/agents/offSecAgent/tools/spawnPentestAgent.ts +1 -0
- package/src/core/agents/offSecAgent/tools/spawnPentestSwarm.ts +1 -0
- package/src/core/agents/offSecAgent/tools/threatModelGenerator.ts +1 -0
- package/src/core/agents/offSecAgent/tools/types.ts +4 -1
- package/src/core/agents/offSecAgent/types.ts +8 -0
- package/src/core/agents/specialized/findingJudge/index.ts +2 -0
- package/src/core/agents/specialized/pentest/agent.test.ts +39 -0
- package/src/core/agents/specialized/pentest/agent.ts +3 -3
- package/src/core/agents/specialized/whiteboxAttackSurface/endpointDocumentationAgent.concurrency.test.ts +59 -2
- package/src/core/agents/specialized/whiteboxAttackSurface/endpointDocumentationAgent.hooks.test.ts +127 -0
- package/src/core/agents/specialized/whiteboxAttackSurface/endpointDocumentationAgent.ts +70 -69
- package/src/core/ai/ai.durability-hooks.test.ts +25 -7
- package/src/core/ai/ai.ts +102 -6
- package/src/core/ai/models/concentrate.ts +52 -0
- package/src/core/ai/models/index.ts +21 -3
- package/src/core/ai/models/models.test.ts +131 -0
- package/src/core/ai/models/openrouter.ts +37 -1
- package/src/core/ai/providers/concentrate.test.ts +31 -0
- package/src/core/ai/providers/concentrate.ts +11 -0
- package/src/core/ai/streamIdleTimeout.test.ts +21 -0
- package/src/core/eventBus.ts +1 -0
- package/src/core/runtime/sqliteRunObservation.test.ts +1 -1
- package/src/core/tools/backends/resolve.ts +7 -0
- package/src/core/tools/backends/whiteboxJobs.test.ts +9 -8
- package/src/core/workflows/whiteboxAttackSurface.test.ts +34 -2
- package/src/core/workflows/whiteboxAttackSurface.ts +83 -70
- package/build/agent-9bh42v64.js +0 -13
- package/build/agent-jg7v2yn0.js +0 -13
- package/build/pentest-t0p4nw2a.js +0 -22
- package/build/recordedRunClient-d7947b0z.js +0 -11
- package/build/threatModel-n0grwkav.js +0 -21
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runAuthenticationAgent2
|
|
3
|
+
} from "./cli-rx9g88ws.js";
|
|
4
|
+
import"./cli-3cw5r290.js";
|
|
5
|
+
import"./cli-qba2x69h.js";
|
|
6
|
+
import"./cli-ae6crt8f.js";
|
|
7
|
+
import"./cli-hsk2jkfx.js";
|
|
8
|
+
import"./cli-w14rjr2a.js";
|
|
9
|
+
import"./cli-c2k4xxaw.js";
|
|
10
|
+
import"./cli-e4a4h158.js";
|
|
11
|
+
export {
|
|
12
|
+
runAuthenticationAgent2 as runAuthenticationAgent
|
|
13
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import"./cli-
|
|
2
|
-
import"./cli-
|
|
3
|
-
import"./cli-
|
|
1
|
+
import"./cli-ae6crt8f.js";
|
|
2
|
+
import"./cli-e4a4h158.js";
|
|
3
|
+
import"./cli-w14rjr2a.js";
|
|
4
4
|
import {
|
|
5
5
|
AgentRuntime,
|
|
6
6
|
defineAgent
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-3cw5r290.js";
|
|
8
8
|
import"./cli-qba2x69h.js";
|
|
9
9
|
import {
|
|
10
10
|
stepCountIs2,
|
|
11
11
|
init_dist
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-hsk2jkfx.js";
|
|
13
13
|
import"./cli-c2k4xxaw.js";
|
|
14
14
|
import {
|
|
15
15
|
init_zod
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CodeAgent2
|
|
3
|
+
} from "./cli-m2wpnmhx.js";
|
|
4
|
+
import"./cli-3cw5r290.js";
|
|
5
|
+
import"./cli-qba2x69h.js";
|
|
6
|
+
import"./cli-ae6crt8f.js";
|
|
7
|
+
import"./cli-hsk2jkfx.js";
|
|
8
|
+
import"./cli-w14rjr2a.js";
|
|
9
|
+
import"./cli-c2k4xxaw.js";
|
|
10
|
+
import"./cli-e4a4h158.js";
|
|
11
|
+
export {
|
|
12
|
+
CodeAgent2 as CodeAgent
|
|
13
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TargetedPentestAgent2,
|
|
3
3
|
buildPentestSystemPrompt2
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-hpbpzy5k.js";
|
|
5
|
+
import"./cli-3cw5r290.js";
|
|
6
6
|
import"./cli-qba2x69h.js";
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
7
|
+
import"./cli-ae6crt8f.js";
|
|
8
|
+
import"./cli-hsk2jkfx.js";
|
|
9
|
+
import"./cli-w14rjr2a.js";
|
|
10
10
|
import"./cli-c2k4xxaw.js";
|
|
11
|
-
import"./cli-
|
|
11
|
+
import"./cli-e4a4h158.js";
|
|
12
12
|
export {
|
|
13
13
|
TargetedPentestAgent2 as TargetedPentestAgent,
|
|
14
14
|
buildPentestSystemPrompt2 as buildPentestSystemPrompt
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
config2,
|
|
3
3
|
init_config
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-e4a4h158.js";
|
|
5
|
+
import"./cli-w14rjr2a.js";
|
|
6
6
|
import {
|
|
7
7
|
AgentEventBus
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-ae6crt8f.js";
|
|
9
9
|
import {
|
|
10
10
|
inspectSessionEvidence2,
|
|
11
11
|
RecordedRunSpecSchema,
|
|
@@ -16,25 +16,25 @@ import {
|
|
|
16
16
|
runRecordedAgent2,
|
|
17
17
|
RunRecoveryBlockedError2,
|
|
18
18
|
resumeRecordedAgent2
|
|
19
|
-
} from "./cli-
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-
|
|
25
|
-
import"./cli-
|
|
26
|
-
import"./cli-
|
|
19
|
+
} from "./cli-d47vhcxp.js";
|
|
20
|
+
import"./cli-w3mk93a4.js";
|
|
21
|
+
import"./cli-m2wpnmhx.js";
|
|
22
|
+
import"./cli-72p3tb5s.js";
|
|
23
|
+
import"./cli-05arm5mj.js";
|
|
24
|
+
import"./cli-rx9g88ws.js";
|
|
25
|
+
import"./cli-hpbpzy5k.js";
|
|
26
|
+
import"./cli-nm0nqnn7.js";
|
|
27
27
|
import"./cli-xcy2vxj2.js";
|
|
28
28
|
import {
|
|
29
29
|
resolveWorkerExecutable,
|
|
30
30
|
launchLocalWorker
|
|
31
|
-
} from "./cli-
|
|
32
|
-
import"./cli-
|
|
31
|
+
} from "./cli-sfpjmf8c.js";
|
|
32
|
+
import"./cli-3cw5r290.js";
|
|
33
33
|
import"./cli-qba2x69h.js";
|
|
34
34
|
import {
|
|
35
35
|
buildAuthConfig,
|
|
36
36
|
init_ai
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-hsk2jkfx.js";
|
|
38
38
|
import"./cli-c2k4xxaw.js";
|
|
39
39
|
|
|
40
40
|
// src/cli/agent-runs.ts
|
|
@@ -115,7 +115,7 @@ async function runAgentRunsCommand(args) {
|
|
|
115
115
|
if (!isAbsolute(values.store)) {
|
|
116
116
|
throw new Error("agent-runs worker requires --store <absolute database>");
|
|
117
117
|
}
|
|
118
|
-
const { serveLocalRunWorker } = await import("./index-
|
|
118
|
+
const { serveLocalRunWorker } = await import("./index-pbftr2x4.js");
|
|
119
119
|
await serveLocalRunWorker({
|
|
120
120
|
runId: values.run,
|
|
121
121
|
databasePath: resolve(values.store)
|
|
@@ -129,7 +129,7 @@ async function runAgentRunsCommand(args) {
|
|
|
129
129
|
${HELP}`);
|
|
130
130
|
}
|
|
131
131
|
if (command === "attach") {
|
|
132
|
-
const { openRecordedRunClient } = await import("./recordedRunClient-
|
|
132
|
+
const { openRecordedRunClient } = await import("./recordedRunClient-647rnnet.js");
|
|
133
133
|
const client = await openRecordedRunClient(values.store);
|
|
134
134
|
const controller = new AbortController;
|
|
135
135
|
const detach = () => controller.abort();
|
|
@@ -15,24 +15,24 @@ import {
|
|
|
15
15
|
searchEndpoints2,
|
|
16
16
|
listDomains2,
|
|
17
17
|
createDomain2
|
|
18
|
-
} from "./cli-
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-
|
|
25
|
-
import"./cli-
|
|
26
|
-
import"./cli-
|
|
27
|
-
import"./cli-
|
|
28
|
-
import"./cli-
|
|
18
|
+
} from "./cli-ae6crt8f.js";
|
|
19
|
+
import"./cli-e4a4h158.js";
|
|
20
|
+
import"./cli-w14rjr2a.js";
|
|
21
|
+
import"./cli-d47vhcxp.js";
|
|
22
|
+
import"./cli-w3mk93a4.js";
|
|
23
|
+
import"./cli-m2wpnmhx.js";
|
|
24
|
+
import"./cli-72p3tb5s.js";
|
|
25
|
+
import"./cli-05arm5mj.js";
|
|
26
|
+
import"./cli-rx9g88ws.js";
|
|
27
|
+
import"./cli-hpbpzy5k.js";
|
|
28
|
+
import"./cli-nm0nqnn7.js";
|
|
29
29
|
import"./cli-xcy2vxj2.js";
|
|
30
30
|
import {
|
|
31
31
|
markCommandFailed
|
|
32
32
|
} from "./cli-z82n3qk1.js";
|
|
33
|
-
import"./cli-
|
|
33
|
+
import"./cli-3cw5r290.js";
|
|
34
34
|
import"./cli-qba2x69h.js";
|
|
35
|
-
import"./cli-
|
|
35
|
+
import"./cli-hsk2jkfx.js";
|
|
36
36
|
import"./cli-c2k4xxaw.js";
|
|
37
37
|
|
|
38
38
|
// src/cli/apps.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import"./cli-
|
|
2
|
+
import"./cli-ae6crt8f.js";
|
|
3
3
|
import {
|
|
4
4
|
config2,
|
|
5
5
|
init_config
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-e4a4h158.js";
|
|
7
7
|
import {
|
|
8
8
|
getPensarApiUrl2,
|
|
9
9
|
getPensarConsoleUrl2,
|
|
@@ -19,22 +19,22 @@ import {
|
|
|
19
19
|
createWorkspaceSelection2,
|
|
20
20
|
pollWorkspaceSelection2,
|
|
21
21
|
init_auth
|
|
22
|
-
} from "./cli-
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-
|
|
25
|
-
import"./cli-
|
|
26
|
-
import"./cli-
|
|
27
|
-
import"./cli-
|
|
28
|
-
import"./cli-
|
|
29
|
-
import"./cli-
|
|
30
|
-
import"./cli-
|
|
22
|
+
} from "./cli-w14rjr2a.js";
|
|
23
|
+
import"./cli-d47vhcxp.js";
|
|
24
|
+
import"./cli-w3mk93a4.js";
|
|
25
|
+
import"./cli-m2wpnmhx.js";
|
|
26
|
+
import"./cli-72p3tb5s.js";
|
|
27
|
+
import"./cli-05arm5mj.js";
|
|
28
|
+
import"./cli-rx9g88ws.js";
|
|
29
|
+
import"./cli-hpbpzy5k.js";
|
|
30
|
+
import"./cli-nm0nqnn7.js";
|
|
31
31
|
import"./cli-xcy2vxj2.js";
|
|
32
32
|
import {
|
|
33
33
|
markCommandFailed
|
|
34
34
|
} from "./cli-z82n3qk1.js";
|
|
35
|
-
import"./cli-
|
|
35
|
+
import"./cli-3cw5r290.js";
|
|
36
36
|
import"./cli-qba2x69h.js";
|
|
37
|
-
import"./cli-
|
|
37
|
+
import"./cli-hsk2jkfx.js";
|
|
38
38
|
import"./cli-c2k4xxaw.js";
|
|
39
39
|
import {
|
|
40
40
|
__require
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BlackboxAttackSurfaceAgent2
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-w3mk93a4.js";
|
|
4
|
+
import"./cli-3cw5r290.js";
|
|
5
5
|
import"./cli-qba2x69h.js";
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
6
|
+
import"./cli-ae6crt8f.js";
|
|
7
|
+
import"./cli-hsk2jkfx.js";
|
|
8
|
+
import"./cli-w14rjr2a.js";
|
|
9
9
|
import"./cli-c2k4xxaw.js";
|
|
10
|
-
import"./cli-
|
|
10
|
+
import"./cli-e4a4h158.js";
|
|
11
11
|
export {
|
|
12
12
|
BlackboxAttackSurfaceAgent2 as BlackboxAttackSurfaceAgent
|
|
13
13
|
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import"./cli-
|
|
2
|
-
import"./cli-
|
|
3
|
-
import"./cli-
|
|
4
|
-
import"./cli-
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
1
|
+
import"./cli-e4a4h158.js";
|
|
2
|
+
import"./cli-w14rjr2a.js";
|
|
3
|
+
import"./cli-ae6crt8f.js";
|
|
4
|
+
import"./cli-w3mk93a4.js";
|
|
5
|
+
import"./cli-hpbpzy5k.js";
|
|
6
|
+
import"./cli-nm0nqnn7.js";
|
|
7
7
|
import {
|
|
8
8
|
readExecutionMetrics,
|
|
9
9
|
writeExecutionMetrics,
|
|
10
10
|
runPentestWorkflow2
|
|
11
|
-
} from "./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
11
|
+
} from "./cli-05arm5mj.js";
|
|
12
|
+
import"./cli-m2wpnmhx.js";
|
|
13
|
+
import"./cli-72p3tb5s.js";
|
|
14
14
|
import {
|
|
15
15
|
EMPTY_SESSION_TOKEN_USAGE,
|
|
16
16
|
accumulateSessionTokens
|
|
17
17
|
} from "./cli-ag6jtndp.js";
|
|
18
|
-
import"./cli-
|
|
18
|
+
import"./cli-3cw5r290.js";
|
|
19
19
|
import"./cli-qba2x69h.js";
|
|
20
20
|
import {
|
|
21
21
|
init_ai,
|
|
22
22
|
normalizeStepUsage
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-hsk2jkfx.js";
|
|
24
24
|
import"./cli-c2k4xxaw.js";
|
|
25
25
|
|
|
26
26
|
// src/core/api/blackboxPentest.ts
|
|
@@ -8,28 +8,29 @@ import {
|
|
|
8
8
|
resolveItemHooks,
|
|
9
9
|
toGrpcPentestContext,
|
|
10
10
|
grpcAuthorityTarget,
|
|
11
|
+
spawnBatch,
|
|
11
12
|
inProcessSubagentSpawner,
|
|
12
13
|
pLimit,
|
|
13
14
|
PLAN_MODE_TOOL_NAMES,
|
|
14
15
|
OffensiveSecurityAgent
|
|
15
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-ae6crt8f.js";
|
|
16
17
|
import {
|
|
17
18
|
BlackboxAttackSurfaceAgent2
|
|
18
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-w3mk93a4.js";
|
|
19
20
|
import {
|
|
20
21
|
TargetedPentestAgent2,
|
|
21
22
|
buildPentestSystemPrompt2
|
|
22
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-hpbpzy5k.js";
|
|
23
24
|
import {
|
|
24
25
|
buildPentestReport,
|
|
25
26
|
renderJson,
|
|
26
27
|
renderMarkdown,
|
|
27
28
|
REPORT_FILENAME_MD,
|
|
28
29
|
REPORT_FILENAME_JSON
|
|
29
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-nm0nqnn7.js";
|
|
30
31
|
import {
|
|
31
32
|
CodeAgent2
|
|
32
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-m2wpnmhx.js";
|
|
33
34
|
import {
|
|
34
35
|
WHITEBOX_APPS_DISCOVERY_SYSTEM_PROMPT2,
|
|
35
36
|
WHITEBOX_ENDPOINT_DOCUMENTATION_SYSTEM_PROMPT,
|
|
@@ -38,7 +39,7 @@ import {
|
|
|
38
39
|
AppInfoSchema2,
|
|
39
40
|
AppsDiscoveryResultSchema2,
|
|
40
41
|
DiscoverySummarySchema2
|
|
41
|
-
} from "./cli-
|
|
42
|
+
} from "./cli-72p3tb5s.js";
|
|
42
43
|
import {
|
|
43
44
|
createThreatModelPrompt
|
|
44
45
|
} from "./cli-q126f6ef.js";
|
|
@@ -50,7 +51,7 @@ import {
|
|
|
50
51
|
init_session,
|
|
51
52
|
createLogger,
|
|
52
53
|
init_structured
|
|
53
|
-
} from "./cli-
|
|
54
|
+
} from "./cli-hsk2jkfx.js";
|
|
54
55
|
import {
|
|
55
56
|
newSessionId,
|
|
56
57
|
init_id
|
|
@@ -758,7 +759,7 @@ This agent is responsible for **exactly one** endpoint. Do not document other en
|
|
|
758
759
|
4. Call \`response\` with \`{ endpointsDocumented: 1, summary: "<one-line summary>" }\`.
|
|
759
760
|
`;
|
|
760
761
|
}
|
|
761
|
-
|
|
762
|
+
function endpointDocumentationSpawnOptions(opts) {
|
|
762
763
|
const {
|
|
763
764
|
codebasePath,
|
|
764
765
|
app,
|
|
@@ -777,8 +778,6 @@ async function runEndpointDocumentationAgent(opts) {
|
|
|
777
778
|
thinkingEffort,
|
|
778
779
|
projectThreatModel,
|
|
779
780
|
parentSubagentId,
|
|
780
|
-
agentLimiter,
|
|
781
|
-
subagentSpawner,
|
|
782
781
|
hooks,
|
|
783
782
|
mintChildId
|
|
784
783
|
} = opts;
|
|
@@ -791,8 +790,7 @@ async function runEndpointDocumentationAgent(opts) {
|
|
|
791
790
|
endpoint,
|
|
792
791
|
frameworks
|
|
793
792
|
});
|
|
794
|
-
|
|
795
|
-
const spawnChild = () => spawner.spawn({
|
|
793
|
+
return {
|
|
796
794
|
spec: {
|
|
797
795
|
type: "code",
|
|
798
796
|
codebasePath,
|
|
@@ -818,6 +816,7 @@ async function runEndpointDocumentationAgent(opts) {
|
|
|
818
816
|
sandbox: hooks?.sandbox,
|
|
819
817
|
languageModelMiddleware: hooks?.languageModelMiddleware,
|
|
820
818
|
usageRecorder: hooks?.usageRecorder,
|
|
819
|
+
toolExecutionContext: hooks?.toolExecutionContext,
|
|
821
820
|
streamIdFactory: hooks?.streamIdFactory
|
|
822
821
|
},
|
|
823
822
|
subagentId,
|
|
@@ -830,26 +829,25 @@ async function runEndpointDocumentationAgent(opts) {
|
|
|
830
829
|
method: displayMethod,
|
|
831
830
|
path: endpoint.path
|
|
832
831
|
}
|
|
833
|
-
}
|
|
834
|
-
try {
|
|
835
|
-
await (agentLimiter ? agentLimiter(spawnChild) : spawnChild());
|
|
836
|
-
return true;
|
|
837
|
-
} catch (error) {
|
|
838
|
-
log3.error(`"${subagentId}" FAILED`, error instanceof Error ? error : undefined, { error: String(error) });
|
|
839
|
-
return false;
|
|
840
|
-
}
|
|
832
|
+
};
|
|
841
833
|
}
|
|
842
834
|
async function runAppEndpointDocumentation(opts) {
|
|
843
835
|
const { endpoints, ...shared } = opts;
|
|
844
836
|
if (endpoints.length === 0)
|
|
845
837
|
return;
|
|
846
838
|
const spawner = opts.subagentSpawner ?? inProcessSubagentSpawner;
|
|
839
|
+
const requests = endpoints.map((endpoint) => endpointDocumentationSpawnOptions({ ...shared, endpoint }));
|
|
840
|
+
const results = await spawnBatch(spawner, requests, {
|
|
841
|
+
concurrency: ENDPOINT_DOCUMENTATION_CONCURRENCY,
|
|
842
|
+
abortSignal: opts.abortSignal
|
|
843
|
+
}, opts.agentLimiter);
|
|
847
844
|
let anyFailed = false;
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
if (!ok)
|
|
845
|
+
for (const [index, result] of results.entries()) {
|
|
846
|
+
if (result.status === "rejected") {
|
|
851
847
|
anyFailed = true;
|
|
852
|
-
|
|
848
|
+
log3.error(`"${requests[index].subagentId}" FAILED`, result.reason instanceof Error ? result.reason : undefined, { error: String(result.reason) });
|
|
849
|
+
}
|
|
850
|
+
}
|
|
853
851
|
if (anyFailed) {
|
|
854
852
|
throw new Error(`One or more endpoint documentation agents failed for app ${opts.app.name}`);
|
|
855
853
|
}
|
|
@@ -7087,60 +7085,72 @@ async function runWhiteboxAttackSurfaceApp(app, appIndex, input) {
|
|
|
7087
7085
|
const appNodeId = `app:${sanitizeName(app.name)}`;
|
|
7088
7086
|
const hooksForApp = resolveItemHooks(sharedHooks, seams, app, appIndex);
|
|
7089
7087
|
let failed = false;
|
|
7090
|
-
const
|
|
7088
|
+
const discoveryRequest = (type, objective) => {
|
|
7091
7089
|
const subagentId = mintChildId(TASK_TYPE_LABELS[type]);
|
|
7092
7090
|
log4.debug(`Phase 2: spawning agent id="${subagentId}" parent="${appNodeId}" (app="${app.name}", type=${type}, appType=${app.type})`);
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7091
|
+
return {
|
|
7092
|
+
spec: {
|
|
7093
|
+
type: "code",
|
|
7094
|
+
codebasePath,
|
|
7095
|
+
objective,
|
|
7096
|
+
system: WHITEBOX_DISCOVERY_SYSTEM_PROMPT2,
|
|
7097
|
+
excludeTools: ["document_app"],
|
|
7098
|
+
responseSchema: DiscoverySummarySchema2,
|
|
7099
|
+
projectThreatModel,
|
|
7100
|
+
attackSurfaceRegistry
|
|
7101
|
+
},
|
|
7102
|
+
runtime: {
|
|
7103
|
+
findingPolicy: hooksForApp.findingPolicy,
|
|
7104
|
+
model,
|
|
7105
|
+
session,
|
|
7106
|
+
authConfig,
|
|
7107
|
+
abortSignal,
|
|
7108
|
+
enableThinking,
|
|
7109
|
+
thinkingEffort,
|
|
7110
|
+
openAIReasoningEffort,
|
|
7111
|
+
onStepFinish,
|
|
7112
|
+
onCacheMetrics,
|
|
7113
|
+
backends: hooksForApp.backends,
|
|
7114
|
+
sandbox: hooksForApp.sandbox,
|
|
7115
|
+
languageModelMiddleware: hooksForApp.languageModelMiddleware,
|
|
7116
|
+
usageRecorder: hooksForApp.usageRecorder,
|
|
7117
|
+
toolExecutionContext: hooksForApp.toolExecutionContext,
|
|
7118
|
+
streamIdFactory: hooksForApp.streamIdFactory
|
|
7119
|
+
},
|
|
7120
|
+
subagentId,
|
|
7121
|
+
subagentName: TASK_TYPE_LABELS[type],
|
|
7122
|
+
parentBus: eventBus,
|
|
7123
|
+
parentSubagentId: appNodeId,
|
|
7124
|
+
lifecycleInput: { app: app.name, type }
|
|
7125
|
+
};
|
|
7126
|
+
};
|
|
7127
|
+
const spawnDiscoveryAgents = async (requests) => {
|
|
7128
|
+
const results = await spawnBatch(subagentSpawner ?? inProcessSubagentSpawner, requests, {
|
|
7129
|
+
concurrency: requests.length,
|
|
7130
|
+
abortSignal
|
|
7131
|
+
}, agentLimiter);
|
|
7132
|
+
for (const [index, result] of results.entries()) {
|
|
7133
|
+
const subagentId = requests[index].subagentId;
|
|
7134
|
+
if (result.status === "rejected") {
|
|
7135
|
+
failed = true;
|
|
7136
|
+
log4.error(`Phase 2: agent "${subagentId}" FAILED`, result.reason instanceof Error ? result.reason : undefined, { error: String(result.reason) });
|
|
7137
|
+
} else {
|
|
7138
|
+
log4.debug(`Phase 2: agent "${subagentId}" completed`);
|
|
7139
|
+
}
|
|
7133
7140
|
}
|
|
7134
7141
|
};
|
|
7135
|
-
const
|
|
7136
|
-
|
|
7137
|
-
|
|
7142
|
+
const discoverPagesAndApi = () => spawnDiscoveryAgents([
|
|
7143
|
+
discoveryRequest("pages", buildPagesDiscoveryObjective(codebasePath, app)),
|
|
7144
|
+
discoveryRequest("apiEndpoints", buildApiEndpointsDiscoveryObjective(codebasePath, app))
|
|
7145
|
+
]);
|
|
7138
7146
|
try {
|
|
7139
7147
|
if (NON_SERVICE_TYPES.includes(app.type)) {
|
|
7140
|
-
await
|
|
7148
|
+
await spawnDiscoveryAgents([
|
|
7149
|
+
discoveryRequest("cloudResourceEndpoints", buildCloudResourceEndpointsObjective(codebasePath, app, environments))
|
|
7150
|
+
]);
|
|
7141
7151
|
} else if (!surfaceIntegrationEnabled) {
|
|
7142
7152
|
log4.debug(`${app.name}: legacy (surfaceIntegrationEnabled=false)`);
|
|
7143
|
-
await
|
|
7153
|
+
await discoverPagesAndApi();
|
|
7144
7154
|
} else {
|
|
7145
7155
|
const surfaceResult = mapAppWithSurface(join16(codebasePath, app.location), codebasePath, { isSingleAppRepo });
|
|
7146
7156
|
if (surfaceResult.mode === "surface") {
|
|
@@ -7170,7 +7180,7 @@ async function runWhiteboxAttackSurfaceApp(app, appIndex, input) {
|
|
|
7170
7180
|
});
|
|
7171
7181
|
} else {
|
|
7172
7182
|
log4.debug(`${app.name}: fallback (${surfaceResult.reason})`);
|
|
7173
|
-
await
|
|
7183
|
+
await discoverPagesAndApi();
|
|
7174
7184
|
}
|
|
7175
7185
|
}
|
|
7176
7186
|
} catch {
|
|
@@ -8190,7 +8200,7 @@ async function runPentestSwarm2(input) {
|
|
|
8190
8200
|
}
|
|
8191
8201
|
async function runPentestWorkflow2(input) {
|
|
8192
8202
|
if (input.fastStrike) {
|
|
8193
|
-
const { runFastStrike } = await import("./fastStrike-
|
|
8203
|
+
const { runFastStrike } = await import("./fastStrike-67ajjp5k.js");
|
|
8194
8204
|
return runFastStrike(input);
|
|
8195
8205
|
}
|
|
8196
8206
|
const {
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
openSqliteRunStore,
|
|
5
5
|
resolveWorkerEndpoint,
|
|
6
6
|
workerRequest
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-d47vhcxp.js";
|
|
8
8
|
import {
|
|
9
9
|
launchLocalWorker
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-sfpjmf8c.js";
|
|
11
11
|
|
|
12
12
|
// src/core/runtime/recordedRunClient.ts
|
|
13
13
|
import { setTimeout as delay } from "node:timers/promises";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OffensiveSecurityAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-ae6crt8f.js";
|
|
4
4
|
|
|
5
5
|
// src/core/agents/agentRuntime.ts
|
|
6
6
|
function assembleAgentHooks(opts) {
|
|
7
7
|
return {
|
|
8
8
|
findingPolicy: opts.findingPolicy,
|
|
9
|
+
toolExecutionContext: opts.toolExecutionContext,
|
|
9
10
|
backends: opts.backends,
|
|
10
11
|
subagentSpawner: opts.subagentSpawner,
|
|
11
12
|
languageModelMiddleware: opts.languageModelMiddleware,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EndpointTransportEnum,
|
|
3
3
|
GrpcEndpointMetadataSchema
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-ae6crt8f.js";
|
|
5
5
|
import {
|
|
6
6
|
AgentRuntime,
|
|
7
7
|
defineAgent
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-3cw5r290.js";
|
|
9
9
|
import {
|
|
10
10
|
stepCountIs2,
|
|
11
11
|
init_dist
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-hsk2jkfx.js";
|
|
13
13
|
import {
|
|
14
14
|
tool
|
|
15
15
|
} from "./cli-pwm29ks7.js";
|