@pensar/apex 2.6.1-canary.4c944004 → 2.6.1
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-6w7egcf1.js +13 -0
- package/build/agent-9zx75feh.js +13 -0
- package/build/{agent-b2z45j1b.js → agent-ayreaj6z.js} +5 -5
- package/build/{agent-runs-mztyf3qm.js → agent-runs-g37vkrjr.js} +16 -16
- package/build/{agent-kddx1vez.js → agent-yby11zaq.js} +6 -6
- package/build/{apps-h48ah1wf.js → apps-xn6km9yn.js} +13 -13
- package/build/{auth-v65mvfbf.js → auth-d105wc64.js} +13 -13
- package/build/{blackboxAgent-pzyz81z9.js → blackboxAgent-s56sgx9b.js} +6 -6
- package/build/{blackboxPentest-3pzzgzm5.js → blackboxPentest-ps78v3w7.js} +11 -11
- package/build/{cli-s82mq645.js → cli-1ve18npr.js} +1 -1
- package/build/{cli-d8x165mf.js → cli-3sp6nd8d.js} +2 -2
- package/build/{cli-gh5c6sf9.js → cli-65g6rcat.js} +3 -1
- package/build/{cli-wxkae592.js → cli-709rvekb.js} +29 -4
- package/build/{cli-jsvm7qaa.js → cli-7eea4e2y.js} +39 -7
- package/build/{cli-s4k4fxqm.js → cli-ae8jqxqr.js} +2 -2
- package/build/{cli-kw5wxxth.js → cli-az3xq70v.js} +1 -1
- package/build/{cli-5t6n4a8w.js → cli-c05y640n.js} +1 -1
- package/build/{cli-wqhbwkbc.js → cli-d37a42dc.js} +8 -8
- package/build/{cli-a9j339n2.js → cli-dpsw2fe6.js} +41 -5
- package/build/{cli-905nmz0b.js → cli-fy6vh2a7.js} +1 -1
- package/build/{cli-rvqwpdjg.js → cli-gx71jcke.js} +1 -1
- package/build/{cli-xaxr74bm.js → cli-k2nwxta0.js} +2 -2
- package/build/{cli-t368gv8p.js → cli-kb21qhvm.js} +2 -2
- package/build/{cli-da57pbjb.js → cli-n2en7j5b.js} +1 -1
- package/build/{cli-x0rrhg57.js → cli-ngq9dr8n.js} +3 -3
- package/build/{cli-v0d1n2j3.js → cli-qgz1q9g5.js} +12 -12
- package/build/{cli-021yxmh5.js → cli-xtc2t6me.js} +3 -3
- package/build/cli.js +42 -36
- package/build/{config-8e9k1hfk.js → config-zpqkd5cz.js} +1 -1
- package/build/{fastStrike-xs5ny137.js → fastStrike-mcjdvwez.js} +5 -5
- package/build/{fixes-a97nmysn.js → fixes-kytx5dmj.js} +13 -13
- package/build/{index-aztmdcaa.js → index-4vqdgb42.js} +19 -19
- package/build/{index-e1cct2cz.js → index-dr3tg1w3.js} +1 -1
- package/build/{index-8enyzj1n.js → index-fv64eb32.js} +2 -2
- package/build/{index-1k2prgt6.js → index-je6hcsqr.js} +1 -1
- package/build/{index-0gyjerk4.js → index-n65z6v7b.js} +6 -6
- package/build/{index-cwnp58dc.js → index-ns4m4s01.js} +4 -4
- package/build/{index-00n0zrdn.js → index-qv4cc65p.js} +28 -14
- package/build/{index-2w1n934x.js → index-r9yjkfrv.js} +4 -4
- package/build/{index-pde3w88a.js → index-wqetp6gq.js} +5 -5
- package/build/{issues-4q8k9rc5.js → issues-eb3q9d3a.js} +13 -13
- package/build/knowledge-fqsvtx0f.js +139 -0
- package/build/lib/{chunk-dmznt6r6.js → chunk-1azdancq.js} +1 -1
- package/build/lib/{chunk-kqgnc8g9.js → chunk-1fy8azee.js} +1 -1
- package/build/lib/{chunk-jmxdxsm8.js → chunk-1jvwqnem.js} +3 -3
- package/build/lib/{chunk-2p92hj2m.js → chunk-1yct6cra.js} +1 -1
- package/build/lib/{chunk-yy87a24g.js → chunk-2qsq76xq.js} +3 -3
- package/build/lib/{chunk-vrnhexdm.js → chunk-3c00n0cy.js} +3 -3
- package/build/lib/{chunk-gmw7vx6r.js → chunk-4hwzqthr.js} +1 -1
- package/build/lib/{chunk-c1zsb6zz.js → chunk-7pwa92rn.js} +1 -1
- package/build/lib/{chunk-vzc51c4z.js → chunk-9tt2021m.js} +9 -9
- package/build/lib/{chunk-nb0pppn2.js → chunk-9yksqgzr.js} +52 -13
- package/build/lib/{chunk-fxx0c7he.js → chunk-acgbyf5h.js} +1 -1
- package/build/lib/{chunk-7zkv27tc.js → chunk-ba41jh41.js} +46 -10
- package/build/lib/{chunk-wtht1nmq.js → chunk-bb0ekhkw.js} +8 -8
- package/build/lib/{chunk-4vsr549z.js → chunk-e8yy2k73.js} +1 -1
- package/build/lib/{chunk-ahtg1ytr.js → chunk-mg03jdmt.js} +1 -1
- package/build/lib/{chunk-mtbmjfys.js → chunk-nhfax4gb.js} +1 -1
- package/build/lib/{chunk-ss77exdk.js → chunk-r2dkp4tb.js} +1 -1
- package/build/lib/{chunk-f09y54py.js → chunk-r4j8ybn9.js} +3 -3
- package/build/lib/{chunk-11w6wa26.js → chunk-v3dk9j7k.js} +11 -11
- package/build/lib/{chunk-qt87ty01.js → chunk-w66ce82a.js} +29 -3
- package/build/lib/{chunk-ed0hqes9.js → chunk-xhdpgpkm.js} +2 -2
- package/build/lib/{chunk-3haymsms.js → chunk-yrnrbjes.js} +1 -1
- package/build/lib/{chunk-1090qz7m.js → chunk-z137x08b.js} +5 -5
- package/build/lib/{chunk-s0egavst.js → chunk-z96pbjhd.js} +1 -1
- package/build/lib/core/agents/offSecAgent/index.js +7 -7
- 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/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/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.js +9 -9
- package/build/lib/core/agents/specialized/whiteboxAttackSurface/index.js +9 -9
- package/build/lib/core/ai/ai.js +2 -2
- package/build/lib/core/ai/index.js +2 -2
- package/build/lib/core/ai/utils.js +2 -2
- package/build/lib/core/api/index.d.ts +2 -0
- package/build/lib/core/api/index.js +34 -20
- package/build/lib/core/api/issues.d.ts +1 -0
- package/build/lib/core/api/knowledge.d.ts +33 -0
- package/build/lib/core/api/targetedPentest.js +10 -10
- package/build/lib/core/config/customProviders.d.ts +16 -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.js +2 -2
- package/build/lib/core/session/persistence.js +3 -3
- 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-xs1kkpdv.js → logs-x62b7hk1.js} +13 -13
- package/build/{native-rollout-evidence-vraxk4w0.js → native-rollout-evidence-c9yhfqcs.js} +3 -3
- package/build/{offesecAgent-2jg3hfrb.js → offesecAgent-5whnpeta.js} +4 -4
- package/build/pentest-e61hc38s.js +22 -0
- package/build/{pentests-e0pdke9w.js → pentests-e0f32aqx.js} +21 -14
- package/build/recordedRunClient-dp032c32.js +11 -0
- package/build/{targetedPentest-jjt094tn.js → targetedPentest-rcbs4nvp.js} +6 -6
- package/build/{targets-2m91qa1w.js → targets-xj9g3q0z.js} +13 -13
- package/build/threatModel-jkxfa40s.js +21 -0
- package/build/{uninstall-bqswmvka.js → uninstall-7s784q4a.js} +1 -1
- package/build/{upload-cdxp2dhp.js → upload-4gvhwmvr.js} +4 -4
- package/build/{utils-rh9r0ka4.js → utils-cjrz64pc.js} +3 -3
- package/package.json +3 -1
- package/src/cli/knowledge.test.ts +140 -0
- package/src/cli/knowledge.ts +146 -0
- package/src/cli/pentests.test.ts +15 -0
- package/src/cli/pentests.ts +15 -1
- package/src/cli.ts +4 -0
- package/src/core/ai/providers/custom.test.ts +240 -0
- package/src/core/ai/providers/custom.ts +40 -0
- package/src/core/api/index.ts +15 -0
- package/src/core/api/issues.ts +1 -0
- package/src/core/api/knowledge.ts +70 -0
- package/src/core/config/customProviders.test.ts +26 -0
- package/src/core/config/customProviders.ts +30 -1
- package/build/agent-2ss75279.js +0 -13
- package/build/agent-s8v26rcw.js +0 -13
- package/build/pentest-mj0ejcdx.js +0 -22
- package/build/recordedRunClient-35dp6wng.js +0 -11
- package/build/threatModel-j3sdyrqd.js +0 -21
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
config2,
|
|
8
8
|
init_config
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-fy6vh2a7.js";
|
|
10
10
|
import {
|
|
11
11
|
getPensarGatewayUrl,
|
|
12
12
|
init_constants,
|
|
13
13
|
ensureValidToken2,
|
|
14
14
|
signGatewayRequest2,
|
|
15
15
|
init_auth
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-c05y640n.js";
|
|
17
17
|
import {
|
|
18
18
|
init_v4,
|
|
19
19
|
ZodFirstPartyTypeKind,
|
|
@@ -106,7 +106,7 @@ import {
|
|
|
106
106
|
HOONIFY_BASE_URL,
|
|
107
107
|
resolveHoonifyModel,
|
|
108
108
|
init_hoonify
|
|
109
|
-
} from "./cli-
|
|
109
|
+
} from "./cli-709rvekb.js";
|
|
110
110
|
import {
|
|
111
111
|
init_zod
|
|
112
112
|
} from "./cli-3qznjsnr.js";
|
|
@@ -138,7 +138,7 @@ import {
|
|
|
138
138
|
import {
|
|
139
139
|
getCurrentVersion,
|
|
140
140
|
init_installation
|
|
141
|
-
} from "./cli-
|
|
141
|
+
} from "./cli-65g6rcat.js";
|
|
142
142
|
import {
|
|
143
143
|
require_src6
|
|
144
144
|
} from "./cli-bb02pjt0.js";
|
|
@@ -48463,6 +48463,40 @@ var init_concentrate2 = __esm(() => {
|
|
|
48463
48463
|
// src/core/ai/providers/custom.ts
|
|
48464
48464
|
function createCustomModel(id, providers) {
|
|
48465
48465
|
const { providerId, provider, model } = resolveCustomModel(id, providers);
|
|
48466
|
+
if (provider.apiType === "responses") {
|
|
48467
|
+
if (!provider.apiKeyEnv)
|
|
48468
|
+
throw new Error("Responses custom providers require apiKeyEnv.");
|
|
48469
|
+
if (provider.requestBody)
|
|
48470
|
+
throw new Error("requestBody is only supported for Chat Completions.");
|
|
48471
|
+
const responsesModel = createOpenAI({
|
|
48472
|
+
name: `custom-${providerId}`,
|
|
48473
|
+
baseURL: provider.baseUrl,
|
|
48474
|
+
apiKey: resolveCustomApiKey(provider),
|
|
48475
|
+
headers: provider.headers
|
|
48476
|
+
}).responses(model.id);
|
|
48477
|
+
return wrapLanguageModel({
|
|
48478
|
+
model: responsesModel,
|
|
48479
|
+
middleware: {
|
|
48480
|
+
specificationVersion: "v3",
|
|
48481
|
+
transformParams: async ({ params }) => ({
|
|
48482
|
+
...params,
|
|
48483
|
+
maxOutputTokens: Math.min(params.maxOutputTokens ?? model.maxOutputTokens, model.maxOutputTokens),
|
|
48484
|
+
...model.reasoningEffort && {
|
|
48485
|
+
providerOptions: {
|
|
48486
|
+
...params.providerOptions,
|
|
48487
|
+
openai: {
|
|
48488
|
+
...params.providerOptions?.openai,
|
|
48489
|
+
forceReasoning: true,
|
|
48490
|
+
reasoningEffort: model.reasoningEffort
|
|
48491
|
+
}
|
|
48492
|
+
}
|
|
48493
|
+
}
|
|
48494
|
+
})
|
|
48495
|
+
}
|
|
48496
|
+
});
|
|
48497
|
+
}
|
|
48498
|
+
if (model.reasoningEffort)
|
|
48499
|
+
throw new Error("reasoningEffort requires the Responses API.");
|
|
48466
48500
|
return createOpenAICompatible({
|
|
48467
48501
|
name: `custom-${providerId}`,
|
|
48468
48502
|
baseURL: provider.baseUrl,
|
|
@@ -48476,7 +48510,9 @@ function createCustomModel(id, providers) {
|
|
|
48476
48510
|
}).chatModel(model.id);
|
|
48477
48511
|
}
|
|
48478
48512
|
var init_custom = __esm(() => {
|
|
48513
|
+
init_dist10();
|
|
48479
48514
|
init_dist11();
|
|
48515
|
+
init_dist();
|
|
48480
48516
|
init_customProviders();
|
|
48481
48517
|
});
|
|
48482
48518
|
|
|
@@ -51014,7 +51050,7 @@ async function create(input) {
|
|
|
51014
51050
|
} else if (input.inheritEnvironmentConfig === false) {
|
|
51015
51051
|
snapshotHeaders = {};
|
|
51016
51052
|
} else {
|
|
51017
|
-
const { config: appConfig } = await import("./index-
|
|
51053
|
+
const { config: appConfig } = await import("./index-dr3tg1w3.js");
|
|
51018
51054
|
const cfg = await appConfig.get();
|
|
51019
51055
|
snapshotHeaders = cfg.defaultHeaders ? { ...cfg.defaultHeaders } : { ...DEFAULT_HEADER_RECORD };
|
|
51020
51056
|
}
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
AgentRuntime,
|
|
6
6
|
defineAgent
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-1ve18npr.js";
|
|
8
8
|
import {
|
|
9
9
|
stepCountIs2,
|
|
10
10
|
hasToolCall,
|
|
11
11
|
init_dist
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-dpsw2fe6.js";
|
|
13
13
|
|
|
14
14
|
// src/core/agents/specialized/attackSurface/blackboxAgent.ts
|
|
15
15
|
init_dist();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentRuntime,
|
|
3
3
|
defineAgent
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-1ve18npr.js";
|
|
5
5
|
import {
|
|
6
6
|
stepCountIs2,
|
|
7
7
|
init_dist
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-dpsw2fe6.js";
|
|
9
9
|
|
|
10
10
|
// src/core/agents/specialized/codeAgent/agent.ts
|
|
11
11
|
init_dist();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EndpointTransportEnum,
|
|
3
3
|
GrpcEndpointMetadataSchema
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-qgz1q9g5.js";
|
|
5
5
|
import {
|
|
6
6
|
AgentRuntime,
|
|
7
7
|
defineAgent
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-1ve18npr.js";
|
|
9
9
|
import {
|
|
10
10
|
stepCountIs2,
|
|
11
11
|
init_dist
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-dpsw2fe6.js";
|
|
13
13
|
import {
|
|
14
14
|
tool
|
|
15
15
|
} from "./cli-pwm29ks7.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
config2,
|
|
3
3
|
init_config
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-fy6vh2a7.js";
|
|
5
5
|
import {
|
|
6
6
|
getPensarApiUrl2,
|
|
7
7
|
init_constants,
|
|
8
8
|
ensureValidToken2,
|
|
9
9
|
signGatewayRequest2,
|
|
10
10
|
init_auth
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-c05y640n.js";
|
|
12
12
|
import {
|
|
13
13
|
parseTargetUrl
|
|
14
14
|
} from "./cli-0wsh8j2t.js";
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
normalizeStepUsage,
|
|
43
43
|
streamResponse,
|
|
44
44
|
generateObjectResponse
|
|
45
|
-
} from "./cli-
|
|
45
|
+
} from "./cli-dpsw2fe6.js";
|
|
46
46
|
import {
|
|
47
47
|
init_v4,
|
|
48
48
|
tool
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
import {
|
|
83
83
|
getCurrentVersion,
|
|
84
84
|
init_installation
|
|
85
|
-
} from "./cli-
|
|
85
|
+
} from "./cli-65g6rcat.js";
|
|
86
86
|
import {
|
|
87
87
|
require_src6
|
|
88
88
|
} from "./cli-bb02pjt0.js";
|
|
@@ -112618,7 +112618,7 @@ function resolveItemHooks(hooks, seams, item, index) {
|
|
|
112618
112618
|
|
|
112619
112619
|
// src/core/agents/offSecAgent/subagentSpawner.ts
|
|
112620
112620
|
async function runSpawnedPentestWorker(spec, input) {
|
|
112621
|
-
const { TargetedPentestAgent } = await import("./agent-
|
|
112621
|
+
const { TargetedPentestAgent } = await import("./agent-yby11zaq.js");
|
|
112622
112622
|
const hooks = resolveItemHooks(input.hooks, input.seams, spec, 0);
|
|
112623
112623
|
const agent = new TargetedPentestAgent({
|
|
112624
112624
|
target: spec.target,
|
|
@@ -112695,7 +112695,7 @@ var runPentestChild = async (spec, ctx) => {
|
|
|
112695
112695
|
};
|
|
112696
112696
|
};
|
|
112697
112697
|
var runCodeChild = async (spec, ctx) => {
|
|
112698
|
-
const { CodeAgent } = await import("./agent-
|
|
112698
|
+
const { CodeAgent } = await import("./agent-9zx75feh.js");
|
|
112699
112699
|
const agent = new CodeAgent({
|
|
112700
112700
|
codebasePath: spec.codebasePath,
|
|
112701
112701
|
objective: spec.objective,
|
|
@@ -112727,7 +112727,7 @@ var runCodeChild = async (spec, ctx) => {
|
|
|
112727
112727
|
return { run: () => agent.consume(), drained: () => agent.drained };
|
|
112728
112728
|
};
|
|
112729
112729
|
var runWhiteboxChild = async (spec, ctx) => {
|
|
112730
|
-
const { WhiteboxAttackSurfaceAgent } = await import("./index-
|
|
112730
|
+
const { WhiteboxAttackSurfaceAgent } = await import("./index-n65z6v7b.js");
|
|
112731
112731
|
const agent = new WhiteboxAttackSurfaceAgent({
|
|
112732
112732
|
codebasePath: spec.codebasePath,
|
|
112733
112733
|
attackSurfaceRegistry: spec.attackSurfaceRegistry,
|
|
@@ -112747,7 +112747,7 @@ var runWhiteboxChild = async (spec, ctx) => {
|
|
|
112747
112747
|
return { run: () => agent.consume(), drained: () => agent.drained };
|
|
112748
112748
|
};
|
|
112749
112749
|
var runBlackboxChild = async (spec, ctx) => {
|
|
112750
|
-
const { BlackboxAttackSurfaceAgent } = await import("./blackboxAgent-
|
|
112750
|
+
const { BlackboxAttackSurfaceAgent } = await import("./blackboxAgent-s56sgx9b.js");
|
|
112751
112751
|
const agent = new BlackboxAttackSurfaceAgent({
|
|
112752
112752
|
target: spec.target,
|
|
112753
112753
|
attackSurfaceRegistry: spec.attackSurfaceRegistry,
|
|
@@ -112766,7 +112766,7 @@ var runBlackboxChild = async (spec, ctx) => {
|
|
|
112766
112766
|
return { run: () => agent.consume(), drained: () => agent.drained };
|
|
112767
112767
|
};
|
|
112768
112768
|
var runAuthChild = async (spec, ctx) => {
|
|
112769
|
-
const { runAuthenticationAgent } = await import("./agent-
|
|
112769
|
+
const { runAuthenticationAgent } = await import("./agent-6w7egcf1.js");
|
|
112770
112770
|
return {
|
|
112771
112771
|
run: () => runAuthenticationAgent({
|
|
112772
112772
|
target: spec.target,
|
|
@@ -112788,7 +112788,7 @@ var runAuthChild = async (spec, ctx) => {
|
|
|
112788
112788
|
};
|
|
112789
112789
|
};
|
|
112790
112790
|
var runJudgeChild = async (spec, ctx) => {
|
|
112791
|
-
const { judgeFinding } = await import("./index-
|
|
112791
|
+
const { judgeFinding } = await import("./index-ns4m4s01.js");
|
|
112792
112792
|
return {
|
|
112793
112793
|
run: () => judgeFinding(spec.judgeInput, {
|
|
112794
112794
|
model: ctx.model,
|
|
@@ -125868,7 +125868,7 @@ Omit \`cwd\` for blackbox mode (live target probing only).`,
|
|
|
125868
125868
|
toolCallDescription: string().describe("A concise, human-readable description of what this tool call is doing")
|
|
125869
125869
|
}),
|
|
125870
125870
|
execute: async ({ target, cwd }) => {
|
|
125871
|
-
const { runPentestWorkflow: workflow } = await import("./pentest-
|
|
125871
|
+
const { runPentestWorkflow: workflow } = await import("./pentest-e61hc38s.js");
|
|
125872
125872
|
if (!ctx.model) {
|
|
125873
125873
|
return {
|
|
125874
125874
|
success: false,
|
|
@@ -126453,7 +126453,7 @@ Pass every target you want tested — the swarm handles concurrency automaticall
|
|
|
126453
126453
|
toolCallDescription: string().describe("A concise, human-readable description of what this tool call is doing")
|
|
126454
126454
|
}),
|
|
126455
126455
|
execute: async ({ targets }) => {
|
|
126456
|
-
const { runPentestSwarm, DEFAULT_CONCURRENCY } = await import("./pentest-
|
|
126456
|
+
const { runPentestSwarm, DEFAULT_CONCURRENCY } = await import("./pentest-e61hc38s.js");
|
|
126457
126457
|
if (!ctx.model) {
|
|
126458
126458
|
return {
|
|
126459
126459
|
success: false,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
REPORT_ERROR_TOOL_NAME,
|
|
8
8
|
createReportErrorTool,
|
|
9
9
|
PentestReportedError
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-qgz1q9g5.js";
|
|
11
11
|
import {
|
|
12
12
|
GOOGLE_SIGNIN_PROMPT_GUIDANCE,
|
|
13
13
|
browserEngineForGoogleSignIn
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
AgentRuntime,
|
|
20
20
|
defineAgent
|
|
21
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-1ve18npr.js";
|
|
22
22
|
import {
|
|
23
23
|
hasToolCall,
|
|
24
24
|
init_dist,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
init_lazyLogger,
|
|
27
27
|
createLogger,
|
|
28
28
|
init_structured
|
|
29
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-dpsw2fe6.js";
|
|
30
30
|
import {
|
|
31
31
|
init_zod
|
|
32
32
|
} from "./cli-3qznjsnr.js";
|
package/build/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
import"./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
import"./cli-fy6vh2a7.js";
|
|
4
|
+
import"./cli-c05y640n.js";
|
|
5
5
|
import {
|
|
6
6
|
require_src,
|
|
7
7
|
require_src2,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
logger,
|
|
28
28
|
init_structured,
|
|
29
29
|
init_ai2
|
|
30
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-dpsw2fe6.js";
|
|
31
31
|
import {
|
|
32
32
|
init_inference_attempt,
|
|
33
33
|
init_native_rollout_evidence
|
|
@@ -40,13 +40,13 @@ import {
|
|
|
40
40
|
init_customProviders,
|
|
41
41
|
resolveHoonifyModel,
|
|
42
42
|
init_hoonify
|
|
43
|
-
} from "./cli-
|
|
43
|
+
} from "./cli-709rvekb.js";
|
|
44
44
|
import {
|
|
45
45
|
init_package,
|
|
46
46
|
version,
|
|
47
47
|
package_default,
|
|
48
48
|
init_installation
|
|
49
|
-
} from "./cli-
|
|
49
|
+
} from "./cli-65g6rcat.js";
|
|
50
50
|
import {
|
|
51
51
|
require_src6
|
|
52
52
|
} from "./cli-bb02pjt0.js";
|
|
@@ -391,6 +391,8 @@ var package_default2 = {
|
|
|
391
391
|
"@ai-sdk/openai": "3.0.46",
|
|
392
392
|
"@ai-sdk/openai-compatible": "^2.0.51",
|
|
393
393
|
"@ai-sdk/provider": "^3.0.10",
|
|
394
|
+
"@aws-sdk/client-s3": "3.1146.0",
|
|
395
|
+
"@aws-sdk/lib-storage": "3.1146.0",
|
|
394
396
|
"@daytona/sdk": "0.222.0",
|
|
395
397
|
"@googleapis/gmail": "^16.1.2",
|
|
396
398
|
"@microsoft/microsoft-graph-client": "^3.0.7",
|
|
@@ -723,7 +725,7 @@ var package_default2 = {
|
|
|
723
725
|
tsc: "tsc --noEmit"
|
|
724
726
|
},
|
|
725
727
|
type: "module",
|
|
726
|
-
version: "2.6.1
|
|
728
|
+
version: "2.6.1"
|
|
727
729
|
};
|
|
728
730
|
|
|
729
731
|
// src/core/ai/index.ts
|
|
@@ -1582,7 +1584,7 @@ async function createInstrumentedBus(session, model) {
|
|
|
1582
1584
|
reportHerdrState("working");
|
|
1583
1585
|
const bus = new AgentEventBus;
|
|
1584
1586
|
attachCliAgentStreamListeners(bus);
|
|
1585
|
-
const { attachWandbToEventBus } = await import("./upload-
|
|
1587
|
+
const { attachWandbToEventBus } = await import("./upload-4gvhwmvr.js");
|
|
1586
1588
|
const wandbCleanup = await attachWandbToEventBus(session, bus).catch((e) => {
|
|
1587
1589
|
console.warn("[wandb] Tracing disabled:", e.message);
|
|
1588
1590
|
return null;
|
|
@@ -1602,7 +1604,7 @@ async function resolveCliHeaders() {
|
|
|
1602
1604
|
const { parseHeaderLine, parseHeadersFromFile, formatParseError } = await import("./parse-cqecqrc5.js");
|
|
1603
1605
|
const merged = {};
|
|
1604
1606
|
if (!noGlobal) {
|
|
1605
|
-
const { config: appConfig } = await import("./index-
|
|
1607
|
+
const { config: appConfig } = await import("./index-je6hcsqr.js");
|
|
1606
1608
|
const cfg = await appConfig.get();
|
|
1607
1609
|
if (cfg.defaultHeaders) {
|
|
1608
1610
|
Object.assign(merged, cfg.defaultHeaders);
|
|
@@ -1633,8 +1635,8 @@ ${formatParseError(parsed.error)}`);
|
|
|
1633
1635
|
return merged;
|
|
1634
1636
|
}
|
|
1635
1637
|
async function resolveCliModel() {
|
|
1636
|
-
const { config: appConfig } = await import("./index-
|
|
1637
|
-
const { getDefaultModelForConfig } = await import("./utils-
|
|
1638
|
+
const { config: appConfig } = await import("./index-je6hcsqr.js");
|
|
1639
|
+
const { getDefaultModelForConfig } = await import("./utils-cjrz64pc.js");
|
|
1638
1640
|
const pensarConfig = await appConfig.get();
|
|
1639
1641
|
const explicit = resolveExplicitCliModel({
|
|
1640
1642
|
model: getArg("--model"),
|
|
@@ -1687,6 +1689,7 @@ Usage:
|
|
|
1687
1689
|
pensar targets List pentest targets and view their agent logs
|
|
1688
1690
|
pensar issues List and manage security issues
|
|
1689
1691
|
pensar fixes View security fixes
|
|
1692
|
+
pensar knowledge Read and edit the workspace knowledge base
|
|
1690
1693
|
pensar logs View agent execution logs
|
|
1691
1694
|
pensar config headers Manage global default HTTP headers
|
|
1692
1695
|
pensar export-trajectory Convert saved rollout evidence to ATIF
|
|
@@ -1766,9 +1769,9 @@ Custom inference:
|
|
|
1766
1769
|
`);
|
|
1767
1770
|
}
|
|
1768
1771
|
async function runPentest() {
|
|
1769
|
-
const { runPentestAgent } = await import("./blackboxPentest-
|
|
1770
|
-
const { sessions } = await import("./index-
|
|
1771
|
-
const { config: appConfig } = await import("./index-
|
|
1772
|
+
const { runPentestAgent } = await import("./blackboxPentest-ps78v3w7.js");
|
|
1773
|
+
const { sessions } = await import("./index-wqetp6gq.js");
|
|
1774
|
+
const { config: appConfig } = await import("./index-je6hcsqr.js");
|
|
1772
1775
|
const target = getArgRequired("--target");
|
|
1773
1776
|
const cwd = getArg("--cwd");
|
|
1774
1777
|
const mode = getArg("--mode");
|
|
@@ -1817,7 +1820,7 @@ Headers: ${Object.keys(headers).length} configured` : ""}
|
|
|
1817
1820
|
}
|
|
1818
1821
|
});
|
|
1819
1822
|
console.log(`PENSAR_SESSION_PATH:${session.rootPath}`);
|
|
1820
|
-
const { runWithCliNativeRolloutEvidence } = await import("./native-rollout-evidence-
|
|
1823
|
+
const { runWithCliNativeRolloutEvidence } = await import("./native-rollout-evidence-c9yhfqcs.js");
|
|
1821
1824
|
const evidence = await runWithCliNativeRolloutEvidence({
|
|
1822
1825
|
session,
|
|
1823
1826
|
outputDirectory: evidenceOutput,
|
|
@@ -1853,9 +1856,9 @@ Report: ${reportPath}` : ""}`);
|
|
|
1853
1856
|
}
|
|
1854
1857
|
}
|
|
1855
1858
|
async function runTargetedPentest() {
|
|
1856
|
-
const { runTargetedPentestAgent } = await import("./targetedPentest-
|
|
1857
|
-
const { sessions } = await import("./index-
|
|
1858
|
-
const { config: appConfig } = await import("./index-
|
|
1859
|
+
const { runTargetedPentestAgent } = await import("./targetedPentest-rcbs4nvp.js");
|
|
1860
|
+
const { sessions } = await import("./index-wqetp6gq.js");
|
|
1861
|
+
const { config: appConfig } = await import("./index-je6hcsqr.js");
|
|
1859
1862
|
const target = getArgRequired("--target");
|
|
1860
1863
|
const objectives = getAllArgs("--objective");
|
|
1861
1864
|
const evidenceOutput = nativeRolloutEvidenceOutput();
|
|
@@ -1888,7 +1891,7 @@ ${objectivesList}
|
|
|
1888
1891
|
} : {}
|
|
1889
1892
|
});
|
|
1890
1893
|
console.log(`PENSAR_SESSION_PATH:${session.rootPath}`);
|
|
1891
|
-
const { runWithCliNativeRolloutEvidence } = await import("./native-rollout-evidence-
|
|
1894
|
+
const { runWithCliNativeRolloutEvidence } = await import("./native-rollout-evidence-c9yhfqcs.js");
|
|
1892
1895
|
const evidence = await runWithCliNativeRolloutEvidence({
|
|
1893
1896
|
session,
|
|
1894
1897
|
outputDirectory: evidenceOutput,
|
|
@@ -1920,8 +1923,8 @@ POCs: ${pocsPath}`);
|
|
|
1920
1923
|
}
|
|
1921
1924
|
}
|
|
1922
1925
|
async function runThreatModel() {
|
|
1923
|
-
const { runThreatModelWorkflow } = await import("./threatModel-
|
|
1924
|
-
const { config: appConfig } = await import("./index-
|
|
1926
|
+
const { runThreatModelWorkflow } = await import("./threatModel-jkxfa40s.js");
|
|
1927
|
+
const { config: appConfig } = await import("./index-je6hcsqr.js");
|
|
1925
1928
|
const path = await import("path");
|
|
1926
1929
|
const pensarConfig = await appConfig.get();
|
|
1927
1930
|
const model = await resolveCliModel();
|
|
@@ -1956,10 +1959,10 @@ ${sep}
|
|
|
1956
1959
|
Threat model written to: ${resolvedPath}`);
|
|
1957
1960
|
}
|
|
1958
1961
|
async function runOperator() {
|
|
1959
|
-
const { runOffensiveSecurityAgent } = await import("./offesecAgent-
|
|
1960
|
-
const { sessions, normalizeMessages, getResumeMessages } = await import("./index-
|
|
1961
|
-
const { ALL_TOOL_NAMES, SKILL_TOOL_NAMES } = await import("./index-
|
|
1962
|
-
const { config: appConfig } = await import("./index-
|
|
1962
|
+
const { runOffensiveSecurityAgent } = await import("./offesecAgent-5whnpeta.js");
|
|
1963
|
+
const { sessions, normalizeMessages, getResumeMessages } = await import("./index-wqetp6gq.js");
|
|
1964
|
+
const { ALL_TOOL_NAMES, SKILL_TOOL_NAMES } = await import("./index-r9yjkfrv.js");
|
|
1965
|
+
const { config: appConfig } = await import("./index-je6hcsqr.js");
|
|
1963
1966
|
const { createInterface } = await import("readline");
|
|
1964
1967
|
const { readFileSync, existsSync } = await import("fs");
|
|
1965
1968
|
const path = await import("path");
|
|
@@ -2000,7 +2003,7 @@ ${sep}
|
|
|
2000
2003
|
...evidenceOutput ? { nativeRolloutEvidence: { outputDirectory: evidenceOutput } } : {}
|
|
2001
2004
|
}
|
|
2002
2005
|
});
|
|
2003
|
-
const { runWithCliNativeRolloutEvidence } = await import("./native-rollout-evidence-
|
|
2006
|
+
const { runWithCliNativeRolloutEvidence } = await import("./native-rollout-evidence-c9yhfqcs.js");
|
|
2004
2007
|
const evidence = await runWithCliNativeRolloutEvidence({
|
|
2005
2008
|
session,
|
|
2006
2009
|
outputDirectory: evidenceOutput,
|
|
@@ -2102,7 +2105,7 @@ try {
|
|
|
2102
2105
|
await standaloneRuntime?.shutdown();
|
|
2103
2106
|
process.exitCode = 1;
|
|
2104
2107
|
} else {
|
|
2105
|
-
const { startTui } = await import("./index-
|
|
2108
|
+
const { startTui } = await import("./index-4vqdgb42.js");
|
|
2106
2109
|
await startTui(options);
|
|
2107
2110
|
}
|
|
2108
2111
|
} else if (hasFlag("-p") || command === "--prompt") {
|
|
@@ -2122,34 +2125,37 @@ try {
|
|
|
2122
2125
|
await runTargetedPentest();
|
|
2123
2126
|
} else if (command === "login" || command === "auth") {
|
|
2124
2127
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2125
|
-
await import("./auth-
|
|
2128
|
+
await import("./auth-d105wc64.js");
|
|
2126
2129
|
} else if (command === "uninstall") {
|
|
2127
2130
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2128
|
-
await import("./uninstall-
|
|
2131
|
+
await import("./uninstall-7s784q4a.js");
|
|
2129
2132
|
} else if (command === "apps") {
|
|
2130
2133
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2131
|
-
await import("./apps-
|
|
2134
|
+
await import("./apps-xn6km9yn.js");
|
|
2132
2135
|
} else if (command === "pentests") {
|
|
2133
2136
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2134
|
-
await import("./pentests-
|
|
2137
|
+
await import("./pentests-e0f32aqx.js");
|
|
2135
2138
|
} else if (command === "agent-runs") {
|
|
2136
|
-
const { runAgentRunsCommand } = await import("./agent-runs-
|
|
2139
|
+
const { runAgentRunsCommand } = await import("./agent-runs-g37vkrjr.js");
|
|
2137
2140
|
await runAgentRunsCommand(args.slice(1));
|
|
2138
2141
|
} else if (command === "targets") {
|
|
2139
2142
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2140
|
-
await import("./targets-
|
|
2143
|
+
await import("./targets-xj9g3q0z.js");
|
|
2141
2144
|
} else if (command === "issues") {
|
|
2142
2145
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2143
|
-
await import("./issues-
|
|
2146
|
+
await import("./issues-eb3q9d3a.js");
|
|
2147
|
+
} else if (command === "knowledge") {
|
|
2148
|
+
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2149
|
+
await import("./knowledge-fqsvtx0f.js");
|
|
2144
2150
|
} else if (command === "fixes") {
|
|
2145
2151
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2146
|
-
await import("./fixes-
|
|
2152
|
+
await import("./fixes-kytx5dmj.js");
|
|
2147
2153
|
} else if (command === "logs") {
|
|
2148
2154
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2149
|
-
await import("./logs-
|
|
2155
|
+
await import("./logs-x62b7hk1.js");
|
|
2150
2156
|
} else if (command === "config") {
|
|
2151
2157
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2152
|
-
await import("./config-
|
|
2158
|
+
await import("./config-zpqkd5cz.js");
|
|
2153
2159
|
} else if (command === "threat-model") {
|
|
2154
2160
|
await runThreatModel();
|
|
2155
2161
|
} else if (command === "doctor") {
|
|
@@ -5,21 +5,21 @@ import {
|
|
|
5
5
|
assertDepth,
|
|
6
6
|
inProcessSeams,
|
|
7
7
|
OffensiveSecurityAgent
|
|
8
|
-
} from "./cli-
|
|
9
|
-
import"./cli-
|
|
10
|
-
import"./cli-
|
|
8
|
+
} from "./cli-qgz1q9g5.js";
|
|
9
|
+
import"./cli-fy6vh2a7.js";
|
|
10
|
+
import"./cli-c05y640n.js";
|
|
11
11
|
import {
|
|
12
12
|
buildPentestReport,
|
|
13
13
|
renderJson,
|
|
14
14
|
renderMarkdown,
|
|
15
15
|
REPORT_FILENAME_MD,
|
|
16
16
|
REPORT_FILENAME_JSON
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-n2en7j5b.js";
|
|
18
18
|
import"./cli-qba2x69h.js";
|
|
19
19
|
import {
|
|
20
20
|
createThreatModelPrompt
|
|
21
21
|
} from "./cli-q126f6ef.js";
|
|
22
|
-
import"./cli-
|
|
22
|
+
import"./cli-dpsw2fe6.js";
|
|
23
23
|
import"./cli-c2k4xxaw.js";
|
|
24
24
|
import {
|
|
25
25
|
init_zod
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import"./cli-
|
|
3
|
-
import"./cli-
|
|
2
|
+
import"./cli-fy6vh2a7.js";
|
|
3
|
+
import"./cli-c05y640n.js";
|
|
4
4
|
import {
|
|
5
5
|
listFixes2,
|
|
6
6
|
getFix2
|
|
7
|
-
} from "./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-
|
|
7
|
+
} from "./cli-7eea4e2y.js";
|
|
8
|
+
import"./cli-qgz1q9g5.js";
|
|
9
|
+
import"./cli-k2nwxta0.js";
|
|
10
|
+
import"./cli-kb21qhvm.js";
|
|
11
|
+
import"./cli-ngq9dr8n.js";
|
|
12
|
+
import"./cli-d37a42dc.js";
|
|
13
|
+
import"./cli-3sp6nd8d.js";
|
|
14
|
+
import"./cli-xtc2t6me.js";
|
|
15
|
+
import"./cli-n2en7j5b.js";
|
|
16
16
|
import"./cli-xcy2vxj2.js";
|
|
17
17
|
import {
|
|
18
18
|
markCommandFailed
|
|
19
19
|
} from "./cli-z82n3qk1.js";
|
|
20
|
-
import"./cli-
|
|
20
|
+
import"./cli-1ve18npr.js";
|
|
21
21
|
import"./cli-qba2x69h.js";
|
|
22
|
-
import"./cli-
|
|
22
|
+
import"./cli-dpsw2fe6.js";
|
|
23
23
|
import"./cli-c2k4xxaw.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/fixes.ts
|