@pensar/apex 2.6.1 → 2.7.0-canary.52c132f4
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-yby11zaq.js → agent-112gdg69.js} +6 -6
- package/build/agent-9bh42v64.js +13 -0
- package/build/agent-jg7v2yn0.js +13 -0
- package/build/{agent-runs-g37vkrjr.js → agent-runs-hhjzsysf.js} +18 -18
- package/build/{agent-ayreaj6z.js → agent-ydy5fq92.js} +5 -5
- package/build/{apps-xn6km9yn.js → apps-v4jc7eqb.js} +13 -13
- package/build/{auth-d105wc64.js → auth-bxkn5pcb.js} +13 -13
- package/build/{blackboxAgent-s56sgx9b.js → blackboxAgent-260yqknt.js} +6 -6
- package/build/{blackboxPentest-ps78v3w7.js → blackboxPentest-nbn588pb.js} +17 -12
- package/build/{cli-3sp6nd8d.js → cli-087apjgk.js} +2 -2
- package/build/{cli-1ve18npr.js → cli-1wtxf161.js} +3 -2
- package/build/{cli-d37a42dc.js → cli-3158x9wb.js} +101 -18
- package/build/{cli-fy6vh2a7.js → cli-35gz0ahm.js} +1 -1
- package/build/{cli-65g6rcat.js → cli-5xdefy58.js} +1 -1
- package/build/{cli-709rvekb.js → cli-6vpprmxb.js} +4 -2
- package/build/{cli-az3xq70v.js → cli-8hrdnq0e.js} +1 -1
- package/build/{cli-7eea4e2y.js → cli-ahk627k3.js} +6 -6
- package/build/{cli-c05y640n.js → cli-bc793xfp.js} +1 -1
- package/build/{cli-ae8jqxqr.js → cli-cs7hsb1w.js} +2 -2
- package/build/{cli-qgz1q9g5.js → cli-ene4g09p.js} +223 -76
- package/build/{cli-gx71jcke.js → cli-k8m6737j.js} +1 -1
- package/build/{cli-dpsw2fe6.js → cli-mm2vxyne.js} +360 -187
- package/build/{cli-ngq9dr8n.js → cli-mpmpfce6.js} +3 -3
- package/build/{cli-kb21qhvm.js → cli-np9x97h3.js} +4 -3
- package/build/{cli-k2nwxta0.js → cli-tb77javm.js} +2 -2
- package/build/{cli-xtc2t6me.js → cli-wa52mx4p.js} +103 -39
- package/build/{cli-n2en7j5b.js → cli-xe4wq07r.js} +1 -1
- package/build/cli.js +70 -40
- package/build/{config-zpqkd5cz.js → config-gpxx6m5z.js} +1 -1
- package/build/{fastStrike-mcjdvwez.js → fastStrike-v0r461wn.js} +67 -15
- package/build/{fixes-kytx5dmj.js → fixes-c51d83b4.js} +13 -13
- package/build/{index-qv4cc65p.js → index-269a90mm.js} +13 -13
- package/build/{index-wqetp6gq.js → index-3ggmqh6x.js} +12 -7
- package/build/{index-4vqdgb42.js → index-e97991ve.js} +1473 -1217
- package/build/{index-n65z6v7b.js → index-ffay4gb2.js} +6 -6
- package/build/{index-ns4m4s01.js → index-gw6t92t5.js} +4 -4
- package/build/{index-dr3tg1w3.js → index-kkt51z6t.js} +1 -1
- package/build/{index-fv64eb32.js → index-kmaq2ym2.js} +2 -2
- package/build/{index-je6hcsqr.js → index-wgas3zgb.js} +1 -1
- package/build/{index-r9yjkfrv.js → index-xfqh0wte.js} +4 -4
- package/build/{issues-eb3q9d3a.js → issues-sq3zya6y.js} +13 -13
- package/build/{knowledge-fqsvtx0f.js → knowledge-kzd0cgcm.js} +13 -13
- package/build/lib/{chunk-r4j8ybn9.js → chunk-0parq6kp.js} +87 -36
- package/build/lib/{chunk-v3dk9j7k.js → chunk-2rcfbtpx.js} +80 -21
- package/build/lib/{chunk-acgbyf5h.js → chunk-5axh2ztr.js} +3 -2
- package/build/lib/{chunk-yrnrbjes.js → chunk-5qdc4rc6.js} +4 -2
- package/build/lib/{chunk-xhdpgpkm.js → chunk-61pnyq94.js} +2 -2
- package/build/lib/{chunk-1azdancq.js → chunk-7p9f6cxx.js} +1 -1
- package/build/lib/{chunk-z137x08b.js → chunk-7sexq62c.js} +7 -5
- package/build/lib/{chunk-ba41jh41.js → chunk-7zayxxn6.js} +304 -129
- package/build/lib/{chunk-3c00n0cy.js → chunk-83nets1m.js} +8 -3
- package/build/lib/{chunk-e8yy2k73.js → chunk-ajfd3s37.js} +28 -2
- package/build/lib/{chunk-4hwzqthr.js → chunk-ay1fx18z.js} +3 -2
- package/build/lib/{chunk-1fy8azee.js → chunk-bgnq735r.js} +1 -1
- package/build/lib/{chunk-mg03jdmt.js → chunk-eaanxcjj.js} +1 -1
- package/build/lib/{chunk-w66ce82a.js → chunk-f28sa6x2.js} +4 -2
- package/build/lib/{chunk-z96pbjhd.js → chunk-f6xde44n.js} +13 -6
- package/build/lib/{chunk-1jvwqnem.js → chunk-fvgehnst.js} +104 -40
- package/build/lib/{chunk-2qsq76xq.js → chunk-fy2a1dm3.js} +128 -34
- package/build/lib/{chunk-7pwa92rn.js → chunk-jqy0ftnp.js} +1 -1
- package/build/lib/{chunk-bb0ekhkw.js → chunk-k6erk6fv.js} +69 -18
- package/build/lib/{chunk-9tt2021m.js → chunk-s338j54x.js} +9 -9
- package/build/lib/{chunk-1yct6cra.js → chunk-se6sk7e4.js} +1 -1
- package/build/lib/{chunk-nhfax4gb.js → chunk-tdprhz5x.js} +1 -1
- package/build/lib/{chunk-r2dkp4tb.js → chunk-wbt03786.js} +1 -1
- package/build/lib/{chunk-9yksqgzr.js → chunk-yk43cvgb.js} +20 -13
- package/build/lib/core/agents/agentRuntime.d.ts +2 -1
- package/build/lib/core/agents/defineAgent.d.ts +3 -2
- package/build/lib/core/agents/offSecAgent/index.d.ts +3 -1
- package/build/lib/core/agents/offSecAgent/index.js +10 -8
- package/build/lib/core/agents/offSecAgent/prompt.d.ts +3 -1
- package/build/lib/core/agents/offSecAgent/subagentSpawner.d.ts +2 -1
- package/build/lib/core/agents/offSecAgent/subagentSpawner.js +5 -5
- package/build/lib/core/agents/offSecAgent/tools/index.js +4 -4
- package/build/lib/core/agents/offSecAgent/tools/listMemories.d.ts +11 -1
- package/build/lib/core/agents/offSecAgent/tools/reportError.d.ts +2 -1
- package/build/lib/core/agents/offSecAgent/tools/runPentestWorkflow.d.ts +20 -1
- package/build/lib/core/agents/offSecAgent/tools/spawnPentestAgent.d.ts +4 -7
- package/build/lib/core/agents/offSecAgent/tools/spawnPentestSwarm.d.ts +7 -1
- package/build/lib/core/agents/offSecAgent/tools/types.d.ts +2 -1
- package/build/lib/core/agents/offSecAgent/types.d.ts +7 -1
- package/build/lib/core/agents/specialized/attackSurface/blackboxAgent.js +9 -9
- package/build/lib/core/agents/specialized/attackSurface/schemas.js +9 -9
- package/build/lib/core/agents/specialized/authenticationAgent/index.js +10 -10
- package/build/lib/core/agents/specialized/codeAgent/agent.js +9 -9
- package/build/lib/core/agents/specialized/codeAgent/prompts.d.ts +1 -0
- package/build/lib/core/agents/specialized/findingJudge/agent.js +8 -8
- package/build/lib/core/agents/specialized/findingJudge/index.js +3 -3
- package/build/lib/core/agents/specialized/patching/index.js +10 -10
- package/build/lib/core/agents/specialized/pentest/agent.d.ts +18 -4
- package/build/lib/core/agents/specialized/pentest/agent.js +11 -9
- package/build/lib/core/agents/specialized/whiteboxAttackSurface/index.js +9 -9
- package/build/lib/core/ai/ai.d.ts +23 -6
- package/build/lib/core/ai/ai.js +2 -2
- package/build/lib/core/ai/index.js +2 -2
- package/build/lib/core/ai/models/claude-capabilities.d.ts +3 -2
- package/build/lib/core/ai/models/index.d.ts +1 -1
- package/build/lib/core/ai/utils.d.ts +2 -0
- package/build/lib/core/ai/utils.js +4 -2
- package/build/lib/core/api/index.d.ts +3 -0
- package/build/lib/core/api/index.js +22 -19
- package/build/lib/core/api/targetedPentest.d.ts +1 -0
- package/build/lib/core/api/targetedPentest.js +10 -10
- package/build/lib/core/config/config.d.ts +3 -0
- package/build/lib/core/config/index.js +1 -1
- package/build/lib/core/findings/registry.js +3 -3
- package/build/lib/core/session/index.d.ts +12 -0
- package/build/lib/core/session/index.js +2 -2
- package/build/lib/core/session/persistence.d.ts +7 -0
- package/build/lib/core/session/persistence.js +7 -3
- package/build/lib/core/workflows/fastStrike.d.ts +3 -1
- package/build/lib/core/workflows/pentest.d.ts +8 -1
- package/build/lib/core/workflows/pentest.js +15 -15
- package/build/lib/core/workflows/seams.js +4 -4
- package/build/lib/core/workflows/whiteboxAttackSurface.js +11 -11
- package/build/lib/index.js +22 -22
- package/build/{logs-x62b7hk1.js → logs-yk8dk6aa.js} +13 -13
- package/build/{native-rollout-evidence-c9yhfqcs.js → native-rollout-evidence-krpdfdv7.js} +3 -3
- package/build/{offesecAgent-5whnpeta.js → offesecAgent-aw87gf37.js} +4 -4
- package/build/pentest-t0p4nw2a.js +22 -0
- package/build/{pentests-e0f32aqx.js → pentests-577n3x75.js} +13 -13
- package/build/recordedRunClient-d7947b0z.js +11 -0
- package/build/{targetedPentest-rcbs4nvp.js → targetedPentest-7v849dtm.js} +18 -11
- package/build/{targets-xj9g3q0z.js → targets-3vjxv3yj.js} +13 -13
- package/build/threatModel-n0grwkav.js +21 -0
- package/build/{uninstall-7s784q4a.js → uninstall-ctv33v8j.js} +1 -1
- package/build/{upload-4gvhwmvr.js → upload-rnec235r.js} +4 -4
- package/build/{utils-cjrz64pc.js → utils-6420gkkg.js} +3 -3
- package/package.json +1 -1
- package/src/cli.ts +48 -14
- package/src/core/agents/agentRuntime.test.ts +38 -0
- package/src/core/agents/agentRuntime.ts +5 -2
- package/src/core/agents/defineAgent.ts +3 -1
- package/src/core/agents/offSecAgent/index.ts +3 -0
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.test.ts +92 -5
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.ts +70 -31
- package/src/core/agents/offSecAgent/prompt.test.ts +46 -0
- package/src/core/agents/offSecAgent/prompt.ts +52 -8
- package/src/core/agents/offSecAgent/selectiveConstruction.publicPath.test.ts +38 -0
- package/src/core/agents/offSecAgent/selectiveConstruction.test.ts +64 -0
- package/src/core/agents/offSecAgent/subagentSpawner.ts +12 -1
- package/src/core/agents/offSecAgent/tools/delegateAuth.ts +1 -0
- package/src/core/agents/offSecAgent/tools/listMemories.test.ts +230 -0
- package/src/core/agents/offSecAgent/tools/listMemories.ts +73 -6
- package/src/core/agents/offSecAgent/tools/reportError.test.ts +6 -0
- package/src/core/agents/offSecAgent/tools/reportError.ts +10 -2
- package/src/core/agents/offSecAgent/tools/runAttackSurface.ts +2 -0
- package/src/core/agents/offSecAgent/tools/runPentestWorkflow.test.ts +57 -0
- package/src/core/agents/offSecAgent/tools/runPentestWorkflow.ts +19 -1
- package/src/core/agents/offSecAgent/tools/runWhiteboxScan.ts +5 -2
- package/src/core/agents/offSecAgent/tools/spawnCodingAgent.ts +1 -0
- package/src/core/agents/offSecAgent/tools/spawnPentestAgent.test.ts +72 -2
- package/src/core/agents/offSecAgent/tools/spawnPentestAgent.ts +32 -11
- package/src/core/agents/offSecAgent/tools/spawnPentestSwarm.ts +25 -5
- package/src/core/agents/offSecAgent/tools/threatModelGenerator.ts +1 -0
- package/src/core/agents/offSecAgent/tools/types.ts +6 -1
- package/src/core/agents/offSecAgent/tools/updateTask.ts +5 -1
- package/src/core/agents/offSecAgent/tools/whiteboxCandidates.ts +11 -4
- package/src/core/agents/offSecAgent/types.ts +9 -0
- package/src/core/agents/specialized/codeAgent/agent.test.ts +7 -0
- package/src/core/agents/specialized/codeAgent/agent.ts +9 -2
- package/src/core/agents/specialized/codeAgent/prompts.ts +6 -0
- package/src/core/agents/specialized/pentest/agent.test.ts +116 -0
- package/src/core/agents/specialized/pentest/agent.ts +178 -49
- package/src/core/agents/specialized/pentest/results.test.ts +59 -4
- package/src/core/agents/specialized/whiteboxAttackSurface/endpointDocumentationAgent.ts +1 -0
- package/src/core/ai/ai.operator-context.bench.test.ts +1408 -0
- package/src/core/ai/ai.recorded-context.test.ts +74 -0
- package/src/core/ai/ai.test.ts +54 -0
- package/src/core/ai/ai.ts +299 -80
- package/src/core/ai/compactionTelemetry.test.ts +2 -2
- package/src/core/ai/models/anthropic.ts +6 -0
- package/src/core/ai/models/bedrock.ts +18 -0
- package/src/core/ai/models/claude-capabilities.ts +29 -8
- package/src/core/ai/models/index.ts +4 -1
- package/src/core/ai/models/models.test.ts +23 -0
- package/src/core/ai/models/openrouter.ts +6 -0
- package/src/core/ai/providers/anthropic-models.test.ts +60 -1
- package/src/core/ai/providers/bedrock-models.test.ts +81 -0
- package/src/core/ai/providers/gateway-models.test.ts +16 -6
- package/src/core/ai/utils.native-rollout-evidence.test.ts +1 -0
- package/src/core/ai/utils.ts +189 -143
- package/src/core/api/blackboxPentest.ts +9 -1
- package/src/core/api/index.ts +9 -0
- package/src/core/api/targetedPentest.ts +19 -5
- package/src/core/config/config.test.ts +35 -0
- package/src/core/config/config.ts +5 -0
- package/src/core/observability/telemetry.test.ts +2 -3
- package/src/core/session/index.ts +5 -0
- package/src/core/session/persistence.test.ts +62 -0
- package/src/core/session/persistence.ts +56 -0
- package/src/core/workflows/fastStrike.seams.test.ts +149 -0
- package/src/core/workflows/fastStrike.test.ts +18 -1
- package/src/core/workflows/fastStrike.ts +103 -11
- package/src/core/workflows/pentest.test.ts +104 -0
- package/src/core/workflows/pentest.ts +110 -7
- package/src/core/workflows/seams.test.ts +13 -0
- package/src/core/workflows/seams.ts +5 -1
- package/src/core/workflows/whiteboxAttackSurface.ts +1 -0
- package/src/tui/components/chat/loading-indicator.tsx +20 -4
- package/src/tui/components/chat/message-list.tsx +1 -0
- package/src/tui/components/commands/__tests__/advanced-settings-lifecycle.tsx +176 -0
- package/src/tui/components/commands/advanced-settings.test.ts +28 -0
- package/src/tui/components/commands/advanced-settings.tsx +237 -19
- package/src/tui/components/operator-dashboard/index.tsx +46 -9
- package/src/tui/components/operator-dashboard/logic.test.ts +106 -0
- package/src/tui/components/operator-dashboard/logic.ts +42 -2
- package/src/tui/components/operator-dashboard/run-events.test.ts +3 -1
- package/src/tui/components/shared/__tests__/tool-renderer-lifecycle.tsx +18 -0
- package/src/tui/components/shared/action-label.test.ts +9 -0
- package/src/tui/components/shared/compacting-icon.tsx +18 -0
- package/src/tui/components/shared/index.ts +1 -0
- package/src/tui/components/shared/tool-registry.ts +1 -0
- package/src/tui/components/shared/tool-renderer.tsx +21 -7
- package/src/tui/context/route.tsx +1 -0
- package/src/tui/keybindings/registry.ts +2 -0
- package/build/agent-6w7egcf1.js +0 -13
- package/build/agent-9zx75feh.js +0 -13
- package/build/pentest-e61hc38s.js +0 -22
- package/build/recordedRunClient-dp032c32.js +0 -11
- package/build/threatModel-jkxfa40s.js +0 -21
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TargetedPentestAgent2,
|
|
3
3
|
buildPentestSystemPrompt2
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-wa52mx4p.js";
|
|
5
|
+
import"./cli-1wtxf161.js";
|
|
6
6
|
import"./cli-qba2x69h.js";
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
7
|
+
import"./cli-ene4g09p.js";
|
|
8
|
+
import"./cli-mm2vxyne.js";
|
|
9
|
+
import"./cli-bc793xfp.js";
|
|
10
10
|
import"./cli-c2k4xxaw.js";
|
|
11
|
-
import"./cli-
|
|
11
|
+
import"./cli-35gz0ahm.js";
|
|
12
12
|
export {
|
|
13
13
|
TargetedPentestAgent2 as TargetedPentestAgent,
|
|
14
14
|
buildPentestSystemPrompt2 as buildPentestSystemPrompt
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CodeAgent2
|
|
3
|
+
} from "./cli-np9x97h3.js";
|
|
4
|
+
import"./cli-1wtxf161.js";
|
|
5
|
+
import"./cli-qba2x69h.js";
|
|
6
|
+
import"./cli-ene4g09p.js";
|
|
7
|
+
import"./cli-mm2vxyne.js";
|
|
8
|
+
import"./cli-bc793xfp.js";
|
|
9
|
+
import"./cli-c2k4xxaw.js";
|
|
10
|
+
import"./cli-35gz0ahm.js";
|
|
11
|
+
export {
|
|
12
|
+
CodeAgent2 as CodeAgent
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runAuthenticationAgent2
|
|
3
|
+
} from "./cli-087apjgk.js";
|
|
4
|
+
import"./cli-1wtxf161.js";
|
|
5
|
+
import"./cli-qba2x69h.js";
|
|
6
|
+
import"./cli-ene4g09p.js";
|
|
7
|
+
import"./cli-mm2vxyne.js";
|
|
8
|
+
import"./cli-bc793xfp.js";
|
|
9
|
+
import"./cli-c2k4xxaw.js";
|
|
10
|
+
import"./cli-35gz0ahm.js";
|
|
11
|
+
export {
|
|
12
|
+
runAuthenticationAgent2 as runAuthenticationAgent
|
|
13
|
+
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
config2,
|
|
3
3
|
init_config
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-35gz0ahm.js";
|
|
5
|
+
import"./cli-bc793xfp.js";
|
|
6
|
+
import {
|
|
7
|
+
AgentEventBus
|
|
8
|
+
} from "./cli-ene4g09p.js";
|
|
6
9
|
import {
|
|
7
10
|
inspectSessionEvidence2,
|
|
8
11
|
RecordedRunSpecSchema,
|
|
@@ -13,28 +16,25 @@ import {
|
|
|
13
16
|
runRecordedAgent2,
|
|
14
17
|
RunRecoveryBlockedError2,
|
|
15
18
|
resumeRecordedAgent2
|
|
16
|
-
} from "./cli-
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-3sp6nd8d.js";
|
|
25
|
-
import"./cli-xtc2t6me.js";
|
|
26
|
-
import"./cli-n2en7j5b.js";
|
|
19
|
+
} from "./cli-ahk627k3.js";
|
|
20
|
+
import"./cli-tb77javm.js";
|
|
21
|
+
import"./cli-np9x97h3.js";
|
|
22
|
+
import"./cli-mpmpfce6.js";
|
|
23
|
+
import"./cli-3158x9wb.js";
|
|
24
|
+
import"./cli-087apjgk.js";
|
|
25
|
+
import"./cli-wa52mx4p.js";
|
|
26
|
+
import"./cli-xe4wq07r.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-k8m6737j.js";
|
|
32
|
+
import"./cli-1wtxf161.js";
|
|
33
33
|
import"./cli-qba2x69h.js";
|
|
34
34
|
import {
|
|
35
35
|
buildAuthConfig,
|
|
36
36
|
init_ai
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-mm2vxyne.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-269a90mm.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-d7947b0z.js");
|
|
133
133
|
const client = await openRecordedRunClient(values.store);
|
|
134
134
|
const controller = new AbortController;
|
|
135
135
|
const detach = () => controller.abort();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import"./cli-
|
|
2
|
-
import"./cli-
|
|
3
|
-
import"./cli-
|
|
1
|
+
import"./cli-ene4g09p.js";
|
|
2
|
+
import"./cli-35gz0ahm.js";
|
|
3
|
+
import"./cli-bc793xfp.js";
|
|
4
4
|
import {
|
|
5
5
|
AgentRuntime,
|
|
6
6
|
defineAgent
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-1wtxf161.js";
|
|
8
8
|
import"./cli-qba2x69h.js";
|
|
9
9
|
import {
|
|
10
10
|
stepCountIs2,
|
|
11
11
|
init_dist
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-mm2vxyne.js";
|
|
13
13
|
import"./cli-c2k4xxaw.js";
|
|
14
14
|
import {
|
|
15
15
|
init_zod
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import"./cli-fy6vh2a7.js";
|
|
3
|
-
import"./cli-c05y640n.js";
|
|
4
|
-
import"./cli-7eea4e2y.js";
|
|
5
2
|
import {
|
|
6
3
|
ENDPOINT_TRANSPORTS2,
|
|
7
4
|
listApps2,
|
|
@@ -18,21 +15,24 @@ import {
|
|
|
18
15
|
searchEndpoints2,
|
|
19
16
|
listDomains2,
|
|
20
17
|
createDomain2
|
|
21
|
-
} from "./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-ene4g09p.js";
|
|
19
|
+
import"./cli-35gz0ahm.js";
|
|
20
|
+
import"./cli-bc793xfp.js";
|
|
21
|
+
import"./cli-ahk627k3.js";
|
|
22
|
+
import"./cli-tb77javm.js";
|
|
23
|
+
import"./cli-np9x97h3.js";
|
|
24
|
+
import"./cli-mpmpfce6.js";
|
|
25
|
+
import"./cli-3158x9wb.js";
|
|
26
|
+
import"./cli-087apjgk.js";
|
|
27
|
+
import"./cli-wa52mx4p.js";
|
|
28
|
+
import"./cli-xe4wq07r.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-1wtxf161.js";
|
|
34
34
|
import"./cli-qba2x69h.js";
|
|
35
|
-
import"./cli-
|
|
35
|
+
import"./cli-mm2vxyne.js";
|
|
36
36
|
import"./cli-c2k4xxaw.js";
|
|
37
37
|
|
|
38
38
|
// src/cli/apps.ts
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
+
import"./cli-ene4g09p.js";
|
|
2
3
|
import {
|
|
3
4
|
config2,
|
|
4
5
|
init_config
|
|
5
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-35gz0ahm.js";
|
|
6
7
|
import {
|
|
7
8
|
getPensarApiUrl2,
|
|
8
9
|
getPensarConsoleUrl2,
|
|
@@ -18,23 +19,22 @@ import {
|
|
|
18
19
|
createWorkspaceSelection2,
|
|
19
20
|
pollWorkspaceSelection2,
|
|
20
21
|
init_auth
|
|
21
|
-
} from "./cli-
|
|
22
|
-
import"./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-n2en7j5b.js";
|
|
22
|
+
} from "./cli-bc793xfp.js";
|
|
23
|
+
import"./cli-ahk627k3.js";
|
|
24
|
+
import"./cli-tb77javm.js";
|
|
25
|
+
import"./cli-np9x97h3.js";
|
|
26
|
+
import"./cli-mpmpfce6.js";
|
|
27
|
+
import"./cli-3158x9wb.js";
|
|
28
|
+
import"./cli-087apjgk.js";
|
|
29
|
+
import"./cli-wa52mx4p.js";
|
|
30
|
+
import"./cli-xe4wq07r.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-1wtxf161.js";
|
|
36
36
|
import"./cli-qba2x69h.js";
|
|
37
|
-
import"./cli-
|
|
37
|
+
import"./cli-mm2vxyne.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-tb77javm.js";
|
|
4
|
+
import"./cli-1wtxf161.js";
|
|
5
5
|
import"./cli-qba2x69h.js";
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
6
|
+
import"./cli-ene4g09p.js";
|
|
7
|
+
import"./cli-mm2vxyne.js";
|
|
8
|
+
import"./cli-bc793xfp.js";
|
|
9
9
|
import"./cli-c2k4xxaw.js";
|
|
10
|
-
import"./cli-
|
|
10
|
+
import"./cli-35gz0ahm.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-35gz0ahm.js";
|
|
2
|
+
import"./cli-bc793xfp.js";
|
|
3
|
+
import"./cli-ene4g09p.js";
|
|
4
|
+
import"./cli-tb77javm.js";
|
|
5
|
+
import"./cli-wa52mx4p.js";
|
|
6
|
+
import"./cli-xe4wq07r.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-3158x9wb.js";
|
|
12
|
+
import"./cli-np9x97h3.js";
|
|
13
|
+
import"./cli-mpmpfce6.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-1wtxf161.js";
|
|
19
19
|
import"./cli-qba2x69h.js";
|
|
20
20
|
import {
|
|
21
21
|
init_ai,
|
|
22
22
|
normalizeStepUsage
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-mm2vxyne.js";
|
|
24
24
|
import"./cli-c2k4xxaw.js";
|
|
25
25
|
|
|
26
26
|
// src/core/api/blackboxPentest.ts
|
|
@@ -45,7 +45,12 @@ async function runPentestAgent(input) {
|
|
|
45
45
|
tokenUsage
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
const { findings, findingsPath, pocsPath, reportPath } = result;
|
|
48
|
+
const { findings, findingsPath, pocsPath, reportPath, reportedFindings } = result;
|
|
49
|
+
if ((input.hooks?.findingPolicy ?? input.findingPolicy) === "external") {
|
|
50
|
+
console.log(`
|
|
51
|
+
Reported ${reportedFindings?.length ?? 0} finding(s) for external evaluation`);
|
|
52
|
+
return result;
|
|
53
|
+
}
|
|
49
54
|
console.log(`
|
|
50
55
|
Found ${findings.length} vulnerabilities`);
|
|
51
56
|
console.log(`Findings: ${findingsPath}`);
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
AgentRuntime,
|
|
10
10
|
defineAgent
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-1wtxf161.js";
|
|
12
12
|
import {
|
|
13
13
|
hasToolCall,
|
|
14
14
|
init_dist,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
init_lazyLogger,
|
|
17
17
|
createLogger,
|
|
18
18
|
init_structured
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-mm2vxyne.js";
|
|
20
20
|
|
|
21
21
|
// src/core/agents/specialized/authenticationAgent/agent.ts
|
|
22
22
|
init_dist();
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OffensiveSecurityAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-ene4g09p.js";
|
|
4
4
|
|
|
5
5
|
// src/core/agents/agentRuntime.ts
|
|
6
6
|
function assembleAgentHooks(opts) {
|
|
7
7
|
return {
|
|
8
|
+
findingPolicy: opts.findingPolicy,
|
|
8
9
|
backends: opts.backends,
|
|
9
10
|
subagentSpawner: opts.subagentSpawner,
|
|
10
11
|
languageModelMiddleware: opts.languageModelMiddleware,
|
|
@@ -39,7 +40,7 @@ class AgentRuntime extends OffensiveSecurityAgent {
|
|
|
39
40
|
responseSchema: definition.responseSchema?.(opts, state),
|
|
40
41
|
stopWhen: definition.stopWhen?.(opts, state) ?? opts.stopWhen,
|
|
41
42
|
extraTools: mergeExtraTools(opts.extraTools, definition.extraTools?.(opts, state)),
|
|
42
|
-
resolveResult: resolveResult ? (streamResult) => resolveResult(opts, state, streamResult) : undefined,
|
|
43
|
+
resolveResult: resolveResult ? (streamResult, validatedResponse) => resolveResult(opts, state, streamResult, validatedResponse) : undefined,
|
|
43
44
|
target: definition.target?.(opts, state) ?? opts.target,
|
|
44
45
|
grpc: definition.grpc?.(opts, state) ?? opts.grpc,
|
|
45
46
|
browserEngine: definition.browserEngine?.(opts, state) ?? opts.browserEngine,
|
|
@@ -12,24 +12,24 @@ import {
|
|
|
12
12
|
pLimit,
|
|
13
13
|
PLAN_MODE_TOOL_NAMES,
|
|
14
14
|
OffensiveSecurityAgent
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-ene4g09p.js";
|
|
16
16
|
import {
|
|
17
17
|
BlackboxAttackSurfaceAgent2
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-tb77javm.js";
|
|
19
19
|
import {
|
|
20
20
|
TargetedPentestAgent2,
|
|
21
21
|
buildPentestSystemPrompt2
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-wa52mx4p.js";
|
|
23
23
|
import {
|
|
24
24
|
buildPentestReport,
|
|
25
25
|
renderJson,
|
|
26
26
|
renderMarkdown,
|
|
27
27
|
REPORT_FILENAME_MD,
|
|
28
28
|
REPORT_FILENAME_JSON
|
|
29
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-xe4wq07r.js";
|
|
30
30
|
import {
|
|
31
31
|
CodeAgent2
|
|
32
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-np9x97h3.js";
|
|
33
33
|
import {
|
|
34
34
|
WHITEBOX_APPS_DISCOVERY_SYSTEM_PROMPT2,
|
|
35
35
|
WHITEBOX_ENDPOINT_DOCUMENTATION_SYSTEM_PROMPT,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
AppInfoSchema2,
|
|
39
39
|
AppsDiscoveryResultSchema2,
|
|
40
40
|
DiscoverySummarySchema2
|
|
41
|
-
} from "./cli-
|
|
41
|
+
} from "./cli-mpmpfce6.js";
|
|
42
42
|
import {
|
|
43
43
|
createThreatModelPrompt
|
|
44
44
|
} from "./cli-q126f6ef.js";
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
init_session,
|
|
51
51
|
createLogger,
|
|
52
52
|
init_structured
|
|
53
|
-
} from "./cli-
|
|
53
|
+
} from "./cli-mm2vxyne.js";
|
|
54
54
|
import {
|
|
55
55
|
newSessionId,
|
|
56
56
|
init_id
|
|
@@ -262,6 +262,28 @@ function loadSubagentMessages(session, key) {
|
|
|
262
262
|
return [];
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
+
function loadSubagentReportedFindings(session, key) {
|
|
266
|
+
const snapshotPath = join2(session.rootPath, SUBAGENTS_DIR, `${key}.json`);
|
|
267
|
+
if (!existsSync2(snapshotPath))
|
|
268
|
+
return null;
|
|
269
|
+
try {
|
|
270
|
+
const data = JSON.parse(readFileSync2(snapshotPath, "utf-8"));
|
|
271
|
+
return data.status === "completed" && Array.isArray(data.reportedFindings) && data.reportedFindings.every((finding) => typeof finding === "string") ? data.reportedFindings : null;
|
|
272
|
+
} catch {
|
|
273
|
+
return null;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
function loadSubagentObjectiveResults(session, key) {
|
|
277
|
+
const snapshotPath = join2(session.rootPath, SUBAGENTS_DIR, `${key}.json`);
|
|
278
|
+
if (!existsSync2(snapshotPath))
|
|
279
|
+
return null;
|
|
280
|
+
try {
|
|
281
|
+
const data = JSON.parse(readFileSync2(snapshotPath, "utf-8"));
|
|
282
|
+
return data.status === "completed" && Array.isArray(data.objectiveResults) && data.objectiveResults.every((result) => result !== null && typeof result === "object" && typeof result.objective === "string" && typeof result.completed === "boolean" && (result.result === undefined || typeof result.result === "string")) ? data.objectiveResults : null;
|
|
283
|
+
} catch {
|
|
284
|
+
return null;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
265
287
|
function saveSubagentData(session, data) {
|
|
266
288
|
const subagentsDir = join2(session.rootPath, SUBAGENTS_DIR);
|
|
267
289
|
mkdirSync(subagentsDir, { recursive: true });
|
|
@@ -287,6 +309,8 @@ function saveSubagentData(session, data) {
|
|
|
287
309
|
toolCallCount,
|
|
288
310
|
stepCount,
|
|
289
311
|
findingsCount: data.findingsCount ?? 0,
|
|
312
|
+
reportedFindings: data.reportedFindings,
|
|
313
|
+
objectiveResults: data.objectiveResults,
|
|
290
314
|
status: data.status,
|
|
291
315
|
error: data.error,
|
|
292
316
|
messages: data.messages,
|
|
@@ -780,6 +804,7 @@ async function runEndpointDocumentationAgent(opts) {
|
|
|
780
804
|
attackSurfaceRegistry
|
|
781
805
|
},
|
|
782
806
|
runtime: {
|
|
807
|
+
findingPolicy: hooks?.findingPolicy,
|
|
783
808
|
model,
|
|
784
809
|
session,
|
|
785
810
|
authConfig,
|
|
@@ -7079,6 +7104,7 @@ async function runWhiteboxAttackSurfaceApp(app, appIndex, input) {
|
|
|
7079
7104
|
attackSurfaceRegistry
|
|
7080
7105
|
},
|
|
7081
7106
|
runtime: {
|
|
7107
|
+
findingPolicy: hooksForApp.findingPolicy,
|
|
7082
7108
|
model,
|
|
7083
7109
|
session,
|
|
7084
7110
|
authConfig,
|
|
@@ -7937,8 +7963,22 @@ async function runPentestSwarmTarget(target, index, input) {
|
|
|
7937
7963
|
const entry = manifestEntries[index];
|
|
7938
7964
|
const subagentId = entry.id;
|
|
7939
7965
|
const subagentName = target.name ?? entry.name;
|
|
7940
|
-
if (completedIds.has(subagentId))
|
|
7941
|
-
|
|
7966
|
+
if (completedIds.has(subagentId)) {
|
|
7967
|
+
if (sharedHooks.findingPolicy !== "external")
|
|
7968
|
+
return null;
|
|
7969
|
+
const reportedFindings = loadSubagentReportedFindings(session, subagentId);
|
|
7970
|
+
const objectiveResults = loadSubagentObjectiveResults(session, subagentId);
|
|
7971
|
+
if (!reportedFindings || !objectiveResults) {
|
|
7972
|
+
throw new Error(`Cannot resume externally graded pentest: findings or objective results for completed agent ${subagentId} are unavailable`);
|
|
7973
|
+
}
|
|
7974
|
+
return {
|
|
7975
|
+
findings: [],
|
|
7976
|
+
reportedFindings,
|
|
7977
|
+
objectiveResults,
|
|
7978
|
+
findingsPath: session.findingsPath,
|
|
7979
|
+
pocsPath: session.pocsPath
|
|
7980
|
+
};
|
|
7981
|
+
}
|
|
7942
7982
|
const itemHooks = resolveItemHooks(sharedHooks, seams, target, index);
|
|
7943
7983
|
const childSignal = abortSignal && itemHooks.abortSignal ? AbortSignal.any([abortSignal, itemHooks.abortSignal]) : abortSignal ?? itemHooks.abortSignal;
|
|
7944
7984
|
const previousMessages = loadSubagentMessages(session, subagentId);
|
|
@@ -8035,14 +8075,21 @@ async function runPentestSwarmTarget(target, index, input) {
|
|
|
8035
8075
|
abortSignal: childSignal
|
|
8036
8076
|
});
|
|
8037
8077
|
const result = await agent.consume();
|
|
8078
|
+
if (itemHooks.findingPolicy === "external" && (!Array.isArray(result.reportedFindings) || !Array.isArray(result.objectiveResults))) {
|
|
8079
|
+
throw new Error(`Externally graded pentest worker ${subagentId} ended without structured findings and objective results`);
|
|
8080
|
+
}
|
|
8038
8081
|
saveSubagentData(session, {
|
|
8039
8082
|
agentName: subagentId,
|
|
8040
8083
|
target: target.target,
|
|
8041
8084
|
objective: objectiveStr,
|
|
8042
8085
|
status: "completed",
|
|
8043
|
-
findingsCount: result.findings.length,
|
|
8086
|
+
findingsCount: result.reportedFindings?.length ?? result.findings.length,
|
|
8087
|
+
...itemHooks.findingPolicy === "external" ? {
|
|
8088
|
+
reportedFindings: result.reportedFindings,
|
|
8089
|
+
objectiveResults: result.objectiveResults
|
|
8090
|
+
} : {},
|
|
8044
8091
|
messages: [...previousMessages, ...lastMessages],
|
|
8045
|
-
systemPrompt: buildPentestSystemPrompt2(session),
|
|
8092
|
+
systemPrompt: buildPentestSystemPrompt2(session, "orchestrator", "default", undefined, undefined, itemHooks.findingPolicy),
|
|
8046
8093
|
userPrompt: agent.userPrompt
|
|
8047
8094
|
});
|
|
8048
8095
|
updateManifestEntryStatus(session, subagentId, "completed");
|
|
@@ -8060,7 +8107,7 @@ async function runPentestSwarmTarget(target, index, input) {
|
|
|
8060
8107
|
status: "failed",
|
|
8061
8108
|
error: error instanceof Error ? error.message : String(error),
|
|
8062
8109
|
messages: [...previousMessages, ...lastMessages],
|
|
8063
|
-
systemPrompt: buildPentestSystemPrompt2(session),
|
|
8110
|
+
systemPrompt: buildPentestSystemPrompt2(session, "orchestrator", "default", undefined, undefined, itemHooks.findingPolicy),
|
|
8064
8111
|
userPrompt: agent?.userPrompt ?? ""
|
|
8065
8112
|
});
|
|
8066
8113
|
updateManifestEntryStatus(session, subagentId, "failed");
|
|
@@ -8106,7 +8153,8 @@ async function runPentestSwarm2(input) {
|
|
|
8106
8153
|
languageModelMiddleware,
|
|
8107
8154
|
usageRecorder,
|
|
8108
8155
|
streamIdFactory,
|
|
8109
|
-
...hooks
|
|
8156
|
+
...hooks,
|
|
8157
|
+
findingPolicy: hooks?.findingPolicy ?? input.findingPolicy
|
|
8110
8158
|
};
|
|
8111
8159
|
const findingsRegistry = withFindingPersistedHook(rawFindingsRegistry, seams.hooks.onFindingPersisted);
|
|
8112
8160
|
const completedIds = getCompletedAgentIds(session);
|
|
@@ -8135,11 +8183,14 @@ async function runPentestSwarm2(input) {
|
|
|
8135
8183
|
};
|
|
8136
8184
|
const results = await seams.fanOut.spawnMany(targets, (target, index) => runPentestSwarmTarget(target, index, targetInput), { concurrency, abortSignal });
|
|
8137
8185
|
finalizeManifest(session, manifestEntries, results);
|
|
8186
|
+
if (sharedHooks.findingPolicy === "external" && results.some((result) => result === null)) {
|
|
8187
|
+
throw new Error("Externally graded pentest has an incomplete swarm target; findings cannot be aggregated");
|
|
8188
|
+
}
|
|
8138
8189
|
return results;
|
|
8139
8190
|
}
|
|
8140
8191
|
async function runPentestWorkflow2(input) {
|
|
8141
8192
|
if (input.fastStrike) {
|
|
8142
|
-
const { runFastStrike } = await import("./fastStrike-
|
|
8193
|
+
const { runFastStrike } = await import("./fastStrike-v0r461wn.js");
|
|
8143
8194
|
return runFastStrike(input);
|
|
8144
8195
|
}
|
|
8145
8196
|
const {
|
|
@@ -8159,6 +8210,7 @@ async function runPentestWorkflow2(input) {
|
|
|
8159
8210
|
threatModel,
|
|
8160
8211
|
surfaceIntegrationEnabled
|
|
8161
8212
|
} = input;
|
|
8213
|
+
const findingPolicy = input.hooks?.findingPolicy ?? input.findingPolicy;
|
|
8162
8214
|
const seams = input.seams ?? inProcessSeams({
|
|
8163
8215
|
fanOut: input.hooks?.subagentSpawner ?? input.subagentSpawner,
|
|
8164
8216
|
registries: {
|
|
@@ -8234,7 +8286,8 @@ ${combined}` : combined;
|
|
|
8234
8286
|
languageModelMiddleware: input.languageModelMiddleware,
|
|
8235
8287
|
usageRecorder: input.usageRecorder,
|
|
8236
8288
|
streamIdFactory: input.streamIdFactory,
|
|
8237
|
-
...input.hooks
|
|
8289
|
+
...input.hooks,
|
|
8290
|
+
findingPolicy
|
|
8238
8291
|
},
|
|
8239
8292
|
seams
|
|
8240
8293
|
});
|
|
@@ -8254,7 +8307,8 @@ ${combined}` : combined;
|
|
|
8254
8307
|
languageModelMiddleware: input.languageModelMiddleware,
|
|
8255
8308
|
usageRecorder: input.usageRecorder,
|
|
8256
8309
|
streamIdFactory: input.streamIdFactory,
|
|
8257
|
-
...input.hooks
|
|
8310
|
+
...input.hooks,
|
|
8311
|
+
findingPolicy
|
|
8258
8312
|
}
|
|
8259
8313
|
});
|
|
8260
8314
|
}
|
|
@@ -8270,6 +8324,16 @@ ${combined}` : combined;
|
|
|
8270
8324
|
throw new DOMException("Pentest aborted by user", "AbortError");
|
|
8271
8325
|
}
|
|
8272
8326
|
if (swarmTargets.length === 0) {
|
|
8327
|
+
if (findingPolicy === "external") {
|
|
8328
|
+
return {
|
|
8329
|
+
findings: [],
|
|
8330
|
+
reportedFindings: [],
|
|
8331
|
+
objectiveResults: [],
|
|
8332
|
+
findingsPath: session.findingsPath,
|
|
8333
|
+
pocsPath: session.pocsPath,
|
|
8334
|
+
reportPath: null
|
|
8335
|
+
};
|
|
8336
|
+
}
|
|
8273
8337
|
const report = buildPentestReport([], {
|
|
8274
8338
|
target,
|
|
8275
8339
|
model,
|
|
@@ -8293,9 +8357,12 @@ ${combined}` : combined;
|
|
|
8293
8357
|
});
|
|
8294
8358
|
const findingsRegistry = seams.registries.findings();
|
|
8295
8359
|
const completedCount = getCompletedAgentIds(session).size;
|
|
8296
|
-
|
|
8297
|
-
|
|
8360
|
+
let externalReportedFindings = [];
|
|
8361
|
+
let externalObjectiveResults = [];
|
|
8362
|
+
if (findingPolicy === "external" || completedCount < swarmTargets.length) {
|
|
8363
|
+
const swarmResults = await runPentestSwarm2({
|
|
8298
8364
|
targets: swarmTargets,
|
|
8365
|
+
findingPolicy,
|
|
8299
8366
|
model,
|
|
8300
8367
|
session,
|
|
8301
8368
|
authConfig,
|
|
@@ -8314,10 +8381,26 @@ ${combined}` : combined;
|
|
|
8314
8381
|
hooks: input.hooks,
|
|
8315
8382
|
seams
|
|
8316
8383
|
});
|
|
8384
|
+
externalReportedFindings = swarmResults.flatMap((result) => result?.reportedFindings ?? []);
|
|
8385
|
+
externalObjectiveResults = swarmResults.flatMap((result) => result?.objectiveResults ?? []);
|
|
8317
8386
|
}
|
|
8318
8387
|
if (abortSignal?.aborted) {
|
|
8319
8388
|
throw new DOMException("Pentest aborted by user", "AbortError");
|
|
8320
8389
|
}
|
|
8390
|
+
if (findingPolicy === "external") {
|
|
8391
|
+
eventBus?.emit("workflow-phase-complete", {
|
|
8392
|
+
phase: "pentesting",
|
|
8393
|
+
summary: { findingsCount: externalReportedFindings.length }
|
|
8394
|
+
});
|
|
8395
|
+
return {
|
|
8396
|
+
findings: [],
|
|
8397
|
+
reportedFindings: externalReportedFindings,
|
|
8398
|
+
objectiveResults: externalObjectiveResults,
|
|
8399
|
+
findingsPath: session.findingsPath,
|
|
8400
|
+
pocsPath: session.pocsPath,
|
|
8401
|
+
reportPath: null
|
|
8402
|
+
};
|
|
8403
|
+
}
|
|
8321
8404
|
eventBus?.emit("workflow-phase-start", {
|
|
8322
8405
|
phase: "reporting",
|
|
8323
8406
|
label: "Report Generation"
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
getCurrentVersion,
|
|
17
17
|
init_installation
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-5xdefy58.js";
|
|
19
19
|
import {
|
|
20
20
|
__esm
|
|
21
21
|
} from "./cli-h6y3bt60.js";
|
|
@@ -287,6 +287,7 @@ function applyEnvFallbacks(parsedConfig) {
|
|
|
287
287
|
responsibleUseAccepted: parsedConfig.responsibleUseAccepted ?? false,
|
|
288
288
|
defaultHeaders: parsedConfig.defaultHeaders ?? DEFAULT_CONFIG.defaultHeaders,
|
|
289
289
|
strikeMode: parsedConfig.strikeMode ?? DEFAULT_CONFIG.strikeMode,
|
|
290
|
+
findingPolicy: parsedConfig.findingPolicy === "external" ? "external" : "native",
|
|
290
291
|
surfaceIntegrationEnabled: parsedConfig.surfaceIntegrationEnabled ?? parseBoolEnv(process.env.PENSAR_SURFACE_INTEGRATION),
|
|
291
292
|
version,
|
|
292
293
|
customProviders: loadCustomProviders(parsedConfig.customProviders),
|
|
@@ -348,7 +349,8 @@ var init_config2 = __esm(() => {
|
|
|
348
349
|
DEFAULT_CONFIG = {
|
|
349
350
|
responsibleUseAccepted: false,
|
|
350
351
|
defaultHeaders: { "User-Agent": "pensar-apex" },
|
|
351
|
-
strikeMode: false
|
|
352
|
+
strikeMode: false,
|
|
353
|
+
findingPolicy: "native"
|
|
352
354
|
};
|
|
353
355
|
});
|
|
354
356
|
|