@pensar/apex 2.4.0 → 2.5.0-canary.0af37eb0

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 (94) hide show
  1. package/build/agent-2edb792c.js +12 -0
  2. package/build/agent-317v8mmz.js +12 -0
  3. package/build/agent-vzqc5vtn.js +14 -0
  4. package/build/{agent-5ejt5vpz.js → agent-y85zsera.js} +42 -42
  5. package/build/{apps-17wvz1d7.js → apps-qf8jww9t.js} +74 -43
  6. package/build/{auth-z3h9859n.js → auth-wf1r533f.js} +57 -61
  7. package/build/blackboxAgent-cb4na30e.js +12 -0
  8. package/build/blackboxPentest-bf7b9m36.js +58 -0
  9. package/build/{cli-9rhzhgx2.js → cli-079enner.js} +5 -5
  10. package/build/cli-4ptm7wgt.js +12188 -0
  11. package/build/{cli-tznv8pf1.js → cli-6hrf9z35.js} +4 -4
  12. package/build/{cli-mavved45.js → cli-80mx747a.js} +89 -96
  13. package/build/cli-8w8k4dph.js +15 -0
  14. package/build/{cli-2cbwdk78.js → cli-a4v5vwfw.js} +4 -4
  15. package/build/cli-ag6jtndp.js +32 -0
  16. package/build/cli-bb02pjt0.js +1485 -0
  17. package/build/{cli-k71t434r.js → cli-ec2hwkv3.js} +34 -76
  18. package/build/{cli-k8kc47pq.js → cli-f3sg3e9x.js} +118 -115
  19. package/build/{cli-bc05qbss.js → cli-h6y3bt60.js} +13 -21
  20. package/build/{cli-xshasbwe.js → cli-jzcsaygf.js} +31 -52
  21. package/build/{cli-vnynf0js.js → cli-k8hgxz61.js} +11 -5
  22. package/build/{cli-32z0017y.js → cli-kn55pk78.js} +36 -60
  23. package/build/{cli-tkc598ey.js → cli-q8pr0zqg.js} +10042 -7665
  24. package/build/{cli-j54qa6tm.js → cli-qktcyj48.js} +1 -1
  25. package/build/cli-retw3rw5.js +12 -0
  26. package/build/{cli-b1adytsy.js → cli-s2y86fd5.js} +67 -39
  27. package/build/{cli-vq52kp7j.js → cli-t6mngnwd.js} +150 -128
  28. package/build/cli-tjm77pmx.js +12075 -0
  29. package/build/{cli-dm0fc0bm.js → cli-v1sarr4y.js} +5 -9
  30. package/build/cli-wpmm960k.js +22 -0
  31. package/build/{cli-5k33webc.js → cli-x069hfr2.js} +355 -332
  32. package/build/{cli-ee3axgts.js → cli-xbhr5khz.js} +1 -1
  33. package/build/{cli-repbyhkk.js → cli-y212s0r8.js} +26315 -25555
  34. package/build/cli-z82n3qk1.js +6 -0
  35. package/build/{cli-gq40s5b3.js → cli-zky875st.js} +33 -46
  36. package/build/cli.js +696 -132
  37. package/build/{config-f1mj4nhd.js → config-g93k0986.js} +29 -29
  38. package/build/{doctor-ekneewa3.js → doctor-4fcx7g0h.js} +4 -9
  39. package/build/{fastStrike-8zka43xs.js → fastStrike-af31ggmt.js} +26 -28
  40. package/build/{fixes-b89s5haw.js → fixes-6kxes4g7.js} +22 -27
  41. package/build/getMachineId-bsd-zr67nd9p.js +36 -0
  42. package/build/getMachineId-darwin-fd1d562d.js +36 -0
  43. package/build/getMachineId-linux-kjmg243j.js +29 -0
  44. package/build/getMachineId-unsupported-n4r58vke.js +19 -0
  45. package/build/getMachineId-win-yzgpfsrb.js +38 -0
  46. package/build/{index-sf16jm0m.js → index-3dpcjj6e.js} +137 -162
  47. package/build/index-4b9nc9e8.js +36 -0
  48. package/build/index-9f0xagac.js +22 -0
  49. package/build/index-9y2bjhh2.js +100 -0
  50. package/build/index-a1bg29j1.js +1559 -0
  51. package/build/{index-cbwn03kz.js → index-a2xycbjs.js} +12 -31
  52. package/build/index-k1mb1edx.js +12 -0
  53. package/build/{index-psqjpw5m.js → index-nweqptgs.js} +7 -7
  54. package/build/{index-6d22pyxt.js → index-r8554acn.js} +3000 -2435
  55. package/build/index-rjmmakbh.js +17 -0
  56. package/build/index-yfcbhfc1.js +9 -0
  57. package/build/{issues-xx5bs4md.js → issues-vgfdw93j.js} +81 -35
  58. package/build/{logs-qtxe51w2.js → logs-czxxx0n0.js} +20 -25
  59. package/build/{multipart-parser-g2xxkezz.js → multipart-parser-vjjdbpd1.js} +10 -10
  60. package/build/{offesecAgent-b9e2xm6v.js → offesecAgent-jwnbnsqm.js} +6 -13
  61. package/build/{parse-rtccymzn.js → parse-cqecqrc5.js} +0 -4
  62. package/build/pentest-hbwbfw9w.js +21 -0
  63. package/build/{pentests-6ks3szc4.js → pentests-6pp1j1w5.js} +23 -28
  64. package/build/{targetedPentest-s1ptvq8e.js → targetedPentest-34zhke7a.js} +16 -20
  65. package/build/{targets-sxygyj87.js → targets-yvh0d0fr.js} +22 -27
  66. package/build/threatModel-r96hed1d.js +19 -0
  67. package/build/{token-3bbp59y6.js → token-n0tmq8n5.js} +2 -2
  68. package/build/{token-util-6xjme11b.js → token-util-bv80pj47.js} +1 -2
  69. package/build/{uninstall-tvsh81v8.js → uninstall-qdzsynrt.js} +7 -4
  70. package/build/{upload-7wdyyqmr.js → upload-twg8pvy7.js} +7 -13
  71. package/build/{utils-7fwdkqk6.js → utils-cnv9jj0h.js} +7 -29
  72. package/package.json +8 -2
  73. package/build/agent-mvpgvgks.js +0 -19
  74. package/build/agent-nhs1w5w0.js +0 -29
  75. package/build/authentication-3s97cpk4.js +0 -19
  76. package/build/blackboxAgent-gw0a1ca4.js +0 -19
  77. package/build/blackboxPentest-44333zss.js +0 -37
  78. package/build/cli-0n4r54hq.js +0 -414
  79. package/build/cli-72cvcqhg.js +0 -22
  80. package/build/cli-qqt4gj1w.js +0 -53
  81. package/build/cli-swpbx60z.js +0 -24441
  82. package/build/index-4ad3sdwk.js +0 -39
  83. package/build/index-ghwf5z3v.js +0 -12
  84. package/build/index-hqjdg6fg.js +0 -205
  85. package/build/index-mtq7kmxz.js +0 -12856
  86. package/build/index-rbzhk712.js +0 -33
  87. package/build/index-y5w6n3tb.js +0 -19
  88. package/build/main-mmjp338j.js +0 -324
  89. package/build/pentest-xtc1sjdw.js +0 -29
  90. package/build/threatModel-xsm6fwk5.js +0 -27
  91. /package/build/{cli-c8131c4q.js → cli-0wsh8j2t.js} +0 -0
  92. /package/build/{cli-e08r86zk.js → cli-b3dvxjgk.js} +0 -0
  93. /package/build/{cli-fw5r7pfj.js → cli-q126f6ef.js} +0 -0
  94. /package/build/{cli-9fsre5pt.js → cli-qba2x69h.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __commonJS,
3
3
  __require
4
- } from "./cli-bc05qbss.js";
4
+ } from "./cli-h6y3bt60.js";
5
5
 
6
6
  // node_modules/@vercel/oidc/dist/token-error.js
7
7
  var require_token_error = __commonJS(function(exports, module) {
@@ -0,0 +1,12 @@
1
+ // src/core/agents/specialized/mobileOtpPrompt.ts
2
+ var MOBILE_OTP_PROMPT_GUIDANCE = `## Mobile OTP credentials
3
+
4
+ Read each credential's \`Authentication method\` before starting:
5
+ - \`sms-passwordless\`: \`phoneNumber\` is the login identifier, not MFA after a password. Reserve immediately before filling that field, then request the code.
6
+ - \`sms-mfa\`: fill username and password first. If submitting the password triggers the SMS code, reserve immediately before submitting. If it reveals a separate send-code action, reserve immediately before that action. Fill a destination phone field only if the target asks, using \`credentialId\` + \`credentialField="phoneNumber"\`.
7
+
8
+ Never ask for, write, log, or pass a public phone number. Reserve with \`sms_list_messages\` and \`reserve=true\`; the Console chooses the shared number. A 429 means that number is busy: do not wait or poll inside the tool. Make at most two separate reservation attempts (with an \`execute_command\` sleep between them), then report the authentication block.
9
+
10
+ At the action that sends the code, record \`Date.now()\` as \`sinceMs\`. Run \`execute_command\` \`sleep 5\`, then call \`sms_list_messages\` with \`sinceMs\` and \`claim=true\`. If no message arrives, make one delayed list retry; otherwise report the result rather than waiting indefinitely. Fill the claimed OTP and continue. Do not report \`phone_verification\` as a barrier for either Mobile OTP flow. TOTP via an environment variable is unchanged.`;
11
+
12
+ export { MOBILE_OTP_PROMPT_GUIDANCE };
@@ -1,53 +1,60 @@
1
1
  import {
2
- EvidenceFileEntrySchema
3
- } from "./cli-qqt4gj1w.js";
4
- import {
2
+ AttackPathSchema,
5
3
  CweEntrySchema,
6
4
  ValidatedCweEntrySchema,
7
- hasCanonicalName
8
- } from "./cli-repbyhkk.js";
5
+ hasCanonicalName,
6
+ EvidenceFileEntrySchema
7
+ } from "./cli-y212s0r8.js";
9
8
  import {
10
- exports_external,
11
9
  init_zod
12
- } from "./cli-swpbx60z.js";
10
+ } from "./cli-q8pr0zqg.js";
11
+ import {
12
+ string,
13
+ number,
14
+ boolean,
15
+ array,
16
+ object,
17
+ _enum
18
+ } from "./cli-tjm77pmx.js";
13
19
 
14
20
  // src/core/report/schemas.ts
15
21
  init_zod();
16
- var PentestReportFindingSchema = exports_external.object({
17
- title: exports_external.string(),
18
- severity: exports_external.enum(["CRITICAL", "HIGH", "MEDIUM", "LOW"]),
19
- description: exports_external.string(),
20
- impact: exports_external.string(),
21
- evidence: exports_external.string(),
22
- endpoint: exports_external.string(),
23
- pocPath: exports_external.string(),
24
- remediation: exports_external.string(),
25
- references: exports_external.string().optional(),
26
- cwes: exports_external.array(ValidatedCweEntrySchema.or(CweEntrySchema)).optional(),
27
- rootCauseGroup: exports_external.string().optional(),
28
- relatedFindings: exports_external.array(exports_external.string()).optional(),
29
- rootCauseLead: exports_external.boolean().optional(),
30
- evidenceFiles: exports_external.array(EvidenceFileEntrySchema).optional()
22
+ var PentestReportFindingSchema = object({
23
+ title: string(),
24
+ severity: _enum(["CRITICAL", "HIGH", "MEDIUM", "LOW"]),
25
+ description: string(),
26
+ impact: string(),
27
+ evidence: string(),
28
+ endpoint: string(),
29
+ pocPath: string(),
30
+ remediation: string(),
31
+ references: string().optional(),
32
+ cwes: array(ValidatedCweEntrySchema.or(CweEntrySchema)).optional(),
33
+ rootCauseGroup: string().optional(),
34
+ relatedFindings: array(string()).optional(),
35
+ rootCauseLead: boolean().optional(),
36
+ evidenceFiles: array(EvidenceFileEntrySchema).optional(),
37
+ attackPath: AttackPathSchema.optional()
31
38
  });
32
- var PentestReportSchema = exports_external.object({
33
- version: exports_external.string().regex(/^1\.\d+$/),
34
- metadata: exports_external.object({
35
- target: exports_external.string(),
36
- model: exports_external.string(),
37
- timestamp: exports_external.string(),
38
- sessionId: exports_external.string(),
39
- mode: exports_external.enum(["blackbox", "whitebox", "targeted"])
39
+ var PentestReportSchema = object({
40
+ version: string().regex(/^1\.\d+$/),
41
+ metadata: object({
42
+ target: string(),
43
+ model: string(),
44
+ timestamp: string(),
45
+ sessionId: string(),
46
+ mode: _enum(["blackbox", "whitebox", "targeted"])
40
47
  }),
41
- summary: exports_external.object({
42
- totalFindings: exports_external.number(),
43
- bySeverity: exports_external.object({
44
- CRITICAL: exports_external.number(),
45
- HIGH: exports_external.number(),
46
- MEDIUM: exports_external.number(),
47
- LOW: exports_external.number()
48
+ summary: object({
49
+ totalFindings: number(),
50
+ bySeverity: object({
51
+ CRITICAL: number(),
52
+ HIGH: number(),
53
+ MEDIUM: number(),
54
+ LOW: number()
48
55
  })
49
56
  }),
50
- findings: exports_external.array(PentestReportFindingSchema)
57
+ findings: array(PentestReportFindingSchema)
51
58
  });
52
59
  var REPORT_VERSION = "1.0";
53
60
 
@@ -86,7 +93,8 @@ function buildPentestReport(findings, context) {
86
93
  rootCauseGroup: f.rootCauseGroup,
87
94
  relatedFindings: f.relatedFindings,
88
95
  rootCauseLead: f.rootCauseLead,
89
- evidenceFiles: f.evidenceFiles
96
+ evidenceFiles: f.evidenceFiles,
97
+ attackPath: f.attackPath
90
98
  }))
91
99
  };
92
100
  }
@@ -141,6 +149,12 @@ function renderFinding(finding, metadata) {
141
149
  "",
142
150
  finding.impact,
143
151
  "",
152
+ ...finding.attackPath?.length ? [
153
+ "## Attack Path",
154
+ "",
155
+ ...finding.attackPath.map(renderAttackPathHop),
156
+ ""
157
+ ] : [],
144
158
  "## Evidence",
145
159
  "",
146
160
  "```",
@@ -187,6 +201,20 @@ function renderFinding(finding, metadata) {
187
201
  return lines.join(`
188
202
  `);
189
203
  }
204
+ function renderAttackPathHop(hop, index) {
205
+ const parts = [];
206
+ if (hop.applicationName)
207
+ parts.push(`**${hop.applicationName}**`);
208
+ if (hop.applicationId)
209
+ parts.push(`(\`${hop.applicationId}\`)`);
210
+ if (hop.host)
211
+ parts.push(`host \`${hop.host}\``);
212
+ if (hop.relationshipType)
213
+ parts.push(`via ${hop.relationshipType}`);
214
+ if (hop.notes)
215
+ parts.push(`— ${hop.notes}`);
216
+ return `${index + 1}. ${parts.join(" ") || "Unspecified system member"}`;
217
+ }
190
218
 
191
219
  // src/core/report/index.ts
192
220
  var REPORT_FILENAME_MD = "pentest-report.md";