@pensar/apex 2.1.1 → 2.1.2-canary.9c58490e
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-5j0r1zwb.js → agent-0b3vcjb3.js} +7 -7
- package/build/{agent-9atrn180.js → agent-a59xqqss.js} +9 -9
- package/build/agent-zy9b6zvp.js +19 -0
- package/build/{apps-r8v4zx74.js → apps-0pyxf9kc.js} +15 -15
- package/build/{auth-1cyt34s1.js → auth-w90316v8.js} +15 -15
- package/build/authentication-a8vvrgyx.js +19 -0
- package/build/blackboxAgent-brp6qzbv.js +19 -0
- package/build/{blackboxPentest-6xg3nwsy.js → blackboxPentest-1yedpz4g.js} +13 -13
- package/build/{cli-90f2rr31.js → cli-0xqfn03a.js} +4 -4
- package/build/{cli-ha57ygh1.js → cli-ahv48hxq.js} +1 -1
- package/build/{cli-92szr4n9.js → cli-ar2092dy.js} +2 -2
- package/build/{cli-yeh71tk6.js → cli-dzqe6v9b.js} +4 -4
- package/build/{cli-y9p64z6j.js → cli-f1xr4abj.js} +1 -1
- package/build/{cli-bt876w2p.js → cli-fgpkgx10.js} +3 -3
- package/build/{cli-ebt2qz4a.js → cli-fym4wq8m.js} +2 -2
- package/build/{cli-7f5xyyv7.js → cli-gx7trq19.js} +13 -10
- package/build/{cli-rb0r7wyk.js → cli-jdpc7ywh.js} +1 -1
- package/build/{cli-2b2hq0bx.js → cli-jpt3qd0e.js} +1 -1
- package/build/{cli-tpf5degm.js → cli-mav49z3q.js} +19 -8
- package/build/{cli-9ns3f6e4.js → cli-q74td57q.js} +57 -30
- package/build/{cli-pwgdqc8n.js → cli-q8zw1hx8.js} +1 -1
- package/build/{cli-5qn1288m.js → cli-vn0eg8z6.js} +3 -3
- package/build/{cli-7v584njb.js → cli-vrcgsnb7.js} +1 -1
- package/build/{cli-gqzh2kf7.js → cli-x0vptkry.js} +1 -1
- package/build/cli.js +33 -33
- package/build/{config-m9nwkqda.js → config-qwjtrn5w.js} +3 -3
- package/build/{doctor-e7nx089w.js → doctor-we9s6x2e.js} +6 -6
- package/build/{fixes-bwbs6y0h.js → fixes-ctjkqmfw.js} +15 -15
- package/build/{index-n3ykm2w9.js → index-frnp2swd.js} +3 -3
- package/build/{index-b7257b3y.js → index-h515wfpr.js} +6 -6
- package/build/{index-vjf3wr3h.js → index-kjkm6q2q.js} +2 -2
- package/build/{index-9v8095vv.js → index-ktjn7x4q.js} +9 -9
- package/build/{index-pvnf0pyw.js → index-p5dnvcn9.js} +4 -4
- package/build/{index-2ngqkd4f.js → index-pgetwc8s.js} +17 -17
- package/build/{index-9mfg4n8j.js → index-pvkc9zqs.js} +8 -8
- package/build/{issues-3b09y726.js → issues-9mxy948j.js} +15 -15
- package/build/{logs-z861s66g.js → logs-vmc468z4.js} +15 -15
- package/build/{offesecAgent-sv2x2ew0.js → offesecAgent-c07zwqyb.js} +8 -8
- package/build/pentest-7b64rtec.js +28 -0
- package/build/{pentests-1s4sbasz.js → pentests-6yj9e0nn.js} +15 -15
- package/build/{targetedPentest-yjpk7d05.js → targetedPentest-3qk8py8t.js} +9 -9
- package/build/{targets-0zg21ndc.js → targets-qayzv4k8.js} +15 -15
- package/build/threatModel-kxe0qbw2.js +26 -0
- package/build/{uninstall-b9ttpxjc.js → uninstall-afr120hd.js} +1 -1
- package/build/{upload-sdx7xg6j.js → upload-5s9ev9dd.js} +6 -6
- package/build/{utils-g8awkbz8.js → utils-kypsnx1e.js} +5 -5
- package/package.json +1 -1
- package/build/agent-fj5t54re.js +0 -19
- package/build/authentication-jcxmdghv.js +0 -19
- package/build/blackboxAgent-gtaq6gvf.js +0 -19
- package/build/pentest-rf73r63h.js +0 -28
- package/build/threatModel-e70carjd.js +0 -26
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
detectOSAndEnhancePrompt
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-x0vptkry.js";
|
|
4
4
|
import {
|
|
5
5
|
parseTargetUrl
|
|
6
6
|
} from "./cli-c8131c4q.js";
|
|
@@ -26,14 +26,14 @@ import {
|
|
|
26
26
|
scopedLogger,
|
|
27
27
|
streamResponse,
|
|
28
28
|
write
|
|
29
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-0xqfn03a.js";
|
|
30
30
|
import {
|
|
31
31
|
ensureValidToken,
|
|
32
32
|
getPensarApiUrl,
|
|
33
33
|
init_auth,
|
|
34
34
|
init_constants,
|
|
35
35
|
signGatewayRequest
|
|
36
|
-
} from "./cli-
|
|
36
|
+
} from "./cli-jdpc7ywh.js";
|
|
37
37
|
import {
|
|
38
38
|
exports_external,
|
|
39
39
|
init_zod,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
import {
|
|
44
44
|
config,
|
|
45
45
|
init_config
|
|
46
|
-
} from "./cli-
|
|
46
|
+
} from "./cli-ahv48hxq.js";
|
|
47
47
|
import {
|
|
48
48
|
__commonJS,
|
|
49
49
|
__export,
|
|
@@ -113271,11 +113271,13 @@ class PlaywrightMcpSession {
|
|
|
113271
113271
|
userAgent;
|
|
113272
113272
|
viewportSize;
|
|
113273
113273
|
extraHttpHeaders;
|
|
113274
|
+
display;
|
|
113274
113275
|
mcpConfigPath = null;
|
|
113275
113276
|
cachedCamouOptions = null;
|
|
113276
113277
|
constructor(options = {}) {
|
|
113277
|
-
const { headless, userAgent, viewportSize, extraHttpHeaders } = options;
|
|
113278
|
-
this.
|
|
113278
|
+
const { headless, userAgent, viewportSize, extraHttpHeaders, display } = options;
|
|
113279
|
+
this.display = display ?? process.env.DISPLAY ?? undefined;
|
|
113280
|
+
this.headless = headless ?? (this.display ? false : defaultHeadless);
|
|
113279
113281
|
this.userAgent = userAgent === null ? undefined : userAgent ?? defaultUserAgent;
|
|
113280
113282
|
this.viewportSize = viewportSize === null ? undefined : viewportSize ?? defaultViewportSize ?? HARDCODED_VIEWPORT_FALLBACK;
|
|
113281
113283
|
const headerSource = extraHttpHeaders === null ? undefined : extraHttpHeaders;
|
|
@@ -113368,7 +113370,10 @@ class PlaywrightMcpSession {
|
|
|
113368
113370
|
command: "node",
|
|
113369
113371
|
args,
|
|
113370
113372
|
stderr: "pipe",
|
|
113371
|
-
env:
|
|
113373
|
+
env: {
|
|
113374
|
+
...Object.fromEntries(Object.entries(camou.env).map(([k, v]) => [k, String(v)])),
|
|
113375
|
+
...this.display ? { DISPLAY: this.display } : {}
|
|
113376
|
+
}
|
|
113372
113377
|
});
|
|
113373
113378
|
const client = new Client({
|
|
113374
113379
|
name: "apex-browser-agent",
|
|
@@ -115562,7 +115567,7 @@ When to use delegate_to_auth_subagent vs authenticate_session:
|
|
|
115562
115567
|
if (credentials) {
|
|
115563
115568
|
ctx.session.credentialManager.addFromAuthCredentials(credentials);
|
|
115564
115569
|
}
|
|
115565
|
-
const { runAuthenticationAgent } = await import("./authentication-
|
|
115570
|
+
const { runAuthenticationAgent } = await import("./authentication-a8vvrgyx.js");
|
|
115566
115571
|
const localBus = new AgentEventBus;
|
|
115567
115572
|
AgentEventBus.attachChild(localBus, ctx.eventBus, subagentId);
|
|
115568
115573
|
const result = await runAuthenticationAgent({
|
|
@@ -116242,7 +116247,7 @@ async function generateThreatModelForEndpoint(ctx, input) {
|
|
|
116242
116247
|
return threatModelLimiter(async () => {
|
|
116243
116248
|
if (ctx.abortSignal?.aborted)
|
|
116244
116249
|
return null;
|
|
116245
|
-
const { CodeAgent } = await import("./agent-
|
|
116250
|
+
const { CodeAgent } = await import("./agent-zy9b6zvp.js");
|
|
116246
116251
|
const subagentId = `threat-model-${sanitize(input.appName)}-${sanitize(input.routePath)}`;
|
|
116247
116252
|
ctx.eventBus?.emit("subagent-spawn", {
|
|
116248
116253
|
subagentId,
|
|
@@ -118118,7 +118123,7 @@ init_lazyLogger();
|
|
|
118118
118123
|
var log6 = scopedLogger(() => createLogger("FindingJudge"));
|
|
118119
118124
|
async function judgeFinding(input, ctx) {
|
|
118120
118125
|
try {
|
|
118121
|
-
const { FindingJudgeAgent } = await import("./agent-
|
|
118126
|
+
const { FindingJudgeAgent } = await import("./agent-0b3vcjb3.js");
|
|
118122
118127
|
const agent = new FindingJudgeAgent({
|
|
118123
118128
|
finding: input,
|
|
118124
118129
|
model: ctx.model,
|
|
@@ -122295,17 +122300,32 @@ function redactPromptInjectionPayloads(value, library) {
|
|
|
122295
122300
|
var MAX_INLINE = 50000;
|
|
122296
122301
|
var MS_TIMEOUT_THRESHOLD = 1e4;
|
|
122297
122302
|
var DEFAULT_PROMPT_INJECTION_FILE_ENV = "APEX_PROMPT_INJECTION_FILE";
|
|
122303
|
+
var OMITTED_PROMPT_INJECTION_IDS = new Set([
|
|
122304
|
+
"null",
|
|
122305
|
+
"undefined",
|
|
122306
|
+
"none",
|
|
122307
|
+
"__omit__"
|
|
122308
|
+
]);
|
|
122298
122309
|
var promptInjectionPointerSchema = exports_external.object({
|
|
122299
|
-
id: exports_external.string().min(1).describe(
|
|
122310
|
+
id: exports_external.string().min(1).nullable().optional().describe('Stable prompt-injection id returned by list_prompt_injections. Leave unset/null unless you are intentionally running a prompt-injection harness. Do NOT pass placeholder values like "__omit__", "none", or "null" — just omit the field.'),
|
|
122300
122311
|
envVar: exports_external.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).optional().describe(`Environment variable that will contain the payload file path at runtime. Defaults to ${DEFAULT_PROMPT_INJECTION_FILE_ENV}.`)
|
|
122301
122312
|
});
|
|
122302
122313
|
var executeCommandInputSchema = exports_external.object({
|
|
122303
122314
|
toolCallDescription: exports_external.string().describe("A concise, human-readable description of what this tool call is doing (e.g., 'Scanning for open ports on target')"),
|
|
122304
122315
|
command: exports_external.string().describe("The shell command to execute"),
|
|
122305
|
-
promptInjection: promptInjectionPointerSchema.optional().describe("Optional runtime prompt-injection file pointer.
|
|
122316
|
+
promptInjection: promptInjectionPointerSchema.optional().describe("Optional runtime prompt-injection file pointer. Omit this entirely unless you are running a prompt-injection harness with a payload id from list_prompt_injections. When set, the tool resolves the id to a local payload file path and exposes that path through envVar. The raw payload text is never inserted into the command."),
|
|
122306
122317
|
timeout: exports_external.number().optional().describe("Timeout in seconds. If omitted, the command runs until completion or abort."),
|
|
122307
122318
|
allow_unprotected: exports_external.boolean().optional().describe("Acknowledge that this command will run WITHOUT the session's configured custom HTTP headers because the tool is unrecognized or the command is pipelined. Defaults to false (fail-closed). Use only when you understand the headers will not be applied.")
|
|
122308
122319
|
});
|
|
122320
|
+
function normalizePromptInjectionPointer(promptInjection) {
|
|
122321
|
+
if (!promptInjection)
|
|
122322
|
+
return;
|
|
122323
|
+
const id = typeof promptInjection.id === "string" ? promptInjection.id.trim() : "";
|
|
122324
|
+
if (id === "" || OMITTED_PROMPT_INJECTION_IDS.has(id.toLowerCase())) {
|
|
122325
|
+
return;
|
|
122326
|
+
}
|
|
122327
|
+
return { ...promptInjection, id };
|
|
122328
|
+
}
|
|
122309
122329
|
function normalizeExecuteCommandTimeout(timeout) {
|
|
122310
122330
|
if (timeout == null || !Number.isFinite(timeout) || timeout <= 0) {
|
|
122311
122331
|
return;
|
|
@@ -122358,31 +122378,32 @@ function wrapCommandWithEnv(command, envVars) {
|
|
|
122358
122378
|
return `env ${assignments} bash -lc ${shellQuote2(command)}`;
|
|
122359
122379
|
}
|
|
122360
122380
|
async function resolvePromptInjectionEnv(promptInjection, ctx) {
|
|
122361
|
-
|
|
122381
|
+
const normalized = normalizePromptInjectionPointer(promptInjection);
|
|
122382
|
+
if (!normalized)
|
|
122362
122383
|
return {};
|
|
122363
122384
|
const library = await getPromptInjectionLibrary({
|
|
122364
122385
|
library: ctx.promptInjectionLibrary,
|
|
122365
122386
|
source: ctx.promptInjectionLibrarySource
|
|
122366
122387
|
});
|
|
122367
|
-
const payloadContent = library.getPayload(
|
|
122388
|
+
const payloadContent = library.getPayload(normalized.id);
|
|
122368
122389
|
if (payloadContent === undefined) {
|
|
122369
122390
|
return {
|
|
122370
122391
|
library,
|
|
122371
|
-
error: `Unknown prompt injection id: ${
|
|
122392
|
+
error: `Unknown prompt injection id: ${normalized.id}`
|
|
122372
122393
|
};
|
|
122373
122394
|
}
|
|
122374
|
-
const payloadFilePath = library.getPayloadFilePath(
|
|
122395
|
+
const payloadFilePath = library.getPayloadFilePath(normalized.id);
|
|
122375
122396
|
if (!payloadFilePath) {
|
|
122376
122397
|
return {
|
|
122377
122398
|
library,
|
|
122378
|
-
error: `Unknown prompt injection id or no payload file path available: ` +
|
|
122399
|
+
error: `Unknown prompt injection id or no payload file path available: ` + normalized.id
|
|
122379
122400
|
};
|
|
122380
122401
|
}
|
|
122381
122402
|
return {
|
|
122382
122403
|
library,
|
|
122383
122404
|
payloadContent,
|
|
122384
122405
|
envVars: {
|
|
122385
|
-
[
|
|
122406
|
+
[normalized.envVar ?? DEFAULT_PROMPT_INJECTION_FILE_ENV]: payloadFilePath
|
|
122386
122407
|
}
|
|
122387
122408
|
};
|
|
122388
122409
|
}
|
|
@@ -124345,7 +124366,7 @@ should be passed directly to spawn_pentest_swarm for deep testing.`,
|
|
|
124345
124366
|
});
|
|
124346
124367
|
if (cwd) {
|
|
124347
124368
|
try {
|
|
124348
|
-
const { WhiteboxAttackSurfaceAgent } = await import("./index-
|
|
124369
|
+
const { WhiteboxAttackSurfaceAgent } = await import("./index-ktjn7x4q.js");
|
|
124349
124370
|
const localBus = new AgentEventBus;
|
|
124350
124371
|
AgentEventBus.attachChild(localBus, ctx.eventBus, subagentId);
|
|
124351
124372
|
const agent = new WhiteboxAttackSurfaceAgent({
|
|
@@ -124395,7 +124416,7 @@ should be passed directly to spawn_pentest_swarm for deep testing.`,
|
|
|
124395
124416
|
}
|
|
124396
124417
|
}
|
|
124397
124418
|
try {
|
|
124398
|
-
const { BlackboxAttackSurfaceAgent } = await import("./blackboxAgent-
|
|
124419
|
+
const { BlackboxAttackSurfaceAgent } = await import("./blackboxAgent-brp6qzbv.js");
|
|
124399
124420
|
const localBus = new AgentEventBus;
|
|
124400
124421
|
AgentEventBus.attachChild(localBus, ctx.eventBus, subagentId);
|
|
124401
124422
|
const agent = new BlackboxAttackSurfaceAgent({
|
|
@@ -124473,7 +124494,7 @@ Omit \`cwd\` for blackbox mode (live target probing only).`,
|
|
|
124473
124494
|
toolCallDescription: exports_external.string().describe("A concise, human-readable description of what this tool call is doing")
|
|
124474
124495
|
}),
|
|
124475
124496
|
execute: async ({ target, cwd }) => {
|
|
124476
|
-
const { runPentestWorkflow: workflow } = await import("./pentest-
|
|
124497
|
+
const { runPentestWorkflow: workflow } = await import("./pentest-7b64rtec.js");
|
|
124477
124498
|
if (!ctx.model) {
|
|
124478
124499
|
return {
|
|
124479
124500
|
success: false,
|
|
@@ -126049,7 +126070,7 @@ Returns an array of results with the text output from each agent.`,
|
|
|
126049
126070
|
});
|
|
126050
126071
|
}
|
|
126051
126072
|
async function runSingleCodingAgent(ctx, codebasePath, objective, agentIndex, name) {
|
|
126052
|
-
const { CodeAgent } = await import("./agent-
|
|
126073
|
+
const { CodeAgent } = await import("./agent-zy9b6zvp.js");
|
|
126053
126074
|
const subagentId = `coding-agent-${agentIndex}`;
|
|
126054
126075
|
ctx.eventBus?.emit("subagent-spawn", {
|
|
126055
126076
|
subagentId,
|
|
@@ -126555,7 +126576,7 @@ Returns the worker's summary, objective results, and finding count — but NOT t
|
|
|
126555
126576
|
message: "spawn_pentest_agent requires a model in the tool context."
|
|
126556
126577
|
};
|
|
126557
126578
|
}
|
|
126558
|
-
const { TargetedPentestAgent } = await import("./agent-
|
|
126579
|
+
const { TargetedPentestAgent } = await import("./agent-a59xqqss.js");
|
|
126559
126580
|
const findingsRegistry = ctx.findingsRegistry ?? FindingsRegistry.fromDirectory(ctx.session.findingsPath, {
|
|
126560
126581
|
model: ctx.model,
|
|
126561
126582
|
authConfig: ctx.authConfig,
|
|
@@ -126579,7 +126600,8 @@ Returns the worker's summary, objective results, and finding count — but NOT t
|
|
|
126579
126600
|
try {
|
|
126580
126601
|
const state = await ctx.browserSession.captureStorageState();
|
|
126581
126602
|
workerBrowserSession = new PlaywrightMcpSession({
|
|
126582
|
-
extraHttpHeaders: inheritedHeaders
|
|
126603
|
+
extraHttpHeaders: inheritedHeaders,
|
|
126604
|
+
display: ctx.display
|
|
126583
126605
|
});
|
|
126584
126606
|
if (state) {
|
|
126585
126607
|
await workerBrowserSession.seedStorageState(state);
|
|
@@ -126587,7 +126609,8 @@ Returns the worker's summary, objective results, and finding count — but NOT t
|
|
|
126587
126609
|
} catch {
|
|
126588
126610
|
if (!workerBrowserSession) {
|
|
126589
126611
|
workerBrowserSession = new PlaywrightMcpSession({
|
|
126590
|
-
extraHttpHeaders: inheritedHeaders
|
|
126612
|
+
extraHttpHeaders: inheritedHeaders,
|
|
126613
|
+
display: ctx.display
|
|
126591
126614
|
});
|
|
126592
126615
|
}
|
|
126593
126616
|
}
|
|
@@ -126618,7 +126641,8 @@ Returns the worker's summary, objective results, and finding count — but NOT t
|
|
|
126618
126641
|
enableThinking: ctx.enableThinking,
|
|
126619
126642
|
openAIReasoningEffort: ctx.openAIReasoningEffort,
|
|
126620
126643
|
role: "worker",
|
|
126621
|
-
browserSession: workerBrowserSession
|
|
126644
|
+
browserSession: workerBrowserSession,
|
|
126645
|
+
display: ctx.display
|
|
126622
126646
|
});
|
|
126623
126647
|
const { findings, objectiveResults } = await agent.consume();
|
|
126624
126648
|
ctx.eventBus?.emit("subagent-complete", {
|
|
@@ -126709,7 +126733,7 @@ Pass every target you want tested — the swarm handles concurrency automaticall
|
|
|
126709
126733
|
toolCallDescription: exports_external.string().describe("A concise, human-readable description of what this tool call is doing")
|
|
126710
126734
|
}),
|
|
126711
126735
|
execute: async ({ targets }) => {
|
|
126712
|
-
const { runPentestSwarm, DEFAULT_CONCURRENCY: DEFAULT_CONCURRENCY2 } = await import("./pentest-
|
|
126736
|
+
const { runPentestSwarm, DEFAULT_CONCURRENCY: DEFAULT_CONCURRENCY2 } = await import("./pentest-7b64rtec.js");
|
|
126713
126737
|
if (!ctx.model) {
|
|
126714
126738
|
return {
|
|
126715
126739
|
success: false,
|
|
@@ -126733,7 +126757,8 @@ Pass every target you want tested — the swarm handles concurrency automaticall
|
|
|
126733
126757
|
eventBus: ctx.eventBus,
|
|
126734
126758
|
concurrency: DEFAULT_CONCURRENCY2,
|
|
126735
126759
|
enableThinking: ctx.enableThinking,
|
|
126736
|
-
openAIReasoningEffort: ctx.openAIReasoningEffort
|
|
126760
|
+
openAIReasoningEffort: ctx.openAIReasoningEffort,
|
|
126761
|
+
display: ctx.display
|
|
126737
126762
|
});
|
|
126738
126763
|
const totalFindings = swarmResults.reduce((sum, r) => sum + (r?.findings.length ?? 0), 0);
|
|
126739
126764
|
const failedCount = swarmResults.filter((r) => r == null).length;
|
|
@@ -128976,7 +129001,8 @@ class OffensiveSecurityAgent {
|
|
|
128976
129001
|
const sessionHeaders = input.target ? resolveEffectiveHeaders(input.session, input.target) : input.session.config?.headers;
|
|
128977
129002
|
this.ownsBrowserSession = !input.browserSession;
|
|
128978
129003
|
this.browserSession = input.browserSession ?? new PlaywrightMcpSession({
|
|
128979
|
-
extraHttpHeaders: stripBrowserManagedHeaders(sessionHeaders)
|
|
129004
|
+
extraHttpHeaders: stripBrowserManagedHeaders(sessionHeaders),
|
|
129005
|
+
display: input.display
|
|
128980
129006
|
});
|
|
128981
129007
|
} else {
|
|
128982
129008
|
this.ownsBrowserSession = false;
|
|
@@ -129015,7 +129041,8 @@ class OffensiveSecurityAgent {
|
|
|
129015
129041
|
projectThreatModel: input.projectThreatModel,
|
|
129016
129042
|
planSubagentId: input.planSubagentId,
|
|
129017
129043
|
subagentId: input.subagentId,
|
|
129018
|
-
browserSession: this.browserSession
|
|
129044
|
+
browserSession: this.browserSession,
|
|
129045
|
+
display: input.display
|
|
129019
129046
|
});
|
|
129020
129047
|
let tools = input.extraTools ? { ...builtinTools, ...input.extraTools } : { ...builtinTools };
|
|
129021
129048
|
if (input.approvalGate) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OffensiveSecurityAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-q74td57q.js";
|
|
4
4
|
import {
|
|
5
5
|
detectOSAndEnhancePrompt
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-x0vptkry.js";
|
|
7
7
|
import {
|
|
8
8
|
createLogger,
|
|
9
9
|
hasToolCall,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
init_lazyLogger,
|
|
12
12
|
init_structured,
|
|
13
13
|
scopedLogger
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-0xqfn03a.js";
|
|
15
15
|
|
|
16
16
|
// src/core/agents/specialized/authenticationAgent/agent.ts
|
|
17
17
|
init_dist();
|
package/build/cli.js
CHANGED
|
@@ -14,16 +14,16 @@ import {
|
|
|
14
14
|
init_toolset,
|
|
15
15
|
init_utils,
|
|
16
16
|
logger
|
|
17
|
-
} from "./cli-
|
|
18
|
-
import"./cli-
|
|
17
|
+
} from "./cli-0xqfn03a.js";
|
|
18
|
+
import"./cli-jdpc7ywh.js";
|
|
19
19
|
import"./cli-f7d23ded.js";
|
|
20
20
|
import"./cli-gpnb45ck.js";
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
21
|
+
import"./cli-ahv48hxq.js";
|
|
22
|
+
import"./cli-vrcgsnb7.js";
|
|
23
23
|
import {
|
|
24
24
|
init_package,
|
|
25
25
|
package_default
|
|
26
|
-
} from "./cli-
|
|
26
|
+
} from "./cli-f1xr4abj.js";
|
|
27
27
|
import {
|
|
28
28
|
__require,
|
|
29
29
|
__toESM
|
|
@@ -144,7 +144,7 @@ var package_default2 = {
|
|
|
144
144
|
tsc: "tsc --noEmit"
|
|
145
145
|
},
|
|
146
146
|
type: "module",
|
|
147
|
-
version: "2.1.
|
|
147
|
+
version: "2.1.2-canary.9c58490e"
|
|
148
148
|
};
|
|
149
149
|
|
|
150
150
|
// src/core/ai/index.ts
|
|
@@ -565,7 +565,7 @@ function attachCliAgentStreamListeners(bus) {
|
|
|
565
565
|
async function createInstrumentedBus(session) {
|
|
566
566
|
const bus = new AgentEventBus;
|
|
567
567
|
attachCliAgentStreamListeners(bus);
|
|
568
|
-
const { attachWandbToEventBus } = await import("./upload-
|
|
568
|
+
const { attachWandbToEventBus } = await import("./upload-5s9ev9dd.js");
|
|
569
569
|
const wandbCleanup = await attachWandbToEventBus(session, bus).catch((e) => {
|
|
570
570
|
console.warn("[wandb] Tracing disabled:", e.message);
|
|
571
571
|
return null;
|
|
@@ -582,7 +582,7 @@ async function resolveCliHeaders() {
|
|
|
582
582
|
const { parseHeaderLine: parseHeaderLine2, parseHeadersFromFile, formatParseError: formatParseError2 } = await import("./parse-7djk9jyf.js");
|
|
583
583
|
const merged = {};
|
|
584
584
|
if (!noGlobal) {
|
|
585
|
-
const { config: appConfig } = await import("./index-
|
|
585
|
+
const { config: appConfig } = await import("./index-kjkm6q2q.js");
|
|
586
586
|
const cfg = await appConfig.get();
|
|
587
587
|
if (cfg.defaultHeaders) {
|
|
588
588
|
Object.assign(merged, cfg.defaultHeaders);
|
|
@@ -616,8 +616,8 @@ async function resolveCliModel() {
|
|
|
616
616
|
const explicit = getArg("--model");
|
|
617
617
|
if (explicit)
|
|
618
618
|
return explicit;
|
|
619
|
-
const { config: appConfig } = await import("./index-
|
|
620
|
-
const { getDefaultModelForConfig } = await import("./utils-
|
|
619
|
+
const { config: appConfig } = await import("./index-kjkm6q2q.js");
|
|
620
|
+
const { getDefaultModelForConfig } = await import("./utils-kypsnx1e.js");
|
|
621
621
|
const pensarConfig = await appConfig.get();
|
|
622
622
|
const defaultModel = getDefaultModelForConfig(pensarConfig);
|
|
623
623
|
if (!defaultModel) {
|
|
@@ -703,9 +703,9 @@ Global options:
|
|
|
703
703
|
async function runPentest() {
|
|
704
704
|
const { config } = await import("./main-3zneyg7p.js").then((m)=>__toESM(m.default,1));
|
|
705
705
|
config();
|
|
706
|
-
const { runPentestAgent } = await import("./blackboxPentest-
|
|
707
|
-
const { sessions: sessions2 } = await import("./index-
|
|
708
|
-
const { config: appConfig } = await import("./index-
|
|
706
|
+
const { runPentestAgent } = await import("./blackboxPentest-1yedpz4g.js");
|
|
707
|
+
const { sessions: sessions2 } = await import("./index-h515wfpr.js");
|
|
708
|
+
const { config: appConfig } = await import("./index-kjkm6q2q.js");
|
|
709
709
|
const target = getArgRequired("--target");
|
|
710
710
|
const cwd = getArg("--cwd");
|
|
711
711
|
const mode = getArg("--mode");
|
|
@@ -775,9 +775,9 @@ Report: ${reportPath}` : ""}`);
|
|
|
775
775
|
async function runTargetedPentest() {
|
|
776
776
|
const { config } = await import("./main-3zneyg7p.js").then((m)=>__toESM(m.default,1));
|
|
777
777
|
config();
|
|
778
|
-
const { runTargetedPentestAgent } = await import("./targetedPentest-
|
|
779
|
-
const { sessions: sessions2 } = await import("./index-
|
|
780
|
-
const { config: appConfig } = await import("./index-
|
|
778
|
+
const { runTargetedPentestAgent } = await import("./targetedPentest-3qk8py8t.js");
|
|
779
|
+
const { sessions: sessions2 } = await import("./index-h515wfpr.js");
|
|
780
|
+
const { config: appConfig } = await import("./index-kjkm6q2q.js");
|
|
781
781
|
const target = getArgRequired("--target");
|
|
782
782
|
const objectives = getAllArgs("--objective");
|
|
783
783
|
const pensarConfig = await appConfig.get();
|
|
@@ -829,8 +829,8 @@ POCs: ${pocsPath}`);
|
|
|
829
829
|
async function runThreatModel() {
|
|
830
830
|
const { config } = await import("./main-3zneyg7p.js").then((m)=>__toESM(m.default,1));
|
|
831
831
|
config();
|
|
832
|
-
const { runThreatModelWorkflow } = await import("./threatModel-
|
|
833
|
-
const { config: appConfig } = await import("./index-
|
|
832
|
+
const { runThreatModelWorkflow } = await import("./threatModel-kxe0qbw2.js");
|
|
833
|
+
const { config: appConfig } = await import("./index-kjkm6q2q.js");
|
|
834
834
|
const path2 = await import("path");
|
|
835
835
|
const pensarConfig = await appConfig.get();
|
|
836
836
|
const model = await resolveCliModel();
|
|
@@ -866,10 +866,10 @@ Threat model written to: ${resolvedPath}`);
|
|
|
866
866
|
async function runOperator() {
|
|
867
867
|
const { config } = await import("./main-3zneyg7p.js").then((m)=>__toESM(m.default,1));
|
|
868
868
|
config();
|
|
869
|
-
const { runOffensiveSecurityAgent } = await import("./offesecAgent-
|
|
870
|
-
const { sessions: sessions2, normalizeMessages, getResumeMessages } = await import("./index-
|
|
871
|
-
const { ALL_TOOL_NAMES, SKILL_TOOL_NAMES } = await import("./index-
|
|
872
|
-
const { config: appConfig } = await import("./index-
|
|
869
|
+
const { runOffensiveSecurityAgent } = await import("./offesecAgent-c07zwqyb.js");
|
|
870
|
+
const { sessions: sessions2, normalizeMessages, getResumeMessages } = await import("./index-h515wfpr.js");
|
|
871
|
+
const { ALL_TOOL_NAMES, SKILL_TOOL_NAMES } = await import("./index-pvkc9zqs.js");
|
|
872
|
+
const { config: appConfig } = await import("./index-kjkm6q2q.js");
|
|
873
873
|
const { createInterface } = await import("readline");
|
|
874
874
|
const { readFileSync: readFileSync2, existsSync } = await import("fs");
|
|
875
875
|
const path2 = await import("path");
|
|
@@ -983,35 +983,35 @@ if (hasFlag("-p") || command === "--prompt") {
|
|
|
983
983
|
await runTargetedPentest();
|
|
984
984
|
} else if (command === "login" || command === "auth") {
|
|
985
985
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
986
|
-
await import("./auth-
|
|
986
|
+
await import("./auth-w90316v8.js");
|
|
987
987
|
} else if (command === "uninstall") {
|
|
988
988
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
989
|
-
await import("./uninstall-
|
|
989
|
+
await import("./uninstall-afr120hd.js");
|
|
990
990
|
} else if (command === "apps") {
|
|
991
991
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
992
|
-
await import("./apps-
|
|
992
|
+
await import("./apps-0pyxf9kc.js");
|
|
993
993
|
} else if (command === "pentests") {
|
|
994
994
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
995
|
-
await import("./pentests-
|
|
995
|
+
await import("./pentests-6yj9e0nn.js");
|
|
996
996
|
} else if (command === "targets") {
|
|
997
997
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
998
|
-
await import("./targets-
|
|
998
|
+
await import("./targets-qayzv4k8.js");
|
|
999
999
|
} else if (command === "issues") {
|
|
1000
1000
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1001
|
-
await import("./issues-
|
|
1001
|
+
await import("./issues-9mxy948j.js");
|
|
1002
1002
|
} else if (command === "fixes") {
|
|
1003
1003
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1004
|
-
await import("./fixes-
|
|
1004
|
+
await import("./fixes-ctjkqmfw.js");
|
|
1005
1005
|
} else if (command === "logs") {
|
|
1006
1006
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1007
|
-
await import("./logs-
|
|
1007
|
+
await import("./logs-vmc468z4.js");
|
|
1008
1008
|
} else if (command === "config") {
|
|
1009
1009
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1010
|
-
await import("./config-
|
|
1010
|
+
await import("./config-qwjtrn5w.js");
|
|
1011
1011
|
} else if (command === "threat-model") {
|
|
1012
1012
|
await runThreatModel();
|
|
1013
1013
|
} else if (command === "doctor") {
|
|
1014
|
-
const { runDoctor } = await import("./doctor-
|
|
1014
|
+
const { runDoctor } = await import("./doctor-we9s6x2e.js");
|
|
1015
1015
|
await runDoctor();
|
|
1016
1016
|
} else if (args.length === 0) {
|
|
1017
1017
|
if (process.env.PENSAR_NO_TUI === "1") {
|
|
@@ -1019,7 +1019,7 @@ if (hasFlag("-p") || command === "--prompt") {
|
|
|
1019
1019
|
console.error("All other commands work with Node \u2014 run 'pensar --help'.");
|
|
1020
1020
|
process.exit(1);
|
|
1021
1021
|
}
|
|
1022
|
-
await import("./index-
|
|
1022
|
+
await import("./index-pgetwc8s.js");
|
|
1023
1023
|
} else {
|
|
1024
1024
|
console.error(`Error: Unknown command '${command}'`);
|
|
1025
1025
|
console.error();
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
config,
|
|
13
13
|
init_config
|
|
14
|
-
} from "./cli-
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
14
|
+
} from "./cli-ahv48hxq.js";
|
|
15
|
+
import"./cli-vrcgsnb7.js";
|
|
16
|
+
import"./cli-f1xr4abj.js";
|
|
17
17
|
import"./cli-8rxa073f.js";
|
|
18
18
|
|
|
19
19
|
// src/cli/config.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toolExists
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
5
|
-
import"./cli-
|
|
3
|
+
} from "./cli-x0vptkry.js";
|
|
4
|
+
import"./cli-0xqfn03a.js";
|
|
5
|
+
import"./cli-jdpc7ywh.js";
|
|
6
6
|
import"./cli-f7d23ded.js";
|
|
7
7
|
import"./cli-gpnb45ck.js";
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
10
|
-
import"./cli-
|
|
8
|
+
import"./cli-ahv48hxq.js";
|
|
9
|
+
import"./cli-vrcgsnb7.js";
|
|
10
|
+
import"./cli-f1xr4abj.js";
|
|
11
11
|
import"./cli-8rxa073f.js";
|
|
12
12
|
|
|
13
13
|
// src/core/doctor.ts
|
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
import {
|
|
3
3
|
getFix,
|
|
4
4
|
listFixes
|
|
5
|
-
} from "./cli-
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
5
|
+
} from "./cli-dzqe6v9b.js";
|
|
6
|
+
import"./cli-gx7trq19.js";
|
|
7
|
+
import"./cli-fgpkgx10.js";
|
|
8
|
+
import"./cli-mav49z3q.js";
|
|
9
|
+
import"./cli-vn0eg8z6.js";
|
|
10
|
+
import"./cli-fym4wq8m.js";
|
|
11
|
+
import"./cli-ar2092dy.js";
|
|
12
12
|
import"./cli-9fsre5pt.js";
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-
|
|
13
|
+
import"./cli-jpt3qd0e.js";
|
|
14
|
+
import"./cli-q74td57q.js";
|
|
15
|
+
import"./cli-x0vptkry.js";
|
|
16
16
|
import"./cli-fw5r7pfj.js";
|
|
17
17
|
import"./cli-c8131c4q.js";
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
18
|
+
import"./cli-0xqfn03a.js";
|
|
19
|
+
import"./cli-jdpc7ywh.js";
|
|
20
20
|
import"./cli-f7d23ded.js";
|
|
21
21
|
import"./cli-gpnb45ck.js";
|
|
22
|
-
import"./cli-
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-
|
|
22
|
+
import"./cli-ahv48hxq.js";
|
|
23
|
+
import"./cli-vrcgsnb7.js";
|
|
24
|
+
import"./cli-f1xr4abj.js";
|
|
25
25
|
import"./cli-8rxa073f.js";
|
|
26
26
|
|
|
27
27
|
// src/cli/fixes.ts
|
|
@@ -17,19 +17,19 @@ import {
|
|
|
17
17
|
update,
|
|
18
18
|
write,
|
|
19
19
|
writeRaw
|
|
20
|
-
} from "./cli-
|
|
21
|
-
import"./cli-
|
|
20
|
+
} from "./cli-0xqfn03a.js";
|
|
21
|
+
import"./cli-jdpc7ywh.js";
|
|
22
22
|
import {
|
|
23
23
|
init_zod,
|
|
24
24
|
zod_default
|
|
25
25
|
} from "./cli-f7d23ded.js";
|
|
26
26
|
import"./cli-gpnb45ck.js";
|
|
27
|
-
import"./cli-
|
|
28
|
-
import"./cli-
|
|
27
|
+
import"./cli-ahv48hxq.js";
|
|
28
|
+
import"./cli-vrcgsnb7.js";
|
|
29
29
|
import {
|
|
30
30
|
getCurrentVersion,
|
|
31
31
|
init_installation
|
|
32
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-f1xr4abj.js";
|
|
33
33
|
import {
|
|
34
34
|
__require
|
|
35
35
|
} from "./cli-8rxa073f.js";
|
|
@@ -303,7 +303,7 @@ async function create(input) {
|
|
|
303
303
|
if (normalizedConfig?.headers !== undefined) {
|
|
304
304
|
snapshotHeaders = { ...normalizedConfig.headers };
|
|
305
305
|
} else {
|
|
306
|
-
const { config: appConfig } = await import("./index-
|
|
306
|
+
const { config: appConfig } = await import("./index-frnp2swd.js");
|
|
307
307
|
const cfg = await appConfig.get();
|
|
308
308
|
snapshotHeaders = cfg.defaultHeaders ? { ...cfg.defaultHeaders } : { ...DEFAULT_HEADER_RECORD };
|
|
309
309
|
}
|
|
@@ -7,19 +7,19 @@ import {
|
|
|
7
7
|
WHITEBOX_APPS_DISCOVERY_SYSTEM_PROMPT,
|
|
8
8
|
WHITEBOX_DISCOVERY_SYSTEM_PROMPT,
|
|
9
9
|
WhiteboxAttackSurfaceAgent
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-ar2092dy.js";
|
|
11
11
|
import"./cli-9fsre5pt.js";
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
12
|
+
import"./cli-jpt3qd0e.js";
|
|
13
|
+
import"./cli-q74td57q.js";
|
|
14
|
+
import"./cli-x0vptkry.js";
|
|
15
15
|
import"./cli-c8131c4q.js";
|
|
16
|
-
import"./cli-
|
|
17
|
-
import"./cli-
|
|
16
|
+
import"./cli-0xqfn03a.js";
|
|
17
|
+
import"./cli-jdpc7ywh.js";
|
|
18
18
|
import"./cli-f7d23ded.js";
|
|
19
19
|
import"./cli-gpnb45ck.js";
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
20
|
+
import"./cli-ahv48hxq.js";
|
|
21
|
+
import"./cli-vrcgsnb7.js";
|
|
22
|
+
import"./cli-f1xr4abj.js";
|
|
23
23
|
import"./cli-8rxa073f.js";
|
|
24
24
|
export {
|
|
25
25
|
WhiteboxAttackSurfaceAgent,
|