@pensar/apex 0.0.112 → 0.0.113-canary.8a0cb7bc

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.
Files changed (38) hide show
  1. package/README.md +36 -37
  2. package/build/agent-5nnw5gdw.js +16 -0
  3. package/build/{agent-5qdmmchx.js → agent-bmamdgbm.js} +9 -9
  4. package/build/{auth-jvq72ekc.js → auth-ynsrm9bf.js} +7 -6
  5. package/build/{authentication-nya4td5k.js → authentication-b5h01t7q.js} +8 -8
  6. package/build/blackboxAgent-91vnvpa8.js +17 -0
  7. package/build/{blackboxPentest-85hwznet.js → blackboxPentest-xtevpnvk.js} +13 -13
  8. package/build/{cli-hmrzx8am.js → cli-0atrar08.js} +9 -6
  9. package/build/{cli-15vxn9zj.js → cli-0tpx8khk.js} +30 -30
  10. package/build/{cli-bp6d08sg.js → cli-16m30n7b.js} +1 -1
  11. package/build/{cli-jb0gcnrs.js → cli-3tntsb59.js} +1 -1
  12. package/build/{cli-kqtgcdzn.js → cli-5ekr1ws4.js} +4418 -2241
  13. package/build/{cli-yj3dy0vg.js → cli-8q94bv77.js} +2 -2
  14. package/build/{cli-jh38b6zv.js → cli-8sm33f4k.js} +1 -1
  15. package/build/{cli-w04ggbe4.js → cli-8yze7t68.js} +2 -2
  16. package/build/{cli-j66pect7.js → cli-9tzcmrd4.js} +38 -3
  17. package/build/{cli-f9shhcxf.js → cli-ee7y516a.js} +6 -6
  18. package/build/{cli-r8r90gka.js → cli-khem6ept.js} +11 -10
  19. package/build/{cli-2ckm5es2.js → cli-renwxhw7.js} +1 -1
  20. package/build/{cli-x1msjf55.js → cli-rjfkex2j.js} +2 -2
  21. package/build/{cli-e20q3hqz.js → cli-vzq3vcqa.js} +2 -2
  22. package/build/cli.js +24 -24
  23. package/build/{fixes-1r6v7kh2.js → fixes-8dt41pqr.js} +4 -4
  24. package/build/{index-9ze42wn7.js → index-42y4vj9f.js} +40 -58
  25. package/build/{index-vwvh1rdw.js → index-7etzc7sn.js} +7 -7
  26. package/build/{index-5ke2yd32.js → index-c6x1x3cq.js} +2 -2
  27. package/build/{issues-kx721wja.js → issues-6dvz3xwg.js} +4 -4
  28. package/build/{logs-hav7d0nm.js → logs-21t24e4n.js} +4 -4
  29. package/build/pentest-5wc29t2w.js +25 -0
  30. package/build/{pentests-s9fwd71b.js → pentests-8yxnj9kr.js} +4 -4
  31. package/build/{projects-tr719twv.js → projects-hkmq4y05.js} +4 -4
  32. package/build/{targetedPentest-w2c85whf.js → targetedPentest-5zyade2x.js} +9 -9
  33. package/build/{uninstall-2j0pymb0.js → uninstall-s3r4kj3h.js} +1 -1
  34. package/build/{utils-jky0th19.js → utils-9fhmzzzh.js} +1 -1
  35. package/package.json +2 -2
  36. package/build/agent-s2z0dasf.js +0 -16
  37. package/build/blackboxAgent-qa9ze2hn.js +0 -17
  38. package/build/pentest-zzebnfa0.js +0 -25
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  <h1 align="center">Pensar Apex</h1>
2
2
 
3
- <p align="center">AI-powered penetration testing using an AI agent to perform comprehensive blackbox and whitebox pentesting - directly in your terminal.
3
+ <p align="center">
4
+ AI-powered penetration testing using autonomous agents — directly in your terminal. Run blackbox and whitebox pentests that explore, reason, and surface real vulnerabilities.
5
+
4
6
  </p>
5
7
 
6
8
  <p align="center">
@@ -19,53 +21,49 @@ Want to run from the cloud or integrate it with your CI/CD? See <a href="https:/
19
21
  <!-- <p align="center">
20
22
  <img src="screenshot.png" alt="Pensar Apex Screenshot" width="800">
21
23
  </p> -->
24
+ ## What is Apex?
22
25
 
23
- ## Use Cases
26
+ Apex is an autonomous penetration testing agent that runs directly in your terminal.
24
27
 
25
- Apex enables both developers and security professionals to run autonomous and assisted penetration testing directly from the terminal.
28
+ It doesn't wrap existing scanners or chain shell scripts. Apex deploys a **swarm of specialized AI agents** each with domain expertise in reconnaissance, authentication analysis, exploitation, and code review — that coordinate a real penetration test against your application. Each agent follows a structured methodology: plan, verify, prepare, test, exploit, and document. Every finding comes with CVSS 4.0 scoring, CWE classification, evidence, and a validated proof-of-concept.
26
29
 
27
- ### Developers: Run a Pentest in Minutes
30
+ The result is a pentest that runs like `npm test` — but thinks like a red team.
28
31
 
29
- Apex makes it easy for developers to run a real penetration test without needing deep offensive security expertise.
32
+ ## Why Apex?
30
33
 
31
- Using the autonomous `/pentest` mode, Apex will perform reconnaissance, attack surface discovery, vulnerability testing, and exploitation attempts automatically.
34
+ Traditional scanners execute signatures. Apex executes a methodology.
32
35
 
33
- This allows teams to quickly identify security issues before they reach production.
36
+ - **Swarm architecture** - Specialized agents run in parallel across your attack surface, the same way a real red team divides and conquers. Up to 10 concurrent agents, each scoped to a specific objective.
37
+ - **Structured, auditable output** - Every vulnerability is automatically scored (CVSS 4.0), classified (CWE), and documented with evidence and remediation steps. No raw tool dumps.
38
+ - **Real exploitation, not guesswork** - Apex writes, runs, and validates proof-of-concept scripts. If the PoC doesn't succeed, it pivots to a different technique.
39
+ - **Blackbox and whitebox** - Test a live target with no source access, or analyze your codebase to map endpoints and test them against a running instance.
40
+ - **30+ built-in tools** - Browser automation, shell execution, HTTP requests, file analysis, web search for CVE lookups, authenticated crawling, and more. Optional Kali Linux container adds 25+ offensive security tools (nmap, sqlmap, hydra, hashcat, gobuster, and others).
34
41
 
35
- ```bash
36
- /pentest
37
- ```
42
+ ## Two Modes
38
43
 
39
- Examples:
44
+ ### `/pentest` — Autonomous
40
45
 
41
- - Test a staging environment before deploying
42
- - Scan a newly launched domain or API
43
- - Run quick security checks during development
44
- - Identify exposed services or misconfigurations
46
+ Fire and forget. Apex runs a full engagement end-to-end: attack surface discovery, parallel swarm testing, and a structured report with findings in Markdown and JSON. No security expertise required.
45
47
 
46
- This is the **fastest way to get real pentesting coverage without becoming a security expert.**
48
+ ### `/operator` Interactive
47
49
 
48
- ---
50
+ Full control. Steer the agent step by step, approve each action, chain exploits manually, and dig deep into specific targets. Every tool is available. The approval gate holds until you say go.
49
51
 
50
- ### Security Engineers: Advanced Operator Workflows
52
+ Start with `/pentest` to get coverage, then reopen the session in `/operator` to investigate specific findings — all context carries over.
51
53
 
52
- Security professionals can use Apex as an **agentic offensive security harness** that orchestrates tools and reasoning workflows.
53
-
54
- The `/operator` mode allows engineers to work interactively with the Offensive Security Agent, guiding investigations and chaining tools dynamically.
55
-
56
- ```bash
57
- /operator
58
- ```
54
+ ## Use Cases
59
55
 
60
- Examples:
56
+ ### Developers
57
+ - Run `/pentest` before merging a PR — catch vulnerabilities as naturally as running tests
58
+ - Get actionable findings with severity scores, evidence, and suggested fixes — no security background needed
59
+ - Integrate into CI/CD via headless CLI commands or Pensar Console
61
60
 
62
- - Deep investigation of suspicious endpoints
63
- - Manual exploitation of discovered vulnerabilities
64
- - Tool orchestration across recon and exploitation phases
65
- - Validation and reproduction of vulnerabilities
66
- - Open-source security research / testing
61
+ ### Security Engineers
62
+ - Deploy agent-driven swarm testing across large attack surfaces
63
+ - Use `/operator` mode for manual investigation, exploit chaining, and validation
64
+ - Automate repetitive testing workflows with persistent memory that accumulates across engagements
65
+ - Scale across teams and projects through Pensar Console
67
66
 
68
- This turns Apex into a **terminal-native AI pentesting partner** rather than just a scanner.
69
67
 
70
68
  ## Installation
71
69
 
@@ -82,17 +80,18 @@ brew tap pensarai/tap
82
80
  brew install apex
83
81
  ```
84
82
 
83
+ #### npm
84
+
85
+ ```bash
86
+ npm install -g @pensar/apex
87
+ ```
88
+
85
89
  #### Windows (PowerShell)
86
90
 
87
91
  ```powershell
88
92
  irm https://www.pensarai.com/apex.ps1 | iex
89
93
  ```
90
94
 
91
- #### npm
92
-
93
- ```bash
94
- npm install -g @pensar/apex
95
- ```
96
95
 
97
96
  ## Usage
98
97
 
@@ -0,0 +1,16 @@
1
+ import {
2
+ CodeAgent
3
+ } from "./cli-8yze7t68.js";
4
+ import"./cli-khem6ept.js";
5
+ import"./cli-8sm33f4k.js";
6
+ import"./cli-5ekr1ws4.js";
7
+ import"./cli-9tzcmrd4.js";
8
+ import"./cli-16m30n7b.js";
9
+ import"./cli-3tntsb59.js";
10
+ import"./cli-8q94bv77.js";
11
+ import"./cli-0tpx8khk.js";
12
+ import"./cli-7ckctq7a.js";
13
+ import"./cli-8rxa073f.js";
14
+ export {
15
+ CodeAgent
16
+ };
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  WhiteboxAttackSurfaceResultSchema
3
- } from "./cli-2ckm5es2.js";
3
+ } from "./cli-renwxhw7.js";
4
4
  import {
5
5
  OffensiveSecurityAgent
6
- } from "./cli-r8r90gka.js";
7
- import"./cli-jh38b6zv.js";
6
+ } from "./cli-khem6ept.js";
7
+ import"./cli-8sm33f4k.js";
8
8
  import {
9
9
  hasToolCall,
10
10
  tool
11
- } from "./cli-kqtgcdzn.js";
12
- import"./cli-j66pect7.js";
13
- import"./cli-bp6d08sg.js";
14
- import"./cli-jb0gcnrs.js";
15
- import"./cli-yj3dy0vg.js";
16
- import"./cli-15vxn9zj.js";
11
+ } from "./cli-5ekr1ws4.js";
12
+ import"./cli-9tzcmrd4.js";
13
+ import"./cli-16m30n7b.js";
14
+ import"./cli-3tntsb59.js";
15
+ import"./cli-8q94bv77.js";
16
+ import"./cli-0tpx8khk.js";
17
17
  import"./cli-7ckctq7a.js";
18
18
  import"./cli-8rxa073f.js";
19
19
 
@@ -8,14 +8,14 @@ import {
8
8
  pollWorkOSToken,
9
9
  selectWorkspace,
10
10
  startDeviceFlow
11
- } from "./cli-j66pect7.js";
11
+ } from "./cli-9tzcmrd4.js";
12
12
  import {
13
13
  config,
14
14
  getPensarApiUrl,
15
15
  getPensarConsoleUrl
16
- } from "./cli-bp6d08sg.js";
17
- import"./cli-jb0gcnrs.js";
18
- import"./cli-yj3dy0vg.js";
16
+ } from "./cli-16m30n7b.js";
17
+ import"./cli-3tntsb59.js";
18
+ import"./cli-8q94bv77.js";
19
19
  import {
20
20
  __require
21
21
  } from "./cli-8rxa073f.js";
@@ -172,9 +172,10 @@ If the browser didn't open, visit: ${consoleUrl}/create-workspace?redirect=/cred
172
172
  ✓ Connected to Pensar Console
173
173
  Workspace: ${workspace.name} (${workspace.slug})
174
174
  Credits: $${result.billing.balance.toFixed(2)}`);
175
- if (!result.confirmed && result.billingUrl) {
175
+ const needsBillingSetup = !result.billing.ready && result.billing.balance <= 0 && !!result.billingUrl;
176
+ if (needsBillingSetup && result.billingUrl) {
176
177
  console.log(`
177
- ⚠ Your workspace needs credits. Add them at:
178
+ ⚠ Your workspace billing setup is not ready yet. Finish setup at:
178
179
  ${result.billingUrl}`);
179
180
  } else if (result.billing.balance < 1) {
180
181
  const billingUrl = `${getPensarConsoleUrl()}/${workspace.slug}/settings/billing`;
@@ -3,16 +3,16 @@ import {
3
3
  } from "./cli-6gtnyaqf.js";
4
4
  import {
5
5
  OffensiveSecurityAgent
6
- } from "./cli-r8r90gka.js";
7
- import"./cli-jh38b6zv.js";
6
+ } from "./cli-khem6ept.js";
7
+ import"./cli-8sm33f4k.js";
8
8
  import {
9
9
  hasToolCall
10
- } from "./cli-kqtgcdzn.js";
11
- import"./cli-j66pect7.js";
12
- import"./cli-bp6d08sg.js";
13
- import"./cli-jb0gcnrs.js";
14
- import"./cli-yj3dy0vg.js";
15
- import"./cli-15vxn9zj.js";
10
+ } from "./cli-5ekr1ws4.js";
11
+ import"./cli-9tzcmrd4.js";
12
+ import"./cli-16m30n7b.js";
13
+ import"./cli-3tntsb59.js";
14
+ import"./cli-8q94bv77.js";
15
+ import"./cli-0tpx8khk.js";
16
16
  import"./cli-7ckctq7a.js";
17
17
  import"./cli-8rxa073f.js";
18
18
 
@@ -0,0 +1,17 @@
1
+ import {
2
+ BlackboxAttackSurfaceAgent
3
+ } from "./cli-0atrar08.js";
4
+ import"./cli-6gtnyaqf.js";
5
+ import"./cli-khem6ept.js";
6
+ import"./cli-8sm33f4k.js";
7
+ import"./cli-5ekr1ws4.js";
8
+ import"./cli-9tzcmrd4.js";
9
+ import"./cli-16m30n7b.js";
10
+ import"./cli-3tntsb59.js";
11
+ import"./cli-8q94bv77.js";
12
+ import"./cli-0tpx8khk.js";
13
+ import"./cli-7ckctq7a.js";
14
+ import"./cli-8rxa073f.js";
15
+ export {
16
+ BlackboxAttackSurfaceAgent
17
+ };
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  runPentestWorkflow
3
- } from "./cli-f9shhcxf.js";
4
- import"./cli-e20q3hqz.js";
5
- import"./cli-w04ggbe4.js";
6
- import"./cli-2ckm5es2.js";
7
- import"./cli-hmrzx8am.js";
3
+ } from "./cli-ee7y516a.js";
4
+ import"./cli-vzq3vcqa.js";
5
+ import"./cli-8yze7t68.js";
6
+ import"./cli-renwxhw7.js";
7
+ import"./cli-0atrar08.js";
8
8
  import"./cli-6gtnyaqf.js";
9
- import"./cli-r8r90gka.js";
10
- import"./cli-jh38b6zv.js";
11
- import"./cli-kqtgcdzn.js";
12
- import"./cli-j66pect7.js";
13
- import"./cli-bp6d08sg.js";
14
- import"./cli-jb0gcnrs.js";
15
- import"./cli-yj3dy0vg.js";
16
- import"./cli-15vxn9zj.js";
9
+ import"./cli-khem6ept.js";
10
+ import"./cli-8sm33f4k.js";
11
+ import"./cli-5ekr1ws4.js";
12
+ import"./cli-9tzcmrd4.js";
13
+ import"./cli-16m30n7b.js";
14
+ import"./cli-3tntsb59.js";
15
+ import"./cli-8q94bv77.js";
16
+ import"./cli-0tpx8khk.js";
17
17
  import"./cli-7ckctq7a.js";
18
18
  import"./cli-8rxa073f.js";
19
19
 
@@ -3,11 +3,11 @@ import {
3
3
  } from "./cli-6gtnyaqf.js";
4
4
  import {
5
5
  OffensiveSecurityAgent
6
- } from "./cli-r8r90gka.js";
6
+ } from "./cli-khem6ept.js";
7
7
  import {
8
8
  hasToolCall,
9
9
  stepCountIs
10
- } from "./cli-kqtgcdzn.js";
10
+ } from "./cli-5ekr1ws4.js";
11
11
 
12
12
  // src/core/agents/specialized/attackSurface/blackboxAgent.ts
13
13
  import { join } from "path";
@@ -279,10 +279,13 @@ For each asset, include:
279
279
  - Technology stack (only what you have evidence for)
280
280
  - Authentication requirements
281
281
  - Risk level (LOW / MEDIUM / HIGH / CRITICAL)
282
+ - \`pentestObjectives\` — specific pentest objectives (see 5b below)
282
283
 
283
- ## 5b. Identify pentest objectives
284
+ ## 5b. Include pentest objectives with every asset
284
285
 
285
- For each asset, determine what a pentest agent should test. Map asset types to specific vulnerability classes:
286
+ **Every \`document_asset\` call MUST include a \`pentestObjectives\` array.** These objectives are passed directly to pentest agents downstream — they define exactly what each agent will test. An asset without objectives will not be pentested.
287
+
288
+ Map asset types to specific vulnerability classes:
286
289
 
287
290
  | Asset Type | Test For |
288
291
  |---|---|
@@ -297,8 +300,8 @@ For each asset, determine what a pentest agent should test. Map asset types to s
297
300
  | Encrypted session tokens | Cipher mode attacks, padding oracle, session forgery |
298
301
 
299
302
  Write objectives that are **specific**, not vague:
300
- - Good: "Test for IDOR in /api/orders/{id} — verify whether user A can access user B's orders by manipulating the order ID"
301
- - Bad: "Test for vulnerabilities"
303
+ - Good: \`pentestObjectives: ["Test for IDOR in /api/orders/{id} — verify whether user A can access user B's orders by manipulating the order ID"]\`
304
+ - Bad: \`pentestObjectives: ["Test for vulnerabilities"]\`
302
305
 
303
306
  ## 5c. Include authentication info with every target
304
307
 
@@ -238,30 +238,6 @@ var OPENAI_MODELS = [
238
238
  provider: "openai",
239
239
  contextLength: 128000
240
240
  },
241
- {
242
- id: "gpt-4-turbo",
243
- name: "GPT-4-turbo",
244
- provider: "openai",
245
- contextLength: 128000
246
- },
247
- {
248
- id: "gpt-4-turbo-2024-04-09",
249
- name: "GPT-4-turbo-2024-04-09",
250
- provider: "openai",
251
- contextLength: 128000
252
- },
253
- {
254
- id: "gpt-4",
255
- name: "GPT-4",
256
- provider: "openai",
257
- contextLength: 8192
258
- },
259
- {
260
- id: "gpt-4-0613",
261
- name: "GPT-4-0613",
262
- provider: "openai",
263
- contextLength: 8192
264
- },
265
241
  {
266
242
  id: "gpt-3.5-turbo-0125",
267
243
  name: "GPT-3.5-turbo-0125",
@@ -286,12 +262,6 @@ var OPENAI_MODELS = [
286
262
  provider: "openai",
287
263
  contextLength: 16385
288
264
  },
289
- {
290
- id: "chatgpt-4o-latest",
291
- name: "ChatGPT-4o (Latest)",
292
- provider: "openai",
293
- contextLength: 128000
294
- },
295
265
  {
296
266
  id: "gpt-5",
297
267
  name: "GPT-5",
@@ -381,6 +351,36 @@ var OPENAI_MODELS = [
381
351
  name: "GPT-5.2-pro-2025-12-11",
382
352
  provider: "openai",
383
353
  contextLength: 200000
354
+ },
355
+ {
356
+ id: "gpt-5.3-chat-latest",
357
+ name: "GPT-5.3-chat (Latest)",
358
+ provider: "openai",
359
+ contextLength: 200000
360
+ },
361
+ {
362
+ id: "gpt-5.4",
363
+ name: "GPT-5.4",
364
+ provider: "openai",
365
+ contextLength: 200000
366
+ },
367
+ {
368
+ id: "gpt-5.4-2026-03-05",
369
+ name: "GPT-5.4-2026-03-05",
370
+ provider: "openai",
371
+ contextLength: 200000
372
+ },
373
+ {
374
+ id: "gpt-5.4-pro",
375
+ name: "GPT-5.4-pro",
376
+ provider: "openai",
377
+ contextLength: 200000
378
+ },
379
+ {
380
+ id: "gpt-5.4-pro-2026-03-05",
381
+ name: "GPT-5.4-pro-2026-03-05",
382
+ provider: "openai",
383
+ contextLength: 200000
384
384
  }
385
385
  ];
386
386
 
@@ -2,7 +2,7 @@ import {
2
2
  get,
3
3
  init,
4
4
  update
5
- } from "./cli-jb0gcnrs.js";
5
+ } from "./cli-3tntsb59.js";
6
6
 
7
7
  // src/core/api/constants.ts
8
8
  var PENSAR_API_BASE_URL = "https://api.pensar.dev";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getCurrentVersion
3
- } from "./cli-yj3dy0vg.js";
3
+ } from "./cli-8q94bv77.js";
4
4
 
5
5
  // src/core/config/config.ts
6
6
  import os from "os";