erosolar-cli 1.7.341 → 1.7.343

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 (327) hide show
  1. package/README.md +24 -148
  2. package/dist/bin/erosolar.js +5 -21
  3. package/dist/bin/erosolar.js.map +1 -1
  4. package/dist/capabilities/agentSpawningCapability.d.ts.map +1 -1
  5. package/dist/capabilities/agentSpawningCapability.js +56 -31
  6. package/dist/capabilities/agentSpawningCapability.js.map +1 -1
  7. package/dist/contracts/agent-schemas.json +0 -15
  8. package/dist/contracts/tools.schema.json +0 -9
  9. package/dist/core/agent.d.ts +2 -2
  10. package/dist/core/agent.d.ts.map +1 -1
  11. package/dist/core/agent.js.map +1 -1
  12. package/dist/core/customCommands.d.ts +1 -0
  13. package/dist/core/customCommands.d.ts.map +1 -1
  14. package/dist/core/customCommands.js +3 -0
  15. package/dist/core/customCommands.js.map +1 -1
  16. package/dist/core/hooks.d.ts +113 -0
  17. package/dist/core/hooks.d.ts.map +1 -0
  18. package/dist/core/hooks.js +267 -0
  19. package/dist/core/hooks.js.map +1 -0
  20. package/dist/core/metricsTracker.d.ts +122 -0
  21. package/dist/core/metricsTracker.d.ts.map +1 -0
  22. package/dist/{alpha-zero → core}/metricsTracker.js +2 -5
  23. package/dist/core/metricsTracker.js.map +1 -0
  24. package/dist/core/securityAssessment.d.ts +91 -0
  25. package/dist/core/securityAssessment.d.ts.map +1 -0
  26. package/dist/core/securityAssessment.js +580 -0
  27. package/dist/core/securityAssessment.js.map +1 -0
  28. package/dist/core/sessionStore.d.ts +2 -0
  29. package/dist/core/sessionStore.d.ts.map +1 -1
  30. package/dist/core/sessionStore.js +1 -0
  31. package/dist/core/sessionStore.js.map +1 -1
  32. package/dist/core/toolPreconditions.d.ts.map +1 -1
  33. package/dist/core/toolPreconditions.js +0 -14
  34. package/dist/core/toolPreconditions.js.map +1 -1
  35. package/dist/core/toolRuntime.d.ts +22 -1
  36. package/dist/core/toolRuntime.d.ts.map +1 -1
  37. package/dist/core/toolRuntime.js +0 -5
  38. package/dist/core/toolRuntime.js.map +1 -1
  39. package/dist/core/toolValidation.d.ts.map +1 -1
  40. package/dist/core/toolValidation.js +14 -3
  41. package/dist/core/toolValidation.js.map +1 -1
  42. package/dist/core/validationRunner.d.ts +1 -3
  43. package/dist/core/validationRunner.d.ts.map +1 -1
  44. package/dist/core/validationRunner.js.map +1 -1
  45. package/dist/core/verification.d.ts +137 -0
  46. package/dist/core/verification.d.ts.map +1 -0
  47. package/dist/core/verification.js +323 -0
  48. package/dist/core/verification.js.map +1 -0
  49. package/dist/headless/headlessApp.d.ts.map +1 -1
  50. package/dist/headless/headlessApp.js +21 -0
  51. package/dist/headless/headlessApp.js.map +1 -1
  52. package/dist/mcp/sseClient.d.ts.map +1 -1
  53. package/dist/mcp/sseClient.js +9 -18
  54. package/dist/mcp/sseClient.js.map +1 -1
  55. package/dist/plugins/tools/build/buildPlugin.d.ts +0 -6
  56. package/dist/plugins/tools/build/buildPlugin.d.ts.map +1 -1
  57. package/dist/plugins/tools/build/buildPlugin.js +4 -10
  58. package/dist/plugins/tools/build/buildPlugin.js.map +1 -1
  59. package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -1
  60. package/dist/plugins/tools/nodeDefaults.js +0 -2
  61. package/dist/plugins/tools/nodeDefaults.js.map +1 -1
  62. package/dist/runtime/agentSession.d.ts +2 -2
  63. package/dist/runtime/agentSession.d.ts.map +1 -1
  64. package/dist/runtime/agentSession.js +2 -2
  65. package/dist/runtime/agentSession.js.map +1 -1
  66. package/dist/shell/interactiveShell.d.ts +19 -7
  67. package/dist/shell/interactiveShell.d.ts.map +1 -1
  68. package/dist/shell/interactiveShell.js +271 -166
  69. package/dist/shell/interactiveShell.js.map +1 -1
  70. package/dist/shell/shellApp.d.ts +2 -0
  71. package/dist/shell/shellApp.d.ts.map +1 -1
  72. package/dist/shell/shellApp.js +82 -9
  73. package/dist/shell/shellApp.js.map +1 -1
  74. package/dist/shell/systemPrompt.d.ts.map +1 -1
  75. package/dist/shell/systemPrompt.js +1 -4
  76. package/dist/shell/systemPrompt.js.map +1 -1
  77. package/dist/shell/terminalInput.d.ts +218 -120
  78. package/dist/shell/terminalInput.d.ts.map +1 -1
  79. package/dist/shell/terminalInput.js +932 -537
  80. package/dist/shell/terminalInput.js.map +1 -1
  81. package/dist/shell/terminalInputAdapter.d.ts +99 -21
  82. package/dist/shell/terminalInputAdapter.d.ts.map +1 -1
  83. package/dist/shell/terminalInputAdapter.js +135 -30
  84. package/dist/shell/terminalInputAdapter.js.map +1 -1
  85. package/dist/subagents/agentConfig.d.ts +27 -0
  86. package/dist/subagents/agentConfig.d.ts.map +1 -0
  87. package/dist/subagents/agentConfig.js +89 -0
  88. package/dist/subagents/agentConfig.js.map +1 -0
  89. package/dist/subagents/agentRegistry.d.ts +33 -0
  90. package/dist/subagents/agentRegistry.d.ts.map +1 -0
  91. package/dist/subagents/agentRegistry.js +162 -0
  92. package/dist/subagents/agentRegistry.js.map +1 -0
  93. package/dist/subagents/taskRunner.d.ts +7 -1
  94. package/dist/subagents/taskRunner.d.ts.map +1 -1
  95. package/dist/subagents/taskRunner.js +180 -47
  96. package/dist/subagents/taskRunner.js.map +1 -1
  97. package/dist/ui/ShellUIAdapter.d.ts.map +1 -1
  98. package/dist/ui/ShellUIAdapter.js +13 -12
  99. package/dist/ui/ShellUIAdapter.js.map +1 -1
  100. package/dist/ui/display.d.ts +24 -45
  101. package/dist/ui/display.d.ts.map +1 -1
  102. package/dist/ui/display.js +140 -259
  103. package/dist/ui/display.js.map +1 -1
  104. package/dist/ui/theme.d.ts.map +1 -1
  105. package/dist/ui/theme.js +6 -8
  106. package/dist/ui/theme.js.map +1 -1
  107. package/dist/ui/toolDisplay.d.ts +0 -158
  108. package/dist/ui/toolDisplay.d.ts.map +1 -1
  109. package/dist/ui/toolDisplay.js +0 -348
  110. package/dist/ui/toolDisplay.js.map +1 -1
  111. package/dist/ui/unified/layout.d.ts +1 -0
  112. package/dist/ui/unified/layout.d.ts.map +1 -1
  113. package/dist/ui/unified/layout.js +25 -179
  114. package/dist/ui/unified/layout.js.map +1 -1
  115. package/dist/utils/frontmatter.d.ts +10 -0
  116. package/dist/utils/frontmatter.d.ts.map +1 -0
  117. package/dist/utils/frontmatter.js +78 -0
  118. package/dist/utils/frontmatter.js.map +1 -0
  119. package/package.json +4 -4
  120. package/dist/alpha-zero/agentWrapper.d.ts +0 -84
  121. package/dist/alpha-zero/agentWrapper.d.ts.map +0 -1
  122. package/dist/alpha-zero/agentWrapper.js +0 -171
  123. package/dist/alpha-zero/agentWrapper.js.map +0 -1
  124. package/dist/alpha-zero/codeEvaluator.d.ts +0 -25
  125. package/dist/alpha-zero/codeEvaluator.d.ts.map +0 -1
  126. package/dist/alpha-zero/codeEvaluator.js +0 -273
  127. package/dist/alpha-zero/codeEvaluator.js.map +0 -1
  128. package/dist/alpha-zero/competitiveRunner.d.ts +0 -66
  129. package/dist/alpha-zero/competitiveRunner.d.ts.map +0 -1
  130. package/dist/alpha-zero/competitiveRunner.js +0 -224
  131. package/dist/alpha-zero/competitiveRunner.js.map +0 -1
  132. package/dist/alpha-zero/index.d.ts +0 -67
  133. package/dist/alpha-zero/index.d.ts.map +0 -1
  134. package/dist/alpha-zero/index.js +0 -99
  135. package/dist/alpha-zero/index.js.map +0 -1
  136. package/dist/alpha-zero/introspection.d.ts +0 -128
  137. package/dist/alpha-zero/introspection.d.ts.map +0 -1
  138. package/dist/alpha-zero/introspection.js +0 -300
  139. package/dist/alpha-zero/introspection.js.map +0 -1
  140. package/dist/alpha-zero/metricsTracker.d.ts +0 -71
  141. package/dist/alpha-zero/metricsTracker.d.ts.map +0 -1
  142. package/dist/alpha-zero/metricsTracker.js.map +0 -1
  143. package/dist/alpha-zero/security/core.d.ts +0 -125
  144. package/dist/alpha-zero/security/core.d.ts.map +0 -1
  145. package/dist/alpha-zero/security/core.js +0 -271
  146. package/dist/alpha-zero/security/core.js.map +0 -1
  147. package/dist/alpha-zero/security/google.d.ts +0 -125
  148. package/dist/alpha-zero/security/google.d.ts.map +0 -1
  149. package/dist/alpha-zero/security/google.js +0 -311
  150. package/dist/alpha-zero/security/google.js.map +0 -1
  151. package/dist/alpha-zero/security/googleLoader.d.ts +0 -17
  152. package/dist/alpha-zero/security/googleLoader.d.ts.map +0 -1
  153. package/dist/alpha-zero/security/googleLoader.js +0 -41
  154. package/dist/alpha-zero/security/googleLoader.js.map +0 -1
  155. package/dist/alpha-zero/security/index.d.ts +0 -29
  156. package/dist/alpha-zero/security/index.d.ts.map +0 -1
  157. package/dist/alpha-zero/security/index.js +0 -32
  158. package/dist/alpha-zero/security/index.js.map +0 -1
  159. package/dist/alpha-zero/security/simulation.d.ts +0 -124
  160. package/dist/alpha-zero/security/simulation.d.ts.map +0 -1
  161. package/dist/alpha-zero/security/simulation.js +0 -277
  162. package/dist/alpha-zero/security/simulation.js.map +0 -1
  163. package/dist/alpha-zero/selfModification.d.ts +0 -109
  164. package/dist/alpha-zero/selfModification.d.ts.map +0 -1
  165. package/dist/alpha-zero/selfModification.js +0 -233
  166. package/dist/alpha-zero/selfModification.js.map +0 -1
  167. package/dist/alpha-zero/types.d.ts +0 -170
  168. package/dist/alpha-zero/types.d.ts.map +0 -1
  169. package/dist/alpha-zero/types.js +0 -31
  170. package/dist/alpha-zero/types.js.map +0 -1
  171. package/dist/capabilities/securityTestingCapability.d.ts +0 -13
  172. package/dist/capabilities/securityTestingCapability.d.ts.map +0 -1
  173. package/dist/capabilities/securityTestingCapability.js +0 -25
  174. package/dist/capabilities/securityTestingCapability.js.map +0 -1
  175. package/dist/core/aiFlowOptimizer.d.ts +0 -26
  176. package/dist/core/aiFlowOptimizer.d.ts.map +0 -1
  177. package/dist/core/aiFlowOptimizer.js +0 -31
  178. package/dist/core/aiFlowOptimizer.js.map +0 -1
  179. package/dist/core/aiOptimizationEngine.d.ts +0 -158
  180. package/dist/core/aiOptimizationEngine.d.ts.map +0 -1
  181. package/dist/core/aiOptimizationEngine.js +0 -428
  182. package/dist/core/aiOptimizationEngine.js.map +0 -1
  183. package/dist/core/aiOptimizationIntegration.d.ts +0 -93
  184. package/dist/core/aiOptimizationIntegration.d.ts.map +0 -1
  185. package/dist/core/aiOptimizationIntegration.js +0 -250
  186. package/dist/core/aiOptimizationIntegration.js.map +0 -1
  187. package/dist/core/enhancedErrorRecovery.d.ts +0 -100
  188. package/dist/core/enhancedErrorRecovery.d.ts.map +0 -1
  189. package/dist/core/enhancedErrorRecovery.js +0 -345
  190. package/dist/core/enhancedErrorRecovery.js.map +0 -1
  191. package/dist/core/hooksSystem.d.ts +0 -65
  192. package/dist/core/hooksSystem.d.ts.map +0 -1
  193. package/dist/core/hooksSystem.js +0 -273
  194. package/dist/core/hooksSystem.js.map +0 -1
  195. package/dist/core/memorySystem.d.ts +0 -48
  196. package/dist/core/memorySystem.d.ts.map +0 -1
  197. package/dist/core/memorySystem.js +0 -271
  198. package/dist/core/memorySystem.js.map +0 -1
  199. package/dist/core/unified/errors.d.ts +0 -189
  200. package/dist/core/unified/errors.d.ts.map +0 -1
  201. package/dist/core/unified/errors.js +0 -497
  202. package/dist/core/unified/errors.js.map +0 -1
  203. package/dist/core/unified/index.d.ts +0 -19
  204. package/dist/core/unified/index.d.ts.map +0 -1
  205. package/dist/core/unified/index.js +0 -68
  206. package/dist/core/unified/index.js.map +0 -1
  207. package/dist/core/unified/schema.d.ts +0 -101
  208. package/dist/core/unified/schema.d.ts.map +0 -1
  209. package/dist/core/unified/schema.js +0 -350
  210. package/dist/core/unified/schema.js.map +0 -1
  211. package/dist/core/unified/toolRuntime.d.ts +0 -179
  212. package/dist/core/unified/toolRuntime.d.ts.map +0 -1
  213. package/dist/core/unified/toolRuntime.js +0 -517
  214. package/dist/core/unified/toolRuntime.js.map +0 -1
  215. package/dist/core/unified/tools.d.ts +0 -127
  216. package/dist/core/unified/tools.d.ts.map +0 -1
  217. package/dist/core/unified/tools.js +0 -1333
  218. package/dist/core/unified/tools.js.map +0 -1
  219. package/dist/core/unified/types.d.ts +0 -352
  220. package/dist/core/unified/types.d.ts.map +0 -1
  221. package/dist/core/unified/types.js +0 -12
  222. package/dist/core/unified/types.js.map +0 -1
  223. package/dist/core/unified/version.d.ts +0 -209
  224. package/dist/core/unified/version.d.ts.map +0 -1
  225. package/dist/core/unified/version.js +0 -454
  226. package/dist/core/unified/version.js.map +0 -1
  227. package/dist/plugins/tools/security/securityPlugin.d.ts +0 -3
  228. package/dist/plugins/tools/security/securityPlugin.d.ts.map +0 -1
  229. package/dist/plugins/tools/security/securityPlugin.js +0 -12
  230. package/dist/plugins/tools/security/securityPlugin.js.map +0 -1
  231. package/dist/security/active-stack-security.d.ts +0 -112
  232. package/dist/security/active-stack-security.d.ts.map +0 -1
  233. package/dist/security/active-stack-security.js +0 -296
  234. package/dist/security/active-stack-security.js.map +0 -1
  235. package/dist/security/advanced-persistence-research.d.ts +0 -92
  236. package/dist/security/advanced-persistence-research.d.ts.map +0 -1
  237. package/dist/security/advanced-persistence-research.js +0 -195
  238. package/dist/security/advanced-persistence-research.js.map +0 -1
  239. package/dist/security/advanced-targeting.d.ts +0 -119
  240. package/dist/security/advanced-targeting.d.ts.map +0 -1
  241. package/dist/security/advanced-targeting.js +0 -233
  242. package/dist/security/advanced-targeting.js.map +0 -1
  243. package/dist/security/assessment/vulnerabilityAssessment.d.ts +0 -104
  244. package/dist/security/assessment/vulnerabilityAssessment.d.ts.map +0 -1
  245. package/dist/security/assessment/vulnerabilityAssessment.js +0 -315
  246. package/dist/security/assessment/vulnerabilityAssessment.js.map +0 -1
  247. package/dist/security/authorization/securityAuthorization.d.ts +0 -88
  248. package/dist/security/authorization/securityAuthorization.d.ts.map +0 -1
  249. package/dist/security/authorization/securityAuthorization.js +0 -172
  250. package/dist/security/authorization/securityAuthorization.js.map +0 -1
  251. package/dist/security/comprehensive-targeting.d.ts +0 -85
  252. package/dist/security/comprehensive-targeting.d.ts.map +0 -1
  253. package/dist/security/comprehensive-targeting.js +0 -438
  254. package/dist/security/comprehensive-targeting.js.map +0 -1
  255. package/dist/security/global-security-integration.d.ts +0 -91
  256. package/dist/security/global-security-integration.d.ts.map +0 -1
  257. package/dist/security/global-security-integration.js +0 -218
  258. package/dist/security/global-security-integration.js.map +0 -1
  259. package/dist/security/index.d.ts +0 -38
  260. package/dist/security/index.d.ts.map +0 -1
  261. package/dist/security/index.js +0 -47
  262. package/dist/security/index.js.map +0 -1
  263. package/dist/security/persistence-analyzer.d.ts +0 -56
  264. package/dist/security/persistence-analyzer.d.ts.map +0 -1
  265. package/dist/security/persistence-analyzer.js +0 -187
  266. package/dist/security/persistence-analyzer.js.map +0 -1
  267. package/dist/security/persistence-cli.d.ts +0 -36
  268. package/dist/security/persistence-cli.d.ts.map +0 -1
  269. package/dist/security/persistence-cli.js +0 -160
  270. package/dist/security/persistence-cli.js.map +0 -1
  271. package/dist/security/persistence-research.d.ts +0 -92
  272. package/dist/security/persistence-research.d.ts.map +0 -1
  273. package/dist/security/persistence-research.js +0 -364
  274. package/dist/security/persistence-research.js.map +0 -1
  275. package/dist/security/research/persistenceResearch.d.ts +0 -97
  276. package/dist/security/research/persistenceResearch.d.ts.map +0 -1
  277. package/dist/security/research/persistenceResearch.js +0 -282
  278. package/dist/security/research/persistenceResearch.js.map +0 -1
  279. package/dist/security/security-integration.d.ts +0 -74
  280. package/dist/security/security-integration.d.ts.map +0 -1
  281. package/dist/security/security-integration.js +0 -137
  282. package/dist/security/security-integration.js.map +0 -1
  283. package/dist/security/security-testing-framework.d.ts +0 -112
  284. package/dist/security/security-testing-framework.d.ts.map +0 -1
  285. package/dist/security/security-testing-framework.js +0 -364
  286. package/dist/security/security-testing-framework.js.map +0 -1
  287. package/dist/security/simulation/attackSimulation.d.ts +0 -93
  288. package/dist/security/simulation/attackSimulation.d.ts.map +0 -1
  289. package/dist/security/simulation/attackSimulation.js +0 -341
  290. package/dist/security/simulation/attackSimulation.js.map +0 -1
  291. package/dist/security/strategic-operations.d.ts +0 -100
  292. package/dist/security/strategic-operations.d.ts.map +0 -1
  293. package/dist/security/strategic-operations.js +0 -276
  294. package/dist/security/strategic-operations.js.map +0 -1
  295. package/dist/security/tool-security-wrapper.d.ts +0 -58
  296. package/dist/security/tool-security-wrapper.d.ts.map +0 -1
  297. package/dist/security/tool-security-wrapper.js +0 -156
  298. package/dist/security/tool-security-wrapper.js.map +0 -1
  299. package/dist/shell/claudeCodeStreamHandler.d.ts +0 -145
  300. package/dist/shell/claudeCodeStreamHandler.d.ts.map +0 -1
  301. package/dist/shell/claudeCodeStreamHandler.js +0 -322
  302. package/dist/shell/claudeCodeStreamHandler.js.map +0 -1
  303. package/dist/shell/inputQueueManager.d.ts +0 -144
  304. package/dist/shell/inputQueueManager.d.ts.map +0 -1
  305. package/dist/shell/inputQueueManager.js +0 -290
  306. package/dist/shell/inputQueueManager.js.map +0 -1
  307. package/dist/shell/metricsTracker.d.ts +0 -60
  308. package/dist/shell/metricsTracker.d.ts.map +0 -1
  309. package/dist/shell/metricsTracker.js +0 -119
  310. package/dist/shell/metricsTracker.js.map +0 -1
  311. package/dist/shell/streamingOutputManager.d.ts +0 -115
  312. package/dist/shell/streamingOutputManager.d.ts.map +0 -1
  313. package/dist/shell/streamingOutputManager.js +0 -225
  314. package/dist/shell/streamingOutputManager.js.map +0 -1
  315. package/dist/tools/securityTools.d.ts +0 -22
  316. package/dist/tools/securityTools.d.ts.map +0 -1
  317. package/dist/tools/securityTools.js +0 -448
  318. package/dist/tools/securityTools.js.map +0 -1
  319. package/dist/ui/persistentPrompt.d.ts +0 -50
  320. package/dist/ui/persistentPrompt.d.ts.map +0 -1
  321. package/dist/ui/persistentPrompt.js +0 -92
  322. package/dist/ui/persistentPrompt.js.map +0 -1
  323. package/dist/ui/terminalUISchema.d.ts +0 -195
  324. package/dist/ui/terminalUISchema.d.ts.map +0 -1
  325. package/dist/ui/terminalUISchema.js +0 -113
  326. package/dist/ui/terminalUISchema.js.map +0 -1
  327. package/scripts/deploy-security-capabilities.js +0 -178
@@ -1,311 +0,0 @@
1
- /**
2
- * Google Infrastructure Persistence Vector Research
3
- *
4
- * OPTIONAL MODULE - Only loaded when Google security research is enabled.
5
- *
6
- * Provides research tools for identifying persistence mechanisms
7
- * in Google Cloud Platform and Google Workspace environments.
8
- *
9
- * AUTHORIZATION: Designed for authorized red team engagements and
10
- * penetration testing of Google infrastructure under contract.
11
- *
12
- * Principal Investigator: Bo Shang
13
- * Framework: erosolar-cli
14
- */
15
- import { AuthorizationScope } from './core.js';
16
- /**
17
- * Google services for persistence research
18
- */
19
- export var GoogleService;
20
- (function (GoogleService) {
21
- // Google Cloud Platform
22
- GoogleService["GCP_COMPUTE"] = "gcp_compute_engine";
23
- GoogleService["GCP_GKE"] = "gcp_kubernetes_engine";
24
- GoogleService["GCP_CLOUD_FUNCTIONS"] = "gcp_cloud_functions";
25
- GoogleService["GCP_IAM"] = "gcp_iam";
26
- GoogleService["GCP_SERVICE_ACCOUNTS"] = "gcp_service_accounts";
27
- GoogleService["GCP_CLOUD_STORAGE"] = "gcp_cloud_storage";
28
- GoogleService["GCP_SECRETS_MANAGER"] = "gcp_secrets_manager";
29
- // Google Workspace
30
- GoogleService["WORKSPACE_GMAIL"] = "workspace_gmail";
31
- GoogleService["WORKSPACE_DRIVE"] = "workspace_drive";
32
- GoogleService["WORKSPACE_ADMIN"] = "workspace_admin";
33
- GoogleService["WORKSPACE_APPS_SCRIPT"] = "workspace_apps_script";
34
- // Google Identity
35
- GoogleService["GOOGLE_OAUTH"] = "google_oauth";
36
- })(GoogleService || (GoogleService = {}));
37
- /**
38
- * Categories of persistence mechanisms
39
- */
40
- export var PersistenceCategory;
41
- (function (PersistenceCategory) {
42
- PersistenceCategory["SERVICE_ACCOUNT_ABUSE"] = "service_account_abuse";
43
- PersistenceCategory["IAM_POLICY_MODIFICATION"] = "iam_policy_modification";
44
- PersistenceCategory["OAUTH_APP_CONSENT"] = "oauth_app_consent";
45
- PersistenceCategory["API_KEYS"] = "api_keys";
46
- PersistenceCategory["CLOUD_FUNCTION_TRIGGER"] = "cloud_function_trigger";
47
- PersistenceCategory["APPS_SCRIPT_TRIGGER"] = "apps_script_trigger";
48
- PersistenceCategory["DELEGATION_ABUSE"] = "delegation_abuse";
49
- })(PersistenceCategory || (PersistenceCategory = {}));
50
- /**
51
- * GCP Persistence Vectors
52
- */
53
- export const GCP_PERSISTENCE_VECTORS = {
54
- sa_key_creation: {
55
- name: 'Service Account Key Creation',
56
- service: GoogleService.GCP_SERVICE_ACCOUNTS,
57
- category: PersistenceCategory.SERVICE_ACCOUNT_ABUSE,
58
- description: 'Create keys for service accounts to maintain API access',
59
- techniqueId: 'T1098.001',
60
- requiredPermissions: ['iam.serviceAccountKeys.create'],
61
- detectionMethods: ['Cloud Audit Logs', 'Security Command Center'],
62
- mitigations: ['Use Workload Identity', 'Key rotation policies'],
63
- stealthRating: 2,
64
- },
65
- iam_binding: {
66
- name: 'IAM Policy Binding',
67
- service: GoogleService.GCP_IAM,
68
- category: PersistenceCategory.IAM_POLICY_MODIFICATION,
69
- description: 'Add IAM bindings for persistent access',
70
- techniqueId: 'T1098.001',
71
- requiredPermissions: ['resourcemanager.projects.setIamPolicy'],
72
- detectionMethods: ['IAM audit logs', 'Policy monitoring'],
73
- mitigations: ['IAM Recommender', 'Least privilege'],
74
- stealthRating: 1,
75
- },
76
- cloud_function_backdoor: {
77
- name: 'Cloud Function Backdoor',
78
- service: GoogleService.GCP_CLOUD_FUNCTIONS,
79
- category: PersistenceCategory.CLOUD_FUNCTION_TRIGGER,
80
- description: 'Deploy function as persistent callback',
81
- techniqueId: 'T1059',
82
- requiredPermissions: ['cloudfunctions.functions.create'],
83
- detectionMethods: ['Function deployment logs', 'Network monitoring'],
84
- mitigations: ['Function allowlisting', 'Binary authorization'],
85
- stealthRating: 3,
86
- },
87
- };
88
- /**
89
- * Workspace Persistence Vectors
90
- */
91
- export const WORKSPACE_PERSISTENCE_VECTORS = {
92
- oauth_consent: {
93
- name: 'OAuth App Consent Persistence',
94
- service: GoogleService.GOOGLE_OAUTH,
95
- category: PersistenceCategory.OAUTH_APP_CONSENT,
96
- description: 'Persist via OAuth app with broad scope consent',
97
- techniqueId: 'T1550.001',
98
- requiredPermissions: ['OAuth consent grant'],
99
- detectionMethods: ['OAuth audit logs', 'App access reviews'],
100
- mitigations: ['OAuth app restrictions', 'Consent monitoring'],
101
- stealthRating: 4,
102
- },
103
- apps_script_trigger: {
104
- name: 'Apps Script Trigger Persistence',
105
- service: GoogleService.WORKSPACE_APPS_SCRIPT,
106
- category: PersistenceCategory.APPS_SCRIPT_TRIGGER,
107
- description: 'Create time/event triggers in Apps Script',
108
- techniqueId: 'T1053',
109
- requiredPermissions: ['Script Editor access'],
110
- detectionMethods: ['Apps Script audit logs', 'Trigger inventory'],
111
- mitigations: ['Apps Script restrictions', 'Trigger monitoring'],
112
- stealthRating: 4,
113
- },
114
- drive_sharing: {
115
- name: 'Drive Sharing Persistence',
116
- service: GoogleService.WORKSPACE_DRIVE,
117
- category: PersistenceCategory.DELEGATION_ABUSE,
118
- description: 'Maintain access via shared drive permissions',
119
- techniqueId: 'T1213',
120
- requiredPermissions: ['Drive sharing permissions'],
121
- detectionMethods: ['Drive audit logs', 'Sharing reports'],
122
- mitigations: ['External sharing restrictions', 'DLP policies'],
123
- stealthRating: 3,
124
- },
125
- };
126
- /**
127
- * Google Persistence Researcher
128
- */
129
- export class GooglePersistenceResearcher {
130
- authorization;
131
- verbose;
132
- testResults = [];
133
- constructor(authorization, verbose = false) {
134
- this.authorization = authorization;
135
- this.verbose = verbose;
136
- }
137
- /**
138
- * Check authorization
139
- */
140
- checkAuthorization() {
141
- if (!this.authorization) {
142
- throw new Error('No authorization record.');
143
- }
144
- const allowed = [
145
- AuthorizationScope.OWNED_SYSTEMS,
146
- AuthorizationScope.PENTEST_ENGAGEMENT,
147
- AuthorizationScope.RED_TEAM,
148
- AuthorizationScope.BUG_BOUNTY,
149
- ];
150
- if (!allowed.includes(this.authorization.scope)) {
151
- throw new Error('Google research requires pentest/red team authorization.');
152
- }
153
- }
154
- /**
155
- * Get all Google persistence vectors
156
- */
157
- getAllVectors() {
158
- return { ...GCP_PERSISTENCE_VECTORS, ...WORKSPACE_PERSISTENCE_VECTORS };
159
- }
160
- /**
161
- * Get vectors by service
162
- */
163
- getVectorsByService(service) {
164
- const all = this.getAllVectors();
165
- return Object.values(all).filter(v => v.service === service);
166
- }
167
- /**
168
- * Get vectors by category
169
- */
170
- getVectorsByCategory(category) {
171
- const all = this.getAllVectors();
172
- return Object.values(all).filter(v => v.category === category);
173
- }
174
- /**
175
- * Get stealthy vectors
176
- */
177
- getStealthyVectors(minRating = 3) {
178
- const all = this.getAllVectors();
179
- return Object.values(all).filter(v => v.stealthRating >= minRating);
180
- }
181
- /**
182
- * Analyze a persistence vector
183
- */
184
- analyzeVector(vectorId, targetProject) {
185
- this.checkAuthorization();
186
- const allVectors = this.getAllVectors();
187
- if (!(vectorId in allVectors)) {
188
- throw new Error(`Unknown vector: ${vectorId}`);
189
- }
190
- const vector = allVectors[vectorId];
191
- if (!vector) {
192
- throw new Error(`Unknown vector ID: ${vectorId}`);
193
- }
194
- const result = {
195
- vector,
196
- targetProject,
197
- timestamp: Date.now(),
198
- testable: true,
199
- permissionsVerified: [],
200
- missingPermissions: [],
201
- detectionRisk: vector.stealthRating < 3 ? 'medium' : 'low',
202
- notes: `Analysis for ${vector.name}`,
203
- };
204
- if (this.verbose) {
205
- console.log(`[Google] Analyzing ${vector.name}`);
206
- console.log(` Service: ${vector.service}`);
207
- console.log(` Stealth: ${vector.stealthRating}/5`);
208
- }
209
- this.testResults.push(result);
210
- return result;
211
- }
212
- /**
213
- * Generate attack playbook
214
- */
215
- generateAttackPlaybook(targetProject, vectors) {
216
- this.checkAuthorization();
217
- const useVectors = vectors || Object.values(this.getAllVectors());
218
- // Sort by stealth rating (stealthiest first)
219
- const sorted = [...useVectors].sort((a, b) => b.stealthRating - a.stealthRating);
220
- return {
221
- target: targetProject,
222
- generated: new Date().toISOString(),
223
- authorization: {
224
- scope: this.authorization.scope,
225
- authorizedBy: this.authorization.authorizedBy,
226
- },
227
- vectors: sorted.map(v => ({
228
- name: v.name,
229
- service: v.service,
230
- category: v.category,
231
- stealthRating: v.stealthRating,
232
- requiredPermissions: v.requiredPermissions,
233
- detectionMethods: v.detectionMethods,
234
- })),
235
- recommendedOrder: sorted.map(v => v.name),
236
- detectionCoverage: Array.from(new Set(sorted.flatMap(v => v.detectionMethods))),
237
- };
238
- }
239
- /**
240
- * Generate detection report (blue team)
241
- */
242
- generateDetectionReport() {
243
- this.checkAuthorization();
244
- const allVectors = this.getAllVectors();
245
- const lines = [
246
- '# Google Infrastructure Detection Guide',
247
- '',
248
- `Generated: ${new Date().toISOString()}`,
249
- '',
250
- '## Overview',
251
- '',
252
- `This guide covers ${Object.keys(allVectors).length} persistence vectors.`,
253
- '',
254
- '## Detection Methods',
255
- '',
256
- ];
257
- // Group by detection method
258
- const detectionMap = {};
259
- for (const vector of Object.values(allVectors)) {
260
- for (const method of vector.detectionMethods) {
261
- if (!detectionMap[method]) {
262
- detectionMap[method] = [];
263
- }
264
- detectionMap[method].push(vector.name);
265
- }
266
- }
267
- for (const [method, vectorNames] of Object.entries(detectionMap).sort()) {
268
- lines.push(`### ${method}`);
269
- lines.push('');
270
- lines.push('Detects:');
271
- for (const name of vectorNames) {
272
- lines.push(`- ${name}`);
273
- }
274
- lines.push('');
275
- }
276
- lines.push('## Vectors by Stealth Rating');
277
- lines.push('');
278
- for (let rating = 5; rating >= 1; rating--) {
279
- const vectorsAtRating = Object.values(allVectors).filter(v => v.stealthRating === rating);
280
- if (vectorsAtRating.length > 0) {
281
- lines.push(`### Stealth ${rating}/5`);
282
- for (const v of vectorsAtRating) {
283
- lines.push(`- ${v.name} (${v.service})`);
284
- }
285
- lines.push('');
286
- }
287
- }
288
- return lines.join('\n');
289
- }
290
- }
291
- /**
292
- * Create Google authorization
293
- */
294
- export function createGoogleAuthorization(engagementType, authorizedBy, targetProject = '*', scopeNotes = '') {
295
- const scopeMap = {
296
- bug_bounty: AuthorizationScope.BUG_BOUNTY,
297
- pentest: AuthorizationScope.PENTEST_ENGAGEMENT,
298
- red_team: AuthorizationScope.RED_TEAM,
299
- owned: AuthorizationScope.OWNED_SYSTEMS,
300
- };
301
- return {
302
- scope: scopeMap[engagementType] || AuthorizationScope.PENTEST_ENGAGEMENT,
303
- targetDomain: `*.googleapis.com,${targetProject}.iam.gserviceaccount.com`,
304
- authorizedBy,
305
- authorizationDate: new Date().toISOString(),
306
- scopeLimitations: [],
307
- outOfScope: [],
308
- notes: scopeNotes || `Google ${engagementType} engagement`,
309
- };
310
- }
311
- //# sourceMappingURL=google.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"google.js","sourceRoot":"","sources":["../../../src/alpha-zero/security/google.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAuB,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpE;;GAEG;AACH,MAAM,CAAN,IAAY,aAkBX;AAlBD,WAAY,aAAa;IACvB,wBAAwB;IACxB,mDAAkC,CAAA;IAClC,kDAAiC,CAAA;IACjC,4DAA2C,CAAA;IAC3C,oCAAmB,CAAA;IACnB,8DAA6C,CAAA;IAC7C,wDAAuC,CAAA;IACvC,4DAA2C,CAAA;IAE3C,mBAAmB;IACnB,oDAAmC,CAAA;IACnC,oDAAmC,CAAA;IACnC,oDAAmC,CAAA;IACnC,gEAA+C,CAAA;IAE/C,kBAAkB;IAClB,8CAA6B,CAAA;AAC/B,CAAC,EAlBW,aAAa,KAAb,aAAa,QAkBxB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,mBAQX;AARD,WAAY,mBAAmB;IAC7B,sEAA+C,CAAA;IAC/C,0EAAmD,CAAA;IACnD,8DAAuC,CAAA;IACvC,4CAAqB,CAAA;IACrB,wEAAiD,CAAA;IACjD,kEAA2C,CAAA;IAC3C,4DAAqC,CAAA;AACvC,CAAC,EARW,mBAAmB,KAAnB,mBAAmB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EAAE;QAC3C,gBAAgB,EAAE,EAAE;QACpB,UAAU,EAAE,EAAE;QACd,KAAK,EAAE,UAAU,IAAI,UAAU,cAAc,aAAa;KAC3D,CAAC;AACJ,CAAC"}
@@ -1,17 +0,0 @@
1
- /**
2
- * Google Security Module Loader
3
- *
4
- * Provides lazy loading for the optional Google security research module.
5
- *
6
- * Principal Investigator: Bo Shang
7
- * Framework: erosolar-cli
8
- */
9
- /**
10
- * Check if Google security research module is available
11
- */
12
- export declare function isGoogleEnabled(): boolean;
13
- /**
14
- * Get the Google security research module (lazy load)
15
- */
16
- export declare function getGoogleModule(): Promise<typeof import("./google.js")>;
17
- //# sourceMappingURL=googleLoader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"googleLoader.d.ts","sourceRoot":"","sources":["../../../src/alpha-zero/security/googleLoader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;GAEG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAWzC;AAED;;GAEG;AACH,wBAAsB,eAAe,0CAYpC"}
@@ -1,41 +0,0 @@
1
- /**
2
- * Google Security Module Loader
3
- *
4
- * Provides lazy loading for the optional Google security research module.
5
- *
6
- * Principal Investigator: Bo Shang
7
- * Framework: erosolar-cli
8
- */
9
- let googleModule = null;
10
- /**
11
- * Check if Google security research module is available
12
- */
13
- export function isGoogleEnabled() {
14
- if (googleModule !== null) {
15
- return true;
16
- }
17
- try {
18
- // Dynamic import check would go here
19
- // For now, return true since we're creating the module
20
- return true;
21
- }
22
- catch {
23
- return false;
24
- }
25
- }
26
- /**
27
- * Get the Google security research module (lazy load)
28
- */
29
- export async function getGoogleModule() {
30
- if (googleModule === null) {
31
- try {
32
- googleModule = await import('./google.js');
33
- }
34
- catch (error) {
35
- throw new Error('Google security research module not available. ' +
36
- 'Ensure google.ts is built and available.');
37
- }
38
- }
39
- return googleModule;
40
- }
41
- //# sourceMappingURL=googleLoader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"googleLoader.js","sourceRoot":"","sources":["../../../src/alpha-zero/security/googleLoader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,IAAI,YAAY,GAAwC,IAAI,CAAC;AAE7D;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAAC;QACH,qCAAqC;QACrC,uDAAuD;QACvD,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QAC1B,IAAI,CAAC;YACH,YAAY,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CACb,iDAAiD;gBACjD,0CAA0C,CAC3C,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC"}
@@ -1,29 +0,0 @@
1
- /**
2
- * Security Research Module for Alpha Zero 2
3
- *
4
- * OPTIONAL MODULE - Only loaded when security research is enabled.
5
- *
6
- * A modular security research framework with optional provider-specific extensions.
7
- * All capabilities require explicit authorization.
8
- *
9
- * LEGAL NOTICE:
10
- * These tools are intended for:
11
- * - Authorized penetration testing engagements
12
- * - Bug bounty programs with explicit scope
13
- * - CTF competitions and security training
14
- * - Red team exercises with written authorization
15
- * - Security research on systems you own or have permission to test
16
- *
17
- * Structure:
18
- * - core: Base authorization and reconnaissance (always available)
19
- * - simulation: Attack simulation framework (always available)
20
- * - google: Google Cloud/Workspace persistence research (optional)
21
- *
22
- * Principal Investigator: Bo Shang
23
- * Framework: erosolar-cli
24
- */
25
- export { AuthorizationScope, type AuthorizationRecord, type ReconResult, type VulnerabilityFinding, SecurityResearchEngine, createBugBountyAuthorization, createPentestAuthorization, createCtfAuthorization, } from './core.js';
26
- export { AttackCategory, AttackPhase, type AttackVector, type AttackSimulationResult, AttackSimulator, PayloadGenerator, ATTACK_VECTORS, } from './simulation.js';
27
- export { isGoogleEnabled, getGoogleModule } from './googleLoader.js';
28
- export declare const SECURITY_VERSION = "1.0.0";
29
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/alpha-zero/security/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EACL,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,sBAAsB,EACtB,4BAA4B,EAC5B,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,cAAc,EACd,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,eAAe,EACf,gBAAgB,EAChB,cAAc,GACf,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAErE,eAAO,MAAM,gBAAgB,UAAU,CAAC"}
@@ -1,32 +0,0 @@
1
- /**
2
- * Security Research Module for Alpha Zero 2
3
- *
4
- * OPTIONAL MODULE - Only loaded when security research is enabled.
5
- *
6
- * A modular security research framework with optional provider-specific extensions.
7
- * All capabilities require explicit authorization.
8
- *
9
- * LEGAL NOTICE:
10
- * These tools are intended for:
11
- * - Authorized penetration testing engagements
12
- * - Bug bounty programs with explicit scope
13
- * - CTF competitions and security training
14
- * - Red team exercises with written authorization
15
- * - Security research on systems you own or have permission to test
16
- *
17
- * Structure:
18
- * - core: Base authorization and reconnaissance (always available)
19
- * - simulation: Attack simulation framework (always available)
20
- * - google: Google Cloud/Workspace persistence research (optional)
21
- *
22
- * Principal Investigator: Bo Shang
23
- * Framework: erosolar-cli
24
- */
25
- // Re-export core security components
26
- export { AuthorizationScope, SecurityResearchEngine, createBugBountyAuthorization, createPentestAuthorization, createCtfAuthorization, } from './core.js';
27
- // Re-export simulation components
28
- export { AttackCategory, AttackPhase, AttackSimulator, PayloadGenerator, ATTACK_VECTORS, } from './simulation.js';
29
- // Google module is optional - export checker function
30
- export { isGoogleEnabled, getGoogleModule } from './googleLoader.js';
31
- export const SECURITY_VERSION = '1.0.0';
32
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/alpha-zero/security/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,qCAAqC;AACrC,OAAO,EACL,kBAAkB,EAIlB,sBAAsB,EACtB,4BAA4B,EAC5B,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,WAAW,CAAC;AAEnB,kCAAkC;AAClC,OAAO,EACL,cAAc,EACd,WAAW,EAGX,eAAe,EACf,gBAAgB,EAChB,cAAc,GACf,MAAM,iBAAiB,CAAC;AAEzB,sDAAsD;AACtD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAErE,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAAC"}
@@ -1,124 +0,0 @@
1
- /**
2
- * Attack Simulation Framework
3
- *
4
- * Provides controlled attack simulations for red team exercises.
5
- * All simulations require explicit authorization.
6
- *
7
- * Principal Investigator: Bo Shang
8
- * Framework: erosolar-cli
9
- */
10
- import { AuthorizationRecord } from './core.js';
11
- /**
12
- * Categories of attack simulations
13
- */
14
- export declare enum AttackCategory {
15
- RECONNAISSANCE = "reconnaissance",
16
- WEB_APPLICATION = "web_application",
17
- AUTHENTICATION = "authentication",
18
- INJECTION = "injection",
19
- MISCONFIGURATION = "misconfiguration",
20
- PRIVILEGE_ESCALATION = "privilege_escalation",
21
- DATA_EXFILTRATION = "data_exfiltration"
22
- }
23
- /**
24
- * MITRE ATT&CK inspired attack phases
25
- */
26
- export declare enum AttackPhase {
27
- INITIAL_ACCESS = "initial_access",
28
- EXECUTION = "execution",
29
- PERSISTENCE = "persistence",
30
- PRIVILEGE_ESCALATION = "privilege_escalation",
31
- DEFENSE_EVASION = "defense_evasion",
32
- CREDENTIAL_ACCESS = "credential_access",
33
- DISCOVERY = "discovery",
34
- LATERAL_MOVEMENT = "lateral_movement",
35
- COLLECTION = "collection",
36
- EXFILTRATION = "exfiltration",
37
- IMPACT = "impact"
38
- }
39
- /**
40
- * Attack vector definition
41
- */
42
- export interface AttackVector {
43
- name: string;
44
- category: AttackCategory;
45
- phase: AttackPhase;
46
- description: string;
47
- techniqueId: string;
48
- prerequisites: string[];
49
- detectionMethods: string[];
50
- mitigations: string[];
51
- }
52
- /**
53
- * Attack simulation result
54
- */
55
- export interface AttackSimulationResult {
56
- vector: AttackVector;
57
- target: string;
58
- timestamp: number;
59
- success: boolean;
60
- evidence: string[];
61
- artifacts: Record<string, unknown>;
62
- detectionTriggered: boolean;
63
- durationMs: number;
64
- notes: string;
65
- }
66
- /**
67
- * Common attack vectors based on OWASP Top 10 and MITRE ATT&CK
68
- */
69
- export declare const ATTACK_VECTORS: Record<string, AttackVector>;
70
- /**
71
- * Payload generator for security testing
72
- */
73
- export declare class PayloadGenerator {
74
- /**
75
- * Generate SQL injection test payloads
76
- */
77
- static sqlInjectionPayloads(): string[];
78
- /**
79
- * Generate XSS test payloads
80
- */
81
- static xssPayloads(): string[];
82
- /**
83
- * Generate path traversal test payloads
84
- */
85
- static pathTraversalPayloads(): string[];
86
- /**
87
- * Encode payload
88
- */
89
- static encodePayload(payload: string, encoding: 'base64' | 'url' | 'hex' | 'none'): string;
90
- }
91
- /**
92
- * Attack simulator
93
- */
94
- export declare class AttackSimulator {
95
- private authorization;
96
- private verbose;
97
- results: AttackSimulationResult[];
98
- constructor(authorization: AuthorizationRecord, verbose?: boolean);
99
- /**
100
- * Check authorization
101
- */
102
- private checkAuthorization;
103
- /**
104
- * Simulate an attack vector
105
- */
106
- simulateAttack(target: string, vectorId: string, dryRun?: boolean): Promise<AttackSimulationResult>;
107
- /**
108
- * Get payloads for a vector
109
- */
110
- private getPayloadsForVector;
111
- /**
112
- * Get vectors by category
113
- */
114
- getVectorsByCategory(category: AttackCategory): AttackVector[];
115
- /**
116
- * Get vectors by phase
117
- */
118
- getVectorsByPhase(phase: AttackPhase): AttackVector[];
119
- /**
120
- * Generate report
121
- */
122
- generateReport(): string;
123
- }
124
- //# sourceMappingURL=simulation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"simulation.d.ts","sourceRoot":"","sources":["../../../src/alpha-zero/security/simulation.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,mBAAmB,EAAsB,MAAM,WAAW,CAAC;AAEpE;;GAEG;AACH,oBAAY,cAAc;IACxB,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IACnC,cAAc,mBAAmB;IACjC,SAAS,cAAc;IACvB,gBAAgB,qBAAqB;IACrC,oBAAoB,yBAAyB;IAC7C,iBAAiB,sBAAsB;CACxC;AAED;;GAEG;AACH,oBAAY,WAAW;IACrB,cAAc,mBAAmB;IACjC,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,oBAAoB,yBAAyB;IAC7C,eAAe,oBAAoB;IACnC,iBAAiB,sBAAsB;IACvC,SAAS,cAAc;IACvB,gBAAgB,qBAAqB;IACrC,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,WAAW,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,WAAW,EAAE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