@pensar/apex 2.6.1 → 2.7.0-canary.52c132f4
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-yby11zaq.js → agent-112gdg69.js} +6 -6
- package/build/agent-9bh42v64.js +13 -0
- package/build/agent-jg7v2yn0.js +13 -0
- package/build/{agent-runs-g37vkrjr.js → agent-runs-hhjzsysf.js} +18 -18
- package/build/{agent-ayreaj6z.js → agent-ydy5fq92.js} +5 -5
- package/build/{apps-xn6km9yn.js → apps-v4jc7eqb.js} +13 -13
- package/build/{auth-d105wc64.js → auth-bxkn5pcb.js} +13 -13
- package/build/{blackboxAgent-s56sgx9b.js → blackboxAgent-260yqknt.js} +6 -6
- package/build/{blackboxPentest-ps78v3w7.js → blackboxPentest-nbn588pb.js} +17 -12
- package/build/{cli-3sp6nd8d.js → cli-087apjgk.js} +2 -2
- package/build/{cli-1ve18npr.js → cli-1wtxf161.js} +3 -2
- package/build/{cli-d37a42dc.js → cli-3158x9wb.js} +101 -18
- package/build/{cli-fy6vh2a7.js → cli-35gz0ahm.js} +1 -1
- package/build/{cli-65g6rcat.js → cli-5xdefy58.js} +1 -1
- package/build/{cli-709rvekb.js → cli-6vpprmxb.js} +4 -2
- package/build/{cli-az3xq70v.js → cli-8hrdnq0e.js} +1 -1
- package/build/{cli-7eea4e2y.js → cli-ahk627k3.js} +6 -6
- package/build/{cli-c05y640n.js → cli-bc793xfp.js} +1 -1
- package/build/{cli-ae8jqxqr.js → cli-cs7hsb1w.js} +2 -2
- package/build/{cli-qgz1q9g5.js → cli-ene4g09p.js} +223 -76
- package/build/{cli-gx71jcke.js → cli-k8m6737j.js} +1 -1
- package/build/{cli-dpsw2fe6.js → cli-mm2vxyne.js} +360 -187
- package/build/{cli-ngq9dr8n.js → cli-mpmpfce6.js} +3 -3
- package/build/{cli-kb21qhvm.js → cli-np9x97h3.js} +4 -3
- package/build/{cli-k2nwxta0.js → cli-tb77javm.js} +2 -2
- package/build/{cli-xtc2t6me.js → cli-wa52mx4p.js} +103 -39
- package/build/{cli-n2en7j5b.js → cli-xe4wq07r.js} +1 -1
- package/build/cli.js +70 -40
- package/build/{config-zpqkd5cz.js → config-gpxx6m5z.js} +1 -1
- package/build/{fastStrike-mcjdvwez.js → fastStrike-v0r461wn.js} +67 -15
- package/build/{fixes-kytx5dmj.js → fixes-c51d83b4.js} +13 -13
- package/build/{index-qv4cc65p.js → index-269a90mm.js} +13 -13
- package/build/{index-wqetp6gq.js → index-3ggmqh6x.js} +12 -7
- package/build/{index-4vqdgb42.js → index-e97991ve.js} +1473 -1217
- package/build/{index-n65z6v7b.js → index-ffay4gb2.js} +6 -6
- package/build/{index-ns4m4s01.js → index-gw6t92t5.js} +4 -4
- package/build/{index-dr3tg1w3.js → index-kkt51z6t.js} +1 -1
- package/build/{index-fv64eb32.js → index-kmaq2ym2.js} +2 -2
- package/build/{index-je6hcsqr.js → index-wgas3zgb.js} +1 -1
- package/build/{index-r9yjkfrv.js → index-xfqh0wte.js} +4 -4
- package/build/{issues-eb3q9d3a.js → issues-sq3zya6y.js} +13 -13
- package/build/{knowledge-fqsvtx0f.js → knowledge-kzd0cgcm.js} +13 -13
- package/build/lib/{chunk-r4j8ybn9.js → chunk-0parq6kp.js} +87 -36
- package/build/lib/{chunk-v3dk9j7k.js → chunk-2rcfbtpx.js} +80 -21
- package/build/lib/{chunk-acgbyf5h.js → chunk-5axh2ztr.js} +3 -2
- package/build/lib/{chunk-yrnrbjes.js → chunk-5qdc4rc6.js} +4 -2
- package/build/lib/{chunk-xhdpgpkm.js → chunk-61pnyq94.js} +2 -2
- package/build/lib/{chunk-1azdancq.js → chunk-7p9f6cxx.js} +1 -1
- package/build/lib/{chunk-z137x08b.js → chunk-7sexq62c.js} +7 -5
- package/build/lib/{chunk-ba41jh41.js → chunk-7zayxxn6.js} +304 -129
- package/build/lib/{chunk-3c00n0cy.js → chunk-83nets1m.js} +8 -3
- package/build/lib/{chunk-e8yy2k73.js → chunk-ajfd3s37.js} +28 -2
- package/build/lib/{chunk-4hwzqthr.js → chunk-ay1fx18z.js} +3 -2
- package/build/lib/{chunk-1fy8azee.js → chunk-bgnq735r.js} +1 -1
- package/build/lib/{chunk-mg03jdmt.js → chunk-eaanxcjj.js} +1 -1
- package/build/lib/{chunk-w66ce82a.js → chunk-f28sa6x2.js} +4 -2
- package/build/lib/{chunk-z96pbjhd.js → chunk-f6xde44n.js} +13 -6
- package/build/lib/{chunk-1jvwqnem.js → chunk-fvgehnst.js} +104 -40
- package/build/lib/{chunk-2qsq76xq.js → chunk-fy2a1dm3.js} +128 -34
- package/build/lib/{chunk-7pwa92rn.js → chunk-jqy0ftnp.js} +1 -1
- package/build/lib/{chunk-bb0ekhkw.js → chunk-k6erk6fv.js} +69 -18
- package/build/lib/{chunk-9tt2021m.js → chunk-s338j54x.js} +9 -9
- package/build/lib/{chunk-1yct6cra.js → chunk-se6sk7e4.js} +1 -1
- package/build/lib/{chunk-nhfax4gb.js → chunk-tdprhz5x.js} +1 -1
- package/build/lib/{chunk-r2dkp4tb.js → chunk-wbt03786.js} +1 -1
- package/build/lib/{chunk-9yksqgzr.js → chunk-yk43cvgb.js} +20 -13
- package/build/lib/core/agents/agentRuntime.d.ts +2 -1
- package/build/lib/core/agents/defineAgent.d.ts +3 -2
- package/build/lib/core/agents/offSecAgent/index.d.ts +3 -1
- package/build/lib/core/agents/offSecAgent/index.js +10 -8
- package/build/lib/core/agents/offSecAgent/prompt.d.ts +3 -1
- package/build/lib/core/agents/offSecAgent/subagentSpawner.d.ts +2 -1
- 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/offSecAgent/tools/listMemories.d.ts +11 -1
- package/build/lib/core/agents/offSecAgent/tools/reportError.d.ts +2 -1
- package/build/lib/core/agents/offSecAgent/tools/runPentestWorkflow.d.ts +20 -1
- package/build/lib/core/agents/offSecAgent/tools/spawnPentestAgent.d.ts +4 -7
- package/build/lib/core/agents/offSecAgent/tools/spawnPentestSwarm.d.ts +7 -1
- package/build/lib/core/agents/offSecAgent/tools/types.d.ts +2 -1
- package/build/lib/core/agents/offSecAgent/types.d.ts +7 -1
- 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/codeAgent/prompts.d.ts +1 -0
- 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.d.ts +18 -4
- package/build/lib/core/agents/specialized/pentest/agent.js +11 -9
- package/build/lib/core/agents/specialized/whiteboxAttackSurface/index.js +9 -9
- package/build/lib/core/ai/ai.d.ts +23 -6
- package/build/lib/core/ai/ai.js +2 -2
- package/build/lib/core/ai/index.js +2 -2
- package/build/lib/core/ai/models/claude-capabilities.d.ts +3 -2
- package/build/lib/core/ai/models/index.d.ts +1 -1
- package/build/lib/core/ai/utils.d.ts +2 -0
- package/build/lib/core/ai/utils.js +4 -2
- package/build/lib/core/api/index.d.ts +3 -0
- package/build/lib/core/api/index.js +22 -19
- package/build/lib/core/api/targetedPentest.d.ts +1 -0
- package/build/lib/core/api/targetedPentest.js +10 -10
- package/build/lib/core/config/config.d.ts +3 -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.d.ts +12 -0
- package/build/lib/core/session/index.js +2 -2
- package/build/lib/core/session/persistence.d.ts +7 -0
- package/build/lib/core/session/persistence.js +7 -3
- package/build/lib/core/workflows/fastStrike.d.ts +3 -1
- package/build/lib/core/workflows/pentest.d.ts +8 -1
- 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-x62b7hk1.js → logs-yk8dk6aa.js} +13 -13
- package/build/{native-rollout-evidence-c9yhfqcs.js → native-rollout-evidence-krpdfdv7.js} +3 -3
- package/build/{offesecAgent-5whnpeta.js → offesecAgent-aw87gf37.js} +4 -4
- package/build/pentest-t0p4nw2a.js +22 -0
- package/build/{pentests-e0f32aqx.js → pentests-577n3x75.js} +13 -13
- package/build/recordedRunClient-d7947b0z.js +11 -0
- package/build/{targetedPentest-rcbs4nvp.js → targetedPentest-7v849dtm.js} +18 -11
- package/build/{targets-xj9g3q0z.js → targets-3vjxv3yj.js} +13 -13
- package/build/threatModel-n0grwkav.js +21 -0
- package/build/{uninstall-7s784q4a.js → uninstall-ctv33v8j.js} +1 -1
- package/build/{upload-4gvhwmvr.js → upload-rnec235r.js} +4 -4
- package/build/{utils-cjrz64pc.js → utils-6420gkkg.js} +3 -3
- package/package.json +1 -1
- package/src/cli.ts +48 -14
- package/src/core/agents/agentRuntime.test.ts +38 -0
- package/src/core/agents/agentRuntime.ts +5 -2
- package/src/core/agents/defineAgent.ts +3 -1
- package/src/core/agents/offSecAgent/index.ts +3 -0
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.test.ts +92 -5
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.ts +70 -31
- package/src/core/agents/offSecAgent/prompt.test.ts +46 -0
- package/src/core/agents/offSecAgent/prompt.ts +52 -8
- package/src/core/agents/offSecAgent/selectiveConstruction.publicPath.test.ts +38 -0
- package/src/core/agents/offSecAgent/selectiveConstruction.test.ts +64 -0
- package/src/core/agents/offSecAgent/subagentSpawner.ts +12 -1
- package/src/core/agents/offSecAgent/tools/delegateAuth.ts +1 -0
- package/src/core/agents/offSecAgent/tools/listMemories.test.ts +230 -0
- package/src/core/agents/offSecAgent/tools/listMemories.ts +73 -6
- package/src/core/agents/offSecAgent/tools/reportError.test.ts +6 -0
- package/src/core/agents/offSecAgent/tools/reportError.ts +10 -2
- package/src/core/agents/offSecAgent/tools/runAttackSurface.ts +2 -0
- package/src/core/agents/offSecAgent/tools/runPentestWorkflow.test.ts +57 -0
- package/src/core/agents/offSecAgent/tools/runPentestWorkflow.ts +19 -1
- package/src/core/agents/offSecAgent/tools/runWhiteboxScan.ts +5 -2
- package/src/core/agents/offSecAgent/tools/spawnCodingAgent.ts +1 -0
- package/src/core/agents/offSecAgent/tools/spawnPentestAgent.test.ts +72 -2
- package/src/core/agents/offSecAgent/tools/spawnPentestAgent.ts +32 -11
- package/src/core/agents/offSecAgent/tools/spawnPentestSwarm.ts +25 -5
- package/src/core/agents/offSecAgent/tools/threatModelGenerator.ts +1 -0
- package/src/core/agents/offSecAgent/tools/types.ts +6 -1
- package/src/core/agents/offSecAgent/tools/updateTask.ts +5 -1
- package/src/core/agents/offSecAgent/tools/whiteboxCandidates.ts +11 -4
- package/src/core/agents/offSecAgent/types.ts +9 -0
- package/src/core/agents/specialized/codeAgent/agent.test.ts +7 -0
- package/src/core/agents/specialized/codeAgent/agent.ts +9 -2
- package/src/core/agents/specialized/codeAgent/prompts.ts +6 -0
- package/src/core/agents/specialized/pentest/agent.test.ts +116 -0
- package/src/core/agents/specialized/pentest/agent.ts +178 -49
- package/src/core/agents/specialized/pentest/results.test.ts +59 -4
- package/src/core/agents/specialized/whiteboxAttackSurface/endpointDocumentationAgent.ts +1 -0
- package/src/core/ai/ai.operator-context.bench.test.ts +1408 -0
- package/src/core/ai/ai.recorded-context.test.ts +74 -0
- package/src/core/ai/ai.test.ts +54 -0
- package/src/core/ai/ai.ts +299 -80
- package/src/core/ai/compactionTelemetry.test.ts +2 -2
- package/src/core/ai/models/anthropic.ts +6 -0
- package/src/core/ai/models/bedrock.ts +18 -0
- package/src/core/ai/models/claude-capabilities.ts +29 -8
- package/src/core/ai/models/index.ts +4 -1
- package/src/core/ai/models/models.test.ts +23 -0
- package/src/core/ai/models/openrouter.ts +6 -0
- package/src/core/ai/providers/anthropic-models.test.ts +60 -1
- package/src/core/ai/providers/bedrock-models.test.ts +81 -0
- package/src/core/ai/providers/gateway-models.test.ts +16 -6
- package/src/core/ai/utils.native-rollout-evidence.test.ts +1 -0
- package/src/core/ai/utils.ts +189 -143
- package/src/core/api/blackboxPentest.ts +9 -1
- package/src/core/api/index.ts +9 -0
- package/src/core/api/targetedPentest.ts +19 -5
- package/src/core/config/config.test.ts +35 -0
- package/src/core/config/config.ts +5 -0
- package/src/core/observability/telemetry.test.ts +2 -3
- package/src/core/session/index.ts +5 -0
- package/src/core/session/persistence.test.ts +62 -0
- package/src/core/session/persistence.ts +56 -0
- package/src/core/workflows/fastStrike.seams.test.ts +149 -0
- package/src/core/workflows/fastStrike.test.ts +18 -1
- package/src/core/workflows/fastStrike.ts +103 -11
- package/src/core/workflows/pentest.test.ts +104 -0
- package/src/core/workflows/pentest.ts +110 -7
- package/src/core/workflows/seams.test.ts +13 -0
- package/src/core/workflows/seams.ts +5 -1
- package/src/core/workflows/whiteboxAttackSurface.ts +1 -0
- package/src/tui/components/chat/loading-indicator.tsx +20 -4
- package/src/tui/components/chat/message-list.tsx +1 -0
- package/src/tui/components/commands/__tests__/advanced-settings-lifecycle.tsx +176 -0
- package/src/tui/components/commands/advanced-settings.test.ts +28 -0
- package/src/tui/components/commands/advanced-settings.tsx +237 -19
- package/src/tui/components/operator-dashboard/index.tsx +46 -9
- package/src/tui/components/operator-dashboard/logic.test.ts +106 -0
- package/src/tui/components/operator-dashboard/logic.ts +42 -2
- package/src/tui/components/operator-dashboard/run-events.test.ts +3 -1
- package/src/tui/components/shared/__tests__/tool-renderer-lifecycle.tsx +18 -0
- package/src/tui/components/shared/action-label.test.ts +9 -0
- package/src/tui/components/shared/compacting-icon.tsx +18 -0
- package/src/tui/components/shared/index.ts +1 -0
- package/src/tui/components/shared/tool-registry.ts +1 -0
- package/src/tui/components/shared/tool-renderer.tsx +21 -7
- package/src/tui/context/route.tsx +1 -0
- package/src/tui/keybindings/registry.ts +2 -0
- package/build/agent-6w7egcf1.js +0 -13
- package/build/agent-9zx75feh.js +0 -13
- package/build/pentest-e61hc38s.js +0 -22
- package/build/recordedRunClient-dp032c32.js +0 -11
- package/build/threatModel-jkxfa40s.js +0 -21
|
@@ -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-ene4g09p.js";
|
|
9
|
+
import"./cli-35gz0ahm.js";
|
|
10
|
+
import"./cli-bc793xfp.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-xe4wq07r.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-mm2vxyne.js";
|
|
23
23
|
import"./cli-c2k4xxaw.js";
|
|
24
24
|
import {
|
|
25
25
|
init_zod
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
import {
|
|
28
28
|
string,
|
|
29
29
|
boolean,
|
|
30
|
+
array,
|
|
30
31
|
object
|
|
31
32
|
} from "./cli-mz5pk30x.js";
|
|
32
33
|
|
|
@@ -38,7 +39,18 @@ var FastStrikeResult = object({
|
|
|
38
39
|
solved: boolean().describe("True if the objective was achieved — a vulnerability was confirmed and, where applicable, the flag or sensitive data was extracted."),
|
|
39
40
|
summary: string().describe("Concise account of the vulnerability exploited, the exact steps that worked, and any flag or sensitive data recovered.")
|
|
40
41
|
});
|
|
41
|
-
var
|
|
42
|
+
var FastStrikeExternalResult = object({
|
|
43
|
+
solved: boolean().describe("True if the supplied objective was met."),
|
|
44
|
+
summary: string().describe("Concise account of security findings and the evidence observed, including any flag or sensitive data extracted for an exfiltration objective."),
|
|
45
|
+
reportedFindings: array(string()).describe("One concise evidence-backed description per discovered vulnerability."),
|
|
46
|
+
submissionJson: string().describe("The exact task-defined JSON submission as a string, or an empty string when no JSON submission was requested. Do not invent fields.")
|
|
47
|
+
});
|
|
48
|
+
function buildFastStrikeSystemPrompt(findingPolicy = "native") {
|
|
49
|
+
const external = findingPolicy === "external";
|
|
50
|
+
const objectiveStep = external ? "5. FOLLOW THE OBJECTIVE — Determine whether the observed behavior establishes a security weakness. For a detection-only objective, stop once the requested evidence is sufficient; develop an exploit or pivot only when the objective requires it." : "5. EXPLOIT — When a vulnerability is confirmed, exploit it: capture the flag, extract the sensitive data, and pivot through it if the objective requires more. Preserve viable primitives and build on them. Prefer extending a working script into an end-to-end exploit over rebuilding the chain with repeated one-off tool calls or stopping at the next network or protocol boundary.";
|
|
51
|
+
const finishStep = external ? "6. REPORT & FINISH — Include each credible finding and its supporting observations in the caller's requested output. If the caller requested a JSON submission, include the exact JSON text in the response tool's submissionJson field as well; otherwise use an empty string. The caller evaluates findings after the run. Once the objective is met or credible leads are exhausted, call the response tool with the correct solved value and a concise summary." : "6. DOCUMENT & FINISH — Record each confirmed vulnerability with the document_vulnerability tool as you go. Before concluding that every credible lead is exhausted, account for each viable primitive and pursue any concrete path that could still close the objective. After this check, whether the objective was met or every credible lead was genuinely exhausted, call the response tool with the correct solved value and a concise summary.";
|
|
52
|
+
const evidenceRule = external ? "- Bias toward the shortest path that satisfies the assigned objective. Distinguish observed evidence from hypotheses, and avoid separate in-run finding review." : "- Bias toward the shortest path that proves impact. Speed comes from picking the right lead, not from skipping verification — always confirm a finding before you claim it.";
|
|
53
|
+
return `You are an elite offensive security operator running a fast strike against a single target. You work ALONE and finish the job yourself — there is no team to hand off to, no swarm to spawn, no plan to file. Your edge is discipline and observation, not volume.
|
|
42
54
|
|
|
43
55
|
Run this loop, tightly:
|
|
44
56
|
|
|
@@ -46,15 +58,17 @@ Run this loop, tightly:
|
|
|
46
58
|
2. HYPOTHESIZE — From that signal and your deep knowledge of web/app vulnerability classes, name the single most likely vulnerability and why the evidence points to it. Rank leads by signal strength and go for the strongest first. A disabled form field, an ID in a URL or JWT, advertised demo creds, an exposed schema — these are tells; read them.
|
|
47
59
|
3. ACT — Test that one hypothesis with the strongest available technique. Use direct tools for quick probes, but treat the shell as a working environment rather than merely a way to issue one-off commands. When the work becomes stateful, repetitive, concurrent, protocol-heavy, or multi-stage, externalize it into an editable script in the session scratchpad directory identified in the workspace instructions. Never create a scratchpad/ directory inside the target repository. Run the script, inspect the results, modify it, and rerun it as the attack develops. For blind/out-of-band testing (SSRF, blind RCE, XSS callbacks), start_callback_listener gives you a nonce-correlated listener that survives intervening commands: embed the returned callback URL (only an address you know the target can reach — never a guessed one) in the payload, then poll_callback_listener for hits. Listener readiness and the tool's own self-test never count as target evidence; stop_callback_listener when done.
|
|
48
60
|
4. PRUNE — If the evidence disproves a lead, drop it and move to the next-strongest. Do NOT re-run a disproven approach or grind a dead end. Do NOT enumerate, brute-force, or run wordlists unless a specific signal demands it — choose techniques from evidence, not from a checklist.
|
|
49
|
-
|
|
50
|
-
|
|
61
|
+
${objectiveStep}
|
|
62
|
+
${finishStep}
|
|
51
63
|
|
|
52
64
|
Rules:
|
|
53
65
|
- You are one operator. Plan in your head and in short text notes — never via planning tools, task lists, or sub-agents.
|
|
54
66
|
- Recon and exploitation are the same loop. Do just enough recon to form the first hypothesis, then start testing. Do not map the entire surface before acting.
|
|
55
67
|
- Spend your reasoning on choosing techniques and interpreting evidence; use scripts for deterministic mechanics, iteration, and chain execution.
|
|
56
|
-
|
|
68
|
+
${evidenceRule}
|
|
57
69
|
- Stay in scope. Only touch the target you were given and hosts it legitimately depends on.`;
|
|
70
|
+
}
|
|
71
|
+
var FAST_STRIKE_SYSTEM_PROMPT = buildFastStrikeSystemPrompt();
|
|
58
72
|
async function runFastStrike(input) {
|
|
59
73
|
const {
|
|
60
74
|
target,
|
|
@@ -67,6 +81,7 @@ async function runFastStrike(input) {
|
|
|
67
81
|
onStepFinish,
|
|
68
82
|
onCacheMetrics,
|
|
69
83
|
enableThinking,
|
|
84
|
+
thinkingEffort,
|
|
70
85
|
openAIReasoningEffort,
|
|
71
86
|
prompt,
|
|
72
87
|
threatModel,
|
|
@@ -107,6 +122,7 @@ async function runFastStrike(input) {
|
|
|
107
122
|
${combined}` : combined;
|
|
108
123
|
}
|
|
109
124
|
const operatorGuidance = session.config?.prompt;
|
|
125
|
+
const findingPolicy = input.hooks?.findingPolicy ?? input.findingPolicy;
|
|
110
126
|
const mode = cwd ? "whitebox" : "blackbox";
|
|
111
127
|
eventBus?.emit("workflow-phase-start", {
|
|
112
128
|
phase: "pentesting",
|
|
@@ -117,14 +133,17 @@ ${combined}` : combined;
|
|
|
117
133
|
const promptParts = [`Target: ${target}`];
|
|
118
134
|
if (operatorGuidance)
|
|
119
135
|
promptParts.push(operatorGuidance);
|
|
120
|
-
promptParts.push("Run the fast strike: find and exploit the vulnerability, complete the objective, and report what worked.");
|
|
136
|
+
promptParts.push(findingPolicy === "external" ? "Run the fast strike: investigate the target, identify security weaknesses, and submit the findings in the requested output. Stop when the supplied objective is met." : "Run the fast strike: find and exploit the vulnerability, complete the objective, and report what worked.");
|
|
137
|
+
if (findingPolicy === "external" && session.config?.exfilMode) {
|
|
138
|
+
promptParts.push("Exfiltration goal: locate and extract FLAG{...} or the assigned sensitive data through a confirmed weakness. Do not stop at discovery; include the extraction result in the final summary.");
|
|
139
|
+
}
|
|
121
140
|
const agent = new OffensiveSecurityAgent({
|
|
122
141
|
subagentSpawner: input.subagentSpawner,
|
|
123
142
|
languageModelMiddleware: input.languageModelMiddleware,
|
|
124
143
|
usageRecorder: input.usageRecorder,
|
|
125
144
|
streamIdFactory: input.streamIdFactory,
|
|
126
145
|
...input.hooks,
|
|
127
|
-
system:
|
|
146
|
+
system: buildFastStrikeSystemPrompt(findingPolicy),
|
|
128
147
|
prompt: promptParts.join(`
|
|
129
148
|
|
|
130
149
|
`),
|
|
@@ -132,8 +151,9 @@ ${combined}` : combined;
|
|
|
132
151
|
session,
|
|
133
152
|
target,
|
|
134
153
|
mode: "fast-strike",
|
|
154
|
+
findingPolicy,
|
|
135
155
|
activeTools: [],
|
|
136
|
-
responseSchema: FastStrikeResult,
|
|
156
|
+
responseSchema: findingPolicy === "external" ? FastStrikeExternalResult : FastStrikeResult,
|
|
137
157
|
findingsRegistry,
|
|
138
158
|
subagentId: "fast-strike",
|
|
139
159
|
authConfig,
|
|
@@ -142,6 +162,7 @@ ${combined}` : combined;
|
|
|
142
162
|
onStepFinish,
|
|
143
163
|
onCacheMetrics,
|
|
144
164
|
enableThinking,
|
|
165
|
+
thinkingEffort,
|
|
145
166
|
openAIReasoningEffort
|
|
146
167
|
});
|
|
147
168
|
eventBus?.emit("subagent-spawn", {
|
|
@@ -154,14 +175,23 @@ ${combined}` : combined;
|
|
|
154
175
|
subagentName: "Fast Strike",
|
|
155
176
|
target
|
|
156
177
|
});
|
|
157
|
-
let
|
|
178
|
+
let completed;
|
|
158
179
|
try {
|
|
159
|
-
strikeResult = await agent.consume();
|
|
180
|
+
const strikeResult = await agent.consume();
|
|
181
|
+
if (findingPolicy === "external") {
|
|
182
|
+
const parsed = FastStrikeExternalResult.safeParse(strikeResult);
|
|
183
|
+
if (!parsed.success) {
|
|
184
|
+
throw new Error("Externally graded Fast Strike ended without a structured findings response");
|
|
185
|
+
}
|
|
186
|
+
completed = { policy: "external", outcome: parsed.data };
|
|
187
|
+
} else {
|
|
188
|
+
completed = { policy: "native", outcome: strikeResult };
|
|
189
|
+
}
|
|
160
190
|
eventBus?.emit("subagent-complete", {
|
|
161
191
|
subagentId: "fast-strike",
|
|
162
192
|
status: "completed"
|
|
163
193
|
});
|
|
164
|
-
await seams.hooks.onEndpointDone?.({ subagentId: "fast-strike", subagentName: "Fast Strike", target },
|
|
194
|
+
await seams.hooks.onEndpointDone?.({ subagentId: "fast-strike", subagentName: "Fast Strike", target }, completed.outcome);
|
|
165
195
|
} catch (e) {
|
|
166
196
|
eventBus?.emit("subagent-complete", {
|
|
167
197
|
subagentId: "fast-strike",
|
|
@@ -173,8 +203,30 @@ ${combined}` : combined;
|
|
|
173
203
|
if (abortSignal?.aborted) {
|
|
174
204
|
throw new DOMException("Pentest aborted by user", "AbortError");
|
|
175
205
|
}
|
|
206
|
+
if (completed.policy === "external") {
|
|
207
|
+
const strikeResult = completed.outcome;
|
|
208
|
+
eventBus?.emit("workflow-phase-complete", {
|
|
209
|
+
phase: "pentesting",
|
|
210
|
+
summary: {
|
|
211
|
+
findingsCount: strikeResult.reportedFindings.length,
|
|
212
|
+
solved: strikeResult.solved,
|
|
213
|
+
operatorSummary: strikeResult.summary
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
return {
|
|
217
|
+
findings: [],
|
|
218
|
+
findingsPath: session.findingsPath,
|
|
219
|
+
pocsPath: session.pocsPath,
|
|
220
|
+
reportPath: null,
|
|
221
|
+
reportedFindings: strikeResult.reportedFindings,
|
|
222
|
+
submissionJson: strikeResult.submissionJson,
|
|
223
|
+
solved: strikeResult.solved,
|
|
224
|
+
summary: strikeResult.summary
|
|
225
|
+
};
|
|
226
|
+
}
|
|
176
227
|
await findingsRegistry.groupByRootCause();
|
|
177
228
|
const findings = [...findingsRegistry.getFindings()];
|
|
229
|
+
const strikeResult = completed.outcome;
|
|
178
230
|
const report = buildPentestReport(findings, {
|
|
179
231
|
target,
|
|
180
232
|
model,
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import"./cli-
|
|
3
|
-
import"./cli-
|
|
2
|
+
import"./cli-ene4g09p.js";
|
|
3
|
+
import"./cli-35gz0ahm.js";
|
|
4
|
+
import"./cli-bc793xfp.js";
|
|
4
5
|
import {
|
|
5
6
|
listFixes2,
|
|
6
7
|
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-n2en7j5b.js";
|
|
8
|
+
} from "./cli-ahk627k3.js";
|
|
9
|
+
import"./cli-tb77javm.js";
|
|
10
|
+
import"./cli-np9x97h3.js";
|
|
11
|
+
import"./cli-mpmpfce6.js";
|
|
12
|
+
import"./cli-3158x9wb.js";
|
|
13
|
+
import"./cli-087apjgk.js";
|
|
14
|
+
import"./cli-wa52mx4p.js";
|
|
15
|
+
import"./cli-xe4wq07r.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-1wtxf161.js";
|
|
21
21
|
import"./cli-qba2x69h.js";
|
|
22
|
-
import"./cli-
|
|
22
|
+
import"./cli-mm2vxyne.js";
|
|
23
23
|
import"./cli-c2k4xxaw.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/fixes.ts
|
|
@@ -32,16 +32,16 @@ import {
|
|
|
32
32
|
RunRecoveryBlockedError2,
|
|
33
33
|
resumeRecordedAgent2,
|
|
34
34
|
serveLocalRunWorker2
|
|
35
|
-
} from "./cli-
|
|
35
|
+
} from "./cli-ahk627k3.js";
|
|
36
36
|
import"./cli-xcy2vxj2.js";
|
|
37
|
-
import"./cli-
|
|
38
|
-
import"./cli-
|
|
39
|
-
import"./cli-
|
|
40
|
-
import"./cli-
|
|
41
|
-
import"./cli-
|
|
42
|
-
import"./cli-
|
|
43
|
-
import"./cli-
|
|
44
|
-
import"./cli-
|
|
37
|
+
import"./cli-3158x9wb.js";
|
|
38
|
+
import"./cli-xe4wq07r.js";
|
|
39
|
+
import"./cli-mpmpfce6.js";
|
|
40
|
+
import"./cli-tb77javm.js";
|
|
41
|
+
import"./cli-087apjgk.js";
|
|
42
|
+
import"./cli-wa52mx4p.js";
|
|
43
|
+
import"./cli-np9x97h3.js";
|
|
44
|
+
import"./cli-1wtxf161.js";
|
|
45
45
|
import"./cli-qba2x69h.js";
|
|
46
46
|
import {
|
|
47
47
|
ENDPOINT_TRANSPORTS2,
|
|
@@ -59,14 +59,14 @@ import {
|
|
|
59
59
|
searchEndpoints2,
|
|
60
60
|
listDomains2,
|
|
61
61
|
createDomain2
|
|
62
|
-
} from "./cli-
|
|
63
|
-
import"./cli-
|
|
62
|
+
} from "./cli-ene4g09p.js";
|
|
63
|
+
import"./cli-mm2vxyne.js";
|
|
64
64
|
import {
|
|
65
65
|
getPensarApiUrl2,
|
|
66
66
|
getPensarConsoleUrl2
|
|
67
|
-
} from "./cli-
|
|
67
|
+
} from "./cli-bc793xfp.js";
|
|
68
68
|
import"./cli-c2k4xxaw.js";
|
|
69
|
-
import"./cli-
|
|
69
|
+
import"./cli-35gz0ahm.js";
|
|
70
70
|
export {
|
|
71
71
|
CLOSED_DISPOSITIONS2 as CLOSED_DISPOSITIONS,
|
|
72
72
|
ENDPOINT_TRANSPORTS2 as ENDPOINT_TRANSPORTS,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import"./cli-
|
|
2
|
-
import"./cli-
|
|
1
|
+
import"./cli-35gz0ahm.js";
|
|
2
|
+
import"./cli-bc793xfp.js";
|
|
3
3
|
import {
|
|
4
4
|
generateRandomName,
|
|
5
5
|
generateSessionName,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
init_storage,
|
|
17
17
|
ToolsetStateSchema,
|
|
18
18
|
init_toolset
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-mm2vxyne.js";
|
|
20
20
|
import {
|
|
21
21
|
schema,
|
|
22
22
|
descending,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
getCurrentVersion,
|
|
43
43
|
init_installation
|
|
44
|
-
} from "./cli-
|
|
44
|
+
} from "./cli-5xdefy58.js";
|
|
45
45
|
|
|
46
46
|
// src/core/session/index.ts
|
|
47
47
|
init_zod();
|
|
@@ -91,7 +91,8 @@ var OperatorSettingsObject = object({
|
|
|
91
91
|
initialMode: _enum(["plan", "manual", "auto"]).default("manual"),
|
|
92
92
|
requireApproval: boolean().default(true),
|
|
93
93
|
enableSuggestions: boolean().default(true),
|
|
94
|
-
strikeMode: boolean().optional()
|
|
94
|
+
strikeMode: boolean().optional(),
|
|
95
|
+
findingPolicy: _enum(["native", "external"]).optional()
|
|
95
96
|
});
|
|
96
97
|
var EmailInboxConfigObject = discriminatedUnion("provider", [
|
|
97
98
|
object({
|
|
@@ -336,7 +337,7 @@ async function create(input) {
|
|
|
336
337
|
} else if (input.inheritEnvironmentConfig === false) {
|
|
337
338
|
snapshotHeaders = {};
|
|
338
339
|
} else {
|
|
339
|
-
const { config: appConfig } = await import("./index-
|
|
340
|
+
const { config: appConfig } = await import("./index-kkt51z6t.js");
|
|
340
341
|
const cfg = await appConfig.get();
|
|
341
342
|
snapshotHeaders = cfg.defaultHeaders ? { ...cfg.defaultHeaders } : { ...DEFAULT_HEADER_RECORD };
|
|
342
343
|
}
|
|
@@ -527,7 +528,8 @@ async function updateOperatorSettings(sessionId, settings) {
|
|
|
527
528
|
initialMode: "manual",
|
|
528
529
|
requireApproval: true,
|
|
529
530
|
enableSuggestions: true,
|
|
530
|
-
strikeMode: false
|
|
531
|
+
strikeMode: false,
|
|
532
|
+
findingPolicy: "native"
|
|
531
533
|
};
|
|
532
534
|
}
|
|
533
535
|
if (settings.initialMode !== undefined) {
|
|
@@ -542,6 +544,9 @@ async function updateOperatorSettings(sessionId, settings) {
|
|
|
542
544
|
if (settings.strikeMode !== undefined) {
|
|
543
545
|
session.config.operatorSettings.strikeMode = settings.strikeMode;
|
|
544
546
|
}
|
|
547
|
+
if (settings.findingPolicy !== undefined) {
|
|
548
|
+
session.config.operatorSettings.findingPolicy = settings.findingPolicy;
|
|
549
|
+
}
|
|
545
550
|
});
|
|
546
551
|
}
|
|
547
552
|
async function updateSessionHeaders(sessionId, headers) {
|