@pensar/apex 2.4.0-canary.70dd6aae → 2.4.0-canary.d13eb239
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-qcsapr5k.js → agent-e46h35ay.js} +7 -7
- package/build/agent-rjfefj3b.js +19 -0
- package/build/{agent-k599ja1k.js → agent-tm0tmpgc.js} +9 -9
- package/build/{apps-w6wc1v7d.js → apps-yd4dytnh.js} +16 -16
- package/build/{auth-bg9jgx4x.js → auth-90n1pswd.js} +16 -16
- package/build/authentication-19qczcfx.js +19 -0
- package/build/blackboxAgent-ja53082h.js +19 -0
- package/build/{blackboxPentest-gezfrvxt.js → blackboxPentest-qt04n5v0.js} +14 -14
- package/build/{cli-rx13s2v3.js → cli-04hkr78f.js} +1 -1
- package/build/{cli-thfxawqn.js → cli-0eeheft8.js} +2 -2
- package/build/{cli-dg149fq1.js → cli-0wc6bt29.js} +3 -3
- package/build/{cli-q70zwc6d.js → cli-1b7ytd6z.js} +2 -2
- package/build/{cli-4secrpg2.js → cli-2s00pcp1.js} +1 -1
- package/build/{cli-a83apjmm.js → cli-419b5qgw.js} +1 -1
- package/build/{cli-a21gdq0h.js → cli-4z8jyxcb.js} +1 -1
- package/build/{cli-89encaay.js → cli-a1xmncfm.js} +17 -5
- package/build/{cli-xhhtbvvf.js → cli-deh0yfrw.js} +52 -13
- package/build/{cli-bsh9mtwc.js → cli-jgk83qr1.js} +2 -2
- package/build/{cli-6r6nrznn.js → cli-kc7w78m4.js} +1 -1
- package/build/{cli-tpwapt8k.js → cli-rgsym52y.js} +1 -1
- package/build/{cli-w7hcfa14.js → cli-vkjgcner.js} +3 -3
- package/build/{cli-eb6cbejm.js → cli-wjw0pmn3.js} +3 -3
- package/build/{cli-xgppmcjy.js → cli-xdrjf347.js} +1 -1
- package/build/{cli-1ndjx2cf.js → cli-yy936th4.js} +8 -8
- package/build/{cli-rf0a3mw3.js → cli-z3ykxkhs.js} +2 -2
- package/build/cli.js +33 -33
- package/build/{config-5b0cgg2p.js → config-mcwp9dsa.js} +3 -3
- package/build/{doctor-v286w5t0.js → doctor-v6gce546.js} +6 -6
- package/build/{fastStrike-kjracswv.js → fastStrike-4j13bxte.js} +9 -9
- package/build/{fixes-jq6s3n43.js → fixes-f339b1sv.js} +16 -16
- package/build/{index-xkxctema.js → index-52a18y8b.js} +4 -4
- package/build/{index-e96hpswc.js → index-7vdchwsv.js} +3 -3
- package/build/{index-3by5pg80.js → index-9emdsfep.js} +2 -2
- package/build/{index-jt6a7w3x.js → index-a9s11g26.js} +8 -8
- package/build/{index-x16a9cfk.js → index-k8p6n78j.js} +18 -18
- package/build/{index-jy21p5km.js → index-p64zmkdp.js} +6 -6
- package/build/{index-7jzzkhwc.js → index-y04ata99.js} +9 -9
- package/build/{issues-atgm38q5.js → issues-qvsx5vz9.js} +16 -16
- package/build/{logs-ka51whfk.js → logs-a1j114zv.js} +16 -16
- package/build/{offesecAgent-q9421and.js → offesecAgent-xtkmzn5h.js} +8 -8
- package/build/pentest-7kcewtby.js +29 -0
- package/build/{pentests-h9htdr1s.js → pentests-8se5y0jq.js} +16 -16
- package/build/{targetedPentest-yrah5bxk.js → targetedPentest-4c3x1es0.js} +9 -9
- package/build/{targets-q3ymw1mx.js → targets-bngw9qvs.js} +16 -16
- package/build/threatModel-emzg6bmm.js +27 -0
- package/build/{uninstall-xe2vtc2m.js → uninstall-zrhsrhxf.js} +1 -1
- package/build/{upload-zmcbed1s.js → upload-4fykzf4q.js} +6 -6
- package/build/{utils-hskyv6w7.js → utils-qgd82ane.js} +5 -5
- package/package.json +1 -1
- package/build/agent-bt1317by.js +0 -19
- package/build/authentication-px7hvjew.js +0 -19
- package/build/blackboxAgent-h5scqk7m.js +0 -19
- package/build/pentest-narr05dk.js +0 -29
- package/build/threatModel-7cpsj0nh.js +0 -27
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OffensiveSecurityAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-deh0yfrw.js";
|
|
4
4
|
import {
|
|
5
5
|
detectOSAndEnhancePrompt
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-rgsym52y.js";
|
|
7
7
|
import"./cli-c8131c4q.js";
|
|
8
8
|
import {
|
|
9
9
|
init_dist,
|
|
10
10
|
stepCountIs
|
|
11
|
-
} from "./cli-
|
|
12
|
-
import"./cli-
|
|
11
|
+
} from "./cli-a1xmncfm.js";
|
|
12
|
+
import"./cli-419b5qgw.js";
|
|
13
13
|
import {
|
|
14
14
|
exports_external,
|
|
15
15
|
init_zod
|
|
16
16
|
} from "./cli-swpbx60z.js";
|
|
17
17
|
import"./cli-j54qa6tm.js";
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
18
|
+
import"./cli-4z8jyxcb.js";
|
|
19
|
+
import"./cli-2s00pcp1.js";
|
|
20
|
+
import"./cli-04hkr78f.js";
|
|
21
21
|
import"./cli-bc05qbss.js";
|
|
22
22
|
|
|
23
23
|
// src/core/agents/specialized/findingJudge/agent.ts
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CodeAgent
|
|
3
|
+
} from "./cli-0eeheft8.js";
|
|
4
|
+
import"./cli-9fsre5pt.js";
|
|
5
|
+
import"./cli-xdrjf347.js";
|
|
6
|
+
import"./cli-deh0yfrw.js";
|
|
7
|
+
import"./cli-rgsym52y.js";
|
|
8
|
+
import"./cli-c8131c4q.js";
|
|
9
|
+
import"./cli-a1xmncfm.js";
|
|
10
|
+
import"./cli-419b5qgw.js";
|
|
11
|
+
import"./cli-swpbx60z.js";
|
|
12
|
+
import"./cli-j54qa6tm.js";
|
|
13
|
+
import"./cli-4z8jyxcb.js";
|
|
14
|
+
import"./cli-2s00pcp1.js";
|
|
15
|
+
import"./cli-04hkr78f.js";
|
|
16
|
+
import"./cli-bc05qbss.js";
|
|
17
|
+
export {
|
|
18
|
+
CodeAgent
|
|
19
|
+
};
|
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
buildPentestPrompt,
|
|
6
6
|
buildPentestSystemPrompt,
|
|
7
7
|
resolvePentestAgentRole
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-jgk83qr1.js";
|
|
9
9
|
import"./cli-9fsre5pt.js";
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
10
|
+
import"./cli-xdrjf347.js";
|
|
11
|
+
import"./cli-deh0yfrw.js";
|
|
12
|
+
import"./cli-rgsym52y.js";
|
|
13
13
|
import"./cli-c8131c4q.js";
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-
|
|
14
|
+
import"./cli-a1xmncfm.js";
|
|
15
|
+
import"./cli-419b5qgw.js";
|
|
16
16
|
import"./cli-swpbx60z.js";
|
|
17
17
|
import"./cli-j54qa6tm.js";
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
18
|
+
import"./cli-4z8jyxcb.js";
|
|
19
|
+
import"./cli-2s00pcp1.js";
|
|
20
|
+
import"./cli-04hkr78f.js";
|
|
21
21
|
import"./cli-bc05qbss.js";
|
|
22
22
|
export {
|
|
23
23
|
PentestResponseSchema,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import"./cli-
|
|
3
|
-
import"./cli-
|
|
4
|
-
import"./cli-
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
2
|
+
import"./cli-vkjgcner.js";
|
|
3
|
+
import"./cli-yy936th4.js";
|
|
4
|
+
import"./cli-0wc6bt29.js";
|
|
5
|
+
import"./cli-1b7ytd6z.js";
|
|
6
|
+
import"./cli-jgk83qr1.js";
|
|
7
|
+
import"./cli-wjw0pmn3.js";
|
|
8
|
+
import"./cli-0eeheft8.js";
|
|
9
|
+
import"./cli-z3ykxkhs.js";
|
|
10
10
|
import"./cli-9fsre5pt.js";
|
|
11
|
-
import"./cli-
|
|
11
|
+
import"./cli-xdrjf347.js";
|
|
12
12
|
import {
|
|
13
13
|
ENDPOINT_TRANSPORTS,
|
|
14
14
|
createApp,
|
|
@@ -25,17 +25,17 @@ import {
|
|
|
25
25
|
searchEndpoints,
|
|
26
26
|
updateApp,
|
|
27
27
|
updateEndpoint
|
|
28
|
-
} from "./cli-
|
|
29
|
-
import"./cli-
|
|
28
|
+
} from "./cli-deh0yfrw.js";
|
|
29
|
+
import"./cli-rgsym52y.js";
|
|
30
30
|
import"./cli-fw5r7pfj.js";
|
|
31
31
|
import"./cli-c8131c4q.js";
|
|
32
|
-
import"./cli-
|
|
33
|
-
import"./cli-
|
|
32
|
+
import"./cli-a1xmncfm.js";
|
|
33
|
+
import"./cli-419b5qgw.js";
|
|
34
34
|
import"./cli-swpbx60z.js";
|
|
35
35
|
import"./cli-j54qa6tm.js";
|
|
36
|
-
import"./cli-
|
|
37
|
-
import"./cli-
|
|
38
|
-
import"./cli-
|
|
36
|
+
import"./cli-4z8jyxcb.js";
|
|
37
|
+
import"./cli-2s00pcp1.js";
|
|
38
|
+
import"./cli-04hkr78f.js";
|
|
39
39
|
import"./cli-bc05qbss.js";
|
|
40
40
|
|
|
41
41
|
// src/cli/apps.ts
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import"./cli-
|
|
3
|
-
import"./cli-
|
|
4
|
-
import"./cli-
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
2
|
+
import"./cli-vkjgcner.js";
|
|
3
|
+
import"./cli-yy936th4.js";
|
|
4
|
+
import"./cli-0wc6bt29.js";
|
|
5
|
+
import"./cli-1b7ytd6z.js";
|
|
6
|
+
import"./cli-jgk83qr1.js";
|
|
7
|
+
import"./cli-wjw0pmn3.js";
|
|
8
|
+
import"./cli-0eeheft8.js";
|
|
9
|
+
import"./cli-z3ykxkhs.js";
|
|
10
10
|
import"./cli-9fsre5pt.js";
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
11
|
+
import"./cli-xdrjf347.js";
|
|
12
|
+
import"./cli-deh0yfrw.js";
|
|
13
|
+
import"./cli-rgsym52y.js";
|
|
14
14
|
import"./cli-fw5r7pfj.js";
|
|
15
15
|
import"./cli-c8131c4q.js";
|
|
16
|
-
import"./cli-
|
|
16
|
+
import"./cli-a1xmncfm.js";
|
|
17
17
|
import {
|
|
18
18
|
createWorkspaceSelection,
|
|
19
19
|
disconnect,
|
|
@@ -29,15 +29,15 @@ import {
|
|
|
29
29
|
pollWorkspaceSelection,
|
|
30
30
|
selectWorkspace,
|
|
31
31
|
startDeviceFlow
|
|
32
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-419b5qgw.js";
|
|
33
33
|
import"./cli-swpbx60z.js";
|
|
34
34
|
import"./cli-j54qa6tm.js";
|
|
35
35
|
import {
|
|
36
36
|
config,
|
|
37
37
|
init_config
|
|
38
|
-
} from "./cli-
|
|
39
|
-
import"./cli-
|
|
40
|
-
import"./cli-
|
|
38
|
+
} from "./cli-4z8jyxcb.js";
|
|
39
|
+
import"./cli-2s00pcp1.js";
|
|
40
|
+
import"./cli-04hkr78f.js";
|
|
41
41
|
import {
|
|
42
42
|
__require
|
|
43
43
|
} from "./cli-bc05qbss.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runAuthenticationAgent
|
|
3
|
+
} from "./cli-wjw0pmn3.js";
|
|
4
|
+
import"./cli-9fsre5pt.js";
|
|
5
|
+
import"./cli-xdrjf347.js";
|
|
6
|
+
import"./cli-deh0yfrw.js";
|
|
7
|
+
import"./cli-rgsym52y.js";
|
|
8
|
+
import"./cli-c8131c4q.js";
|
|
9
|
+
import"./cli-a1xmncfm.js";
|
|
10
|
+
import"./cli-419b5qgw.js";
|
|
11
|
+
import"./cli-swpbx60z.js";
|
|
12
|
+
import"./cli-j54qa6tm.js";
|
|
13
|
+
import"./cli-4z8jyxcb.js";
|
|
14
|
+
import"./cli-2s00pcp1.js";
|
|
15
|
+
import"./cli-04hkr78f.js";
|
|
16
|
+
import"./cli-bc05qbss.js";
|
|
17
|
+
export {
|
|
18
|
+
runAuthenticationAgent
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BlackboxAttackSurfaceAgent
|
|
3
|
+
} from "./cli-0wc6bt29.js";
|
|
4
|
+
import"./cli-9fsre5pt.js";
|
|
5
|
+
import"./cli-xdrjf347.js";
|
|
6
|
+
import"./cli-deh0yfrw.js";
|
|
7
|
+
import"./cli-rgsym52y.js";
|
|
8
|
+
import"./cli-c8131c4q.js";
|
|
9
|
+
import"./cli-a1xmncfm.js";
|
|
10
|
+
import"./cli-419b5qgw.js";
|
|
11
|
+
import"./cli-swpbx60z.js";
|
|
12
|
+
import"./cli-j54qa6tm.js";
|
|
13
|
+
import"./cli-4z8jyxcb.js";
|
|
14
|
+
import"./cli-2s00pcp1.js";
|
|
15
|
+
import"./cli-04hkr78f.js";
|
|
16
|
+
import"./cli-bc05qbss.js";
|
|
17
|
+
export {
|
|
18
|
+
BlackboxAttackSurfaceAgent
|
|
19
|
+
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runPentestWorkflow
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
3
|
+
} from "./cli-yy936th4.js";
|
|
4
|
+
import"./cli-0wc6bt29.js";
|
|
5
|
+
import"./cli-1b7ytd6z.js";
|
|
6
|
+
import"./cli-jgk83qr1.js";
|
|
7
|
+
import"./cli-0eeheft8.js";
|
|
8
|
+
import"./cli-z3ykxkhs.js";
|
|
9
9
|
import"./cli-9fsre5pt.js";
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
10
|
+
import"./cli-xdrjf347.js";
|
|
11
|
+
import"./cli-deh0yfrw.js";
|
|
12
|
+
import"./cli-rgsym52y.js";
|
|
13
13
|
import"./cli-fw5r7pfj.js";
|
|
14
14
|
import"./cli-c8131c4q.js";
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
15
|
+
import"./cli-a1xmncfm.js";
|
|
16
|
+
import"./cli-419b5qgw.js";
|
|
17
17
|
import"./cli-swpbx60z.js";
|
|
18
18
|
import"./cli-j54qa6tm.js";
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
19
|
+
import"./cli-4z8jyxcb.js";
|
|
20
|
+
import"./cli-2s00pcp1.js";
|
|
21
|
+
import"./cli-04hkr78f.js";
|
|
22
22
|
import"./cli-bc05qbss.js";
|
|
23
23
|
|
|
24
24
|
// src/core/api/blackboxPentest.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OffensiveSecurityAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-deh0yfrw.js";
|
|
4
4
|
import {
|
|
5
5
|
init_dist,
|
|
6
6
|
stepCountIs
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-a1xmncfm.js";
|
|
8
8
|
|
|
9
9
|
// src/core/agents/specialized/codeAgent/agent.ts
|
|
10
10
|
init_dist();
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OffensiveSecurityAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-deh0yfrw.js";
|
|
4
4
|
import {
|
|
5
5
|
detectOSAndEnhancePrompt
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-rgsym52y.js";
|
|
7
7
|
import {
|
|
8
8
|
hasToolCall,
|
|
9
9
|
init_dist,
|
|
10
10
|
stepCountIs
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-a1xmncfm.js";
|
|
12
12
|
|
|
13
13
|
// src/core/agents/specialized/attackSurface/blackboxAgent.ts
|
|
14
14
|
init_dist();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EvidenceFileEntrySchema
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-xdrjf347.js";
|
|
4
4
|
import {
|
|
5
5
|
CweEntrySchema,
|
|
6
6
|
ValidatedCweEntrySchema,
|
|
7
7
|
hasCanonicalName
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-deh0yfrw.js";
|
|
9
9
|
import {
|
|
10
10
|
exports_external,
|
|
11
11
|
init_zod
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
init_auth,
|
|
5
5
|
init_constants,
|
|
6
6
|
signGatewayRequest
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-419b5qgw.js";
|
|
8
8
|
import {
|
|
9
9
|
AISDKError,
|
|
10
10
|
APICallError,
|
|
@@ -87,11 +87,11 @@ import {
|
|
|
87
87
|
import {
|
|
88
88
|
config,
|
|
89
89
|
init_config
|
|
90
|
-
} from "./cli-
|
|
90
|
+
} from "./cli-4z8jyxcb.js";
|
|
91
91
|
import {
|
|
92
92
|
getCurrentVersion,
|
|
93
93
|
init_installation
|
|
94
|
-
} from "./cli-
|
|
94
|
+
} from "./cli-04hkr78f.js";
|
|
95
95
|
import {
|
|
96
96
|
__callDispose,
|
|
97
97
|
__commonJS,
|
|
@@ -45821,6 +45821,9 @@ var init_streamTelemetry = __esm(() => {
|
|
|
45821
45821
|
|
|
45822
45822
|
// src/core/ai/ai.ts
|
|
45823
45823
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
45824
|
+
function isRepairFailClosedTool(toolName) {
|
|
45825
|
+
return REPAIR_FAIL_CLOSED_TOOLS.has(toolName);
|
|
45826
|
+
}
|
|
45824
45827
|
function takeStepContext() {
|
|
45825
45828
|
const store = stepContextStore.getStore();
|
|
45826
45829
|
if (!store)
|
|
@@ -46265,6 +46268,12 @@ function streamResponse(opts) {
|
|
|
46265
46268
|
const rawLen = typeof raw === "string" ? raw.length : JSON.stringify(raw).length;
|
|
46266
46269
|
log.warn(`[response-debug] experimental_repairToolCall FIRED for response ` + `rawInputChars=${rawLen} error=${(error.message || String(error)).slice(0, 200)}`);
|
|
46267
46270
|
}
|
|
46271
|
+
if (isRepairFailClosedTool(toolCall.toolName)) {
|
|
46272
|
+
if (!silent) {
|
|
46273
|
+
log.warn(`Tool-call repair disabled for security-sensitive tool "${toolCall.toolName}" — failing closed (no argument synthesis).`);
|
|
46274
|
+
}
|
|
46275
|
+
return null;
|
|
46276
|
+
}
|
|
46268
46277
|
try {
|
|
46269
46278
|
if (!silent) {
|
|
46270
46279
|
log.debug(`Repairing tool call: ${toolCall.toolName}`, {
|
|
@@ -46447,7 +46456,7 @@ async function generateObjectResponse(opts) {
|
|
|
46447
46456
|
}
|
|
46448
46457
|
throw lastError;
|
|
46449
46458
|
}
|
|
46450
|
-
var log, RESPONSE_DEBUG, RESPONSE_TOOL_NAME = "response", DEFAULT_OPENAI_REASONING_EFFORT = "medium", OPENAI_REASONING_MODEL_IDS, _usageCallback = null, stepContextStore, SEQUENTIAL_TOOL_CALL_INSTRUCTION, MAX_RATE_LIMIT_RETRIES = 20, MAX_IDLE_RESUME_RETRIES = 3, STREAM_IDLE_TIMEOUT_MS, StreamIdleTimeoutError, NON_GATED_TOOLS, MAX_OBJECT_RATE_LIMIT_RETRIES = 8, ContextLengthError, ContextLengthExhaustedError, MAX_RESTART_DEPTH = 3, MAX_TOOL_INPUT_CHARS = 8000, MAX_SCHEMA_CHARS = 6000, MINIMAL_RESTART_PROMPT = "Continue the previous task. Earlier context was discarded due to repeated context-length errors.";
|
|
46459
|
+
var log, RESPONSE_DEBUG, RESPONSE_TOOL_NAME = "response", REPAIR_FAIL_CLOSED_TOOLS, DEFAULT_OPENAI_REASONING_EFFORT = "medium", OPENAI_REASONING_MODEL_IDS, _usageCallback = null, stepContextStore, SEQUENTIAL_TOOL_CALL_INSTRUCTION, MAX_RATE_LIMIT_RETRIES = 20, MAX_IDLE_RESUME_RETRIES = 3, STREAM_IDLE_TIMEOUT_MS, StreamIdleTimeoutError, NON_GATED_TOOLS, MAX_OBJECT_RATE_LIMIT_RETRIES = 8, ContextLengthError, ContextLengthExhaustedError, MAX_RESTART_DEPTH = 3, MAX_TOOL_INPUT_CHARS = 8000, MAX_SCHEMA_CHARS = 6000, MINIMAL_RESTART_PROMPT = "Continue the previous task. Earlier context was discarded due to repeated context-length errors.";
|
|
46451
46460
|
var init_ai = __esm(() => {
|
|
46452
46461
|
init_dist4();
|
|
46453
46462
|
init_structured();
|
|
@@ -46460,6 +46469,9 @@ var init_ai = __esm(() => {
|
|
|
46460
46469
|
init_utils();
|
|
46461
46470
|
log = scopedLogger(() => createLogger("ai"));
|
|
46462
46471
|
RESPONSE_DEBUG = process.env.RESPONSE_DEBUG === "1" || process.env.RESPONSE_DEBUG === "true";
|
|
46472
|
+
REPAIR_FAIL_CLOSED_TOOLS = new Set([
|
|
46473
|
+
"spawn_pentest_agent"
|
|
46474
|
+
]);
|
|
46463
46475
|
OPENAI_REASONING_MODEL_IDS = new Set([
|
|
46464
46476
|
"gpt-5",
|
|
46465
46477
|
"gpt-5-2025-08-07",
|
|
@@ -47372,7 +47384,7 @@ async function create2(input) {
|
|
|
47372
47384
|
if (normalizedConfig?.headers !== undefined) {
|
|
47373
47385
|
snapshotHeaders = { ...normalizedConfig.headers };
|
|
47374
47386
|
} else {
|
|
47375
|
-
const { config: appConfig } = await import("./index-
|
|
47387
|
+
const { config: appConfig } = await import("./index-7vdchwsv.js");
|
|
47376
47388
|
const cfg = await appConfig.get();
|
|
47377
47389
|
snapshotHeaders = cfg.defaultHeaders ? { ...cfg.defaultHeaders } : { ...DEFAULT_HEADER_RECORD };
|
|
47378
47390
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
detectOSAndEnhancePrompt
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-rgsym52y.js";
|
|
4
4
|
import {
|
|
5
5
|
parseTargetUrl
|
|
6
6
|
} from "./cli-c8131c4q.js";
|
|
@@ -32,14 +32,14 @@ import {
|
|
|
32
32
|
streamResponse,
|
|
33
33
|
withSubagentSessionBaggage,
|
|
34
34
|
write
|
|
35
|
-
} from "./cli-
|
|
35
|
+
} from "./cli-a1xmncfm.js";
|
|
36
36
|
import {
|
|
37
37
|
ensureValidToken,
|
|
38
38
|
getPensarApiUrl,
|
|
39
39
|
init_auth,
|
|
40
40
|
init_constants,
|
|
41
41
|
signGatewayRequest
|
|
42
|
-
} from "./cli-
|
|
42
|
+
} from "./cli-419b5qgw.js";
|
|
43
43
|
import {
|
|
44
44
|
_enum,
|
|
45
45
|
_null,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
import {
|
|
71
71
|
config,
|
|
72
72
|
init_config
|
|
73
|
-
} from "./cli-
|
|
73
|
+
} from "./cli-4z8jyxcb.js";
|
|
74
74
|
import {
|
|
75
75
|
__commonJS,
|
|
76
76
|
__require,
|
|
@@ -104461,6 +104461,19 @@ function assertUrlInScope(url, ctx) {
|
|
|
104461
104461
|
throw new ScopeViolationError(hostname, allowedHosts);
|
|
104462
104462
|
}
|
|
104463
104463
|
}
|
|
104464
|
+
function assertFindingEndpointInScope(endpoint, ctx) {
|
|
104465
|
+
const allowedHosts = getAllowedHosts(ctx);
|
|
104466
|
+
if (allowedHosts.length === 0)
|
|
104467
|
+
return;
|
|
104468
|
+
if (!/^https?:\/\//i.test(endpoint.trim()))
|
|
104469
|
+
return;
|
|
104470
|
+
const hostname = extractHostname2(endpoint);
|
|
104471
|
+
if (!hostname)
|
|
104472
|
+
return;
|
|
104473
|
+
if (!isHostAllowed(hostname, allowedHosts)) {
|
|
104474
|
+
throw new ScopeViolationError(hostname, allowedHosts);
|
|
104475
|
+
}
|
|
104476
|
+
}
|
|
104464
104477
|
function extractHostsFromCommand(command) {
|
|
104465
104478
|
const hosts = new Set;
|
|
104466
104479
|
const urlPattern = /https?:\/\/[^\s"'`;|&)<>]+/gi;
|
|
@@ -106752,7 +106765,7 @@ IMPORTANT: Pass protectedEndpoints in authHints when you've discovered 401/403 e
|
|
|
106752
106765
|
if (credentials) {
|
|
106753
106766
|
ctx.session.credentialManager.addFromAuthCredentials(credentials);
|
|
106754
106767
|
}
|
|
106755
|
-
const { runAuthenticationAgent } = await import("./authentication-
|
|
106768
|
+
const { runAuthenticationAgent } = await import("./authentication-19qczcfx.js");
|
|
106756
106769
|
const localBus = new AgentEventBus;
|
|
106757
106770
|
AgentEventBus.attachChild(localBus, ctx.eventBus, subagentId);
|
|
106758
106771
|
const result = await runAuthenticationAgent({
|
|
@@ -107546,7 +107559,7 @@ async function generateThreatModelForEndpoint(ctx, input) {
|
|
|
107546
107559
|
return threatModelLimiter(async () => {
|
|
107547
107560
|
if (ctx.abortSignal?.aborted)
|
|
107548
107561
|
return null;
|
|
107549
|
-
const { CodeAgent } = await import("./agent-
|
|
107562
|
+
const { CodeAgent } = await import("./agent-rjfefj3b.js");
|
|
107550
107563
|
const subagentId = newSessionId();
|
|
107551
107564
|
const subagentName = `Threat Model: ${input.routePath}`;
|
|
107552
107565
|
ctx.eventBus?.emit("subagent-spawn", {
|
|
@@ -109471,7 +109484,7 @@ init_lazyLogger();
|
|
|
109471
109484
|
var log6 = scopedLogger(() => createLogger("FindingJudge"));
|
|
109472
109485
|
async function judgeFinding(input, ctx) {
|
|
109473
109486
|
try {
|
|
109474
|
-
const { FindingJudgeAgent } = await import("./agent-
|
|
109487
|
+
const { FindingJudgeAgent } = await import("./agent-e46h35ay.js");
|
|
109475
109488
|
const agent = new FindingJudgeAgent({
|
|
109476
109489
|
finding: input,
|
|
109477
109490
|
model: ctx.model,
|
|
@@ -109647,6 +109660,18 @@ CRITICAL RULES — READ BEFORE CALLING:
|
|
|
109647
109660
|
- If you could not exploit a vulnerability, do NOT call this tool — mention it in your final response summary instead`,
|
|
109648
109661
|
inputSchema: documentVulnerabilityInputSchema,
|
|
109649
109662
|
execute: async (input) => {
|
|
109663
|
+
try {
|
|
109664
|
+
assertFindingEndpointInScope(input.endpoint, ctx);
|
|
109665
|
+
} catch (error) {
|
|
109666
|
+
if (error instanceof ScopeViolationError) {
|
|
109667
|
+
return {
|
|
109668
|
+
success: false,
|
|
109669
|
+
error: error.message,
|
|
109670
|
+
message: `Finding endpoint rejected — out of scope: ${error.message}`
|
|
109671
|
+
};
|
|
109672
|
+
}
|
|
109673
|
+
throw error;
|
|
109674
|
+
}
|
|
109650
109675
|
try {
|
|
109651
109676
|
const materializedEvidence = formatMateriality(input);
|
|
109652
109677
|
if (ctx.findingsRegistry) {
|
|
@@ -116097,7 +116122,7 @@ should be passed directly to spawn_pentest_swarm for deep testing.`,
|
|
|
116097
116122
|
});
|
|
116098
116123
|
if (cwd) {
|
|
116099
116124
|
try {
|
|
116100
|
-
const { WhiteboxAttackSurfaceAgent } = await import("./index-
|
|
116125
|
+
const { WhiteboxAttackSurfaceAgent } = await import("./index-y04ata99.js");
|
|
116101
116126
|
const localBus = new AgentEventBus;
|
|
116102
116127
|
AgentEventBus.attachChild(localBus, ctx.eventBus, subagentId);
|
|
116103
116128
|
const agent = new WhiteboxAttackSurfaceAgent({
|
|
@@ -116152,7 +116177,7 @@ should be passed directly to spawn_pentest_swarm for deep testing.`,
|
|
|
116152
116177
|
}
|
|
116153
116178
|
}
|
|
116154
116179
|
try {
|
|
116155
|
-
const { BlackboxAttackSurfaceAgent } = await import("./blackboxAgent-
|
|
116180
|
+
const { BlackboxAttackSurfaceAgent } = await import("./blackboxAgent-ja53082h.js");
|
|
116156
116181
|
const localBus = new AgentEventBus;
|
|
116157
116182
|
AgentEventBus.attachChild(localBus, ctx.eventBus, subagentId);
|
|
116158
116183
|
const agent = new BlackboxAttackSurfaceAgent({
|
|
@@ -116230,7 +116255,7 @@ Omit \`cwd\` for blackbox mode (live target probing only).`,
|
|
|
116230
116255
|
toolCallDescription: exports_external.string().describe("A concise, human-readable description of what this tool call is doing")
|
|
116231
116256
|
}),
|
|
116232
116257
|
execute: async ({ target, cwd }) => {
|
|
116233
|
-
const { runPentestWorkflow: workflow } = await import("./pentest-
|
|
116258
|
+
const { runPentestWorkflow: workflow } = await import("./pentest-7kcewtby.js");
|
|
116234
116259
|
if (!ctx.model) {
|
|
116235
116260
|
return {
|
|
116236
116261
|
success: false,
|
|
@@ -117808,7 +117833,7 @@ Returns an array of results with the text output from each agent.`,
|
|
|
117808
117833
|
});
|
|
117809
117834
|
}
|
|
117810
117835
|
async function runSingleCodingAgent(ctx, codebasePath, objective, agentIndex, name) {
|
|
117811
|
-
const { CodeAgent } = await import("./agent-
|
|
117836
|
+
const { CodeAgent } = await import("./agent-rjfefj3b.js");
|
|
117812
117837
|
const childSessionId = newSessionId();
|
|
117813
117838
|
const subagentId = childSessionId;
|
|
117814
117839
|
ctx.eventBus?.emit("subagent-spawn", {
|
|
@@ -118325,7 +118350,21 @@ Returns the worker's summary, objective results, and finding count — but NOT t
|
|
|
118325
118350
|
message: "spawn_pentest_agent requires a model in the tool context."
|
|
118326
118351
|
};
|
|
118327
118352
|
}
|
|
118328
|
-
|
|
118353
|
+
if (typeof target !== "string" || parseTargetUrl(target) === null) {
|
|
118354
|
+
return {
|
|
118355
|
+
success: false,
|
|
118356
|
+
message: `spawn_pentest_agent rejected: "target" is not a valid full URL (received ${JSON.stringify(target)}). ` + `Pass the exact full URL the orchestrator received — do NOT invent, default, or substitute a target.`
|
|
118357
|
+
};
|
|
118358
|
+
}
|
|
118359
|
+
try {
|
|
118360
|
+
assertUrlInScope(target, ctx);
|
|
118361
|
+
} catch (error) {
|
|
118362
|
+
if (error instanceof ScopeViolationError) {
|
|
118363
|
+
return { success: false, message: error.message };
|
|
118364
|
+
}
|
|
118365
|
+
throw error;
|
|
118366
|
+
}
|
|
118367
|
+
const { TargetedPentestAgent } = await import("./agent-tm0tmpgc.js");
|
|
118329
118368
|
const findingsRegistry = ctx.findingsRegistry ?? FindingsRegistry.fromDirectory(ctx.session.findingsPath, {
|
|
118330
118369
|
model: ctx.model,
|
|
118331
118370
|
authConfig: ctx.authConfig,
|
|
@@ -118459,7 +118498,7 @@ Pass every target you want tested — the swarm handles concurrency automaticall
|
|
|
118459
118498
|
toolCallDescription: exports_external.string().describe("A concise, human-readable description of what this tool call is doing")
|
|
118460
118499
|
}),
|
|
118461
118500
|
execute: async ({ targets }) => {
|
|
118462
|
-
const { runPentestSwarm, DEFAULT_CONCURRENCY: DEFAULT_CONCURRENCY2 } = await import("./pentest-
|
|
118501
|
+
const { runPentestSwarm, DEFAULT_CONCURRENCY: DEFAULT_CONCURRENCY2 } = await import("./pentest-7kcewtby.js");
|
|
118463
118502
|
if (!ctx.model) {
|
|
118464
118503
|
return {
|
|
118465
118504
|
success: false,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
createReportErrorTool,
|
|
6
6
|
isMemoryEnabled,
|
|
7
7
|
readPlan
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-deh0yfrw.js";
|
|
9
9
|
import {
|
|
10
10
|
createLogger,
|
|
11
11
|
hasToolCall,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
init_lazyLogger,
|
|
14
14
|
init_structured,
|
|
15
15
|
scopedLogger
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-a1xmncfm.js";
|
|
17
17
|
import {
|
|
18
18
|
exports_external,
|
|
19
19
|
init_zod
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
SKILL_TOOL_NAMES,
|
|
6
6
|
apiRequest,
|
|
7
7
|
buildBaseSystemPrompt
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-deh0yfrw.js";
|
|
9
9
|
import {
|
|
10
10
|
init_dist,
|
|
11
11
|
init_session,
|
|
12
12
|
sessions,
|
|
13
13
|
stepCountIs
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-a1xmncfm.js";
|
|
15
15
|
import {
|
|
16
16
|
init_constants
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-419b5qgw.js";
|
|
18
18
|
import {
|
|
19
19
|
exports_external,
|
|
20
20
|
init_zod
|