@pensar/apex 2.3.0-canary.15ec17ea → 2.3.0-canary.3f6d2a2b
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-00rjnxth.js → agent-2h0w8eta.js} +7 -7
- package/build/agent-95qsypnq.js +19 -0
- package/build/{agent-q3yvg7qp.js → agent-rktf0v3c.js} +9 -9
- package/build/{apps-f3snzs8b.js → apps-rehs72t3.js} +17 -17
- package/build/{auth-5pqmq5x9.js → auth-h5bjv1dp.js} +35 -17
- package/build/authentication-zqkagnvm.js +19 -0
- package/build/blackboxAgent-b799jbpa.js +19 -0
- package/build/{blackboxPentest-bwj95jra.js → blackboxPentest-gszetqnq.js} +14 -14
- package/build/{cli-vfsxxnmr.js → cli-06fq5zym.js} +1 -1
- package/build/{cli-3b5rh4nn.js → cli-0qybv29g.js} +1 -1
- package/build/{cli-x7tqybza.js → cli-2m8y1rkp.js} +5 -139
- package/build/{cli-ef2c0sm6.js → cli-2q3kvbwv.js} +16 -5
- package/build/{cli-ztvkmav5.js → cli-3e0jb8k6.js} +1 -1
- package/build/{cli-vbz5qm07.js → cli-3r7xgtqj.js} +1 -1
- package/build/{cli-v8q0djvy.js → cli-41h8gh1v.js} +34 -9
- package/build/{cli-fkkkkf49.js → cli-5asc7364.js} +3 -3
- package/build/{cli-ztk7j1rd.js → cli-7d3h16fw.js} +2 -2
- package/build/{cli-nsc30rcx.js → cli-abm5bgap.js} +8 -8
- package/build/{cli-xw6xh0c2.js → cli-dth5et2y.js} +1 -1
- package/build/{cli-sf878p6j.js → cli-khyery65.js} +1 -1
- package/build/{cli-3q27f7wb.js → cli-mb680jb3.js} +372 -31
- package/build/{cli-q7123drf.js → cli-pvf8tyr2.js} +1 -1
- package/build/{cli-x5gd8b11.js → cli-qs2mveb2.js} +2 -2
- package/build/{cli-wp59e6eq.js → cli-s8z1mkv5.js} +2 -2
- package/build/{cli-b27w98bz.js → cli-xkv494x1.js} +2 -2
- package/build/cli.js +33 -33
- package/build/{config-4bxc6cvx.js → config-hawgse8e.js} +3 -3
- package/build/{doctor-njjx9pc4.js → doctor-t305mq12.js} +6 -6
- package/build/{fastStrike-zcyrev2c.js → fastStrike-mk0gxtkm.js} +9 -9
- package/build/{fixes-4gsx59zz.js → fixes-gxn4cmte.js} +16 -16
- package/build/{index-vgp133kt.js → index-98bpwjq9.js} +16 -8
- package/build/{index-1swzf5ha.js → index-a2qb45hc.js} +9 -9
- package/build/{index-05cb7ddj.js → index-cpbhz85w.js} +4 -4
- package/build/{index-nwx21gnf.js → index-fa4xk0fq.js} +6 -6
- package/build/{index-kamp2pwf.js → index-qqp08dtj.js} +2 -2
- package/build/{index-tesn1wem.js → index-ra8jmwb2.js} +67 -27
- package/build/{index-0kd686e2.js → index-yggyem63.js} +3 -3
- package/build/{issues-fdqzva1g.js → issues-mtbp80dr.js} +16 -16
- package/build/{logs-hy3kvx1m.js → logs-0wpqqb3z.js} +16 -16
- package/build/{offesecAgent-x1ap18zc.js → offesecAgent-d5ceedmg.js} +8 -8
- package/build/pentest-2znknvqd.js +29 -0
- package/build/{pentests-38363a42.js → pentests-gnwwdmac.js} +16 -16
- package/build/{targetedPentest-td5hts5a.js → targetedPentest-ap7p8j6q.js} +9 -9
- package/build/{targets-ys9ezcjn.js → targets-be3c736k.js} +16 -16
- package/build/threatModel-bypv7mjx.js +27 -0
- package/build/{uninstall-pszt5mdd.js → uninstall-71xttcr0.js} +1 -1
- package/build/{upload-61bcszx8.js → upload-c7e0bdcn.js} +6 -6
- package/build/{utils-fhqds1ws.js → utils-ef23ac3j.js} +5 -5
- package/package.json +1 -1
- package/build/agent-65jzj95h.js +0 -19
- package/build/authentication-cx4fr1jm.js +0 -19
- package/build/blackboxAgent-t4kd841t.js +0 -19
- package/build/pentest-v886reb6.js +0 -29
- package/build/threatModel-8ygdfkqx.js +0 -27
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OffensiveSecurityAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-mb680jb3.js";
|
|
4
4
|
import {
|
|
5
5
|
detectOSAndEnhancePrompt
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-06fq5zym.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-2q3kvbwv.js";
|
|
12
|
+
import"./cli-dth5et2y.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-0qybv29g.js";
|
|
19
|
+
import"./cli-khyery65.js";
|
|
20
|
+
import"./cli-3e0jb8k6.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-7d3h16fw.js";
|
|
4
|
+
import"./cli-9fsre5pt.js";
|
|
5
|
+
import"./cli-3r7xgtqj.js";
|
|
6
|
+
import"./cli-mb680jb3.js";
|
|
7
|
+
import"./cli-06fq5zym.js";
|
|
8
|
+
import"./cli-c8131c4q.js";
|
|
9
|
+
import"./cli-2q3kvbwv.js";
|
|
10
|
+
import"./cli-dth5et2y.js";
|
|
11
|
+
import"./cli-3k1x5rn3.js";
|
|
12
|
+
import"./cli-gpnb45ck.js";
|
|
13
|
+
import"./cli-0qybv29g.js";
|
|
14
|
+
import"./cli-khyery65.js";
|
|
15
|
+
import"./cli-3e0jb8k6.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-s8z1mkv5.js";
|
|
8
8
|
import"./cli-9fsre5pt.js";
|
|
9
|
-
import"./cli-
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
9
|
+
import"./cli-3r7xgtqj.js";
|
|
10
|
+
import"./cli-mb680jb3.js";
|
|
11
|
+
import"./cli-06fq5zym.js";
|
|
12
12
|
import"./cli-c8131c4q.js";
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
13
|
+
import"./cli-2q3kvbwv.js";
|
|
14
|
+
import"./cli-dth5et2y.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-0qybv29g.js";
|
|
18
|
+
import"./cli-khyery65.js";
|
|
19
|
+
import"./cli-3e0jb8k6.js";
|
|
20
20
|
import"./cli-8rxa073f.js";
|
|
21
21
|
export {
|
|
22
22
|
buildPentestSystemPrompt,
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
+
import"./cli-2m8y1rkp.js";
|
|
3
|
+
import"./cli-abm5bgap.js";
|
|
4
|
+
import"./cli-5asc7364.js";
|
|
5
|
+
import"./cli-xkv494x1.js";
|
|
6
|
+
import"./cli-s8z1mkv5.js";
|
|
7
|
+
import"./cli-41h8gh1v.js";
|
|
8
|
+
import"./cli-7d3h16fw.js";
|
|
9
|
+
import"./cli-qs2mveb2.js";
|
|
10
|
+
import"./cli-9fsre5pt.js";
|
|
11
|
+
import"./cli-3r7xgtqj.js";
|
|
2
12
|
import {
|
|
3
13
|
createApp,
|
|
4
14
|
createEndpoint,
|
|
@@ -12,27 +22,17 @@ import {
|
|
|
12
22
|
searchEndpoints,
|
|
13
23
|
updateApp,
|
|
14
24
|
updateEndpoint
|
|
15
|
-
} from "./cli-
|
|
16
|
-
import"./cli-
|
|
17
|
-
import"./cli-fkkkkf49.js";
|
|
18
|
-
import"./cli-b27w98bz.js";
|
|
19
|
-
import"./cli-wp59e6eq.js";
|
|
20
|
-
import"./cli-v8q0djvy.js";
|
|
21
|
-
import"./cli-ztk7j1rd.js";
|
|
22
|
-
import"./cli-x5gd8b11.js";
|
|
23
|
-
import"./cli-9fsre5pt.js";
|
|
24
|
-
import"./cli-vbz5qm07.js";
|
|
25
|
-
import"./cli-3q27f7wb.js";
|
|
26
|
-
import"./cli-vfsxxnmr.js";
|
|
25
|
+
} from "./cli-mb680jb3.js";
|
|
26
|
+
import"./cli-06fq5zym.js";
|
|
27
27
|
import"./cli-fw5r7pfj.js";
|
|
28
28
|
import"./cli-c8131c4q.js";
|
|
29
|
-
import"./cli-
|
|
30
|
-
import"./cli-
|
|
29
|
+
import"./cli-2q3kvbwv.js";
|
|
30
|
+
import"./cli-dth5et2y.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-0qybv29g.js";
|
|
34
|
+
import"./cli-khyery65.js";
|
|
35
|
+
import"./cli-3e0jb8k6.js";
|
|
36
36
|
import"./cli-8rxa073f.js";
|
|
37
37
|
|
|
38
38
|
// src/cli/apps.ts
|
|
@@ -1,22 +1,23 @@
|
|
|
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-2m8y1rkp.js";
|
|
3
|
+
import"./cli-abm5bgap.js";
|
|
4
|
+
import"./cli-5asc7364.js";
|
|
5
|
+
import"./cli-xkv494x1.js";
|
|
6
|
+
import"./cli-s8z1mkv5.js";
|
|
7
|
+
import"./cli-41h8gh1v.js";
|
|
8
|
+
import"./cli-7d3h16fw.js";
|
|
9
|
+
import"./cli-qs2mveb2.js";
|
|
10
10
|
import"./cli-9fsre5pt.js";
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
11
|
+
import"./cli-3r7xgtqj.js";
|
|
12
|
+
import"./cli-mb680jb3.js";
|
|
13
|
+
import"./cli-06fq5zym.js";
|
|
14
14
|
import"./cli-fw5r7pfj.js";
|
|
15
15
|
import"./cli-c8131c4q.js";
|
|
16
|
-
import"./cli-
|
|
16
|
+
import"./cli-2q3kvbwv.js";
|
|
17
17
|
import {
|
|
18
18
|
createWorkspaceSelection,
|
|
19
19
|
disconnect,
|
|
20
|
+
ensureValidToken,
|
|
20
21
|
fetchWorkspaces,
|
|
21
22
|
getPensarApiUrl,
|
|
22
23
|
getPensarConsoleUrl,
|
|
@@ -28,15 +29,15 @@ import {
|
|
|
28
29
|
pollWorkspaceSelection,
|
|
29
30
|
selectWorkspace,
|
|
30
31
|
startDeviceFlow
|
|
31
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-dth5et2y.js";
|
|
32
33
|
import"./cli-3k1x5rn3.js";
|
|
33
34
|
import"./cli-gpnb45ck.js";
|
|
34
35
|
import {
|
|
35
36
|
config,
|
|
36
37
|
init_config
|
|
37
|
-
} from "./cli-
|
|
38
|
-
import"./cli-
|
|
39
|
-
import"./cli-
|
|
38
|
+
} from "./cli-0qybv29g.js";
|
|
39
|
+
import"./cli-khyery65.js";
|
|
40
|
+
import"./cli-3e0jb8k6.js";
|
|
40
41
|
import {
|
|
41
42
|
__require
|
|
42
43
|
} from "./cli-8rxa073f.js";
|
|
@@ -85,7 +86,13 @@ Waiting for workspace selection...`);
|
|
|
85
86
|
}
|
|
86
87
|
async function login() {
|
|
87
88
|
const appConfig = await config.get();
|
|
88
|
-
|
|
89
|
+
const hasStoredCredentials = isConnected(appConfig);
|
|
90
|
+
const validToken = hasStoredCredentials ? await ensureValidToken({
|
|
91
|
+
accessToken: appConfig.accessToken,
|
|
92
|
+
refreshToken: appConfig.refreshToken,
|
|
93
|
+
pensarAPIKey: appConfig.pensarAPIKey
|
|
94
|
+
}) : null;
|
|
95
|
+
if (validToken) {
|
|
89
96
|
console.log("Already connected to Pensar Console.");
|
|
90
97
|
if (appConfig.workspaceSlug) {
|
|
91
98
|
console.log(` Workspace: ${appConfig.workspaceSlug}`);
|
|
@@ -95,6 +102,8 @@ Reconnect? (y/N): `);
|
|
|
95
102
|
if (answer.toLowerCase() !== "y") {
|
|
96
103
|
return;
|
|
97
104
|
}
|
|
105
|
+
} else if (hasStoredCredentials) {
|
|
106
|
+
console.log("Your saved Pensar Console session has expired. Reconnecting.");
|
|
98
107
|
}
|
|
99
108
|
console.log(`
|
|
100
109
|
Pensar Console — Managed Inference
|
|
@@ -228,6 +237,15 @@ async function status() {
|
|
|
228
237
|
console.log("Not connected to Pensar Console.\n\nRun `pensar login` to connect.");
|
|
229
238
|
return;
|
|
230
239
|
}
|
|
240
|
+
const validToken = await ensureValidToken({
|
|
241
|
+
accessToken: appConfig.accessToken,
|
|
242
|
+
refreshToken: appConfig.refreshToken,
|
|
243
|
+
pensarAPIKey: appConfig.pensarAPIKey
|
|
244
|
+
});
|
|
245
|
+
if (!validToken) {
|
|
246
|
+
console.log("Your Pensar Console session has expired.\n\nRun `pensar login` to reconnect.");
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
231
249
|
if (!appConfig.accessToken && appConfig.pensarAPIKey && !appConfig.workspaceSlug) {
|
|
232
250
|
try {
|
|
233
251
|
const apiUrl = getPensarApiUrl();
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runAuthenticationAgent
|
|
3
|
+
} from "./cli-41h8gh1v.js";
|
|
4
|
+
import"./cli-9fsre5pt.js";
|
|
5
|
+
import"./cli-3r7xgtqj.js";
|
|
6
|
+
import"./cli-mb680jb3.js";
|
|
7
|
+
import"./cli-06fq5zym.js";
|
|
8
|
+
import"./cli-c8131c4q.js";
|
|
9
|
+
import"./cli-2q3kvbwv.js";
|
|
10
|
+
import"./cli-dth5et2y.js";
|
|
11
|
+
import"./cli-3k1x5rn3.js";
|
|
12
|
+
import"./cli-gpnb45ck.js";
|
|
13
|
+
import"./cli-0qybv29g.js";
|
|
14
|
+
import"./cli-khyery65.js";
|
|
15
|
+
import"./cli-3e0jb8k6.js";
|
|
16
|
+
import"./cli-8rxa073f.js";
|
|
17
|
+
export {
|
|
18
|
+
runAuthenticationAgent
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BlackboxAttackSurfaceAgent
|
|
3
|
+
} from "./cli-5asc7364.js";
|
|
4
|
+
import"./cli-9fsre5pt.js";
|
|
5
|
+
import"./cli-3r7xgtqj.js";
|
|
6
|
+
import"./cli-mb680jb3.js";
|
|
7
|
+
import"./cli-06fq5zym.js";
|
|
8
|
+
import"./cli-c8131c4q.js";
|
|
9
|
+
import"./cli-2q3kvbwv.js";
|
|
10
|
+
import"./cli-dth5et2y.js";
|
|
11
|
+
import"./cli-3k1x5rn3.js";
|
|
12
|
+
import"./cli-gpnb45ck.js";
|
|
13
|
+
import"./cli-0qybv29g.js";
|
|
14
|
+
import"./cli-khyery65.js";
|
|
15
|
+
import"./cli-3e0jb8k6.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-abm5bgap.js";
|
|
4
|
+
import"./cli-5asc7364.js";
|
|
5
|
+
import"./cli-xkv494x1.js";
|
|
6
|
+
import"./cli-s8z1mkv5.js";
|
|
7
|
+
import"./cli-7d3h16fw.js";
|
|
8
|
+
import"./cli-qs2mveb2.js";
|
|
9
9
|
import"./cli-9fsre5pt.js";
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
10
|
+
import"./cli-3r7xgtqj.js";
|
|
11
|
+
import"./cli-mb680jb3.js";
|
|
12
|
+
import"./cli-06fq5zym.js";
|
|
13
13
|
import"./cli-fw5r7pfj.js";
|
|
14
14
|
import"./cli-c8131c4q.js";
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
15
|
+
import"./cli-2q3kvbwv.js";
|
|
16
|
+
import"./cli-dth5et2y.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-0qybv29g.js";
|
|
20
|
+
import"./cli-khyery65.js";
|
|
21
|
+
import"./cli-3e0jb8k6.js";
|
|
22
22
|
import"./cli-8rxa073f.js";
|
|
23
23
|
|
|
24
24
|
// src/core/api/blackboxPentest.ts
|
|
@@ -3,28 +3,22 @@ import {
|
|
|
3
3
|
ASK_USER_QUESTIONS_TOOL_NAME,
|
|
4
4
|
OffensiveSecurityAgent,
|
|
5
5
|
SKILL_TOOL_NAMES,
|
|
6
|
+
apiRequest,
|
|
6
7
|
buildBaseSystemPrompt
|
|
7
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-mb680jb3.js";
|
|
8
9
|
import {
|
|
9
10
|
init_dist,
|
|
10
11
|
init_session,
|
|
11
12
|
sessions,
|
|
12
13
|
stepCountIs
|
|
13
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-2q3kvbwv.js";
|
|
14
15
|
import {
|
|
15
|
-
ensureValidToken,
|
|
16
|
-
getPensarApiUrl,
|
|
17
|
-
init_auth,
|
|
18
16
|
init_constants
|
|
19
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-dth5et2y.js";
|
|
20
18
|
import {
|
|
21
19
|
exports_external,
|
|
22
20
|
init_zod
|
|
23
21
|
} from "./cli-3k1x5rn3.js";
|
|
24
|
-
import {
|
|
25
|
-
config,
|
|
26
|
-
init_config
|
|
27
|
-
} from "./cli-3b5rh4nn.js";
|
|
28
22
|
import {
|
|
29
23
|
__commonJS,
|
|
30
24
|
__require
|
|
@@ -6971,134 +6965,6 @@ var require_public_api = __commonJS((exports) => {
|
|
|
6971
6965
|
exports.stringify = stringify;
|
|
6972
6966
|
});
|
|
6973
6967
|
|
|
6974
|
-
// src/core/api/apiClient.ts
|
|
6975
|
-
init_auth();
|
|
6976
|
-
init_config();
|
|
6977
|
-
init_constants();
|
|
6978
|
-
async function getAuthHeaders() {
|
|
6979
|
-
const cfg = await config.get();
|
|
6980
|
-
const validToken = await ensureValidToken({
|
|
6981
|
-
accessToken: cfg.accessToken,
|
|
6982
|
-
refreshToken: cfg.refreshToken,
|
|
6983
|
-
pensarAPIKey: cfg.pensarAPIKey
|
|
6984
|
-
});
|
|
6985
|
-
if (!validToken) {
|
|
6986
|
-
throw new Error("Not authenticated. Run `pensar login` to connect to Pensar Console.");
|
|
6987
|
-
}
|
|
6988
|
-
const headers = {
|
|
6989
|
-
"Content-Type": "application/json",
|
|
6990
|
-
Authorization: `Bearer ${validToken.token}`
|
|
6991
|
-
};
|
|
6992
|
-
if (cfg.workspaceId) {
|
|
6993
|
-
headers["X-Workspace-Id"] = cfg.workspaceId;
|
|
6994
|
-
}
|
|
6995
|
-
return headers;
|
|
6996
|
-
}
|
|
6997
|
-
async function apiRequest(method, path, body) {
|
|
6998
|
-
const baseUrl = getPensarApiUrl();
|
|
6999
|
-
const headers = await getAuthHeaders();
|
|
7000
|
-
const url = `${baseUrl}${path}`;
|
|
7001
|
-
const init = { method, headers };
|
|
7002
|
-
if (body !== undefined) {
|
|
7003
|
-
init.body = JSON.stringify(body);
|
|
7004
|
-
}
|
|
7005
|
-
const response = await fetch(url, init);
|
|
7006
|
-
if (!response.ok) {
|
|
7007
|
-
const text2 = await response.text();
|
|
7008
|
-
let message;
|
|
7009
|
-
try {
|
|
7010
|
-
const err = JSON.parse(text2);
|
|
7011
|
-
message = err.error ?? text2;
|
|
7012
|
-
} catch {
|
|
7013
|
-
message = text2;
|
|
7014
|
-
}
|
|
7015
|
-
throw new Error(`API error (${response.status}): ${message}`);
|
|
7016
|
-
}
|
|
7017
|
-
const text = await response.text();
|
|
7018
|
-
if (!text)
|
|
7019
|
-
return;
|
|
7020
|
-
return JSON.parse(text);
|
|
7021
|
-
}
|
|
7022
|
-
|
|
7023
|
-
// src/core/api/apps.ts
|
|
7024
|
-
async function listApps(opts) {
|
|
7025
|
-
const params = new URLSearchParams;
|
|
7026
|
-
if (opts?.limit !== undefined)
|
|
7027
|
-
params.set("limit", String(opts.limit));
|
|
7028
|
-
if (opts?.offset !== undefined)
|
|
7029
|
-
params.set("offset", String(opts.offset));
|
|
7030
|
-
const qs = params.toString();
|
|
7031
|
-
return apiRequest("GET", `/apps${qs ? `?${qs}` : ""}`);
|
|
7032
|
-
}
|
|
7033
|
-
async function getApp(appId) {
|
|
7034
|
-
return apiRequest("GET", `/apps/${appId}`);
|
|
7035
|
-
}
|
|
7036
|
-
async function createApp(data) {
|
|
7037
|
-
return apiRequest("POST", "/apps", data);
|
|
7038
|
-
}
|
|
7039
|
-
async function updateApp(appId, data) {
|
|
7040
|
-
return apiRequest("PATCH", `/apps/${appId}`, data);
|
|
7041
|
-
}
|
|
7042
|
-
async function deleteApp(appId) {
|
|
7043
|
-
return apiRequest("DELETE", `/apps/${appId}`);
|
|
7044
|
-
}
|
|
7045
|
-
async function listEndpoints(appId, filters) {
|
|
7046
|
-
const params = new URLSearchParams;
|
|
7047
|
-
if (filters?.type)
|
|
7048
|
-
params.set("type", filters.type);
|
|
7049
|
-
if (filters?.minRiskScore !== undefined) {
|
|
7050
|
-
params.set("minRiskScore", String(filters.minRiskScore));
|
|
7051
|
-
}
|
|
7052
|
-
if (filters?.limit !== undefined)
|
|
7053
|
-
params.set("limit", String(filters.limit));
|
|
7054
|
-
if (filters?.offset !== undefined) {
|
|
7055
|
-
params.set("offset", String(filters.offset));
|
|
7056
|
-
}
|
|
7057
|
-
const qs = params.toString();
|
|
7058
|
-
const path = `/apps/${appId}/endpoints${qs ? `?${qs}` : ""}`;
|
|
7059
|
-
return apiRequest("GET", path);
|
|
7060
|
-
}
|
|
7061
|
-
async function getEndpoint(endpointId) {
|
|
7062
|
-
return apiRequest("GET", `/endpoints/${endpointId}`);
|
|
7063
|
-
}
|
|
7064
|
-
async function createEndpoint(appId, data) {
|
|
7065
|
-
return apiRequest("POST", `/apps/${appId}/endpoints`, data);
|
|
7066
|
-
}
|
|
7067
|
-
async function updateEndpoint(endpointId, data) {
|
|
7068
|
-
return apiRequest("PATCH", `/endpoints/${endpointId}`, data);
|
|
7069
|
-
}
|
|
7070
|
-
async function deleteEndpoint(endpointId) {
|
|
7071
|
-
return apiRequest("DELETE", `/endpoints/${endpointId}`);
|
|
7072
|
-
}
|
|
7073
|
-
async function searchApps(query, opts) {
|
|
7074
|
-
const params = new URLSearchParams({ q: query });
|
|
7075
|
-
if (opts?.type)
|
|
7076
|
-
params.set("type", opts.type);
|
|
7077
|
-
if (opts?.limit !== undefined)
|
|
7078
|
-
params.set("limit", String(opts.limit));
|
|
7079
|
-
if (opts?.offset !== undefined)
|
|
7080
|
-
params.set("offset", String(opts.offset));
|
|
7081
|
-
return apiRequest("GET", `/search/apps?${params.toString()}`);
|
|
7082
|
-
}
|
|
7083
|
-
async function searchEndpoints(query, opts) {
|
|
7084
|
-
const params = new URLSearchParams({ q: query });
|
|
7085
|
-
if (opts?.applicationId)
|
|
7086
|
-
params.set("applicationId", opts.applicationId);
|
|
7087
|
-
if (opts?.type)
|
|
7088
|
-
params.set("type", opts.type);
|
|
7089
|
-
if (opts?.minRiskScore !== undefined) {
|
|
7090
|
-
params.set("minRiskScore", String(opts.minRiskScore));
|
|
7091
|
-
}
|
|
7092
|
-
if (opts?.authRequired !== undefined) {
|
|
7093
|
-
params.set("authRequired", opts.authRequired ? "true" : "false");
|
|
7094
|
-
}
|
|
7095
|
-
if (opts?.limit !== undefined)
|
|
7096
|
-
params.set("limit", String(opts.limit));
|
|
7097
|
-
if (opts?.offset !== undefined)
|
|
7098
|
-
params.set("offset", String(opts.offset));
|
|
7099
|
-
return apiRequest("GET", `/search/endpoints?${params.toString()}`);
|
|
7100
|
-
}
|
|
7101
|
-
|
|
7102
6968
|
// src/core/api/issues.ts
|
|
7103
6969
|
async function listScans() {
|
|
7104
6970
|
return apiRequest("GET", "/pentests");
|
|
@@ -8339,4 +8205,4 @@ Working directory: ${input.codebasePath}`;
|
|
|
8339
8205
|
});
|
|
8340
8206
|
return { session, outputPath: input.outputPath };
|
|
8341
8207
|
}
|
|
8342
|
-
export {
|
|
8208
|
+
export { listScans, getScan, listPentestTargets, dispatchPentest, listIssues, getIssue, updateIssue, retestIssue, linkPullRequest, listIssuePullRequests, listFixes, getFix, listAgentLogs, searchAgentLogs, listTargetLogs, searchTargetLogs, runOffensiveSecurityAgent, buildPentestPrompt, buildThreatModelPrompt, createSkillsRegistry, runThreatModelWorkflow };
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
init_auth,
|
|
5
5
|
init_constants,
|
|
6
6
|
signGatewayRequest
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-dth5et2y.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-0qybv29g.js";
|
|
91
91
|
import {
|
|
92
92
|
getCurrentVersion,
|
|
93
93
|
init_installation
|
|
94
|
-
} from "./cli-
|
|
94
|
+
} from "./cli-3e0jb8k6.js";
|
|
95
95
|
import {
|
|
96
96
|
__callDispose,
|
|
97
97
|
__commonJS,
|
|
@@ -46606,6 +46606,11 @@ function toReference(stored) {
|
|
|
46606
46606
|
if (stored.tokens?.customHeaders) {
|
|
46607
46607
|
ref.customHeaderKeys = Object.keys(stored.tokens.customHeaders);
|
|
46608
46608
|
}
|
|
46609
|
+
if (stored.additionalFields) {
|
|
46610
|
+
const keys = Object.keys(stored.additionalFields);
|
|
46611
|
+
if (keys.length > 0)
|
|
46612
|
+
ref.additionalFieldKeys = keys;
|
|
46613
|
+
}
|
|
46609
46614
|
const ctx = stored.metadata?.context;
|
|
46610
46615
|
if (typeof ctx === "string" && ctx)
|
|
46611
46616
|
ref.context = ctx;
|
|
@@ -46616,7 +46621,7 @@ class CredentialManager {
|
|
|
46616
46621
|
store = new Map;
|
|
46617
46622
|
findDuplicate(candidate) {
|
|
46618
46623
|
for (const [id, existing] of this.store) {
|
|
46619
|
-
if (existing.username === candidate.username && existing.password === candidate.password && existing.apiKey === candidate.apiKey && existing.loginUrl === candidate.loginUrl && existing.tokens?.bearerToken === candidate.tokens?.bearerToken && existing.tokens?.cookies === candidate.tokens?.cookies && existing.tokens?.sessionToken === candidate.tokens?.sessionToken && JSON.stringify(existing.tokens?.customHeaders) === JSON.stringify(candidate.tokens?.customHeaders)) {
|
|
46624
|
+
if (existing.username === candidate.username && existing.password === candidate.password && existing.apiKey === candidate.apiKey && existing.loginUrl === candidate.loginUrl && existing.tokens?.bearerToken === candidate.tokens?.bearerToken && existing.tokens?.cookies === candidate.tokens?.cookies && existing.tokens?.sessionToken === candidate.tokens?.sessionToken && JSON.stringify(existing.tokens?.customHeaders) === JSON.stringify(candidate.tokens?.customHeaders) && JSON.stringify(existing.additionalFields) === JSON.stringify(candidate.additionalFields)) {
|
|
46620
46625
|
return id;
|
|
46621
46626
|
}
|
|
46622
46627
|
}
|
|
@@ -46714,6 +46719,9 @@ class CredentialManager {
|
|
|
46714
46719
|
if (ref.customHeaderKeys?.length) {
|
|
46715
46720
|
parts.push(` Header keys: ${ref.customHeaderKeys.join(", ")}`);
|
|
46716
46721
|
}
|
|
46722
|
+
if (ref.additionalFieldKeys?.length) {
|
|
46723
|
+
parts.push(` Additional secret fields: ${ref.additionalFieldKeys.join(", ")}`);
|
|
46724
|
+
}
|
|
46717
46725
|
if (ref.context)
|
|
46718
46726
|
parts.push(` Context: ${ref.context}`);
|
|
46719
46727
|
return parts.join(`
|
|
@@ -46722,6 +46730,9 @@ class CredentialManager {
|
|
|
46722
46730
|
return `<available_credentials>
|
|
46723
46731
|
The following credentials are available. To use a credential, pass its ID to the appropriate tool.
|
|
46724
46732
|
Do NOT ask the user for passwords or secrets — they are resolved automatically from the credential ID.
|
|
46733
|
+
"Additional secret fields" are operator-supplied named secrets: pass the name as "credentialField"
|
|
46734
|
+
to browser_fill, or read the matching environment variable in execute_command. Their values are
|
|
46735
|
+
never shown to you and are redacted from command output.
|
|
46725
46736
|
|
|
46726
46737
|
${lines.join(`
|
|
46727
46738
|
|
|
@@ -47265,7 +47276,7 @@ async function create2(input) {
|
|
|
47265
47276
|
if (normalizedConfig?.headers !== undefined) {
|
|
47266
47277
|
snapshotHeaders = { ...normalizedConfig.headers };
|
|
47267
47278
|
} else {
|
|
47268
|
-
const { config: appConfig } = await import("./index-
|
|
47279
|
+
const { config: appConfig } = await import("./index-yggyem63.js");
|
|
47269
47280
|
const cfg = await appConfig.get();
|
|
47270
47281
|
snapshotHeaders = cfg.defaultHeaders ? { ...cfg.defaultHeaders } : { ...DEFAULT_HEADER_RECORD };
|
|
47271
47282
|
}
|