@pensar/apex 2.4.0 → 2.5.0-canary.41357c27
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-nhs1w5w0.js → agent-092hrrbn.js} +11 -10
- package/build/{agent-5ejt5vpz.js → agent-jgdfbwse.js} +9 -8
- package/build/agent-z3ydv420.js +20 -0
- package/build/{apps-17wvz1d7.js → apps-pxwa5s9f.js} +72 -31
- package/build/{auth-z3h9859n.js → auth-j34f09ke.js} +25 -20
- package/build/authentication-jt9fq8y9.js +20 -0
- package/build/blackboxAgent-vwtk3hv1.js +20 -0
- package/build/blackboxPentest-nzn4xjd4.js +70 -0
- package/build/{cli-vnynf0js.js → cli-13vsx08y.js} +10 -4
- package/build/{cli-mavved45.js → cli-1e69fd35.js} +46 -25
- package/build/cli-53rm0rrz.js +15 -0
- package/build/cli-68260ckj.js +12136 -0
- package/build/{cli-tkc598ey.js → cli-70banr6y.js} +411 -280
- package/build/{cli-xshasbwe.js → cli-7hqdp86d.js} +34 -4
- package/build/cli-7q3ae3ft.js +6 -0
- package/build/cli-9pbk8m32.js +32 -0
- package/build/{cli-tznv8pf1.js → cli-9y49bzhd.js} +1 -1
- package/build/{cli-swpbx60z.js → cli-avmhkjtv.js} +1 -1481
- package/build/{cli-9rhzhgx2.js → cli-epqtwyeb.js} +1 -1
- package/build/cli-knd276ed.js +1485 -0
- package/build/{cli-repbyhkk.js → cli-mjd75xw4.js} +1129 -525
- package/build/{cli-5k33webc.js → cli-mtavwpav.js} +45 -43
- package/build/{cli-0n4r54hq.js → cli-naapss75.js} +1 -1
- package/build/{cli-gq40s5b3.js → cli-pd9j03q2.js} +5 -3
- package/build/{cli-qqt4gj1w.js → cli-pepts4ha.js} +5 -3
- package/build/{cli-32z0017y.js → cli-q2sq1qkn.js} +2 -2
- package/build/{cli-72cvcqhg.js → cli-x4e10v99.js} +1 -1
- package/build/{cli-2cbwdk78.js → cli-xan180ab.js} +1 -1
- package/build/{cli-vq52kp7j.js → cli-xp52xsqm.js} +23 -5
- package/build/{cli-k8kc47pq.js → cli-ygesx0vf.js} +3 -3
- package/build/{cli-b1adytsy.js → cli-yzhjh7x1.js} +28 -5
- package/build/cli.js +641 -95
- package/build/{config-f1mj4nhd.js → config-v87zm6cx.js} +18 -15
- package/build/{doctor-ekneewa3.js → doctor-705xb28k.js} +8 -7
- package/build/{fastStrike-8zka43xs.js → fastStrike-wp2tvcnq.js} +13 -10
- package/build/{fixes-b89s5haw.js → fixes-x8y42dh5.js} +25 -20
- package/build/getMachineId-bsd-xj3bn2fv.js +36 -0
- package/build/getMachineId-darwin-07jzjcx6.js +36 -0
- package/build/getMachineId-linux-ahngynxd.js +29 -0
- package/build/getMachineId-unsupported-vy43b44z.js +19 -0
- package/build/getMachineId-win-8x66cynz.js +38 -0
- package/build/{index-mtq7kmxz.js → index-5wh7gq37.js} +4 -2
- package/build/{index-sf16jm0m.js → index-6f06c8v0.js} +9 -7
- package/build/{index-hqjdg6fg.js → index-g0fvrp9n.js} +17 -9
- package/build/{index-y5w6n3tb.js → index-hdzja756.js} +2 -2
- package/build/{index-4ad3sdwk.js → index-q1hh6p80.js} +4 -4
- package/build/{index-ghwf5z3v.js → index-qpmdq6vj.js} +3 -3
- package/build/{index-6d22pyxt.js → index-sfwny7gx.js} +1756 -1213
- package/build/{index-rbzhk712.js → index-sx52n7s9.js} +11 -10
- package/build/{issues-xx5bs4md.js → issues-1g7j8ktr.js} +82 -26
- package/build/{logs-qtxe51w2.js → logs-6rjwnwz7.js} +25 -20
- package/build/{offesecAgent-b9e2xm6v.js → offesecAgent-frnz6ngh.js} +10 -9
- package/build/pentest-3w1jgsg7.js +30 -0
- package/build/{pentests-6ks3szc4.js → pentests-wxacefk4.js} +26 -21
- package/build/{targetedPentest-s1ptvq8e.js → targetedPentest-w1dze9hg.js} +11 -10
- package/build/{targets-sxygyj87.js → targets-vhxkvbmg.js} +27 -22
- package/build/threatModel-2k259rx1.js +29 -0
- package/build/{uninstall-tvsh81v8.js → uninstall-j8dmsaz5.js} +6 -3
- package/build/{upload-7wdyyqmr.js → upload-7pz6yt0n.js} +8 -7
- package/build/{utils-7fwdkqk6.js → utils-2gvfe1dz.js} +7 -6
- package/package.json +8 -2
- package/build/agent-mvpgvgks.js +0 -19
- package/build/authentication-3s97cpk4.js +0 -19
- package/build/blackboxAgent-gw0a1ca4.js +0 -19
- package/build/blackboxPentest-44333zss.js +0 -37
- package/build/main-mmjp338j.js +0 -324
- package/build/pentest-xtc1sjdw.js +0 -29
- package/build/threatModel-xsm6fwk5.js +0 -27
|
@@ -1,28 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AppsDiscoveryResultSchema,
|
|
3
|
+
DiscoverySummarySchema,
|
|
4
|
+
EndpointSchema,
|
|
5
|
+
WHITEBOX_APPS_DISCOVERY_SYSTEM_PROMPT,
|
|
6
|
+
WHITEBOX_DISCOVERY_SYSTEM_PROMPT,
|
|
7
|
+
WHITEBOX_ENDPOINT_DOCUMENTATION_SYSTEM_PROMPT
|
|
8
|
+
} from "./cli-ygesx0vf.js";
|
|
1
9
|
import {
|
|
2
10
|
BlackboxAttackSurfaceAgent
|
|
3
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-pd9j03q2.js";
|
|
12
|
+
import {
|
|
13
|
+
TargetedPentestAgent,
|
|
14
|
+
buildPentestSystemPrompt
|
|
15
|
+
} from "./cli-1e69fd35.js";
|
|
4
16
|
import {
|
|
5
17
|
REPORT_FILENAME_JSON,
|
|
6
18
|
REPORT_FILENAME_MD,
|
|
7
19
|
buildPentestReport,
|
|
8
20
|
renderJson,
|
|
9
21
|
renderMarkdown
|
|
10
|
-
} from "./cli-
|
|
11
|
-
import {
|
|
12
|
-
TargetedPentestAgent,
|
|
13
|
-
buildPentestSystemPrompt
|
|
14
|
-
} from "./cli-mavved45.js";
|
|
22
|
+
} from "./cli-yzhjh7x1.js";
|
|
15
23
|
import {
|
|
16
24
|
CodeAgent
|
|
17
|
-
} from "./cli-
|
|
18
|
-
import {
|
|
19
|
-
AppsDiscoveryResultSchema,
|
|
20
|
-
DiscoverySummarySchema,
|
|
21
|
-
EndpointSchema,
|
|
22
|
-
WHITEBOX_APPS_DISCOVERY_SYSTEM_PROMPT,
|
|
23
|
-
WHITEBOX_DISCOVERY_SYSTEM_PROMPT,
|
|
24
|
-
WHITEBOX_ENDPOINT_DOCUMENTATION_SYSTEM_PROMPT
|
|
25
|
-
} from "./cli-k8kc47pq.js";
|
|
25
|
+
} from "./cli-q2sq1qkn.js";
|
|
26
26
|
import {
|
|
27
27
|
FindingsRegistry,
|
|
28
28
|
OffensiveSecurityAgent,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
pLimit,
|
|
32
32
|
runWithBoundedConcurrency,
|
|
33
33
|
toGrpcPentestContext
|
|
34
|
-
} from "./cli-
|
|
34
|
+
} from "./cli-mjd75xw4.js";
|
|
35
35
|
import {
|
|
36
36
|
createThreatModelPrompt
|
|
37
37
|
} from "./cli-fw5r7pfj.js";
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
init_structured,
|
|
46
46
|
newSessionId,
|
|
47
47
|
scopedLogger
|
|
48
|
-
} from "./cli-
|
|
48
|
+
} from "./cli-70banr6y.js";
|
|
49
49
|
import {
|
|
50
50
|
__require
|
|
51
51
|
} from "./cli-bc05qbss.js";
|
|
@@ -126,9 +126,23 @@ function normalizeTokenUsage(value) {
|
|
|
126
126
|
return {
|
|
127
127
|
inputTokens,
|
|
128
128
|
outputTokens,
|
|
129
|
+
cacheReadTokens: toNonNegativeInteger(value?.cacheReadTokens),
|
|
130
|
+
cacheWriteTokens: toNonNegativeInteger(value?.cacheWriteTokens),
|
|
129
131
|
totalTokens: explicitTotal > 0 ? explicitTotal : derivedTotal
|
|
130
132
|
};
|
|
131
133
|
}
|
|
134
|
+
function normalizeContextUsage(value) {
|
|
135
|
+
if (typeof value !== "object" || value === null)
|
|
136
|
+
return;
|
|
137
|
+
const v = value;
|
|
138
|
+
if (typeof v.modelId !== "string" || v.modelId.length === 0)
|
|
139
|
+
return;
|
|
140
|
+
return {
|
|
141
|
+
modelId: v.modelId,
|
|
142
|
+
usedTokens: toNonNegativeInteger(v.usedTokens),
|
|
143
|
+
contextLimit: toNonNegativeInteger(v.contextLimit)
|
|
144
|
+
};
|
|
145
|
+
}
|
|
132
146
|
function metricsPath(sessionRootPath) {
|
|
133
147
|
return join(sessionRootPath, EXECUTION_METRICS_FILENAME);
|
|
134
148
|
}
|
|
@@ -143,6 +157,7 @@ function readExecutionMetrics(sessionRootPath) {
|
|
|
143
157
|
const parsed = JSON.parse(readFileSync(path, "utf-8"));
|
|
144
158
|
return {
|
|
145
159
|
tokenUsage: normalizeTokenUsage(parsed.tokenUsage),
|
|
160
|
+
contextUsage: normalizeContextUsage(parsed.contextUsage),
|
|
146
161
|
runtime: typeof parsed.runtime === "string" ? parsed.runtime : undefined,
|
|
147
162
|
elapsedSeconds: toNonNegativeInteger(parsed.elapsedSeconds) || undefined,
|
|
148
163
|
updatedAt: typeof parsed.updatedAt === "string" ? parsed.updatedAt : new Date().toISOString()
|
|
@@ -167,10 +182,13 @@ function writeExecutionMetrics(input) {
|
|
|
167
182
|
const nextTokenUsage = input.tokenUsage ? normalizeTokenUsage(input.tokenUsage) : existing?.tokenUsage ?? {
|
|
168
183
|
inputTokens: 0,
|
|
169
184
|
outputTokens: 0,
|
|
185
|
+
cacheReadTokens: 0,
|
|
186
|
+
cacheWriteTokens: 0,
|
|
170
187
|
totalTokens: 0
|
|
171
188
|
};
|
|
172
189
|
const next = {
|
|
173
190
|
tokenUsage: nextTokenUsage,
|
|
191
|
+
contextUsage: input.contextUsage ?? existing?.contextUsage,
|
|
174
192
|
runtime: input.runtime ?? existing?.runtime,
|
|
175
193
|
elapsedSeconds: input.elapsedSeconds ?? existing?.elapsedSeconds,
|
|
176
194
|
updatedAt: new Date().toISOString()
|
|
@@ -7639,16 +7657,6 @@ When finished, call \`response\` with a summary of how many entry points you doc
|
|
|
7639
7657
|
// src/core/workflows/pentest.ts
|
|
7640
7658
|
var log5 = scopedLogger(() => createLogger("pentest-swarm"));
|
|
7641
7659
|
var DEFAULT_CONCURRENCY2 = 10;
|
|
7642
|
-
function addUsageTotals(totals, usage) {
|
|
7643
|
-
if (!usage)
|
|
7644
|
-
return;
|
|
7645
|
-
const inputTokens = usage.inputTokens ?? 0;
|
|
7646
|
-
const outputTokens = usage.outputTokens ?? 0;
|
|
7647
|
-
const totalTokens = usage.totalTokens ?? inputTokens + outputTokens;
|
|
7648
|
-
totals.inputTokens += inputTokens;
|
|
7649
|
-
totals.outputTokens += outputTokens;
|
|
7650
|
-
totals.totalTokens += totalTokens;
|
|
7651
|
-
}
|
|
7652
7660
|
async function runPentestSwarm(input) {
|
|
7653
7661
|
const {
|
|
7654
7662
|
targets,
|
|
@@ -7661,6 +7669,7 @@ async function runPentestSwarm(input) {
|
|
|
7661
7669
|
onError,
|
|
7662
7670
|
concurrency = DEFAULT_CONCURRENCY2,
|
|
7663
7671
|
onStepFinish,
|
|
7672
|
+
onCacheMetrics,
|
|
7664
7673
|
enableThinking,
|
|
7665
7674
|
thinkingEffort,
|
|
7666
7675
|
openAIReasoningEffort,
|
|
@@ -7717,6 +7726,8 @@ async function runPentestSwarm(input) {
|
|
|
7717
7726
|
tasksDir: executionTasksDir,
|
|
7718
7727
|
planSubagentId: subagentId,
|
|
7719
7728
|
eventBus,
|
|
7729
|
+
onStepFinish,
|
|
7730
|
+
onCacheMetrics,
|
|
7720
7731
|
enableThinking,
|
|
7721
7732
|
thinkingEffort,
|
|
7722
7733
|
openAIReasoningEffort,
|
|
@@ -7750,6 +7761,8 @@ async function runPentestSwarm(input) {
|
|
|
7750
7761
|
abortSignal,
|
|
7751
7762
|
findingsRegistry,
|
|
7752
7763
|
onStepFinish: handleStepFinish,
|
|
7764
|
+
onCacheMetrics,
|
|
7765
|
+
forwardUsageCallbacksToSpawnedAgents: true,
|
|
7753
7766
|
messages: previousMessages.length > 0 ? previousMessages : undefined,
|
|
7754
7767
|
eventBus,
|
|
7755
7768
|
subagentId,
|
|
@@ -7802,7 +7815,7 @@ async function runPentestSwarm(input) {
|
|
|
7802
7815
|
}
|
|
7803
7816
|
async function runPentestWorkflow(input) {
|
|
7804
7817
|
if (input.fastStrike) {
|
|
7805
|
-
const { runFastStrike } = await import("./fastStrike-
|
|
7818
|
+
const { runFastStrike } = await import("./fastStrike-wp2tvcnq.js");
|
|
7806
7819
|
return runFastStrike(input);
|
|
7807
7820
|
}
|
|
7808
7821
|
const {
|
|
@@ -7839,17 +7852,6 @@ async function runPentestWorkflow(input) {
|
|
|
7839
7852
|
${combined}` : combined;
|
|
7840
7853
|
}
|
|
7841
7854
|
const startedAt = Date.now();
|
|
7842
|
-
const tokenUsageTotals = {
|
|
7843
|
-
inputTokens: 0,
|
|
7844
|
-
outputTokens: 0,
|
|
7845
|
-
totalTokens: 0
|
|
7846
|
-
};
|
|
7847
|
-
const wrappedOnStepFinish = (event) => {
|
|
7848
|
-
addUsageTotals(tokenUsageTotals, event.usage);
|
|
7849
|
-
if (onStepFinish) {
|
|
7850
|
-
onStepFinish(event);
|
|
7851
|
-
}
|
|
7852
|
-
};
|
|
7853
7855
|
try {
|
|
7854
7856
|
const mode = cwd ? "whitebox" : "blackbox";
|
|
7855
7857
|
let swarmTargets;
|
|
@@ -7886,7 +7888,7 @@ ${combined}` : combined;
|
|
|
7886
7888
|
authConfig,
|
|
7887
7889
|
abortSignal,
|
|
7888
7890
|
eventBus,
|
|
7889
|
-
onStepFinish
|
|
7891
|
+
onStepFinish,
|
|
7890
7892
|
onCacheMetrics,
|
|
7891
7893
|
openAIReasoningEffort,
|
|
7892
7894
|
surfaceIntegrationEnabled
|
|
@@ -7899,7 +7901,7 @@ ${combined}` : combined;
|
|
|
7899
7901
|
authConfig,
|
|
7900
7902
|
abortSignal,
|
|
7901
7903
|
eventBus,
|
|
7902
|
-
onStepFinish
|
|
7904
|
+
onStepFinish,
|
|
7903
7905
|
onCacheMetrics,
|
|
7904
7906
|
openAIReasoningEffort
|
|
7905
7907
|
});
|
|
@@ -7952,7 +7954,8 @@ ${combined}` : combined;
|
|
|
7952
7954
|
abortSignal,
|
|
7953
7955
|
findingsRegistry,
|
|
7954
7956
|
eventBus,
|
|
7955
|
-
onStepFinish
|
|
7957
|
+
onStepFinish,
|
|
7958
|
+
onCacheMetrics,
|
|
7956
7959
|
enableThinking,
|
|
7957
7960
|
thinkingEffort,
|
|
7958
7961
|
openAIReasoningEffort
|
|
@@ -8000,7 +8003,6 @@ ${combined}` : combined;
|
|
|
8000
8003
|
const runtime = formatDurationHmsFromMs(Date.now() - startedAt);
|
|
8001
8004
|
writeExecutionMetrics({
|
|
8002
8005
|
sessionRootPath: session.rootPath,
|
|
8003
|
-
tokenUsage: tokenUsageTotals,
|
|
8004
8006
|
runtime
|
|
8005
8007
|
});
|
|
8006
8008
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OffensiveSecurityAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-mjd75xw4.js";
|
|
4
4
|
import {
|
|
5
5
|
detectOSAndEnhancePrompt
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-9y49bzhd.js";
|
|
7
7
|
import {
|
|
8
8
|
hasToolCall,
|
|
9
9
|
init_dist,
|
|
10
10
|
stepCountIs
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-70banr6y.js";
|
|
12
12
|
|
|
13
13
|
// src/core/agents/specialized/attackSurface/blackboxAgent.ts
|
|
14
14
|
init_dist();
|
|
@@ -438,6 +438,7 @@ class BlackboxAttackSurfaceAgent extends OffensiveSecurityAgent {
|
|
|
438
438
|
"email_search_messages",
|
|
439
439
|
"email_get_message",
|
|
440
440
|
"send_email",
|
|
441
|
+
"sms_list_messages",
|
|
441
442
|
"web_search",
|
|
442
443
|
"get_page"
|
|
443
444
|
],
|
|
@@ -483,6 +484,7 @@ ${authenticationInstructions}
|
|
|
483
484
|
Your FIRST tool call must be: browser_navigate to ${loginTarget}
|
|
484
485
|
Then use browser tools to authenticate. Pass the credentialId to delegate_to_auth_subagent — secrets are resolved automatically.
|
|
485
486
|
For browser_fill on password/secret fields, use credentialId + credentialField instead of raw values.
|
|
487
|
+
When a credential has a phoneNumber additional field (Mobile OTP / sms-passwordless), phone is the login identifier — not MFA-after-password. Immediately before filling it, call sms_list_messages with reserve=true; never pass that tool a phone number. If it returns 429, retry the reservation later as a separate attempt without waiting in the tool. Then fill credentialField="phoneNumber", click send-code, sleep with execute_command, and call sms_list_messages with sinceMs from that click and claim=true. If the list is empty, make one delayed list retry; if it stays empty, stop and report. Do not report phone_verification as a barrier. TOTP-via-env for authenticator MFA is unchanged.
|
|
486
488
|
|
|
487
489
|
Do NOT run curl, nmap, dig, or any other command before completing login.
|
|
488
490
|
Include authentication information with EVERY target that requires it in your final report.
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
+
AttackPathSchema,
|
|
2
3
|
CweEntrySchema,
|
|
3
4
|
ValidatedCweEntrySchema
|
|
4
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-mjd75xw4.js";
|
|
5
6
|
import {
|
|
6
7
|
exports_external,
|
|
7
8
|
init_zod
|
|
8
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-avmhkjtv.js";
|
|
9
10
|
|
|
10
11
|
// src/core/agents/offSecAgent/types.ts
|
|
11
12
|
init_zod();
|
|
@@ -47,7 +48,8 @@ var ApexFindingObject = exports_external.object({
|
|
|
47
48
|
rootCauseGroup: exports_external.string().optional(),
|
|
48
49
|
relatedFindings: exports_external.array(exports_external.string()).optional(),
|
|
49
50
|
rootCauseLead: exports_external.boolean().optional(),
|
|
50
|
-
evidenceFiles: exports_external.array(EvidenceFileEntrySchema).optional()
|
|
51
|
+
evidenceFiles: exports_external.array(EvidenceFileEntrySchema).optional(),
|
|
52
|
+
attackPath: AttackPathSchema.optional()
|
|
51
53
|
});
|
|
52
54
|
|
|
53
55
|
export { EvidenceFileEntrySchema, ApexFindingObject };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OffensiveSecurityAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-mjd75xw4.js";
|
|
4
4
|
import {
|
|
5
5
|
init_dist,
|
|
6
6
|
stepCountIs
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-70banr6y.js";
|
|
8
8
|
|
|
9
9
|
// src/core/agents/specialized/codeAgent/agent.ts
|
|
10
10
|
init_dist();
|
|
@@ -5,20 +5,20 @@ import {
|
|
|
5
5
|
SKILL_TOOL_NAMES,
|
|
6
6
|
apiRequest,
|
|
7
7
|
buildBaseSystemPrompt
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-mjd75xw4.js";
|
|
9
9
|
import {
|
|
10
10
|
init_dist,
|
|
11
11
|
init_session,
|
|
12
12
|
sessions,
|
|
13
13
|
stepCountIs
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-70banr6y.js";
|
|
15
15
|
import {
|
|
16
16
|
init_constants
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-naapss75.js";
|
|
18
18
|
import {
|
|
19
19
|
exports_external,
|
|
20
20
|
init_zod
|
|
21
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-avmhkjtv.js";
|
|
22
22
|
import {
|
|
23
23
|
__commonJS,
|
|
24
24
|
__require
|
|
@@ -6966,6 +6966,12 @@ var require_public_api = __commonJS(function(exports) {
|
|
|
6966
6966
|
});
|
|
6967
6967
|
|
|
6968
6968
|
// src/core/api/issues.ts
|
|
6969
|
+
var CLOSED_DISPOSITIONS = [
|
|
6970
|
+
"resolved",
|
|
6971
|
+
"wont-fix",
|
|
6972
|
+
"out-of-scope",
|
|
6973
|
+
"risk-accepted"
|
|
6974
|
+
];
|
|
6969
6975
|
async function listScans() {
|
|
6970
6976
|
return apiRequest("GET", "/pentests");
|
|
6971
6977
|
}
|
|
@@ -6998,6 +7004,18 @@ async function getIssue(issueId) {
|
|
|
6998
7004
|
async function updateIssue(issueId, data) {
|
|
6999
7005
|
return apiRequest("PATCH", `/issues/${issueId}`, data);
|
|
7000
7006
|
}
|
|
7007
|
+
async function listIssueComments(issueId, options) {
|
|
7008
|
+
const params = new URLSearchParams;
|
|
7009
|
+
if (options?.page)
|
|
7010
|
+
params.set("page", String(options.page));
|
|
7011
|
+
if (options?.pageSize)
|
|
7012
|
+
params.set("pageSize", String(options.pageSize));
|
|
7013
|
+
const qs = params.toString();
|
|
7014
|
+
return apiRequest("GET", `/issues/${issueId}/comments${qs ? `?${qs}` : ""}`);
|
|
7015
|
+
}
|
|
7016
|
+
async function createIssueComment(issueId, body) {
|
|
7017
|
+
return apiRequest("POST", `/issues/${issueId}/comments`, { body });
|
|
7018
|
+
}
|
|
7001
7019
|
async function retestIssue(issueId) {
|
|
7002
7020
|
return apiRequest("POST", `/issues/${issueId}/retest`);
|
|
7003
7021
|
}
|
|
@@ -8205,4 +8223,4 @@ Working directory: ${input.codebasePath}`;
|
|
|
8205
8223
|
});
|
|
8206
8224
|
return { session, outputPath: input.outputPath };
|
|
8207
8225
|
}
|
|
8208
|
-
export { listScans, getScan, listPentestTargets, dispatchPentest, listIssues, getIssue, updateIssue, retestIssue, linkPullRequest, listIssuePullRequests, listFixes, getFix, listAgentLogs, searchAgentLogs, listTargetLogs, searchTargetLogs, runOffensiveSecurityAgent, buildPentestPrompt, buildThreatModelPrompt, createSkillsRegistry, runThreatModelWorkflow };
|
|
8226
|
+
export { CLOSED_DISPOSITIONS, listScans, getScan, listPentestTargets, dispatchPentest, listIssues, getIssue, updateIssue, listIssueComments, createIssueComment, retestIssue, linkPullRequest, listIssuePullRequests, listFixes, getFix, listAgentLogs, searchAgentLogs, listTargetLogs, searchTargetLogs, runOffensiveSecurityAgent, buildPentestPrompt, buildThreatModelPrompt, createSkillsRegistry, runThreatModelWorkflow };
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
EndpointTransportEnum,
|
|
3
3
|
GrpcEndpointMetadataSchema,
|
|
4
4
|
OffensiveSecurityAgent
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-mjd75xw4.js";
|
|
6
6
|
import {
|
|
7
7
|
hasToolCall,
|
|
8
8
|
init_dist
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-70banr6y.js";
|
|
10
10
|
import {
|
|
11
11
|
exports_external,
|
|
12
12
|
init_zod,
|
|
13
13
|
tool
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-avmhkjtv.js";
|
|
15
15
|
|
|
16
16
|
// src/core/agents/specialized/whiteboxAttackSurface/agent.ts
|
|
17
17
|
init_dist();
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EvidenceFileEntrySchema
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-pepts4ha.js";
|
|
4
4
|
import {
|
|
5
|
+
AttackPathSchema,
|
|
5
6
|
CweEntrySchema,
|
|
6
7
|
ValidatedCweEntrySchema,
|
|
7
8
|
hasCanonicalName
|
|
8
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-mjd75xw4.js";
|
|
9
10
|
import {
|
|
10
11
|
exports_external,
|
|
11
12
|
init_zod
|
|
12
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-avmhkjtv.js";
|
|
13
14
|
|
|
14
15
|
// src/core/report/schemas.ts
|
|
15
16
|
init_zod();
|
|
@@ -27,7 +28,8 @@ var PentestReportFindingSchema = exports_external.object({
|
|
|
27
28
|
rootCauseGroup: exports_external.string().optional(),
|
|
28
29
|
relatedFindings: exports_external.array(exports_external.string()).optional(),
|
|
29
30
|
rootCauseLead: exports_external.boolean().optional(),
|
|
30
|
-
evidenceFiles: exports_external.array(EvidenceFileEntrySchema).optional()
|
|
31
|
+
evidenceFiles: exports_external.array(EvidenceFileEntrySchema).optional(),
|
|
32
|
+
attackPath: AttackPathSchema.optional()
|
|
31
33
|
});
|
|
32
34
|
var PentestReportSchema = exports_external.object({
|
|
33
35
|
version: exports_external.string().regex(/^1\.\d+$/),
|
|
@@ -86,7 +88,8 @@ function buildPentestReport(findings, context) {
|
|
|
86
88
|
rootCauseGroup: f.rootCauseGroup,
|
|
87
89
|
relatedFindings: f.relatedFindings,
|
|
88
90
|
rootCauseLead: f.rootCauseLead,
|
|
89
|
-
evidenceFiles: f.evidenceFiles
|
|
91
|
+
evidenceFiles: f.evidenceFiles,
|
|
92
|
+
attackPath: f.attackPath
|
|
90
93
|
}))
|
|
91
94
|
};
|
|
92
95
|
}
|
|
@@ -141,6 +144,12 @@ function renderFinding(finding, metadata) {
|
|
|
141
144
|
"",
|
|
142
145
|
finding.impact,
|
|
143
146
|
"",
|
|
147
|
+
...finding.attackPath?.length ? [
|
|
148
|
+
"## Attack Path",
|
|
149
|
+
"",
|
|
150
|
+
...finding.attackPath.map(renderAttackPathHop),
|
|
151
|
+
""
|
|
152
|
+
] : [],
|
|
144
153
|
"## Evidence",
|
|
145
154
|
"",
|
|
146
155
|
"```",
|
|
@@ -187,6 +196,20 @@ function renderFinding(finding, metadata) {
|
|
|
187
196
|
return lines.join(`
|
|
188
197
|
`);
|
|
189
198
|
}
|
|
199
|
+
function renderAttackPathHop(hop, index) {
|
|
200
|
+
const parts = [];
|
|
201
|
+
if (hop.applicationName)
|
|
202
|
+
parts.push(`**${hop.applicationName}**`);
|
|
203
|
+
if (hop.applicationId)
|
|
204
|
+
parts.push(`(\`${hop.applicationId}\`)`);
|
|
205
|
+
if (hop.host)
|
|
206
|
+
parts.push(`host \`${hop.host}\``);
|
|
207
|
+
if (hop.relationshipType)
|
|
208
|
+
parts.push(`via ${hop.relationshipType}`);
|
|
209
|
+
if (hop.notes)
|
|
210
|
+
parts.push(`— ${hop.notes}`);
|
|
211
|
+
return `${index + 1}. ${parts.join(" ") || "Unspecified system member"}`;
|
|
212
|
+
}
|
|
190
213
|
|
|
191
214
|
// src/core/report/index.ts
|
|
192
215
|
var REPORT_FILENAME_MD = "pentest-report.md";
|