@pensar/apex 2.3.0-canary.545f12fe → 2.3.0-canary.69bfb82f
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-28g40h1h.js → agent-9ck6hcgm.js} +7 -7
- package/build/agent-fsm08k4s.js +19 -0
- package/build/{agent-ksxqhwz8.js → agent-xeze611p.js} +9 -9
- package/build/{apps-csx75pk9.js → apps-z4t1t8vq.js} +16 -16
- package/build/{auth-xk51kbta.js → auth-9y0h9cc2.js} +16 -16
- package/build/authentication-ar6t1hah.js +19 -0
- package/build/blackboxAgent-z4ps082z.js +19 -0
- package/build/{blackboxPentest-yej2rznw.js → blackboxPentest-byjp9njm.js} +14 -14
- package/build/{cli-e2qdjmmk.js → cli-0nhhne05.js} +1 -1
- package/build/{cli-fdh49tvn.js → cli-3v63bjde.js} +2 -2
- package/build/{cli-3q59v60j.js → cli-56zyg4kv.js} +79 -41
- package/build/{cli-08ebfe16.js → cli-5kw8aevs.js} +2 -2
- package/build/{cli-b8djymsb.js → cli-5r9kv574.js} +3 -3
- package/build/{cli-f1fn45dm.js → cli-6d37md4z.js} +1 -1
- package/build/{cli-cj6gf45y.js → cli-84zf1xh9.js} +1 -1
- package/build/{cli-nkgncst6.js → cli-b5fgnn98.js} +8 -8
- package/build/{cli-2b1fcxrx.js → cli-j2xnatde.js} +12 -8
- package/build/{cli-1xqq625p.js → cli-mfsnae61.js} +1 -1
- package/build/{cli-1dpatpjw.js → cli-nz9t18bj.js} +2 -2
- package/build/{cli-qq5tzdaf.js → cli-phg6k6r3.js} +4 -4
- package/build/{cli-683adz4a.js → cli-t3w55a46.js} +1 -1
- package/build/{cli-atjcbeyz.js → cli-x3dp6b1d.js} +1 -1
- package/build/{cli-jqfbbpvp.js → cli-x8a6x5qp.js} +2 -2
- package/build/{cli-aqn5axrc.js → cli-xtr26a9f.js} +3 -3
- package/build/{cli-df54tdaz.js → cli-ycdcat4d.js} +1 -1
- package/build/cli.js +33 -33
- package/build/{config-tf803ygw.js → config-n46nr9dn.js} +3 -3
- package/build/{doctor-hvmgtwsv.js → doctor-pmxj4q08.js} +6 -6
- package/build/{fastStrike-7ptrz6qt.js → fastStrike-wnceneew.js} +15 -13
- package/build/{fixes-43ex34f1.js → fixes-ebea8j04.js} +16 -16
- package/build/{index-05epz60s.js → index-7wwrt670.js} +21 -21
- package/build/{index-hmf9b8jd.js → index-8nhy408y.js} +9 -9
- package/build/{index-vvqw4r20.js → index-grtryfy3.js} +4 -4
- package/build/{index-5q4g038d.js → index-mcav8n18.js} +3 -3
- package/build/{index-532vvmaf.js → index-v12mbkx8.js} +2 -2
- package/build/{index-9qd1rtbs.js → index-z32wkpxq.js} +8 -8
- package/build/{index-hnecr3bj.js → index-zgpq7k03.js} +14 -10
- package/build/{issues-p6spqtma.js → issues-y41kba23.js} +16 -16
- package/build/{logs-eq2nc2k3.js → logs-b7h122e9.js} +16 -16
- package/build/{offesecAgent-zsc5vrek.js → offesecAgent-fr9fpzzk.js} +8 -8
- package/build/pentest-t3d2bpde.js +29 -0
- package/build/{pentests-8tqyzj9v.js → pentests-c6x7t7n4.js} +16 -16
- package/build/{targetedPentest-rpwgc6wf.js → targetedPentest-jyq4azbd.js} +9 -9
- package/build/{targets-8pd483mk.js → targets-xdv5m9vq.js} +16 -16
- package/build/threatModel-3rmdn2z4.js +27 -0
- package/build/{uninstall-tc9xqgxy.js → uninstall-3gat07zn.js} +1 -1
- package/build/{upload-nskdz2y3.js → upload-9xb2xw55.js} +6 -6
- package/build/{utils-r7ndrdsp.js → utils-dwhbr085.js} +5 -5
- package/package.json +1 -1
- package/build/agent-wqk2r9q4.js +0 -19
- package/build/authentication-92gz89ht.js +0 -19
- package/build/blackboxAgent-4s6exxja.js +0 -19
- package/build/pentest-pnz2qm5t.js +0 -29
- package/build/threatModel-5h24gh6m.js +0 -27
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OffensiveSecurityAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-56zyg4kv.js";
|
|
4
4
|
import {
|
|
5
5
|
detectOSAndEnhancePrompt
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-6d37md4z.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-j2xnatde.js";
|
|
12
|
+
import"./cli-t3w55a46.js";
|
|
13
13
|
import {
|
|
14
14
|
exports_external,
|
|
15
15
|
init_zod
|
|
16
16
|
} from "./cli-3k1x5rn3.js";
|
|
17
17
|
import"./cli-gpnb45ck.js";
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
18
|
+
import"./cli-0nhhne05.js";
|
|
19
|
+
import"./cli-mfsnae61.js";
|
|
20
|
+
import"./cli-x3dp6b1d.js";
|
|
21
21
|
import"./cli-8rxa073f.js";
|
|
22
22
|
|
|
23
23
|
// src/core/agents/specialized/findingJudge/agent.ts
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CodeAgent
|
|
3
|
+
} from "./cli-3v63bjde.js";
|
|
4
|
+
import"./cli-9fsre5pt.js";
|
|
5
|
+
import"./cli-84zf1xh9.js";
|
|
6
|
+
import"./cli-56zyg4kv.js";
|
|
7
|
+
import"./cli-6d37md4z.js";
|
|
8
|
+
import"./cli-c8131c4q.js";
|
|
9
|
+
import"./cli-j2xnatde.js";
|
|
10
|
+
import"./cli-t3w55a46.js";
|
|
11
|
+
import"./cli-3k1x5rn3.js";
|
|
12
|
+
import"./cli-gpnb45ck.js";
|
|
13
|
+
import"./cli-0nhhne05.js";
|
|
14
|
+
import"./cli-mfsnae61.js";
|
|
15
|
+
import"./cli-x3dp6b1d.js";
|
|
16
|
+
import"./cli-8rxa073f.js";
|
|
17
|
+
export {
|
|
18
|
+
CodeAgent
|
|
19
|
+
};
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
buildPentestActiveTools,
|
|
5
5
|
buildPentestPrompt,
|
|
6
6
|
buildPentestSystemPrompt
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-nz9t18bj.js";
|
|
8
8
|
import"./cli-9fsre5pt.js";
|
|
9
|
-
import"./cli-
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
9
|
+
import"./cli-84zf1xh9.js";
|
|
10
|
+
import"./cli-56zyg4kv.js";
|
|
11
|
+
import"./cli-6d37md4z.js";
|
|
12
12
|
import"./cli-c8131c4q.js";
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
13
|
+
import"./cli-j2xnatde.js";
|
|
14
|
+
import"./cli-t3w55a46.js";
|
|
15
15
|
import"./cli-3k1x5rn3.js";
|
|
16
16
|
import"./cli-gpnb45ck.js";
|
|
17
|
-
import"./cli-
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
17
|
+
import"./cli-0nhhne05.js";
|
|
18
|
+
import"./cli-mfsnae61.js";
|
|
19
|
+
import"./cli-x3dp6b1d.js";
|
|
20
20
|
import"./cli-8rxa073f.js";
|
|
21
21
|
export {
|
|
22
22
|
buildPentestSystemPrompt,
|
|
@@ -12,27 +12,27 @@ import {
|
|
|
12
12
|
searchEndpoints,
|
|
13
13
|
updateApp,
|
|
14
14
|
updateEndpoint
|
|
15
|
-
} from "./cli-
|
|
16
|
-
import"./cli-
|
|
17
|
-
import"./cli-
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
15
|
+
} from "./cli-phg6k6r3.js";
|
|
16
|
+
import"./cli-b5fgnn98.js";
|
|
17
|
+
import"./cli-5r9kv574.js";
|
|
18
|
+
import"./cli-5kw8aevs.js";
|
|
19
|
+
import"./cli-nz9t18bj.js";
|
|
20
|
+
import"./cli-xtr26a9f.js";
|
|
21
|
+
import"./cli-3v63bjde.js";
|
|
22
|
+
import"./cli-x8a6x5qp.js";
|
|
23
23
|
import"./cli-9fsre5pt.js";
|
|
24
|
-
import"./cli-
|
|
25
|
-
import"./cli-
|
|
26
|
-
import"./cli-
|
|
24
|
+
import"./cli-84zf1xh9.js";
|
|
25
|
+
import"./cli-56zyg4kv.js";
|
|
26
|
+
import"./cli-6d37md4z.js";
|
|
27
27
|
import"./cli-fw5r7pfj.js";
|
|
28
28
|
import"./cli-c8131c4q.js";
|
|
29
|
-
import"./cli-
|
|
30
|
-
import"./cli-
|
|
29
|
+
import"./cli-j2xnatde.js";
|
|
30
|
+
import"./cli-t3w55a46.js";
|
|
31
31
|
import"./cli-3k1x5rn3.js";
|
|
32
32
|
import"./cli-gpnb45ck.js";
|
|
33
|
-
import"./cli-
|
|
34
|
-
import"./cli-
|
|
35
|
-
import"./cli-
|
|
33
|
+
import"./cli-0nhhne05.js";
|
|
34
|
+
import"./cli-mfsnae61.js";
|
|
35
|
+
import"./cli-x3dp6b1d.js";
|
|
36
36
|
import"./cli-8rxa073f.js";
|
|
37
37
|
|
|
38
38
|
// 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-phg6k6r3.js";
|
|
3
|
+
import"./cli-b5fgnn98.js";
|
|
4
|
+
import"./cli-5r9kv574.js";
|
|
5
|
+
import"./cli-5kw8aevs.js";
|
|
6
|
+
import"./cli-nz9t18bj.js";
|
|
7
|
+
import"./cli-xtr26a9f.js";
|
|
8
|
+
import"./cli-3v63bjde.js";
|
|
9
|
+
import"./cli-x8a6x5qp.js";
|
|
10
10
|
import"./cli-9fsre5pt.js";
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
11
|
+
import"./cli-84zf1xh9.js";
|
|
12
|
+
import"./cli-56zyg4kv.js";
|
|
13
|
+
import"./cli-6d37md4z.js";
|
|
14
14
|
import"./cli-fw5r7pfj.js";
|
|
15
15
|
import"./cli-c8131c4q.js";
|
|
16
|
-
import"./cli-
|
|
16
|
+
import"./cli-j2xnatde.js";
|
|
17
17
|
import {
|
|
18
18
|
createWorkspaceSelection,
|
|
19
19
|
disconnect,
|
|
@@ -28,15 +28,15 @@ import {
|
|
|
28
28
|
pollWorkspaceSelection,
|
|
29
29
|
selectWorkspace,
|
|
30
30
|
startDeviceFlow
|
|
31
|
-
} from "./cli-
|
|
31
|
+
} from "./cli-t3w55a46.js";
|
|
32
32
|
import"./cli-3k1x5rn3.js";
|
|
33
33
|
import"./cli-gpnb45ck.js";
|
|
34
34
|
import {
|
|
35
35
|
config,
|
|
36
36
|
init_config
|
|
37
|
-
} from "./cli-
|
|
38
|
-
import"./cli-
|
|
39
|
-
import"./cli-
|
|
37
|
+
} from "./cli-0nhhne05.js";
|
|
38
|
+
import"./cli-mfsnae61.js";
|
|
39
|
+
import"./cli-x3dp6b1d.js";
|
|
40
40
|
import {
|
|
41
41
|
__require
|
|
42
42
|
} from "./cli-8rxa073f.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runAuthenticationAgent
|
|
3
|
+
} from "./cli-xtr26a9f.js";
|
|
4
|
+
import"./cli-9fsre5pt.js";
|
|
5
|
+
import"./cli-84zf1xh9.js";
|
|
6
|
+
import"./cli-56zyg4kv.js";
|
|
7
|
+
import"./cli-6d37md4z.js";
|
|
8
|
+
import"./cli-c8131c4q.js";
|
|
9
|
+
import"./cli-j2xnatde.js";
|
|
10
|
+
import"./cli-t3w55a46.js";
|
|
11
|
+
import"./cli-3k1x5rn3.js";
|
|
12
|
+
import"./cli-gpnb45ck.js";
|
|
13
|
+
import"./cli-0nhhne05.js";
|
|
14
|
+
import"./cli-mfsnae61.js";
|
|
15
|
+
import"./cli-x3dp6b1d.js";
|
|
16
|
+
import"./cli-8rxa073f.js";
|
|
17
|
+
export {
|
|
18
|
+
runAuthenticationAgent
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BlackboxAttackSurfaceAgent
|
|
3
|
+
} from "./cli-5r9kv574.js";
|
|
4
|
+
import"./cli-9fsre5pt.js";
|
|
5
|
+
import"./cli-84zf1xh9.js";
|
|
6
|
+
import"./cli-56zyg4kv.js";
|
|
7
|
+
import"./cli-6d37md4z.js";
|
|
8
|
+
import"./cli-c8131c4q.js";
|
|
9
|
+
import"./cli-j2xnatde.js";
|
|
10
|
+
import"./cli-t3w55a46.js";
|
|
11
|
+
import"./cli-3k1x5rn3.js";
|
|
12
|
+
import"./cli-gpnb45ck.js";
|
|
13
|
+
import"./cli-0nhhne05.js";
|
|
14
|
+
import"./cli-mfsnae61.js";
|
|
15
|
+
import"./cli-x3dp6b1d.js";
|
|
16
|
+
import"./cli-8rxa073f.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-b5fgnn98.js";
|
|
4
|
+
import"./cli-5r9kv574.js";
|
|
5
|
+
import"./cli-5kw8aevs.js";
|
|
6
|
+
import"./cli-nz9t18bj.js";
|
|
7
|
+
import"./cli-3v63bjde.js";
|
|
8
|
+
import"./cli-x8a6x5qp.js";
|
|
9
9
|
import"./cli-9fsre5pt.js";
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
10
|
+
import"./cli-84zf1xh9.js";
|
|
11
|
+
import"./cli-56zyg4kv.js";
|
|
12
|
+
import"./cli-6d37md4z.js";
|
|
13
13
|
import"./cli-fw5r7pfj.js";
|
|
14
14
|
import"./cli-c8131c4q.js";
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
15
|
+
import"./cli-j2xnatde.js";
|
|
16
|
+
import"./cli-t3w55a46.js";
|
|
17
17
|
import"./cli-3k1x5rn3.js";
|
|
18
18
|
import"./cli-gpnb45ck.js";
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
19
|
+
import"./cli-0nhhne05.js";
|
|
20
|
+
import"./cli-mfsnae61.js";
|
|
21
|
+
import"./cli-x3dp6b1d.js";
|
|
22
22
|
import"./cli-8rxa073f.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-56zyg4kv.js";
|
|
4
4
|
import {
|
|
5
5
|
init_dist,
|
|
6
6
|
stepCountIs
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-j2xnatde.js";
|
|
8
8
|
|
|
9
9
|
// src/core/agents/specialized/codeAgent/agent.ts
|
|
10
10
|
init_dist();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
detectOSAndEnhancePrompt
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-6d37md4z.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-j2xnatde.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-t3w55a46.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-0nhhne05.js";
|
|
74
74
|
import {
|
|
75
75
|
__commonJS,
|
|
76
76
|
__require,
|
|
@@ -46340,7 +46340,7 @@ var require_gaxios = __commonJS((exports) => {
|
|
|
46340
46340
|
var retry_js_1 = require_retry();
|
|
46341
46341
|
var stream_1 = __require("stream");
|
|
46342
46342
|
var interceptor_js_1 = require_interceptor();
|
|
46343
|
-
var
|
|
46343
|
+
var randomUUID2 = async () => globalThis.crypto?.randomUUID() || (await import("crypto")).randomUUID();
|
|
46344
46344
|
var HTTP_STATUS_NO_CONTENT = 204;
|
|
46345
46345
|
|
|
46346
46346
|
class Gaxios {
|
|
@@ -46551,7 +46551,7 @@ var require_gaxios = __commonJS((exports) => {
|
|
|
46551
46551
|
}
|
|
46552
46552
|
const shouldDirectlyPassData = typeof opts.data === "string" || opts.data instanceof ArrayBuffer || opts.data instanceof Blob || globalThis.File && opts.data instanceof File || opts.data instanceof FormData || opts.data instanceof stream_1.Readable || opts.data instanceof ReadableStream || opts.data instanceof String || opts.data instanceof URLSearchParams || ArrayBuffer.isView(opts.data) || ["Blob", "File", "FormData"].includes(opts.data?.constructor?.name || "");
|
|
46553
46553
|
if (opts.multipart?.length) {
|
|
46554
|
-
const boundary = await
|
|
46554
|
+
const boundary = await randomUUID2();
|
|
46555
46555
|
preparedHeaders.set("content-type", `multipart/related; boundary=${boundary}`);
|
|
46556
46556
|
opts.body = stream_1.Readable.from(this.getMultipartRequest(opts.multipart, boundary));
|
|
46557
46557
|
} else if (shouldDirectlyPassData) {
|
|
@@ -57496,7 +57496,7 @@ var require_apirequest = __commonJS((exports) => {
|
|
|
57496
57496
|
var h2 = require_http2();
|
|
57497
57497
|
var util_1 = require_util6();
|
|
57498
57498
|
var pkg = require_package4();
|
|
57499
|
-
var
|
|
57499
|
+
var randomUUID2 = () => globalThis.crypto?.randomUUID() || __require("crypto").randomUUID();
|
|
57500
57500
|
function isReadableStream(obj) {
|
|
57501
57501
|
return obj !== null && typeof obj === "object" && typeof obj.pipe === "function" && obj.readable !== false && typeof obj._read === "function" && typeof obj._readableState === "object";
|
|
57502
57502
|
}
|
|
@@ -57569,7 +57569,7 @@ var require_apirequest = __commonJS((exports) => {
|
|
|
57569
57569
|
authClient = undefined;
|
|
57570
57570
|
}
|
|
57571
57571
|
function multipartUpload(multipart) {
|
|
57572
|
-
const boundary =
|
|
57572
|
+
const boundary = randomUUID2();
|
|
57573
57573
|
const finale = `--${boundary}--`;
|
|
57574
57574
|
const rStream = new stream.PassThrough({
|
|
57575
57575
|
flush(callback) {
|
|
@@ -57608,7 +57608,7 @@ content-type: ${part["content-type"]}\r
|
|
|
57608
57608
|
options.data = rStream;
|
|
57609
57609
|
}
|
|
57610
57610
|
function browserMultipartUpload(multipart) {
|
|
57611
|
-
const boundary =
|
|
57611
|
+
const boundary = randomUUID2();
|
|
57612
57612
|
const finale = `--${boundary}--`;
|
|
57613
57613
|
headers["content-type"] = `multipart/related; boundary=${boundary}`;
|
|
57614
57614
|
let content = "";
|
|
@@ -100128,6 +100128,7 @@ function askUserQuestions(_ctx) {
|
|
|
100128
100128
|
}
|
|
100129
100129
|
|
|
100130
100130
|
// src/core/agents/offSecAgent/tools/playwrightMcp.ts
|
|
100131
|
+
import { randomUUID } from "node:crypto";
|
|
100131
100132
|
import {
|
|
100132
100133
|
existsSync as existsSync2,
|
|
100133
100134
|
mkdirSync,
|
|
@@ -102895,6 +102896,30 @@ function collectDescendantPids(rootPid) {
|
|
|
102895
102896
|
}
|
|
102896
102897
|
return descendants;
|
|
102897
102898
|
}
|
|
102899
|
+
var BROWSER_LAUNCH_ENV = "PENSAR_BROWSER_LAUNCH_ID";
|
|
102900
|
+
function collectPidsByEnvMarker(key, value) {
|
|
102901
|
+
let entries;
|
|
102902
|
+
try {
|
|
102903
|
+
entries = readdirSync2("/proc");
|
|
102904
|
+
} catch {
|
|
102905
|
+
return [];
|
|
102906
|
+
}
|
|
102907
|
+
const needle = `${key}=${value}`;
|
|
102908
|
+
const pids = [];
|
|
102909
|
+
for (const name of entries) {
|
|
102910
|
+
if (!/^\d+$/.test(name))
|
|
102911
|
+
continue;
|
|
102912
|
+
const pid = Number(name);
|
|
102913
|
+
if (pid === process.pid)
|
|
102914
|
+
continue;
|
|
102915
|
+
try {
|
|
102916
|
+
if (readFileSync(`/proc/${pid}/environ`, "utf8").split("\x00").includes(needle)) {
|
|
102917
|
+
pids.push(pid);
|
|
102918
|
+
}
|
|
102919
|
+
} catch {}
|
|
102920
|
+
}
|
|
102921
|
+
return pids;
|
|
102922
|
+
}
|
|
102898
102923
|
var defaultHeadless = true;
|
|
102899
102924
|
var defaultUserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36";
|
|
102900
102925
|
var HARDCODED_VIEWPORT_FALLBACK = "1920,1080";
|
|
@@ -102922,6 +102947,7 @@ class PlaywrightMcpSession {
|
|
|
102922
102947
|
display;
|
|
102923
102948
|
mcpConfigPath = null;
|
|
102924
102949
|
cachedCamouOptions = null;
|
|
102950
|
+
currentLaunchId = null;
|
|
102925
102951
|
constructor(options = {}) {
|
|
102926
102952
|
const { headless, userAgent, viewportSize, extraHttpHeaders, display } = options;
|
|
102927
102953
|
this.display = display ?? process.env.DISPLAY ?? undefined;
|
|
@@ -102951,33 +102977,41 @@ class PlaywrightMcpSession {
|
|
|
102951
102977
|
} catch {}
|
|
102952
102978
|
})();
|
|
102953
102979
|
}
|
|
102954
|
-
forceKillProcess(proc = this.mcpProcess) {
|
|
102955
|
-
if (
|
|
102956
|
-
|
|
102957
|
-
|
|
102958
|
-
|
|
102959
|
-
|
|
102960
|
-
|
|
102961
|
-
|
|
102962
|
-
|
|
102963
|
-
|
|
102964
|
-
|
|
102965
|
-
|
|
102966
|
-
|
|
102967
|
-
|
|
102980
|
+
forceKillProcess(proc = this.mcpProcess, launchId = this.currentLaunchId) {
|
|
102981
|
+
if (proc && proc.exitCode === null) {
|
|
102982
|
+
const rootPid = proc.pid ?? null;
|
|
102983
|
+
const descendants = rootPid != null ? collectDescendantPids(rootPid) : [];
|
|
102984
|
+
const descendantStarts = new Map;
|
|
102985
|
+
for (const pid of descendants) {
|
|
102986
|
+
descendantStarts.set(pid, readProcStartTime(pid));
|
|
102987
|
+
}
|
|
102988
|
+
try {
|
|
102989
|
+
if (rootPid != null) {
|
|
102990
|
+
try {
|
|
102991
|
+
process.kill(-rootPid, "SIGKILL");
|
|
102992
|
+
} catch {
|
|
102993
|
+
proc.kill("SIGKILL");
|
|
102994
|
+
}
|
|
102995
|
+
} else {
|
|
102968
102996
|
proc.kill("SIGKILL");
|
|
102969
102997
|
}
|
|
102970
|
-
}
|
|
102971
|
-
|
|
102972
|
-
|
|
102973
|
-
} catch {}
|
|
102974
|
-
for (const pid of descendants) {
|
|
102975
|
-
const expected = descendantStarts.get(pid);
|
|
102976
|
-
if (expected != null) {
|
|
102998
|
+
} catch {}
|
|
102999
|
+
for (const pid of descendants) {
|
|
103000
|
+
const expected = descendantStarts.get(pid);
|
|
102977
103001
|
const now = readProcStartTime(pid);
|
|
102978
|
-
if (now == null || now !== expected)
|
|
103002
|
+
if (expected == null || now == null || now !== expected)
|
|
102979
103003
|
continue;
|
|
103004
|
+
try {
|
|
103005
|
+
process.kill(pid, "SIGKILL");
|
|
103006
|
+
} catch {}
|
|
102980
103007
|
}
|
|
103008
|
+
}
|
|
103009
|
+
this.reapLaunchedProcesses(launchId);
|
|
103010
|
+
}
|
|
103011
|
+
reapLaunchedProcesses(launchId) {
|
|
103012
|
+
if (!launchId)
|
|
103013
|
+
return;
|
|
103014
|
+
for (const pid of collectPidsByEnvMarker(BROWSER_LAUNCH_ENV, launchId)) {
|
|
102981
103015
|
try {
|
|
102982
103016
|
process.kill(pid, "SIGKILL");
|
|
102983
103017
|
} catch {}
|
|
@@ -103025,13 +103059,16 @@ class PlaywrightMcpSession {
|
|
|
103025
103059
|
mode: 384
|
|
103026
103060
|
});
|
|
103027
103061
|
args.push("--config", this.mcpConfigPath);
|
|
103062
|
+
const launchId = randomUUID();
|
|
103063
|
+
this.currentLaunchId = launchId;
|
|
103028
103064
|
const transport = new StdioClientTransport({
|
|
103029
103065
|
command: "node",
|
|
103030
103066
|
args,
|
|
103031
103067
|
stderr: "pipe",
|
|
103032
103068
|
env: {
|
|
103033
103069
|
...Object.fromEntries(Object.entries(camou.env).map(([k, v]) => [k, String(v)])),
|
|
103034
|
-
...this.display ? { DISPLAY: this.display } : {}
|
|
103070
|
+
...this.display ? { DISPLAY: this.display } : {},
|
|
103071
|
+
[BROWSER_LAUNCH_ENV]: launchId
|
|
103035
103072
|
}
|
|
103036
103073
|
});
|
|
103037
103074
|
const client = new Client({
|
|
@@ -103048,6 +103085,7 @@ class PlaywrightMcpSession {
|
|
|
103048
103085
|
this.mcpTransport = transport;
|
|
103049
103086
|
client.onclose = () => {
|
|
103050
103087
|
if (this.mcpClient === client) {
|
|
103088
|
+
this.forceKillProcess(this.mcpProcess, launchId);
|
|
103051
103089
|
this.resetState();
|
|
103052
103090
|
}
|
|
103053
103091
|
};
|
|
@@ -106639,7 +106677,7 @@ IMPORTANT: Pass protectedEndpoints in authHints when you've discovered 401/403 e
|
|
|
106639
106677
|
if (credentials) {
|
|
106640
106678
|
ctx.session.credentialManager.addFromAuthCredentials(credentials);
|
|
106641
106679
|
}
|
|
106642
|
-
const { runAuthenticationAgent } = await import("./authentication-
|
|
106680
|
+
const { runAuthenticationAgent } = await import("./authentication-ar6t1hah.js");
|
|
106643
106681
|
const localBus = new AgentEventBus;
|
|
106644
106682
|
AgentEventBus.attachChild(localBus, ctx.eventBus, subagentId);
|
|
106645
106683
|
const result = await runAuthenticationAgent({
|
|
@@ -107430,7 +107468,7 @@ async function generateThreatModelForEndpoint(ctx, input) {
|
|
|
107430
107468
|
return threatModelLimiter(async () => {
|
|
107431
107469
|
if (ctx.abortSignal?.aborted)
|
|
107432
107470
|
return null;
|
|
107433
|
-
const { CodeAgent } = await import("./agent-
|
|
107471
|
+
const { CodeAgent } = await import("./agent-fsm08k4s.js");
|
|
107434
107472
|
const subagentId = newSessionId();
|
|
107435
107473
|
const subagentName = `Threat Model: ${input.routePath}`;
|
|
107436
107474
|
ctx.eventBus?.emit("subagent-spawn", {
|
|
@@ -109353,7 +109391,7 @@ init_lazyLogger();
|
|
|
109353
109391
|
var log6 = scopedLogger(() => createLogger("FindingJudge"));
|
|
109354
109392
|
async function judgeFinding(input, ctx) {
|
|
109355
109393
|
try {
|
|
109356
|
-
const { FindingJudgeAgent } = await import("./agent-
|
|
109394
|
+
const { FindingJudgeAgent } = await import("./agent-9ck6hcgm.js");
|
|
109357
109395
|
const agent = new FindingJudgeAgent({
|
|
109358
109396
|
finding: input,
|
|
109359
109397
|
model: ctx.model,
|
|
@@ -115979,7 +116017,7 @@ should be passed directly to spawn_pentest_swarm for deep testing.`,
|
|
|
115979
116017
|
});
|
|
115980
116018
|
if (cwd) {
|
|
115981
116019
|
try {
|
|
115982
|
-
const { WhiteboxAttackSurfaceAgent } = await import("./index-
|
|
116020
|
+
const { WhiteboxAttackSurfaceAgent } = await import("./index-8nhy408y.js");
|
|
115983
116021
|
const localBus = new AgentEventBus;
|
|
115984
116022
|
AgentEventBus.attachChild(localBus, ctx.eventBus, subagentId);
|
|
115985
116023
|
const agent = new WhiteboxAttackSurfaceAgent({
|
|
@@ -116034,7 +116072,7 @@ should be passed directly to spawn_pentest_swarm for deep testing.`,
|
|
|
116034
116072
|
}
|
|
116035
116073
|
}
|
|
116036
116074
|
try {
|
|
116037
|
-
const { BlackboxAttackSurfaceAgent } = await import("./blackboxAgent-
|
|
116075
|
+
const { BlackboxAttackSurfaceAgent } = await import("./blackboxAgent-z4ps082z.js");
|
|
116038
116076
|
const localBus = new AgentEventBus;
|
|
116039
116077
|
AgentEventBus.attachChild(localBus, ctx.eventBus, subagentId);
|
|
116040
116078
|
const agent = new BlackboxAttackSurfaceAgent({
|
|
@@ -116112,7 +116150,7 @@ Omit \`cwd\` for blackbox mode (live target probing only).`,
|
|
|
116112
116150
|
toolCallDescription: exports_external.string().describe("A concise, human-readable description of what this tool call is doing")
|
|
116113
116151
|
}),
|
|
116114
116152
|
execute: async ({ target, cwd }) => {
|
|
116115
|
-
const { runPentestWorkflow: workflow } = await import("./pentest-
|
|
116153
|
+
const { runPentestWorkflow: workflow } = await import("./pentest-t3d2bpde.js");
|
|
116116
116154
|
if (!ctx.model) {
|
|
116117
116155
|
return {
|
|
116118
116156
|
success: false,
|
|
@@ -117690,7 +117728,7 @@ Returns an array of results with the text output from each agent.`,
|
|
|
117690
117728
|
});
|
|
117691
117729
|
}
|
|
117692
117730
|
async function runSingleCodingAgent(ctx, codebasePath, objective, agentIndex, name) {
|
|
117693
|
-
const { CodeAgent } = await import("./agent-
|
|
117731
|
+
const { CodeAgent } = await import("./agent-fsm08k4s.js");
|
|
117694
117732
|
const childSessionId = newSessionId();
|
|
117695
117733
|
const subagentId = childSessionId;
|
|
117696
117734
|
ctx.eventBus?.emit("subagent-spawn", {
|
|
@@ -118207,7 +118245,7 @@ Returns the worker's summary, objective results, and finding count — but NOT t
|
|
|
118207
118245
|
message: "spawn_pentest_agent requires a model in the tool context."
|
|
118208
118246
|
};
|
|
118209
118247
|
}
|
|
118210
|
-
const { TargetedPentestAgent } = await import("./agent-
|
|
118248
|
+
const { TargetedPentestAgent } = await import("./agent-xeze611p.js");
|
|
118211
118249
|
const findingsRegistry = ctx.findingsRegistry ?? FindingsRegistry.fromDirectory(ctx.session.findingsPath, {
|
|
118212
118250
|
model: ctx.model,
|
|
118213
118251
|
authConfig: ctx.authConfig,
|
|
@@ -118341,7 +118379,7 @@ Pass every target you want tested — the swarm handles concurrency automaticall
|
|
|
118341
118379
|
toolCallDescription: exports_external.string().describe("A concise, human-readable description of what this tool call is doing")
|
|
118342
118380
|
}),
|
|
118343
118381
|
execute: async ({ targets }) => {
|
|
118344
|
-
const { runPentestSwarm, DEFAULT_CONCURRENCY: DEFAULT_CONCURRENCY2 } = await import("./pentest-
|
|
118382
|
+
const { runPentestSwarm, DEFAULT_CONCURRENCY: DEFAULT_CONCURRENCY2 } = await import("./pentest-t3d2bpde.js");
|
|
118345
118383
|
if (!ctx.model) {
|
|
118346
118384
|
return {
|
|
118347
118385
|
success: false,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EvidenceFileEntrySchema
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-84zf1xh9.js";
|
|
4
4
|
import {
|
|
5
5
|
CweEntrySchema,
|
|
6
6
|
ValidatedCweEntrySchema,
|
|
7
7
|
hasCanonicalName
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-56zyg4kv.js";
|
|
9
9
|
import {
|
|
10
10
|
exports_external,
|
|
11
11
|
init_zod
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OffensiveSecurityAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-56zyg4kv.js";
|
|
4
4
|
import {
|
|
5
5
|
detectOSAndEnhancePrompt
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-6d37md4z.js";
|
|
7
7
|
import {
|
|
8
8
|
hasToolCall,
|
|
9
9
|
init_dist,
|
|
10
10
|
stepCountIs
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-j2xnatde.js";
|
|
12
12
|
|
|
13
13
|
// src/core/agents/specialized/attackSurface/blackboxAgent.ts
|
|
14
14
|
init_dist();
|