pentesting 0.23.0 → 0.24.0

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 (2) hide show
  1. package/dist/main.js +29 -65
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -127,11 +127,11 @@ var AGENT_LIMITS = {
127
127
  /** ID radix for generation */
128
128
  ID_RADIX: 36,
129
129
  /** Maximum token budget for LLM response (matches LLM_LIMITS.streamMaxTokens) */
130
- MAX_TOKENS: 16384,
130
+ MAX_TOKENS: 32768,
131
131
  /** Maximum consecutive idle iterations before nudging agent (deadlock prevention) */
132
132
  MAX_CONSECUTIVE_IDLE: 3,
133
133
  /** Maximum tool output length before truncation (context hygiene) */
134
- MAX_TOOL_OUTPUT_LENGTH: 1e4,
134
+ MAX_TOOL_OUTPUT_LENGTH: 2e4,
135
135
  /** Max chars to include in blocked pattern tracking key (loop detection) */
136
136
  BLOCKED_PATTERN_KEY_SLICE: 80,
137
137
  /** Max chars of error text to include in web_search suggestion */
@@ -183,7 +183,7 @@ var EXIT_CODES = {
183
183
  var ID_LENGTH = AGENT_LIMITS.ID_LENGTH;
184
184
  var ID_RADIX = AGENT_LIMITS.ID_RADIX;
185
185
  var APP_NAME = "Pentest AI";
186
- var APP_VERSION = "0.23.0";
186
+ var APP_VERSION = "0.24.0";
187
187
  var APP_DESCRIPTION = "Autonomous Penetration Testing AI Agent";
188
188
  var LLM_ROLES = {
189
189
  SYSTEM: "system",
@@ -867,11 +867,6 @@ var WORKSPACE = {
867
867
  return path.join(getWorkspaceRoot(), "temp");
868
868
  }
869
869
  };
870
- var PATHS = {
871
- ROOT: PROJECT_ROOT,
872
- SRC: path.join(PROJECT_ROOT, "src"),
873
- DIST: path.join(PROJECT_ROOT, "dist")
874
- };
875
870
 
876
871
  // src/shared/utils/debug-logger.ts
877
872
  var DebugLogger = class _DebugLogger {
@@ -3128,10 +3123,6 @@ Detail: ${p.detail}
3128
3123
  import { execFileSync } from "child_process";
3129
3124
 
3130
3125
  // src/shared/utils/config.ts
3131
- import path2 from "path";
3132
- import { fileURLToPath as fileURLToPath2 } from "url";
3133
- var __filename2 = fileURLToPath2(import.meta.url);
3134
- var __dirname2 = path2.dirname(__filename2);
3135
3126
  var ENV_KEYS = {
3136
3127
  API_KEY: "PENTEST_API_KEY",
3137
3128
  BASE_URL: "PENTEST_BASE_URL",
@@ -5884,15 +5875,6 @@ var CLOUD_KEYWORDS = [
5884
5875
  "heroku",
5885
5876
  "vercel"
5886
5877
  ];
5887
- var PASSIVE_CATEGORIES = [
5888
- SERVICE_CATEGORIES.NETWORK
5889
- ];
5890
- var ACTIVE_CATEGORIES = [
5891
- SERVICE_CATEGORIES.WEB,
5892
- SERVICE_CATEGORIES.API,
5893
- SERVICE_CATEGORIES.EMAIL,
5894
- SERVICE_CATEGORIES.FILE_SHARING
5895
- ];
5896
5878
  var DANGER_LEVEL_MAP = {
5897
5879
  [SERVICE_CATEGORIES.NETWORK]: DANGER_LEVELS.PASSIVE,
5898
5880
  [SERVICE_CATEGORIES.WEB]: DANGER_LEVELS.ACTIVE,
@@ -5941,80 +5923,80 @@ var ServiceParser = class {
5941
5923
 
5942
5924
  // src/domains/registry.ts
5943
5925
  import { join as join6, dirname as dirname3 } from "path";
5944
- import { fileURLToPath as fileURLToPath3 } from "url";
5945
- var __dirname3 = dirname3(fileURLToPath3(import.meta.url));
5926
+ import { fileURLToPath as fileURLToPath2 } from "url";
5927
+ var __dirname2 = dirname3(fileURLToPath2(import.meta.url));
5946
5928
  var DOMAINS = {
5947
5929
  [SERVICE_CATEGORIES.NETWORK]: {
5948
5930
  id: SERVICE_CATEGORIES.NETWORK,
5949
5931
  name: "Network Infrastructure",
5950
5932
  description: "Vulnerability scanning, port mapping, and network service exploitation.",
5951
- promptPath: join6(__dirname3, "network/prompt.md")
5933
+ promptPath: join6(__dirname2, "network/prompt.md")
5952
5934
  },
5953
5935
  [SERVICE_CATEGORIES.WEB]: {
5954
5936
  id: SERVICE_CATEGORIES.WEB,
5955
5937
  name: "Web Application",
5956
5938
  description: "Web app security testing, injection attacks, and auth bypass.",
5957
- promptPath: join6(__dirname3, "web/prompt.md")
5939
+ promptPath: join6(__dirname2, "web/prompt.md")
5958
5940
  },
5959
5941
  [SERVICE_CATEGORIES.DATABASE]: {
5960
5942
  id: SERVICE_CATEGORIES.DATABASE,
5961
5943
  name: "Database Security",
5962
5944
  description: "SQL injection, database enumeration, and data extraction.",
5963
- promptPath: join6(__dirname3, "database/prompt.md")
5945
+ promptPath: join6(__dirname2, "database/prompt.md")
5964
5946
  },
5965
5947
  [SERVICE_CATEGORIES.AD]: {
5966
5948
  id: SERVICE_CATEGORIES.AD,
5967
5949
  name: "Active Directory",
5968
5950
  description: "Kerberos, LDAP, and Windows domain privilege escalation.",
5969
- promptPath: join6(__dirname3, "ad/prompt.md")
5951
+ promptPath: join6(__dirname2, "ad/prompt.md")
5970
5952
  },
5971
5953
  [SERVICE_CATEGORIES.EMAIL]: {
5972
5954
  id: SERVICE_CATEGORIES.EMAIL,
5973
5955
  name: "Email Services",
5974
5956
  description: "SMTP, IMAP, POP3 security and user enumeration.",
5975
- promptPath: join6(__dirname3, "email/prompt.md")
5957
+ promptPath: join6(__dirname2, "email/prompt.md")
5976
5958
  },
5977
5959
  [SERVICE_CATEGORIES.REMOTE_ACCESS]: {
5978
5960
  id: SERVICE_CATEGORIES.REMOTE_ACCESS,
5979
5961
  name: "Remote Access",
5980
5962
  description: "SSH, RDP, VNC and other remote control protocols.",
5981
- promptPath: join6(__dirname3, "remote-access/prompt.md")
5963
+ promptPath: join6(__dirname2, "remote-access/prompt.md")
5982
5964
  },
5983
5965
  [SERVICE_CATEGORIES.FILE_SHARING]: {
5984
5966
  id: SERVICE_CATEGORIES.FILE_SHARING,
5985
5967
  name: "File Sharing",
5986
5968
  description: "SMB, NFS, FTP and shared resource security.",
5987
- promptPath: join6(__dirname3, "file-sharing/prompt.md")
5969
+ promptPath: join6(__dirname2, "file-sharing/prompt.md")
5988
5970
  },
5989
5971
  [SERVICE_CATEGORIES.CLOUD]: {
5990
5972
  id: SERVICE_CATEGORIES.CLOUD,
5991
5973
  name: "Cloud Infrastructure",
5992
5974
  description: "AWS, Azure, and GCP security and misconfiguration.",
5993
- promptPath: join6(__dirname3, "cloud/prompt.md")
5975
+ promptPath: join6(__dirname2, "cloud/prompt.md")
5994
5976
  },
5995
5977
  [SERVICE_CATEGORIES.CONTAINER]: {
5996
5978
  id: SERVICE_CATEGORIES.CONTAINER,
5997
5979
  name: "Container Systems",
5998
5980
  description: "Docker and Kubernetes security testing.",
5999
- promptPath: join6(__dirname3, "container/prompt.md")
5981
+ promptPath: join6(__dirname2, "container/prompt.md")
6000
5982
  },
6001
5983
  [SERVICE_CATEGORIES.API]: {
6002
5984
  id: SERVICE_CATEGORIES.API,
6003
5985
  name: "API Security",
6004
5986
  description: "REST, GraphQL, and SOAP API security testing.",
6005
- promptPath: join6(__dirname3, "api/prompt.md")
5987
+ promptPath: join6(__dirname2, "api/prompt.md")
6006
5988
  },
6007
5989
  [SERVICE_CATEGORIES.WIRELESS]: {
6008
5990
  id: SERVICE_CATEGORIES.WIRELESS,
6009
5991
  name: "Wireless Networks",
6010
5992
  description: "WiFi and Bluetooth security testing.",
6011
- promptPath: join6(__dirname3, "wireless/prompt.md")
5993
+ promptPath: join6(__dirname2, "wireless/prompt.md")
6012
5994
  },
6013
5995
  [SERVICE_CATEGORIES.ICS]: {
6014
5996
  id: SERVICE_CATEGORIES.ICS,
6015
5997
  name: "Industrial Systems",
6016
5998
  description: "Critical infrastructure - Modbus, DNP3, ENIP.",
6017
- promptPath: join6(__dirname3, "ics/prompt.md")
5999
+ promptPath: join6(__dirname2, "ics/prompt.md")
6018
6000
  }
6019
6001
  };
6020
6002
 
@@ -6185,8 +6167,8 @@ var RETRY_CONFIG = {
6185
6167
  // Initial delay for rate limit retry (exponential backoff)
6186
6168
  };
6187
6169
  var LLM_LIMITS = {
6188
- nonStreamMaxTokens: 8192,
6189
- streamMaxTokens: 16384,
6170
+ nonStreamMaxTokens: 16384,
6171
+ streamMaxTokens: 32768,
6190
6172
  /** WHY: ~3.5 chars/token is a reasonable average for mixed English/CJK content */
6191
6173
  charsPerTokenEstimate: 3.5
6192
6174
  };
@@ -6199,26 +6181,8 @@ var LLM_ERROR_TYPES = {
6199
6181
  UNKNOWN: "unknown"
6200
6182
  };
6201
6183
 
6202
- // src/shared/constants/_shared/http.const.ts
6203
- var HTTP_STATUS = {
6204
- // 2xx Success
6205
- OK: 200,
6206
- CREATED: 201,
6207
- NO_CONTENT: 204,
6208
- // 4xx Client Errors
6209
- BAD_REQUEST: 400,
6210
- UNAUTHORIZED: 401,
6211
- FORBIDDEN: 403,
6212
- NOT_FOUND: 404,
6213
- RATE_LIMIT: 429,
6214
- // 5xx Server Errors
6215
- INTERNAL_ERROR: 500,
6216
- BAD_GATEWAY: 502,
6217
- SERVICE_UNAVAILABLE: 503,
6218
- GATEWAY_TIMEOUT: 504
6219
- };
6220
-
6221
6184
  // src/engine/llm-types.ts
6185
+ var HTTP_STATUS = { BAD_REQUEST: 400, UNAUTHORIZED: 401, FORBIDDEN: 403, RATE_LIMIT: 429 };
6222
6186
  var LLMError = class extends Error {
6223
6187
  /** Structured error information */
6224
6188
  errorInfo;
@@ -6584,14 +6548,14 @@ function logLLM(message, data) {
6584
6548
  }
6585
6549
 
6586
6550
  // src/engine/orchestrator/orchestrator.ts
6587
- import { fileURLToPath as fileURLToPath4 } from "url";
6551
+ import { fileURLToPath as fileURLToPath3 } from "url";
6588
6552
  import { dirname as dirname4, join as join7 } from "path";
6589
- var __filename3 = fileURLToPath4(import.meta.url);
6590
- var __dirname4 = dirname4(__filename3);
6553
+ var __filename2 = fileURLToPath3(import.meta.url);
6554
+ var __dirname3 = dirname4(__filename2);
6591
6555
 
6592
6556
  // src/engine/state-persistence.ts
6593
6557
  import { writeFileSync as writeFileSync5, readFileSync as readFileSync3, existsSync as existsSync5, readdirSync, statSync, unlinkSync as unlinkSync3 } from "fs";
6594
- import { join as join8, basename } from "path";
6558
+ import { join as join8 } from "path";
6595
6559
  function saveState(state) {
6596
6560
  const sessionsDir = WORKSPACE.SESSIONS;
6597
6561
  ensureDirExists(sessionsDir);
@@ -7277,7 +7241,7 @@ Please decide how to handle this error and continue.`;
7277
7241
  // src/agents/prompt-builder.ts
7278
7242
  import { readFileSync as readFileSync4, existsSync as existsSync6, readdirSync as readdirSync2 } from "fs";
7279
7243
  import { join as join9, dirname as dirname5 } from "path";
7280
- import { fileURLToPath as fileURLToPath5 } from "url";
7244
+ import { fileURLToPath as fileURLToPath4 } from "url";
7281
7245
 
7282
7246
  // src/shared/constants/prompts.ts
7283
7247
  var PROMPT_PATHS = {
@@ -7331,8 +7295,8 @@ var INITIAL_TASKS = {
7331
7295
  };
7332
7296
 
7333
7297
  // src/agents/prompt-builder.ts
7334
- var __dirname5 = dirname5(fileURLToPath5(import.meta.url));
7335
- var PROMPTS_DIR = join9(__dirname5, "prompts");
7298
+ var __dirname4 = dirname5(fileURLToPath4(import.meta.url));
7299
+ var PROMPTS_DIR = join9(__dirname4, "prompts");
7336
7300
  var TECHNIQUES_DIR = join9(PROMPTS_DIR, PROMPT_PATHS.TECHNIQUES_DIR);
7337
7301
  var { AGENT_FILES } = PROMPT_PATHS;
7338
7302
  var PHASE_PROMPT_MAP = {
@@ -7421,8 +7385,8 @@ ${content}
7421
7385
  * Load a prompt file from src/agents/prompts/
7422
7386
  */
7423
7387
  loadPromptFile(filename) {
7424
- const path3 = join9(PROMPTS_DIR, filename);
7425
- return existsSync6(path3) ? readFileSync4(path3, PROMPT_CONFIG.ENCODING) : "";
7388
+ const path2 = join9(PROMPTS_DIR, filename);
7389
+ return existsSync6(path2) ? readFileSync4(path2, PROMPT_CONFIG.ENCODING) : "";
7426
7390
  }
7427
7391
  /**
7428
7392
  * Load phase-specific prompt.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pentesting",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "Autonomous Penetration Testing AI Agent",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",