@pensar/apex 2.7.0-canary.e18bef4d → 2.7.0-canary.f7d630b6
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/README.md +50 -0
- package/build/{agent-pdaya70z.js → agent-25gwz2r5.js} +17 -9
- package/build/agent-2mbcdfnr.js +81 -0
- package/build/agent-8rym304q.js +14 -0
- package/build/agent-h4q2qbrd.js +14 -0
- package/build/{agent-y7w88qe9.js → agent-q1pp19sj.js} +7 -7
- package/build/{agent-runs-f0fpf651.js → agent-runs-nkh6k5re.js} +20 -20
- package/build/{apps-6hstfsy5.js → apps-9hhberd3.js} +17 -17
- package/build/{auth-sdg0sqa0.js → auth-7h04pwxq.js} +17 -17
- package/build/blackboxAgent-9k41bnmd.js +14 -0
- package/build/{blackboxPentest-1850fx09.js → blackboxPentest-rw3t2jmx.js} +12 -12
- package/build/{cli-0wsh8j2t.js → cli-00nmqwmq.js} +6 -6
- package/build/{cli-se8ae8z3.js → cli-0rhfexax.js} +3 -3
- package/build/{cli-gt29d4q6.js → cli-1sejsyt5.js} +43 -23
- package/build/{cli-z85qmtjd.js → cli-27sjhcnt.js} +6642 -1307
- package/build/cli-2httdr6q.js +29 -0
- package/build/cli-4fkaes4s.js +1199 -0
- package/build/{cli-67d2744b.js → cli-4pmek04p.js} +16 -52
- package/build/{cli-1qyejhv5.js → cli-55jke7bk.js} +2 -2
- package/build/{cli-7xf5h4pb.js → cli-69vcn7a7.js} +77 -8
- package/build/{cli-tmr100n4.js → cli-6b3fnw71.js} +1 -1
- package/build/{cli-ssstde7z.js → cli-76pqdrw5.js} +1 -1
- package/build/{cli-gsaf4jk3.js → cli-7898kznf.js} +2 -2
- package/build/{cli-9dka0an3.js → cli-9b3x3trx.js} +2 -2
- package/build/{cli-xcy2vxj2.js → cli-ak23knae.js} +1 -1
- package/build/{cli-k46jmzbs.js → cli-bjvcjes3.js} +79 -46
- package/build/{cli-4h9d98y6.js → cli-bk4x36vj.js} +1 -1
- package/build/{cli-c29xr0h0.js → cli-bq2n4nd8.js} +2 -2
- package/build/{cli-1h046yxp.js → cli-bvwhhm6a.js} +1 -1
- package/build/{cli-vfkmdrkb.js → cli-e1mks1dc.js} +153 -3
- package/build/{cli-qmt07txj.js → cli-enqe6bcb.js} +24 -12
- package/build/{cli-qp8413xr.js → cli-fw0r700s.js} +292 -24
- package/build/{cli-fnth71q3.js → cli-grkzfmsc.js} +2 -2
- package/build/{cli-y1z3vemx.js → cli-hdtc520e.js} +1 -1
- package/build/{cli-3gt761d2.js → cli-j0wfj2kw.js} +6 -0
- package/build/{cli-739g9qgd.js → cli-jrscs7aw.js} +1649 -472
- package/build/{cli-zs7rp1f6.js → cli-md8azc7a.js} +4 -4
- package/build/{cli-gy5stwkg.js → cli-q6h43c9v.js} +6 -1
- package/build/{cli-rv2d03xr.js → cli-vgbrtb0q.js} +1 -1
- package/build/cli-xs69gx66.js +100 -0
- package/build/{cli-pwm29ks7.js → cli-ychebg4z.js} +16 -16
- package/build/cli.js +177 -94
- package/build/{config-kgz8rzkt.js → config-regttqtz.js} +1 -1
- package/build/{doctor-z94afr10.js → doctor-srja68wr.js} +1 -0
- package/build/emscripten-module-kzkvkeqz.js +503 -0
- package/build/{export-trajectory-rt4tf07k.js → export-trajectory-ex317s0n.js} +1 -1
- package/build/{fastStrike-65d7njyn.js → fastStrike-h6xdrh4n.js} +16 -9
- package/build/ffi-pf145jhd.js +78 -0
- package/build/{fixes-xmq89hve.js → fixes-sebrwnn8.js} +17 -17
- package/build/{index-hx133hms.js → index-3z3y73bw.js} +6 -4
- package/build/{index-t0p01qg4.js → index-44ezhe0c.js} +21 -6
- package/build/{index-27xpg3k0.js → index-7rv94pxs.js} +1382 -1142
- package/build/{index-js3zc3cb.js → index-edyd3y71.js} +2 -2
- package/build/{index-qnyevb6q.js → index-ffe5c30s.js} +13 -13
- package/build/{index-wh328kzg.js → index-kq7qxs2y.js} +1 -1
- package/build/{index-pvm55x85.js → index-qf5dsf99.js} +1 -1
- package/build/{index-cxa5jxva.js → index-sk0w7023.js} +5 -5
- package/build/{index-1z234ygf.js → index-tnzz7fxt.js} +7 -7
- package/build/{index-m6graaat.js → index-z2jt4tgv.js} +21 -17
- package/build/{issues-rscc7pny.js → issues-kyb5711j.js} +52 -25
- package/build/{knowledge-5vd451za.js → knowledge-kaht3gx0.js} +17 -17
- package/build/{lance-s26xde23.js → lance-272zk3sq.js} +8 -8
- package/build/lance-budget-ezkt15v5.js +52 -0
- package/build/lib/{chunk-1gb8gefz.js → chunk-15pck5s4.js} +1369 -922
- package/build/lib/chunk-2fnyp7w4.js +107 -0
- package/build/lib/{chunk-h9h4t4gc.js → chunk-2n3kx849.js} +25 -13
- package/build/lib/{chunk-j84kpwgp.js → chunk-2nk6w459.js} +2 -2
- package/build/lib/{chunk-6j0mc5qw.js → chunk-3821y34j.js} +234 -48
- package/build/lib/{chunk-j0qn7hzk.js → chunk-38rext6w.js} +2 -2
- package/build/lib/{chunk-6q0xnkda.js → chunk-3dbq462d.js} +47 -4
- package/build/lib/chunk-3jhaybr5.js +8 -0
- package/build/lib/{chunk-rsv4feh8.js → chunk-46198c8f.js} +1 -1
- package/build/lib/chunk-7734wct9.js +100 -0
- package/build/lib/{chunk-nctbsa6r.js → chunk-aks10fcy.js} +6 -1
- package/build/lib/{chunk-66hd85x8.js → chunk-aphe9h5t.js} +1 -1
- package/build/lib/chunk-brcz9tw6.js +100 -0
- package/build/lib/{chunk-cmb702kp.js → chunk-cp7vwv40.js} +3 -1
- package/build/lib/{chunk-4x6t39xs.js → chunk-dvfastyn.js} +34 -16
- package/build/lib/chunk-esd67mhc.js +315 -0
- package/build/lib/{chunk-3mgmff3q.js → chunk-f4z70mmf.js} +1288 -90
- package/build/lib/chunk-gq2d4891.js +258 -0
- package/build/lib/chunk-h0rr779d.js +18 -0
- package/build/lib/{chunk-a3edjxz9.js → chunk-ht9c77k6.js} +13 -13
- package/build/lib/{chunk-12qns4xq.js → chunk-j3vadvd8.js} +1 -1
- package/build/lib/{chunk-vwr9w3ab.js → chunk-m6cb9zce.js} +26 -0
- package/build/lib/{chunk-2yv9vekb.js → chunk-m8nxmvbt.js} +1 -1
- package/build/lib/{chunk-7jfqqwyq.js → chunk-mb9j4kwd.js} +25 -13
- package/build/lib/chunk-pgm6zjes.js +154 -0
- package/build/lib/{chunk-5gk78665.js → chunk-pkftqdmx.js} +1 -1
- package/build/lib/{chunk-pzv4df99.js → chunk-rpyx8xkf.js} +1 -1
- package/build/lib/{chunk-5wqbq9hw.js → chunk-rtzgs3gx.js} +1 -1
- package/build/lib/{chunk-wtz8qt8q.js → chunk-th4vs9mm.js} +1186 -333
- package/build/lib/{chunk-mdfneahm.js → chunk-wnfcqxeb.js} +369 -145
- package/build/lib/{chunk-5avnedwm.js → chunk-xzdky6sk.js} +723 -279
- package/build/lib/chunk-y2eqw6ha.js +1067 -0
- package/build/lib/{chunk-kcq1qb6n.js → chunk-yeh3hr5k.js} +17 -57
- package/build/lib/{chunk-2q39y7g0.js → chunk-yejp5mrj.js} +28 -4
- package/build/lib/{chunk-jjqcnbz9.js → chunk-zs4tcxt1.js} +20 -16
- package/build/lib/core/agents/agentRuntime.d.ts +6 -1
- package/build/lib/core/agents/lance.d.ts +19 -9
- package/build/lib/core/agents/lanceBudget.d.ts +11 -0
- package/build/lib/core/agents/offSecAgent/index.js +24 -20
- package/build/lib/core/agents/offSecAgent/offensiveSecurityAgent.d.ts +7 -1
- package/build/lib/core/agents/offSecAgent/runtimeContext.d.ts +1 -0
- package/build/lib/core/agents/offSecAgent/subagentSpawner.d.ts +12 -2
- package/build/lib/core/agents/offSecAgent/subagentSpawner.js +7 -6
- package/build/lib/core/agents/offSecAgent/toolLifecycle.d.ts +3 -0
- package/build/lib/core/agents/offSecAgent/tools/browserHeaderRouting.d.ts +2 -0
- package/build/lib/core/agents/offSecAgent/tools/callbackHits.d.ts +34 -0
- package/build/lib/core/agents/offSecAgent/tools/cloneRepository.d.ts +30 -0
- package/build/lib/core/agents/offSecAgent/tools/createAttackSurfaceReport.d.ts +3 -2
- package/build/lib/core/agents/offSecAgent/tools/documentApp.d.ts +9 -0
- package/build/lib/core/agents/offSecAgent/tools/documentFinding.d.ts +22 -3
- package/build/lib/core/agents/offSecAgent/tools/documentTopology.d.ts +263 -0
- package/build/lib/core/agents/offSecAgent/tools/getPage.d.ts +1 -2
- package/build/lib/core/agents/offSecAgent/tools/httpPoc.d.ts +30 -0
- package/build/lib/core/agents/offSecAgent/tools/httpRequest.d.ts +2 -2
- package/build/lib/core/agents/offSecAgent/tools/index.d.ts +48 -0
- package/build/lib/core/agents/offSecAgent/tools/index.js +43 -14
- package/build/lib/core/agents/offSecAgent/tools/listTasks.d.ts +1 -1
- package/build/lib/core/agents/offSecAgent/tools/scopeGuard.d.ts +13 -18
- package/build/lib/core/agents/offSecAgent/tools/spawnReconAgent.d.ts +36 -0
- package/build/lib/core/agents/offSecAgent/tools/toolOutput.d.ts +2 -1
- package/build/lib/core/agents/offSecAgent/tools/topologyDuplicates.d.ts +16 -0
- package/build/lib/core/agents/offSecAgent/tools/topologyMermaid.d.ts +37 -0
- package/build/lib/core/agents/offSecAgent/tools/topologyMermaid.js +6 -0
- package/build/lib/core/agents/offSecAgent/tools/topologyRecords.d.ts +91 -0
- package/build/lib/core/agents/offSecAgent/tools/topologyRecords.js +28 -0
- package/build/lib/core/agents/offSecAgent/tools/types.d.ts +7 -2
- package/build/lib/core/agents/offSecAgent/tools/updateTask.d.ts +1 -1
- package/build/lib/core/agents/offSecAgent/tools/webSearch.d.ts +9 -1
- package/build/lib/core/agents/offSecAgent/tools/whiteboxCandidates.d.ts +1 -1
- package/build/lib/core/agents/offSecAgent/types.d.ts +26 -5
- package/build/lib/core/agents/specialized/attackSurface/blackboxAgent.js +20 -16
- package/build/lib/core/agents/specialized/attackSurface/generalizedAgent.d.ts +68 -0
- package/build/lib/core/agents/specialized/attackSurface/generalizedAgent.js +40 -0
- package/build/lib/core/agents/specialized/attackSurface/generalizedPrompts.d.ts +10 -0
- package/build/lib/core/agents/specialized/attackSurface/prompts.d.ts +1 -1
- package/build/lib/core/agents/specialized/attackSurface/reconToolset.d.ts +15 -0
- package/build/lib/core/agents/specialized/attackSurface/reconUpdate.d.ts +64 -0
- package/build/lib/core/agents/specialized/attackSurface/reconUpdate.js +19 -0
- package/build/lib/core/agents/specialized/attackSurface/schemas.js +15 -11
- package/build/lib/core/agents/specialized/authenticationAgent/index.js +21 -17
- package/build/lib/core/agents/specialized/authenticationAgent/types.d.ts +3 -3
- package/build/lib/core/agents/specialized/codeAgent/agent.js +20 -16
- package/build/lib/core/agents/specialized/environment/agent.d.ts +1 -1
- package/build/lib/core/agents/specialized/environment/types.d.ts +1 -1
- package/build/lib/core/agents/specialized/findingJudge/agent.js +25 -13
- package/build/lib/core/agents/specialized/findingJudge/index.d.ts +1 -1
- package/build/lib/core/agents/specialized/findingJudge/index.js +4 -3
- package/build/lib/core/agents/specialized/findingJudge/prompts.d.ts +2 -1
- package/build/lib/core/agents/specialized/patching/index.js +21 -17
- package/build/lib/core/agents/specialized/pentest/agent.d.ts +4 -2
- package/build/lib/core/agents/specialized/pentest/agent.js +20 -16
- package/build/lib/core/agents/specialized/reconWorker/agent.d.ts +23 -0
- package/build/lib/core/agents/specialized/reconWorker/agent.js +98 -0
- package/build/lib/core/agents/specialized/reconWorker/prompts.d.ts +2 -0
- package/build/lib/core/agents/specialized/siemTriage/agent.d.ts +225 -0
- package/build/lib/core/agents/specialized/siemTriage/aws.d.ts +22 -0
- package/build/lib/core/agents/specialized/siemTriage/aws.js +6 -0
- package/build/lib/core/agents/specialized/vulnerabilityReproduction/agent.d.ts +3 -3
- package/build/lib/core/agents/specialized/whiteboxAttackSurface/index.js +20 -16
- package/build/lib/core/ai/ai.d.ts +43 -5
- package/build/lib/core/ai/ai.js +10 -3
- package/build/lib/core/ai/compactionPrompts.d.ts +6 -0
- package/build/lib/core/ai/contextManagement.d.ts +19 -4
- package/build/lib/core/ai/failedToolCallHistory.d.ts +9 -0
- package/build/lib/core/ai/incompleteModelStream.d.ts +4 -0
- package/build/lib/core/ai/index.d.ts +7 -2
- package/build/lib/core/ai/index.js +14 -3
- package/build/lib/core/ai/inference-attempt/envelope.d.ts +1 -1
- package/build/lib/core/ai/inference-attempt/recording.d.ts +1 -1
- package/build/lib/core/ai/modelRuntime.d.ts +10 -0
- package/build/lib/core/ai/modelStreamDrain.d.ts +3 -0
- package/build/lib/core/ai/models/index.d.ts +2 -1
- package/build/lib/core/ai/models/inference.d.ts +2 -0
- package/build/lib/core/ai/models/openrouter.d.ts +1 -0
- package/build/lib/core/ai/native-rollout-evidence/schema.d.ts +3 -3
- package/build/lib/core/ai/providers/concentrate.d.ts +2 -0
- package/build/lib/core/ai/providers/ollama.d.ts +2 -0
- package/build/lib/core/ai/utils.d.ts +5 -0
- package/build/lib/core/ai/utils.js +3 -2
- package/build/lib/core/api/attackSurface.d.ts +9 -0
- package/build/lib/core/api/index.d.ts +5 -2
- package/build/lib/core/api/index.js +47 -27
- package/build/lib/core/api/issues.d.ts +125 -16
- package/build/lib/core/api/siemTriage.d.ts +4 -0
- package/build/lib/core/api/targetedPentest.js +21 -17
- package/build/lib/core/atif/schema.d.ts +2 -2
- package/build/lib/core/cli/model.d.ts +2 -0
- package/build/lib/core/code-mode/capabilityInvoker.d.ts +53 -0
- package/build/lib/core/code-mode/index.d.ts +3 -0
- package/build/lib/core/code-mode/runtime.d.ts +42 -0
- package/build/lib/core/code-mode/tools.d.ts +16 -0
- package/build/lib/core/config/config.d.ts +12 -0
- package/build/lib/core/config/index.js +1 -1
- package/build/lib/core/eventBus.d.ts +43 -0
- package/build/lib/core/eventBus.js +1 -1
- package/build/lib/core/findings/registry.js +4 -3
- package/build/lib/core/http/researchFetchToken.d.ts +2 -0
- package/build/lib/core/http/targetHeaders.d.ts +4 -0
- package/build/lib/core/http/targetScope.d.ts +20 -0
- package/build/lib/core/ollama.d.ts +28 -0
- package/build/lib/core/providers/types.d.ts +1 -1
- package/build/lib/core/providers/utils.d.ts +1 -1
- package/build/lib/core/runtime/localWorkerProtocol.d.ts +4 -4
- package/build/lib/core/runtime/runStore.d.ts +2 -2
- package/build/lib/core/session/index.d.ts +41 -5
- package/build/lib/core/session/index.js +3 -2
- package/build/lib/core/session/persistence.d.ts +1 -1
- package/build/lib/core/session/persistence.js +4 -3
- package/build/lib/core/tools/backends/callbacks.d.ts +22 -0
- package/build/lib/core/tools/backends/index.d.ts +1 -1
- package/build/lib/core/tools/backends/index.js +3 -1
- package/build/lib/core/tools/backends/types.d.ts +69 -0
- package/build/lib/core/workflows/fastStrike.d.ts +1 -1
- package/build/lib/core/workflows/pentest.js +26 -22
- package/build/lib/core/workflows/seams.js +5 -4
- package/build/lib/core/workflows/whiteboxAttackSurface.d.ts +2 -0
- package/build/lib/core/workflows/whiteboxAttackSurface.js +22 -18
- package/build/lib/index.js +31 -24
- package/build/lib/util/url.d.ts +1 -0
- package/build/{logs-tax0j5es.js → logs-dj570g45.js} +17 -17
- package/build/module-ES6BEMUI-6ewavg9p.js +12 -0
- package/build/{native-rollout-evidence-0820cgjt.js → native-rollout-evidence-vcmxkq9z.js} +4 -4
- package/build/{offesecAgent-78zt4ce1.js → offesecAgent-3fey7k6e.js} +6 -6
- package/build/pentest-a97cjbbg.js +23 -0
- package/build/{pentests-f1kh0619.js → pentests-4b66eaa4.js} +17 -17
- package/build/recordedRunClient-w3ss08a7.js +11 -0
- package/build/{subagentSpawner-xzyhb9e5.js → subagentSpawner-cfcwj7qg.js} +4 -4
- package/build/{targetedPentest-p94z9n61.js → targetedPentest-vyrqzrvz.js} +8 -8
- package/build/{targets-f149r24n.js → targets-b3b1n24h.js} +17 -17
- package/build/threatModel-kepg75h9.js +24 -0
- package/build/{uninstall-7kxqrs32.js → uninstall-wt0jqrsb.js} +1 -1
- package/build/{upload-03e2pj1m.js → upload-1am959p4.js} +4 -4
- package/build/{utils-ec43nwzn.js → utils-a1bfm0ep.js} +16 -4
- package/package.json +79 -46
- package/src/cli/agent-runs.test.ts +1 -4
- package/src/cli/issues.test.ts +234 -12
- package/src/cli/issues.ts +49 -9
- package/src/cli/lance-budget.test.ts +31 -0
- package/src/cli/lance-budget.ts +56 -0
- package/src/cli.ts +15 -9
- package/src/core/agents/agentRuntime.test.ts +18 -0
- package/src/core/agents/agentRuntime.ts +11 -1
- package/src/core/agents/lance.test.ts +2 -1
- package/src/core/agents/lance.ts +94 -21
- package/src/core/agents/lanceBudget.test.ts +166 -0
- package/src/core/agents/lanceBudget.ts +21 -0
- package/src/core/agents/offSecAgent/lance.test.ts +27 -2
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.codeMode.test.ts +435 -0
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.compaction.test.ts +257 -0
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.ollama.test.ts +289 -0
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.runtimeContext.test.ts +1 -0
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.test.ts +40 -1
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.toolApproval.test.ts +120 -0
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.ts +196 -24
- package/src/core/agents/offSecAgent/prompt.test.ts +16 -0
- package/src/core/agents/offSecAgent/prompt.ts +4 -3
- package/src/core/agents/offSecAgent/recordedTools.test.ts +7 -1
- package/src/core/agents/offSecAgent/responseContext.test.ts +213 -0
- package/src/core/agents/offSecAgent/runtimeContext.test.ts +19 -0
- package/src/core/agents/offSecAgent/runtimeContext.ts +9 -2
- package/src/core/agents/offSecAgent/selectiveConstruction.publicPath.test.ts +2 -0
- package/src/core/agents/offSecAgent/selectiveConstruction.test.ts +7 -1
- package/src/core/agents/offSecAgent/structuredResponse.test.ts +248 -0
- package/src/core/agents/offSecAgent/subagentSpawner.hooks.test.ts +70 -0
- package/src/core/agents/offSecAgent/subagentSpawner.reasoning.test.ts +8 -0
- package/src/core/agents/offSecAgent/subagentSpawner.test.ts +29 -0
- package/src/core/agents/offSecAgent/subagentSpawner.ts +62 -1
- package/src/core/agents/offSecAgent/toolExecutionContext.test.ts +178 -0
- package/src/core/agents/offSecAgent/toolExecutionContext.ts +52 -22
- package/src/core/agents/offSecAgent/toolLifecycle.test.ts +18 -0
- package/src/core/agents/offSecAgent/toolLifecycle.ts +5 -0
- package/src/core/agents/offSecAgent/tools/browserHeaderRouting.redirect.test.ts +182 -0
- package/src/core/agents/offSecAgent/tools/browserHeaderRouting.test.ts +127 -22
- package/src/core/agents/offSecAgent/tools/browserHeaderRouting.ts +40 -25
- package/src/core/agents/offSecAgent/tools/callbackHits.test.ts +220 -0
- package/src/core/agents/offSecAgent/tools/callbackHits.ts +118 -0
- package/src/core/agents/offSecAgent/tools/callbackListener.test.ts +10 -6
- package/src/core/agents/offSecAgent/tools/cloneRepository.test.ts +176 -0
- package/src/core/agents/offSecAgent/tools/cloneRepository.ts +108 -0
- package/src/core/agents/offSecAgent/tools/createAttackSurfaceReport.test.ts +95 -0
- package/src/core/agents/offSecAgent/tools/createAttackSurfaceReport.ts +12 -0
- package/src/core/agents/offSecAgent/tools/delegateAuth.ts +5 -0
- package/src/core/agents/offSecAgent/tools/documentApp.ts +21 -0
- package/src/core/agents/offSecAgent/tools/documentFinding.test.ts +119 -0
- package/src/core/agents/offSecAgent/tools/documentFinding.ts +73 -12
- package/src/core/agents/offSecAgent/tools/documentTopology.test.ts +411 -0
- package/src/core/agents/offSecAgent/tools/documentTopology.ts +1510 -0
- package/src/core/agents/offSecAgent/tools/executeCommand.test.ts +3 -2
- package/src/core/agents/offSecAgent/tools/executeCommand.ts +2 -2
- package/src/core/agents/offSecAgent/tools/getPage.test.ts +120 -0
- package/src/core/agents/offSecAgent/tools/getPage.ts +24 -19
- package/src/core/agents/offSecAgent/tools/grep.ts +2 -2
- package/src/core/agents/offSecAgent/tools/httpBackends.test.ts +18 -25
- package/src/core/agents/offSecAgent/tools/httpPoc.test.ts +483 -0
- package/src/core/agents/offSecAgent/tools/httpPoc.ts +296 -0
- package/src/core/agents/offSecAgent/tools/httpRequest.body.test.ts +214 -0
- package/src/core/agents/offSecAgent/tools/httpRequest.test.ts +54 -0
- package/src/core/agents/offSecAgent/tools/httpRequest.ts +22 -13
- package/src/core/agents/offSecAgent/tools/index.ts +88 -3
- package/src/core/agents/offSecAgent/tools/playwrightMcp.test.ts +3 -0
- package/src/core/agents/offSecAgent/tools/playwrightMcp.ts +1 -0
- package/src/core/agents/offSecAgent/tools/runAttackSurface.ts +2 -0
- package/src/core/agents/offSecAgent/tools/runPentestWorkflow.ts +2 -0
- package/src/core/agents/offSecAgent/tools/sandboxPlaywright.test.ts +37 -0
- package/src/core/agents/offSecAgent/tools/sandboxPlaywright.ts +6 -1
- package/src/core/agents/offSecAgent/tools/scopeGuard.test.ts +198 -54
- package/src/core/agents/offSecAgent/tools/scopeGuard.ts +74 -33
- package/src/core/agents/offSecAgent/tools/selectiveFactories.test.ts +6 -6
- package/src/core/agents/offSecAgent/tools/spawnCodingAgent.ts +1 -0
- package/src/core/agents/offSecAgent/tools/spawnPentestAgent.test.ts +4 -3
- package/src/core/agents/offSecAgent/tools/spawnPentestAgent.ts +2 -0
- package/src/core/agents/offSecAgent/tools/spawnPentestSwarm.ts +2 -0
- package/src/core/agents/offSecAgent/tools/spawnReconAgent.test.ts +95 -0
- package/src/core/agents/offSecAgent/tools/spawnReconAgent.ts +193 -0
- package/src/core/agents/offSecAgent/tools/threatModelGenerator.ts +1 -0
- package/src/core/agents/offSecAgent/tools/toolOutput.test.ts +96 -9
- package/src/core/agents/offSecAgent/tools/toolOutput.ts +100 -14
- package/src/core/agents/offSecAgent/tools/toolOutput.writeFailure.test.ts +180 -0
- package/src/core/agents/offSecAgent/tools/topologyDuplicates.test.ts +500 -0
- package/src/core/agents/offSecAgent/tools/topologyDuplicates.ts +153 -0
- package/src/core/agents/offSecAgent/tools/topologyMermaid.test.ts +174 -0
- package/src/core/agents/offSecAgent/tools/topologyMermaid.ts +179 -0
- package/src/core/agents/offSecAgent/tools/topologyRecords.test.ts +569 -0
- package/src/core/agents/offSecAgent/tools/topologyRecords.ts +427 -0
- package/src/core/agents/offSecAgent/tools/topologyThreats.test.ts +286 -0
- package/src/core/agents/offSecAgent/tools/types.ts +11 -1
- package/src/core/agents/offSecAgent/tools/webSearch.test.ts +357 -0
- package/src/core/agents/offSecAgent/tools/webSearch.ts +200 -87
- package/src/core/agents/offSecAgent/types.ts +26 -5
- package/src/core/agents/specialized/attackSurface/blackboxAgent.test.ts +101 -2
- package/src/core/agents/specialized/attackSurface/blackboxAgent.ts +5 -5
- package/src/core/agents/specialized/attackSurface/generalizedAgent.continuation.test.ts +81 -0
- package/src/core/agents/specialized/attackSurface/generalizedAgent.ts +195 -0
- package/src/core/agents/specialized/attackSurface/generalizedPrompts.test.ts +42 -0
- package/src/core/agents/specialized/attackSurface/generalizedPrompts.ts +112 -0
- package/src/core/agents/specialized/attackSurface/prompts.ts +9 -45
- package/src/core/agents/specialized/attackSurface/reconToolset.test.ts +122 -0
- package/src/core/agents/specialized/attackSurface/reconToolset.ts +60 -0
- package/src/core/agents/specialized/attackSurface/reconUpdate.test.ts +297 -0
- package/src/core/agents/specialized/attackSurface/reconUpdate.ts +270 -0
- package/src/core/agents/specialized/findingJudge/agent.ts +3 -5
- package/src/core/agents/specialized/findingJudge/index.test.ts +6 -6
- package/src/core/agents/specialized/findingJudge/index.ts +4 -0
- package/src/core/agents/specialized/findingJudge/prompts.test.ts +28 -0
- package/src/core/agents/specialized/findingJudge/prompts.ts +17 -2
- package/src/core/agents/specialized/pentest/agent.test.ts +44 -0
- package/src/core/agents/specialized/pentest/agent.ts +32 -5
- package/src/core/agents/specialized/reconWorker/agent.ts +61 -0
- package/src/core/agents/specialized/reconWorker/prompts.ts +28 -0
- package/src/core/agents/specialized/siemTriage/agent.test.ts +231 -0
- package/src/core/agents/specialized/siemTriage/agent.ts +311 -0
- package/src/core/agents/specialized/siemTriage/aws.ts +21 -0
- package/src/core/agents/specialized/whiteboxAttackSurface/endpointDocumentationAgent.hooks.test.ts +11 -0
- package/src/core/ai/ai.approval-compaction.test.ts +902 -0
- package/src/core/ai/ai.effective-tools.test.ts +30 -3
- package/src/core/ai/ai.invalid-tool-name-history.test.ts +264 -0
- package/src/core/ai/ai.operator-context.bench.test.ts +11 -2
- package/src/core/ai/ai.recorded-attempts.test.ts +49 -0
- package/src/core/ai/ai.stream-recovery.test.ts +758 -0
- package/src/core/ai/ai.test.ts +34 -6
- package/src/core/ai/ai.tool-approval.test.ts +159 -0
- package/src/core/ai/ai.tool-repair-drain.test.ts +362 -0
- package/src/core/ai/ai.tool-repair-reasoning.test.ts +231 -0
- package/src/core/ai/ai.ts +586 -265
- package/src/core/ai/caching.test.ts +43 -0
- package/src/core/ai/caching.ts +7 -0
- package/src/core/ai/compactionPrompts.ts +12 -0
- package/src/core/ai/compactionTelemetry.test.ts +216 -14
- package/src/core/ai/contextManagement.toolOutput.test.ts +340 -0
- package/src/core/ai/contextManagement.ts +115 -37
- package/src/core/ai/contextManagement.unicode.test.ts +157 -0
- package/src/core/ai/failedToolCallHistory.test.ts +226 -0
- package/src/core/ai/failedToolCallHistory.ts +101 -0
- package/src/core/ai/incompleteModelStream.ts +17 -0
- package/src/core/ai/index.ts +12 -0
- package/src/core/ai/inference-attempt/recording.ts +1 -0
- package/src/core/ai/inference.test.ts +292 -0
- package/src/core/ai/modelRuntime.test.ts +58 -0
- package/src/core/ai/modelRuntime.ts +63 -0
- package/src/core/ai/modelStreamDrain.ts +6 -0
- package/src/core/ai/models/concentrate.ts +132 -0
- package/src/core/ai/models/index.ts +23 -8
- package/src/core/ai/models/inference.ts +11 -0
- package/src/core/ai/models/models.test.ts +28 -0
- package/src/core/ai/models/openai.ts +6 -0
- package/src/core/ai/models/openrouter-reasoning.json +68 -2
- package/src/core/ai/models/openrouter.ts +132 -3
- package/src/core/ai/providers/anthropic-models.test.ts +4 -2
- package/src/core/ai/providers/anthropic.ts +2 -1
- package/src/core/ai/providers/bedrock-models.test.ts +212 -2
- package/src/core/ai/providers/concentrate.ts +96 -0
- package/src/core/ai/providers/ollama.test.ts +223 -0
- package/src/core/ai/providers/ollama.ts +21 -0
- package/src/core/ai/providers/openai-models.test.ts +5 -0
- package/src/core/ai/providers/pensarResponsesStream.test.ts +117 -0
- package/src/core/ai/providers/pensarResponsesStream.ts +20 -1
- package/src/core/ai/providers/qwen-models.test.ts +265 -0
- package/src/core/ai/reasoning.test.ts +4 -0
- package/src/core/ai/reasoning.ts +6 -0
- package/src/core/ai/utils.native-rollout-evidence.test.ts +1 -0
- package/src/core/ai/utils.ts +151 -28
- package/src/core/api/attackSurface.test.ts +14 -16
- package/src/core/api/attackSurface.ts +26 -0
- package/src/core/api/index.ts +20 -0
- package/src/core/api/issues.test.ts +80 -6
- package/src/core/api/issues.ts +137 -16
- package/src/core/api/recordedRun.loop.test.ts +67 -0
- package/src/core/api/siemTriage.ts +40 -0
- package/src/core/cli/model.ts +6 -2
- package/src/core/code-mode/capabilityInvoker.test.ts +424 -0
- package/src/core/code-mode/capabilityInvoker.ts +383 -0
- package/src/core/code-mode/index.ts +8 -0
- package/src/core/code-mode/runtime.setup.test.ts +157 -0
- package/src/core/code-mode/runtime.test.ts +664 -0
- package/src/core/code-mode/runtime.ts +700 -0
- package/src/core/code-mode/tools.test.ts +375 -0
- package/src/core/code-mode/tools.ts +281 -0
- package/src/core/config/config.test.ts +55 -0
- package/src/core/config/config.ts +17 -0
- package/src/core/doctor.ts +1 -0
- package/src/core/eventBus.test.ts +63 -0
- package/src/core/eventBus.ts +69 -0
- package/src/core/http/agentNetworkPolicyFixture.test.ts +39 -0
- package/src/core/http/headers.contract.test.ts +146 -2
- package/src/core/http/researchFetchToken.test.ts +50 -0
- package/src/core/http/researchFetchToken.ts +63 -0
- package/src/core/http/targetHeaders.ts +29 -8
- package/src/core/http/targetScope.ts +118 -11
- package/src/core/installation/installation.test.ts +1 -0
- package/src/core/ollama.test.ts +139 -0
- package/src/core/ollama.ts +184 -0
- package/src/core/providers/types.ts +7 -0
- package/src/core/providers/utils.ts +18 -2
- package/src/core/providers/verify.test.ts +54 -0
- package/src/core/providers/verify.ts +28 -0
- package/src/core/runtime/runRecoveryPlan.test.ts +18 -0
- package/src/core/runtime/runRecoveryPlan.ts +5 -0
- package/src/core/runtime/runTools.test.ts +8 -1
- package/src/core/runtime/runTools.ts +4 -1
- package/src/core/runtime/sqliteControlStore.test.ts +21 -0
- package/src/core/runtime/sqliteControlStore.ts +6 -1
- package/src/core/runtime/sqliteModelStore.ts +1 -0
- package/src/core/runtime/sqliteRecoveryStore.test.ts +24 -5
- package/src/core/session/index.ts +23 -0
- package/src/core/session/persistence.ts +65 -4
- package/src/core/session/rehydrate.test.ts +238 -0
- package/src/core/tools/backends/callbacks.ts +42 -0
- package/src/core/tools/backends/index.ts +4 -0
- package/src/core/tools/backends/local.test.ts +211 -1
- package/src/core/tools/backends/local.ts +300 -59
- package/src/core/tools/backends/policy.test.ts +36 -1
- package/src/core/tools/backends/policy.ts +10 -4
- package/src/core/tools/backends/types.ts +76 -0
- package/src/core/workflows/fastStrike.test.ts +10 -0
- package/src/core/workflows/fastStrike.ts +18 -2
- package/src/core/workflows/pentest.test.ts +93 -0
- package/src/core/workflows/pentest.ts +4 -2
- package/src/core/workflows/whiteboxAttackSurface.lifecycle.test.ts +269 -0
- package/src/core/workflows/whiteboxAttackSurface.test.ts +102 -0
- package/src/core/workflows/whiteboxAttackSurface.ts +37 -17
- package/src/test-fixtures/agent-network-policy-v2.json +80 -0
- package/src/tests/attackSurface.test.ts +20 -22
- package/src/tests/authCookieExport.test.ts +120 -122
- package/src/tests/authPentestHandoff.test.ts +192 -199
- package/src/tests/browserCookies.test.ts +106 -108
- package/src/tui/components/chat/__tests__/model-loading.tsx +110 -0
- package/src/tui/components/chat/input-area.tsx +1 -0
- package/src/tui/components/chat/loading-indicator.tsx +20 -6
- package/src/tui/components/chat/message-list.tsx +16 -10
- package/src/tui/components/chat/model-loading.test.ts +16 -0
- package/src/tui/components/commands/__tests__/advanced-settings-lifecycle.tsx +49 -6
- package/src/tui/components/commands/advanced-settings.test.ts +4 -0
- package/src/tui/components/commands/advanced-settings.tsx +161 -17
- package/src/tui/components/commands/api-key-input.tsx +2 -0
- package/src/tui/components/commands/operator-wizard.tsx +2 -0
- package/src/tui/components/commands/provider-manager.tsx +3 -0
- package/src/tui/components/model-picker/ModelPicker.tsx +2 -0
- package/src/tui/components/model-picker/__tests__/ollama-discovery.tsx +141 -0
- package/src/tui/components/model-picker/__tests__/reasoning-control.tsx +41 -14
- package/src/tui/components/model-picker/model-search.test.ts +11 -0
- package/src/tui/components/model-picker/model-search.ts +2 -0
- package/src/tui/components/model-picker/ollama-discovery.test.ts +13 -0
- package/src/tui/components/model-picker/reasoning-control.test.ts +8 -2
- package/src/tui/components/operator-dashboard/index.tsx +29 -12
- package/src/tui/components/operator-dashboard/run-events.test.ts +55 -0
- package/src/tui/components/operator-dashboard/run-events.ts +12 -0
- package/src/tui/components/operator-dashboard/subagent-detail-view.tsx +1 -0
- package/src/tui/components/operator-dashboard/subagent-state.test.ts +15 -0
- package/src/tui/components/operator-dashboard/subagent-state.ts +14 -0
- package/src/tui/components/shared/index.ts +1 -0
- package/src/tui/components/shared/model-loading-icon.tsx +21 -0
- package/src/tui/context/agent.tsx +4 -1
- package/src/tui/context/config.tsx +21 -0
- package/src/tui/context/route.tsx +2 -0
- package/src/tui/index.tsx +7 -1
- package/src/util/url.ts +6 -8
- package/build/agent-ks4dc1q5.js +0 -14
- package/build/agent-q6ckrtd2.js +0 -14
- package/build/blackboxAgent-pe5y5hxr.js +0 -14
- package/build/pentest-0s9rgnvr.js +0 -23
- package/build/recordedRunClient-jv7ew35v.js +0 -11
- package/build/threatModel-ktqchbn1.js +0 -24
package/README.md
CHANGED
|
@@ -107,6 +107,27 @@ pensar targeted-pentest --target https://example.com --objective "Test authentic
|
|
|
107
107
|
| `--threat-model <text\|@file>` | pentest | Threat model to guide testing |
|
|
108
108
|
| `--objective <text>` | targeted-pentest | Testing objective (repeatable) |
|
|
109
109
|
|
|
110
|
+
### Ollama (local models)
|
|
111
|
+
|
|
112
|
+
Start Ollama with a model installed, then open `/models` and select it under
|
|
113
|
+
**Ollama (local)**. Apex discovers models automatically at startup and refreshes
|
|
114
|
+
the list every five seconds, including when Ollama starts after Apex. No API key
|
|
115
|
+
or manual endpoint setup is needed. Running models appear first.
|
|
116
|
+
|
|
117
|
+
Discovery uses `http://127.0.0.1:11434` by default and honors `OLLAMA_HOST`.
|
|
118
|
+
Headless commands accept `--model-provider ollama --model <ollama-model-name>`
|
|
119
|
+
or `--model ollama:<ollama-model-name>`. Model names retain their full tags,
|
|
120
|
+
including Hugging Face paths. Existing manual local endpoints remain separate.
|
|
121
|
+
|
|
122
|
+
Apex loads the selected model on the first request if needed, showing **Loading
|
|
123
|
+
model weights** with a dedicated throbber. It then reads Ollama's allocated
|
|
124
|
+
context before fitting the prompt or deciding whether to compact the conversation.
|
|
125
|
+
Servers without context metadata use a conservative 4,096-token budget. Apex
|
|
126
|
+
does not download models or override Ollama's idle-unload settings; model lifetime
|
|
127
|
+
is managed by Ollama, independently of Apex sessions.
|
|
128
|
+
Agent workflows require a model and Ollama template that support tool calls;
|
|
129
|
+
discovery alone does not establish tool support.
|
|
130
|
+
|
|
110
131
|
### Hoonify inference
|
|
111
132
|
|
|
112
133
|
Connect **Hoonify** in `/providers` or set `HOONIFY_API_KEY`, then select a
|
|
@@ -114,6 +135,19 @@ discovered model in `/models`. Headless commands accept
|
|
|
114
135
|
`--model-provider hoonify --model <catalog-model-id>`. See
|
|
115
136
|
[Hoonify setup](docs/hoonify.md) for model discovery, token budgets, and live checks.
|
|
116
137
|
|
|
138
|
+
### Inference.net
|
|
139
|
+
|
|
140
|
+
Connect **Inference.net** in `/providers` or set `INFERENCE_API_KEY`, then select
|
|
141
|
+
**DeepSeek V4.1 Flash 1017 Cyber** in `/models`. This is the only Inference.net model
|
|
142
|
+
currently available in Apex. Headless commands accept
|
|
143
|
+
`--model inference:deepseek-v4.1-flash-1017-cyber`.
|
|
144
|
+
|
|
145
|
+
Your team needs [approved model access](https://inference.net/model-access/deepseek-v4.1-flash-1017-cyber)
|
|
146
|
+
before inference will succeed; saving a valid API key does not grant model access.
|
|
147
|
+
Apex uses the provider's default reasoning behavior and the
|
|
148
|
+
[catalog](https://api.inference.net/v1/models) limits of 1,040,000 context tokens
|
|
149
|
+
and 393,216 output tokens.
|
|
150
|
+
|
|
117
151
|
### Custom inference endpoints
|
|
118
152
|
|
|
119
153
|
Bring an OpenAI-compatible endpoint and bearer token through `customProviders`
|
|
@@ -122,6 +156,22 @@ it with `--model-provider <id> --model <model>`, or choose its declared models i
|
|
|
122
156
|
the operator's `/models` picker. See [custom inference setup](docs/custom-inference.md)
|
|
123
157
|
for GLM settings, headless job configuration, and a live connection test.
|
|
124
158
|
|
|
159
|
+
### Web search
|
|
160
|
+
|
|
161
|
+
Use your own Exa API key for direct web search with any model provider:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
export EXA_API_KEY=your-exa-api-key
|
|
165
|
+
pensar
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
You can also save the key as `exaAPIKey` in your existing
|
|
169
|
+
`~/.pensar/config.json`. If a Brave key is configured (`BRAVE_API_KEY` or
|
|
170
|
+
`braveAPIKey`), Brave takes precedence; remove that key to use Exa. Without
|
|
171
|
+
either search key, Apex uses the existing Pensar web-search gateway, which
|
|
172
|
+
requires Pensar authentication. Exa errors are returned directly without
|
|
173
|
+
switching providers.
|
|
174
|
+
|
|
125
175
|
### Logging
|
|
126
176
|
|
|
127
177
|
Apex routes diagnostic/operational logging through a centralized structured logger
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import"./cli-
|
|
1
|
+
import {
|
|
2
|
+
callbackDomains
|
|
3
|
+
} from "./cli-27sjhcnt.js";
|
|
4
|
+
import"./cli-69vcn7a7.js";
|
|
5
|
+
import"./cli-vgbrtb0q.js";
|
|
6
|
+
import"./cli-bvwhhm6a.js";
|
|
5
7
|
import {
|
|
6
8
|
AgentRuntime,
|
|
7
9
|
defineAgent
|
|
8
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-q6h43c9v.js";
|
|
9
11
|
import"./cli-qba2x69h.js";
|
|
10
12
|
import {
|
|
11
13
|
stepCountIs2,
|
|
12
14
|
init_dist
|
|
13
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-jrscs7aw.js";
|
|
14
16
|
import"./cli-c2k4xxaw.js";
|
|
15
17
|
import {
|
|
16
18
|
init_zod
|
|
@@ -38,7 +40,7 @@ function truncate(value, limit) {
|
|
|
38
40
|
return `${value.substring(0, limit)}
|
|
39
41
|
... [truncated]`;
|
|
40
42
|
}
|
|
41
|
-
var
|
|
43
|
+
var judgeSystemPrompt = (outOfBandRule) => `You are a security finding validation specialist running as an agentic verifier inside an automated penetration testing pipeline.
|
|
42
44
|
|
|
43
45
|
You are the last line of defense against false positives, hallucinated findings, fabricated evidence, and overstated impact. Your job is to independently verify whether a submitted proof-of-concept and its output support the claimed finding.
|
|
44
46
|
|
|
@@ -71,7 +73,7 @@ You are the last line of defense against false positives, hallucinated findings,
|
|
|
71
73
|
- IDOR: output should show access to another user's/account's resource while authentication exists.
|
|
72
74
|
- Authorization / access-control boundary bypass (RSC/prefetch/redirect-body leaks, missing per-route checks): the evidence must establish the access-model delta — which identity/role was used, and proof that the returned data is genuinely out of scope for that identity (cross-tenant, another user's, or admin-only data a member should not see). A 200 response, a leaked RSC payload, or a skipped redirect alone does NOT prove sensitive exposure. If the bypass is real but the returned data is non-sensitive or plausibly same-tenant/expected-visible, classify as a valid lower-impact finding and require the claim's impact/severity to match — do NOT accept it as high-confidence sensitive/cross-tenant exposure.
|
|
73
75
|
- Authentication bypass: output should show protected access without valid credentials.
|
|
74
|
-
- Email/HTML injection: ideally verify delivery and rendering. If only server acceptance is shown, confidence must stay below 0.7 and limitations must state rendering was not independently verified.
|
|
76
|
+
${outOfBandRule}- Email/HTML injection: ideally verify delivery and rendering. If only server acceptance is shown, confidence must stay below 0.7 and limitations must state rendering was not independently verified.
|
|
75
77
|
- Missing rate limiting / anti-automation: a modest burst (~20 requests) with no observed throttling, delays, or 429s is sufficient to demonstrate the gap. For endpoints with real-world side effects (sending email/SMS/push, creating tickets/notifications, contact/support/feedback forms, payments), as few as 2–3 attempts plus the observed response is sufficient — do NOT require volume-testing that would spam real recipients. Evidence must state exact request count, timing/distribution, and observed statuses.
|
|
76
78
|
|
|
77
79
|
### Common Low-Signal Patterns
|
|
@@ -112,6 +114,12 @@ Call the response tool exactly once. Include:
|
|
|
112
114
|
- reproducedPoc: whether you reran or independently reproduced the PoC.
|
|
113
115
|
- webResearchUsed: whether web research materially informed the judgment.
|
|
114
116
|
- limitations: remaining gaps.`;
|
|
117
|
+
var FINDING_JUDGE_SYSTEM_PROMPT = judgeSystemPrompt("");
|
|
118
|
+
var OUT_OF_BAND_RULE = `- Out-of-band (blind SSRF, XXE, webhook, host-header or password-reset poisoning, blind injection): the target's own response won't show the impact. Accept a claim that cites a callback hit (hitId, method, path, source IP, user agent, time) read with read_callback_hits when its path carries the marker the PoC sends and the PoC makes the target, not the PoC itself, request that URL. You can't read callbacks yourself, so confidence must stay below 0.7 and limitations must state the callback was not independently re-observed. Reject an out-of-band claim with no cited hit, or one where the PoC requests the test domain directly.
|
|
119
|
+
`;
|
|
120
|
+
function findingJudgeSystemPrompt(callbackDomains) {
|
|
121
|
+
return judgeSystemPrompt(callbackDomains.length > 0 ? OUT_OF_BAND_RULE : "");
|
|
122
|
+
}
|
|
115
123
|
function buildFindingJudgePrompt(input) {
|
|
116
124
|
const { pocScript, pocType, pocOutput, claim } = input;
|
|
117
125
|
return `# Finding Validation Request
|
|
@@ -202,7 +210,7 @@ function resolveTarget(opts) {
|
|
|
202
210
|
var findingJudgeDefinition = defineAgent({
|
|
203
211
|
name: "finding-judge",
|
|
204
212
|
role: "judge",
|
|
205
|
-
system: () =>
|
|
213
|
+
system: (opts) => findingJudgeSystemPrompt(callbackDomains(opts)),
|
|
206
214
|
activeTools: () => [...FINDING_JUDGE_ACTIVE_TOOLS],
|
|
207
215
|
responseSchema: () => FindingJudgeOutputSchema,
|
|
208
216
|
stopWhen: () => stepCountIs2(60),
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import"./cli-69vcn7a7.js";
|
|
2
|
+
import"./cli-vgbrtb0q.js";
|
|
3
|
+
import"./cli-bvwhhm6a.js";
|
|
4
|
+
import {
|
|
5
|
+
RECON_WORKER_TOOLS
|
|
6
|
+
} from "./cli-27sjhcnt.js";
|
|
7
|
+
import {
|
|
8
|
+
buildCredentialsBlock
|
|
9
|
+
} from "./cli-xs69gx66.js";
|
|
10
|
+
import {
|
|
11
|
+
AgentRuntime,
|
|
12
|
+
defineAgent
|
|
13
|
+
} from "./cli-q6h43c9v.js";
|
|
14
|
+
import"./cli-qba2x69h.js";
|
|
15
|
+
import {
|
|
16
|
+
stepCountIs2,
|
|
17
|
+
init_dist
|
|
18
|
+
} from "./cli-jrscs7aw.js";
|
|
19
|
+
import"./cli-c2k4xxaw.js";
|
|
20
|
+
|
|
21
|
+
// src/core/agents/specialized/reconWorker/agent.ts
|
|
22
|
+
init_dist();
|
|
23
|
+
|
|
24
|
+
// src/core/agents/specialized/reconWorker/prompts.ts
|
|
25
|
+
var RECON_WORKER_SYSTEM_PROMPT = `You are a reconnaissance worker sub-agent on an offensive-security team.
|
|
26
|
+
|
|
27
|
+
Your parent agent is mapping the system behind a set of origins as boundaries and components. You have been spawned to pursue ONE scoped goal and report what you find. You have the same primitives as your parent: browser automation, execute_command, http_request, the code tools (read_file, list_files, grep, glob), web_search/get_page, clone_repository (for connected repositories only), and the documentation tools (document_boundary, document_component, document_flow, document_control, document_threat, update_record).
|
|
28
|
+
|
|
29
|
+
Operating rules:
|
|
30
|
+
- Stay within your assigned goal and scope. Do not wander to unrelated hosts or objectives.
|
|
31
|
+
- Prefer evidence over assumption. Confirm a component exists, what it is, and whether it requires authentication before documenting it. Tag every piece of evidence observed, source, or inferred.
|
|
32
|
+
- When a component maps to a connected repository, clone it and read the source to raise fidelity.
|
|
33
|
+
- Use document_component for each component your goal surfaces, in a boundary the parent documented — including datastores and other components the origins do not expose — with what is at stake if it is compromised and what it trusts without verifying. To update a component the parent already documented, reuse its exact name. Document a new boundary only when your goal uncovers one.
|
|
34
|
+
- Use document_control for every control your goal touches — what it protects and, concretely, its gaps — attached to the boundaries and components it is enforced on.
|
|
35
|
+
- Use document_threat for the threats your goal surfaces on the components it covers: concrete scenarios that follow from the documented trust assumptions, control gaps, and flows — not generic categories. Make each testable: its exact entry point, the attack as ordered steps, and how a pentest confirms it.
|
|
36
|
+
- Be concise and factual in your final summary: what you found, how you confirmed it, and anything the parent should follow up on.`;
|
|
37
|
+
function buildReconWorkerPrompt(goal, target, codebasePath, credentials) {
|
|
38
|
+
const parts = [`# Goal
|
|
39
|
+
|
|
40
|
+
${goal}`];
|
|
41
|
+
if (credentials)
|
|
42
|
+
parts.push(credentials.trim());
|
|
43
|
+
if (target)
|
|
44
|
+
parts.push(`## Target
|
|
45
|
+
- ${target}`);
|
|
46
|
+
if (codebasePath)
|
|
47
|
+
parts.push(`## Codebase
|
|
48
|
+
- ${codebasePath}`);
|
|
49
|
+
parts.push("Begin now. Pursue the goal, confirm your findings with evidence, document what you confirm, then report a concise summary.");
|
|
50
|
+
return parts.join(`
|
|
51
|
+
|
|
52
|
+
`);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// src/core/agents/specialized/reconWorker/agent.ts
|
|
56
|
+
function reconWorkerDefinition() {
|
|
57
|
+
return defineAgent({
|
|
58
|
+
name: "recon-worker",
|
|
59
|
+
role: "worker",
|
|
60
|
+
system: () => RECON_WORKER_SYSTEM_PROMPT,
|
|
61
|
+
activeTools: (opts) => {
|
|
62
|
+
if (!opts.excludeTools?.length)
|
|
63
|
+
return [...RECON_WORKER_TOOLS];
|
|
64
|
+
const excluded = new Set(opts.excludeTools);
|
|
65
|
+
return RECON_WORKER_TOOLS.filter((t) => !excluded.has(t));
|
|
66
|
+
},
|
|
67
|
+
resolveResult: async (_opts, _state, stream) => (await stream.text).trim(),
|
|
68
|
+
target: (opts) => opts.target,
|
|
69
|
+
stopWhen: (opts) => opts.stopWhen ?? stepCountIs2(1e4),
|
|
70
|
+
prompt: (opts) => buildReconWorkerPrompt(opts.goal, opts.target, opts.codebasePath, buildCredentialsBlock((opts.credentialManager ?? opts.session.credentialManager)?.formatForPrompt(), opts.session.config?.authenticationInstructions))
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
class ReconWorkerAgent extends AgentRuntime {
|
|
75
|
+
constructor(opts) {
|
|
76
|
+
super(reconWorkerDefinition(), opts);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
export {
|
|
80
|
+
ReconWorkerAgent
|
|
81
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CodeAgent2
|
|
3
|
+
} from "./cli-9b3x3trx.js";
|
|
4
|
+
import"./cli-q6h43c9v.js";
|
|
5
|
+
import"./cli-qba2x69h.js";
|
|
6
|
+
import"./cli-27sjhcnt.js";
|
|
7
|
+
import"./cli-69vcn7a7.js";
|
|
8
|
+
import"./cli-jrscs7aw.js";
|
|
9
|
+
import"./cli-bvwhhm6a.js";
|
|
10
|
+
import"./cli-c2k4xxaw.js";
|
|
11
|
+
import"./cli-vgbrtb0q.js";
|
|
12
|
+
export {
|
|
13
|
+
CodeAgent2 as CodeAgent
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runAuthenticationAgent2
|
|
3
|
+
} from "./cli-55jke7bk.js";
|
|
4
|
+
import"./cli-q6h43c9v.js";
|
|
5
|
+
import"./cli-qba2x69h.js";
|
|
6
|
+
import"./cli-27sjhcnt.js";
|
|
7
|
+
import"./cli-69vcn7a7.js";
|
|
8
|
+
import"./cli-jrscs7aw.js";
|
|
9
|
+
import"./cli-bvwhhm6a.js";
|
|
10
|
+
import"./cli-c2k4xxaw.js";
|
|
11
|
+
import"./cli-vgbrtb0q.js";
|
|
12
|
+
export {
|
|
13
|
+
runAuthenticationAgent2 as runAuthenticationAgent
|
|
14
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TargetedPentestAgent2,
|
|
3
3
|
buildPentestSystemPrompt2
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-enqe6bcb.js";
|
|
5
|
+
import"./cli-q6h43c9v.js";
|
|
6
6
|
import"./cli-qba2x69h.js";
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
10
|
-
import"./cli-
|
|
7
|
+
import"./cli-27sjhcnt.js";
|
|
8
|
+
import"./cli-69vcn7a7.js";
|
|
9
|
+
import"./cli-jrscs7aw.js";
|
|
10
|
+
import"./cli-bvwhhm6a.js";
|
|
11
11
|
import"./cli-c2k4xxaw.js";
|
|
12
|
-
import"./cli-
|
|
12
|
+
import"./cli-vgbrtb0q.js";
|
|
13
13
|
export {
|
|
14
14
|
TargetedPentestAgent2 as TargetedPentestAgent,
|
|
15
15
|
buildPentestSystemPrompt2 as buildPentestSystemPrompt
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
config2,
|
|
3
3
|
init_config
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
4
|
+
} from "./cli-vgbrtb0q.js";
|
|
5
|
+
import"./cli-bvwhhm6a.js";
|
|
6
|
+
import"./cli-27sjhcnt.js";
|
|
7
7
|
import {
|
|
8
8
|
AgentEventBus
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-69vcn7a7.js";
|
|
10
10
|
import {
|
|
11
11
|
inspectSessionEvidence2,
|
|
12
12
|
RecordedRunSpecSchema,
|
|
@@ -17,27 +17,27 @@ import {
|
|
|
17
17
|
runRecordedAgent2,
|
|
18
18
|
RunRecoveryBlockedError2,
|
|
19
19
|
resumeRecordedAgent2
|
|
20
|
-
} from "./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-
|
|
25
|
-
import"./cli-
|
|
26
|
-
import"./cli-
|
|
27
|
-
import"./cli-
|
|
28
|
-
import"./cli-
|
|
29
|
-
import"./cli-
|
|
20
|
+
} from "./cli-fw0r700s.js";
|
|
21
|
+
import"./cli-4pmek04p.js";
|
|
22
|
+
import"./cli-9b3x3trx.js";
|
|
23
|
+
import"./cli-md8azc7a.js";
|
|
24
|
+
import"./cli-1sejsyt5.js";
|
|
25
|
+
import"./cli-55jke7bk.js";
|
|
26
|
+
import"./cli-enqe6bcb.js";
|
|
27
|
+
import"./cli-76pqdrw5.js";
|
|
28
|
+
import"./cli-6b3fnw71.js";
|
|
29
|
+
import"./cli-ak23knae.js";
|
|
30
30
|
import {
|
|
31
31
|
resolveWorkerExecutable,
|
|
32
32
|
launchLocalWorker
|
|
33
|
-
} from "./cli-
|
|
34
|
-
import"./cli-
|
|
35
|
-
import"./cli-
|
|
33
|
+
} from "./cli-hdtc520e.js";
|
|
34
|
+
import"./cli-bq2n4nd8.js";
|
|
35
|
+
import"./cli-q6h43c9v.js";
|
|
36
36
|
import"./cli-qba2x69h.js";
|
|
37
37
|
import {
|
|
38
38
|
buildAuthConfig,
|
|
39
39
|
init_ai2
|
|
40
|
-
} from "./cli-
|
|
40
|
+
} from "./cli-jrscs7aw.js";
|
|
41
41
|
import"./cli-c2k4xxaw.js";
|
|
42
42
|
|
|
43
43
|
// src/cli/agent-runs.ts
|
|
@@ -118,7 +118,7 @@ async function runAgentRunsCommand(args) {
|
|
|
118
118
|
if (!isAbsolute(values.store)) {
|
|
119
119
|
throw new Error("agent-runs worker requires --store <absolute database>");
|
|
120
120
|
}
|
|
121
|
-
const { serveLocalRunWorker } = await import("./index-
|
|
121
|
+
const { serveLocalRunWorker } = await import("./index-z2jt4tgv.js");
|
|
122
122
|
await serveLocalRunWorker({
|
|
123
123
|
runId: values.run,
|
|
124
124
|
databasePath: resolve(values.store)
|
|
@@ -132,7 +132,7 @@ async function runAgentRunsCommand(args) {
|
|
|
132
132
|
${HELP}`);
|
|
133
133
|
}
|
|
134
134
|
if (command === "attach") {
|
|
135
|
-
const { openRecordedRunClient } = await import("./recordedRunClient-
|
|
135
|
+
const { openRecordedRunClient } = await import("./recordedRunClient-w3ss08a7.js");
|
|
136
136
|
const client = await openRecordedRunClient(values.store);
|
|
137
137
|
const controller = new AbortController;
|
|
138
138
|
const detach = () => controller.abort();
|
|
@@ -15,27 +15,27 @@ import {
|
|
|
15
15
|
searchEndpoints2,
|
|
16
16
|
listDomains2,
|
|
17
17
|
createDomain2
|
|
18
|
-
} from "./cli-
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-
|
|
25
|
-
import"./cli-
|
|
26
|
-
import"./cli-
|
|
27
|
-
import"./cli-
|
|
28
|
-
import"./cli-
|
|
29
|
-
import"./cli-
|
|
30
|
-
import"./cli-
|
|
31
|
-
import"./cli-
|
|
18
|
+
} from "./cli-27sjhcnt.js";
|
|
19
|
+
import"./cli-69vcn7a7.js";
|
|
20
|
+
import"./cli-vgbrtb0q.js";
|
|
21
|
+
import"./cli-bvwhhm6a.js";
|
|
22
|
+
import"./cli-fw0r700s.js";
|
|
23
|
+
import"./cli-4pmek04p.js";
|
|
24
|
+
import"./cli-9b3x3trx.js";
|
|
25
|
+
import"./cli-md8azc7a.js";
|
|
26
|
+
import"./cli-1sejsyt5.js";
|
|
27
|
+
import"./cli-55jke7bk.js";
|
|
28
|
+
import"./cli-enqe6bcb.js";
|
|
29
|
+
import"./cli-76pqdrw5.js";
|
|
30
|
+
import"./cli-6b3fnw71.js";
|
|
31
|
+
import"./cli-ak23knae.js";
|
|
32
32
|
import {
|
|
33
33
|
markCommandFailed
|
|
34
34
|
} from "./cli-z82n3qk1.js";
|
|
35
|
-
import"./cli-
|
|
36
|
-
import"./cli-
|
|
35
|
+
import"./cli-bq2n4nd8.js";
|
|
36
|
+
import"./cli-q6h43c9v.js";
|
|
37
37
|
import"./cli-qba2x69h.js";
|
|
38
|
-
import"./cli-
|
|
38
|
+
import"./cli-jrscs7aw.js";
|
|
39
39
|
import"./cli-c2k4xxaw.js";
|
|
40
40
|
|
|
41
41
|
// src/cli/apps.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import"./cli-
|
|
3
|
-
import"./cli-
|
|
2
|
+
import"./cli-27sjhcnt.js";
|
|
3
|
+
import"./cli-69vcn7a7.js";
|
|
4
4
|
import {
|
|
5
5
|
config2,
|
|
6
6
|
init_config
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-vgbrtb0q.js";
|
|
8
8
|
import {
|
|
9
9
|
getPensarApiUrl2,
|
|
10
10
|
getPensarConsoleUrl2,
|
|
@@ -20,24 +20,24 @@ import {
|
|
|
20
20
|
createWorkspaceSelection2,
|
|
21
21
|
pollWorkspaceSelection2,
|
|
22
22
|
init_auth
|
|
23
|
-
} from "./cli-
|
|
24
|
-
import"./cli-
|
|
25
|
-
import"./cli-
|
|
26
|
-
import"./cli-
|
|
27
|
-
import"./cli-
|
|
28
|
-
import"./cli-
|
|
29
|
-
import"./cli-
|
|
30
|
-
import"./cli-
|
|
31
|
-
import"./cli-
|
|
32
|
-
import"./cli-
|
|
33
|
-
import"./cli-
|
|
23
|
+
} from "./cli-bvwhhm6a.js";
|
|
24
|
+
import"./cli-fw0r700s.js";
|
|
25
|
+
import"./cli-4pmek04p.js";
|
|
26
|
+
import"./cli-9b3x3trx.js";
|
|
27
|
+
import"./cli-md8azc7a.js";
|
|
28
|
+
import"./cli-1sejsyt5.js";
|
|
29
|
+
import"./cli-55jke7bk.js";
|
|
30
|
+
import"./cli-enqe6bcb.js";
|
|
31
|
+
import"./cli-76pqdrw5.js";
|
|
32
|
+
import"./cli-6b3fnw71.js";
|
|
33
|
+
import"./cli-ak23knae.js";
|
|
34
34
|
import {
|
|
35
35
|
markCommandFailed
|
|
36
36
|
} from "./cli-z82n3qk1.js";
|
|
37
|
-
import"./cli-
|
|
38
|
-
import"./cli-
|
|
37
|
+
import"./cli-bq2n4nd8.js";
|
|
38
|
+
import"./cli-q6h43c9v.js";
|
|
39
39
|
import"./cli-qba2x69h.js";
|
|
40
|
-
import"./cli-
|
|
40
|
+
import"./cli-jrscs7aw.js";
|
|
41
41
|
import"./cli-c2k4xxaw.js";
|
|
42
42
|
import {
|
|
43
43
|
__require
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BlackboxAttackSurfaceAgent2
|
|
3
|
+
} from "./cli-4pmek04p.js";
|
|
4
|
+
import"./cli-q6h43c9v.js";
|
|
5
|
+
import"./cli-qba2x69h.js";
|
|
6
|
+
import"./cli-27sjhcnt.js";
|
|
7
|
+
import"./cli-69vcn7a7.js";
|
|
8
|
+
import"./cli-jrscs7aw.js";
|
|
9
|
+
import"./cli-bvwhhm6a.js";
|
|
10
|
+
import"./cli-c2k4xxaw.js";
|
|
11
|
+
import"./cli-vgbrtb0q.js";
|
|
12
|
+
export {
|
|
13
|
+
BlackboxAttackSurfaceAgent2 as BlackboxAttackSurfaceAgent
|
|
14
|
+
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import"./cli-
|
|
2
|
-
import"./cli-
|
|
3
|
-
import"./cli-
|
|
4
|
-
import"./cli-
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
1
|
+
import"./cli-vgbrtb0q.js";
|
|
2
|
+
import"./cli-bvwhhm6a.js";
|
|
3
|
+
import"./cli-69vcn7a7.js";
|
|
4
|
+
import"./cli-27sjhcnt.js";
|
|
5
|
+
import"./cli-4pmek04p.js";
|
|
6
|
+
import"./cli-enqe6bcb.js";
|
|
7
|
+
import"./cli-76pqdrw5.js";
|
|
8
8
|
import {
|
|
9
9
|
readExecutionMetrics,
|
|
10
10
|
writeExecutionMetrics,
|
|
11
11
|
runPentestWorkflow2
|
|
12
|
-
} from "./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
12
|
+
} from "./cli-1sejsyt5.js";
|
|
13
|
+
import"./cli-9b3x3trx.js";
|
|
14
|
+
import"./cli-md8azc7a.js";
|
|
15
15
|
import {
|
|
16
16
|
EMPTY_SESSION_TOKEN_USAGE,
|
|
17
17
|
accumulateSessionTokens
|
|
18
18
|
} from "./cli-ag6jtndp.js";
|
|
19
|
-
import"./cli-
|
|
19
|
+
import"./cli-q6h43c9v.js";
|
|
20
20
|
import"./cli-qba2x69h.js";
|
|
21
21
|
import {
|
|
22
22
|
normalizeStepUsage,
|
|
23
23
|
init_ai2
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-jrscs7aw.js";
|
|
25
25
|
import"./cli-c2k4xxaw.js";
|
|
26
26
|
|
|
27
27
|
// src/core/api/blackboxPentest.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// src/util/url.ts
|
|
2
|
+
function withHttpScheme(target) {
|
|
3
|
+
const value = target.trim();
|
|
4
|
+
return /^https?:\/\//i.test(value) ? value : `https://${value}`;
|
|
5
|
+
}
|
|
2
6
|
function parseTargetUrl(target) {
|
|
3
7
|
if (!target?.trim()) {
|
|
4
8
|
return null;
|
|
5
9
|
}
|
|
6
|
-
let urlString = target.trim();
|
|
7
|
-
if (!urlString.match(/^https?:\/\//i)) {
|
|
8
|
-
urlString = `https://${urlString}`;
|
|
9
|
-
}
|
|
10
10
|
try {
|
|
11
|
-
const url = new URL(
|
|
11
|
+
const url = new URL(withHttpScheme(target));
|
|
12
12
|
const hostname = url.hostname;
|
|
13
13
|
let port;
|
|
14
14
|
if (url.port) {
|
|
@@ -45,4 +45,4 @@ function getAutoPopulatedPorts(target, initialPorts = []) {
|
|
|
45
45
|
return ports;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
export { parseTargetUrl, getAutoPopulatedHosts, getAutoPopulatedPorts };
|
|
48
|
+
export { withHttpScheme, parseTargetUrl, getAutoPopulatedHosts, getAutoPopulatedPorts };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APICallError,
|
|
3
|
-
|
|
4
|
-
} from "./cli-
|
|
3
|
+
init_dist4
|
|
4
|
+
} from "./cli-7898kznf.js";
|
|
5
5
|
import {
|
|
6
6
|
init_zod
|
|
7
7
|
} from "./cli-3qznjsnr.js";
|
|
@@ -2215,7 +2215,7 @@ function withNativeRolloutEvidenceModel(model, defaultContext) {
|
|
|
2215
2215
|
}
|
|
2216
2216
|
var DEFAULT_NATIVE_ROLLOUT_CAPTURE_LIMITS, captureStore, operationStore, sessionStore, RECORDER_ONLY_INPUT;
|
|
2217
2217
|
var init_capture = __esm(() => {
|
|
2218
|
-
|
|
2218
|
+
init_dist4();
|
|
2219
2219
|
init_inference_attempt();
|
|
2220
2220
|
init_content();
|
|
2221
2221
|
init_provider_metadata();
|