erosolar-cli 1.7.341 → 1.7.342

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 +215 -120
  78. package/dist/shell/terminalInput.d.ts.map +1 -1
  79. package/dist/shell/terminalInput.js +926 -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 +131 -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,119 +0,0 @@
1
- /**
2
- * Advanced Targeting Security Module
3
- *
4
- * Enables Erosolar CLI to analyze and operate on external active stacks
5
- * and critical infrastructure while maintaining security controls.
6
- *
7
- * @license MIT
8
- * @author Bo Shang
9
- *
10
- * DISCLAIMER: This software is provided for authorized security testing,
11
- * research, and defensive purposes only. Users must ensure compliance
12
- * with all applicable laws and regulations in their jurisdiction.
13
- */
14
- export interface SecurityValidationResult {
15
- allowed: boolean;
16
- reason?: string;
17
- severity: 'low' | 'medium' | 'high' | 'critical';
18
- details?: Record<string, unknown>;
19
- }
20
- export interface TargetAuthorization {
21
- /** Target identifier (domain, IP range, organization) */
22
- target: string;
23
- /** Authorization level */
24
- level: 'research' | 'analysis' | 'testing' | 'operations';
25
- /** Scope of authorized operations */
26
- scope: string[];
27
- /** Authorization source */
28
- authorizedBy: string;
29
- /** Expiration timestamp */
30
- expiresAt?: Date;
31
- /** Legal/compliance requirements */
32
- compliance: {
33
- jurisdiction: string;
34
- legalFramework: string;
35
- reportingRequirements: string[];
36
- };
37
- }
38
- export interface CriticalInfrastructureTarget {
39
- /** Infrastructure category */
40
- category: 'energy' | 'finance' | 'telecom' | 'government' | 'military' | 'healthcare' | 'transportation';
41
- /** Target identifier */
42
- identifier: string;
43
- /** Country/region */
44
- jurisdiction: string;
45
- /** Sensitivity level */
46
- sensitivity: 'low' | 'medium' | 'high' | 'critical';
47
- /** Authorized operations */
48
- authorizedOperations: string[];
49
- /** Legal restrictions */
50
- legalRestrictions: string[];
51
- }
52
- export interface OperationAuthorization {
53
- /** Operation type */
54
- type: 'scanning' | 'analysis' | 'vulnerability_assessment' | 'penetration_testing' | 'research';
55
- /** Target information */
56
- target: CriticalInfrastructureTarget | string;
57
- /** Authorization level required */
58
- requiredLevel: string;
59
- /** Legal compliance requirements */
60
- compliance: {
61
- jurisdiction: string;
62
- legalFramework: string;
63
- reportingRequired: boolean;
64
- evidenceCollection: boolean;
65
- };
66
- }
67
- export declare class AdvancedTargetingSecurity {
68
- private authorizedTargets;
69
- private criticalInfrastructure;
70
- private operationLog;
71
- constructor();
72
- /**
73
- * Authorize a target for operations
74
- */
75
- authorizeTarget(authorization: TargetAuthorization): void;
76
- /**
77
- * Validate operation on external target
78
- */
79
- validateExternalOperation(operation: string, target: string, parameters: Record<string, unknown>): SecurityValidationResult;
80
- /**
81
- * Register critical infrastructure target
82
- */
83
- registerCriticalInfrastructure(target: CriticalInfrastructureTarget): void;
84
- /**
85
- * Get authorized targets
86
- */
87
- getAuthorizedTargets(): TargetAuthorization[];
88
- /**
89
- * Get critical infrastructure targets
90
- */
91
- getCriticalInfrastructure(): CriticalInfrastructureTarget[];
92
- /**
93
- * Get operation log
94
- */
95
- getOperationLog(): AdvancedOperationEvent[];
96
- /**
97
- * Generate targeting report
98
- */
99
- generateTargetingReport(): string;
100
- private initializeDefaultTargets;
101
- private isOperationAuthorized;
102
- private validateCriticalInfrastructureOperation;
103
- private logAdvancedOperation;
104
- }
105
- export interface AdvancedOperationEvent {
106
- type: string;
107
- severity: 'low' | 'medium' | 'high' | 'critical';
108
- operation: string;
109
- target: string;
110
- timestamp: Date;
111
- authorizationLevel?: string;
112
- authorizedBy?: string;
113
- details?: Record<string, unknown>;
114
- }
115
- /**
116
- * Global advanced targeting security instance
117
- */
118
- export declare const advancedTargetingSecurity: AdvancedTargetingSecurity;
119
- //# sourceMappingURL=advanced-targeting.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"advanced-targeting.d.ts","sourceRoot":"","sources":["../../src/security/advanced-targeting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,MAAM,WAA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ate on external active stacks
5
- * and critical infrastructure while maintaining security controls.
6
- *
7
- * @license MIT
8
- * @author Bo Shang
9
- *
10
- * DISCLAIMER: This software is provided for authorized security testing,
11
- * research, and defensive purposes only. Users must ensure compliance
12
- * with all applicable laws and regulations in their jurisdiction.
13
- */
14
- export class AdvancedTargetingSecurity {
15
- authorizedTargets = new Map();
16
- criticalInfrastructure = new Map();
17
- operationLog = [];
18
- constructor() {
19
- this.initializeDefaultTargets();
20
- }
21
- /**
22
- * Authorize a target for operations
23
- */
24
- authorizeTarget(authorization) {
25
- this.authorizedTargets.set(authorization.target, authorization);
26
- this.logAdvancedOperation({
27
- type: 'target_authorization',
28
- severity: 'high',
29
- operation: 'authorize',
30
- target: authorization.target,
31
- authorizationLevel: authorization.level,
32
- authorizedBy: authorization.authorizedBy,
33
- timestamp: new Date(),
34
- details: {
35
- scope: authorization.scope,
36
- compliance: authorization.compliance
37
- }
38
- });
39
- }
40
- /**
41
- * Validate operation on external target
42
- */
43
- validateExternalOperation(operation, target, parameters) {
44
- // Check if target is authorized
45
- const authorization = this.authorizedTargets.get(target);
46
- if (!authorization) {
47
- return {
48
- allowed: false,
49
- reason: 'Target not authorized for external operations',
50
- severity: 'high',
51
- details: { target, operation }
52
- };
53
- }
54
- // Check authorization level
55
- if (!this.isOperationAuthorized(operation, authorization.level)) {
56
- return {
57
- allowed: false,
58
- reason: `Operation '${operation}' not authorized for target '${target}'`,
59
- severity: 'high',
60
- details: { target, operation, authorizationLevel: authorization.level }
61
- };
62
- }
63
- // Check expiration
64
- if (authorization.expiresAt && authorization.expiresAt < new Date()) {
65
- return {
66
- allowed: false,
67
- reason: 'Target authorization has expired',
68
- severity: 'high',
69
- details: { target, expiresAt: authorization.expiresAt }
70
- };
71
- }
72
- // Check for critical infrastructure
73
- const criticalTarget = this.criticalInfrastructure.get(target);
74
- if (criticalTarget) {
75
- return this.validateCriticalInfrastructureOperation(operation, criticalTarget, parameters);
76
- }
77
- // Log the authorized operation
78
- this.logAdvancedOperation({
79
- type: 'external_operation',
80
- severity: 'medium',
81
- operation,
82
- target,
83
- authorizationLevel: authorization.level,
84
- timestamp: new Date(),
85
- details: {
86
- parameters,
87
- authorizedBy: authorization.authorizedBy,
88
- compliance: authorization.compliance
89
- }
90
- });
91
- return { allowed: true, severity: 'low' };
92
- }
93
- /**
94
- * Register critical infrastructure target
95
- */
96
- registerCriticalInfrastructure(target) {
97
- this.criticalInfrastructure.set(target.identifier, target);
98
- this.logAdvancedOperation({
99
- type: 'critical_infrastructure_registration',
100
- severity: 'critical',
101
- operation: 'register',
102
- target: target.identifier,
103
- timestamp: new Date(),
104
- details: {
105
- category: target.category,
106
- jurisdiction: target.jurisdiction,
107
- sensitivity: target.sensitivity
108
- }
109
- });
110
- }
111
- /**
112
- * Get authorized targets
113
- */
114
- getAuthorizedTargets() {
115
- return Array.from(this.authorizedTargets.values());
116
- }
117
- /**
118
- * Get critical infrastructure targets
119
- */
120
- getCriticalInfrastructure() {
121
- return Array.from(this.criticalInfrastructure.values());
122
- }
123
- /**
124
- * Get operation log
125
- */
126
- getOperationLog() {
127
- return [...this.operationLog];
128
- }
129
- /**
130
- * Generate targeting report
131
- */
132
- generateTargetingReport() {
133
- const authorized = this.getAuthorizedTargets();
134
- const critical = this.getCriticalInfrastructure();
135
- const operations = this.getOperationLog();
136
- const report = [
137
- '🎯 Advanced Targeting Security Report',
138
- '=====================================',
139
- `Authorized Targets: ${authorized.length}`,
140
- `Critical Infrastructure: ${critical.length}`,
141
- `Total Operations: ${operations.length}`,
142
- '',
143
- '🔐 Authorized Targets:',
144
- ...authorized.map(auth => ` • ${auth.target} (${auth.level}) - ${auth.authorizedBy}`),
145
- '',
146
- '🏛️ Critical Infrastructure:',
147
- ...critical.map(infra => ` • ${infra.identifier} (${infra.category}) - ${infra.jurisdiction} [${infra.sensitivity}]`),
148
- '',
149
- '📊 Recent Operations:',
150
- ...operations.slice(-10).map(op => ` • ${op.timestamp.toISOString()} - ${op.type} on ${op.target} [${op.severity}]`)
151
- ];
152
- return report.join('\n');
153
- }
154
- initializeDefaultTargets() {
155
- // Example: Research authorization for security analysis
156
- this.authorizeTarget({
157
- target: '*.gov',
158
- level: 'research',
159
- scope: ['vulnerability_scanning', 'security_analysis'],
160
- authorizedBy: 'Security Research Team',
161
- compliance: {
162
- jurisdiction: 'International',
163
- legalFramework: 'Authorized Security Research',
164
- reportingRequirements: ['vulnerability_disclosure']
165
- }
166
- });
167
- // Example: Critical infrastructure for analysis
168
- this.registerCriticalInfrastructure({
169
- category: 'energy',
170
- identifier: 'power-grid-*.gov',
171
- jurisdiction: 'Multiple',
172
- sensitivity: 'critical',
173
- authorizedOperations: ['security_analysis', 'vulnerability_assessment'],
174
- legalRestrictions: ['no_exploitation', 'responsible_disclosure']
175
- });
176
- }
177
- isOperationAuthorized(operation, authorizationLevel) {
178
- const operationLevels = {
179
- 'research': ['scanning', 'analysis', 'vulnerability_assessment'],
180
- 'analysis': ['scanning', 'analysis', 'vulnerability_assessment', 'security_testing'],
181
- 'testing': ['scanning', 'analysis', 'vulnerability_assessment', 'security_testing', 'penetration_testing'],
182
- 'operations': ['scanning', 'analysis', 'vulnerability_assessment', 'security_testing', 'penetration_testing', 'remediation']
183
- };
184
- const allowedOperations = operationLevels[authorizationLevel] || [];
185
- return allowedOperations.includes(operation);
186
- }
187
- validateCriticalInfrastructureOperation(operation, target, parameters) {
188
- // Enhanced validation for critical infrastructure
189
- if (!target.authorizedOperations.includes(operation)) {
190
- return {
191
- allowed: false,
192
- reason: `Operation '${operation}' not authorized for critical infrastructure '${target.identifier}'`,
193
- severity: 'critical',
194
- details: {
195
- target: target.identifier,
196
- operation,
197
- authorizedOperations: target.authorizedOperations,
198
- legalRestrictions: target.legalRestrictions
199
- }
200
- };
201
- }
202
- // Additional compliance checks for critical targets
203
- if (target.sensitivity === 'critical') {
204
- this.logAdvancedOperation({
205
- type: 'critical_infrastructure_operation',
206
- severity: 'critical',
207
- operation,
208
- target: target.identifier,
209
- timestamp: new Date(),
210
- details: {
211
- parameters,
212
- category: target.category,
213
- jurisdiction: target.jurisdiction,
214
- sensitivity: target.sensitivity,
215
- legalRestrictions: target.legalRestrictions
216
- }
217
- });
218
- }
219
- return { allowed: true, severity: 'medium' };
220
- }
221
- logAdvancedOperation(event) {
222
- this.operationLog.push(event);
223
- // Keep log size manageable
224
- if (this.operationLog.length > 1000) {
225
- this.operationLog = this.operationLog.slice(-500);
226
- }
227
- }
228
- }
229
- /**
230
- * Global advanced targeting security instance
231
- */
232
- export const advancedTargetingSecurity = new AdvancedTargetingSecurity();
233
- //# sourceMappingURL=advanced-targeting.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"advanced-targeting.js","sourceRoot":"","sources":["../../src/security/advanced-targeting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AA2DH,MAAM,OAAO,yBAAyB;IAC5B,iBAAiB,GAAqC,IAAI,GAAG,EAAE,CAAC;IAChE,sBAAsB,GAA8C,IAAI,GAAG,EAAE,CAAC;IAC9E,YAAY,GAA6B,EAAE,CAAC;IAEpD;QACE,IAAI,CAAC,wBAAwB,EAAE,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,eAAe,CAAC,aAAkC;QAChD,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QAEhE,IAAI,CAAC,oBAAoB,CAAC;YACxB,IAAI,EAAE,sBAAsB;YAC5B,QAAQ,EAAE,MAAM;YAChB,SAAS,EAAE,WAAW;YACtB,MAAM,EAAE,aAAa,CAAC,MAAM;YAC5B,kBAAkB,EAAE,aAAa,CAAC,KAAK;YACvC,YAAY,EAAE,aAAa,CAAC,YAAY;YACxC,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,OAAO,EAAE;gBACP,KAAK,EAAE,aAAa,CAAC,KAAK;gBAC1B,UAAU,EAAE,aAAa,CAAC,UAAU;aACrC;SACF,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,y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AE;oBACP,MAAM,EAAE,MAAM,CAAC,UAAU;oBACzB,SAAS;oBACT,oBAAoB,EAAE,MAAM,CAAC,oBAAoB;oBACjD,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;iBAC5C;aACF,CAAC;QACJ,CAAC;QAED,oDAAoD;QACpD,IAAI,MAAM,CAAC,WAAW,KAAK,UAAU,EAAE,CAAC;YACtC,IAAI,CAAC,oBAAoB,CAAC;gBACxB,IAAI,EAAE,mCAAmC;gBACzC,QAAQ,EAAE,UAAU;gBACpB,SAAS;gBACT,MAAM,EAAE,MAAM,CAAC,UAAU;gBACzB,SAAS,EAAE,IAAI,IAAI,EAAE;gBACrB,OAAO,EAAE;oBACP,UAAU;oBACV,QAAQ,EAAE,MAAM,CAAC,QAAQ;oBACzB,YAAY,EAAE,MAAM,CAAC,YAAY;oBACjC,WAAW,EAAE,MAAM,CAAC,WAAW;oBAC/B,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;iBAC5C;aACF,CAAC,CAAC;QACL,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;IAC/C,CAAC;IAEO,oBAAoB,CAAC,KAA6B;QACxD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAE9B,2BAA2B;QAC3B,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,IAAI,EAAE,CAAC;YACpC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;CACF;AAaD;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,yBAAyB,EAAE,CAAC"}
@@ -1,104 +0,0 @@
1
- /**
2
- * Vulnerability Assessment Engine
3
- *
4
- * Provides vulnerability scanning and risk assessment capabilities
5
- * for authorized security research and testing.
6
- *
7
- * LEGAL NOTICE:
8
- * For authorized security research, penetration testing, and red team exercises only.
9
- */
10
- export interface VulnerabilityScanRequest {
11
- targetType: 'web_application' | 'api' | 'infrastructure' | 'cloud' | 'container';
12
- targetUrl: string;
13
- scanDepth: 'quick' | 'standard' | 'deep';
14
- }
15
- export interface VulnerabilityScanResult {
16
- targetType: string;
17
- targetUrl: string;
18
- scanDepth: string;
19
- scanDate: string;
20
- vulnerabilities: Vulnerability[];
21
- summary: {
22
- totalVulnerabilities: number;
23
- criticalCount: number;
24
- highCount: number;
25
- mediumCount: number;
26
- lowCount: number;
27
- riskScore: number;
28
- };
29
- }
30
- export interface Vulnerability {
31
- id: string;
32
- name: string;
33
- severity: 'critical' | 'high' | 'medium' | 'low' | 'info';
34
- category: string;
35
- description: string;
36
- impact: string;
37
- remediation: string;
38
- cvssScore?: number;
39
- references?: string[];
40
- }
41
- export interface RiskAssessmentRequest {
42
- findings: string[];
43
- context: string;
44
- }
45
- export interface RiskAssessmentResult {
46
- findings: string[];
47
- context: string;
48
- riskScore: number;
49
- riskLevel: 'critical' | 'high' | 'medium' | 'low';
50
- recommendations: string[];
51
- priorityActions: string[];
52
- }
53
- /**
54
- * Vulnerability Assessment Engine
55
- */
56
- export declare class VulnerabilityAssessmentEngine {
57
- private vulnerabilityDatabase;
58
- constructor();
59
- /**
60
- * Scan for vulnerabilities
61
- */
62
- scanVulnerabilities(request: VulnerabilityScanRequest): Promise<VulnerabilityScanResult>;
63
- /**
64
- * Assess security risks
65
- */
66
- assessRisk(request: RiskAssessmentRequest): Promise<RiskAssessmentResult>;
67
- /**
68
- * Get vulnerability by ID
69
- */
70
- getVulnerability(vulnerabilityId: string): Vulnerability | undefined;
71
- /**
72
- * List all vulnerabilities
73
- */
74
- listVulnerabilities(): Vulnerability[];
75
- /**
76
- * Generate simulated vulnerabilities for demonstration
77
- */
78
- private generateSimulatedVulnerabilities;
79
- /**
80
- * Calculate vulnerability summary
81
- */
82
- private calculateVulnerabilitySummary;
83
- /**
84
- * Calculate risk score
85
- */
86
- private calculateRiskScore;
87
- /**
88
- * Determine risk level
89
- */
90
- private determineRiskLevel;
91
- /**
92
- * Generate risk recommendations
93
- */
94
- private generateRiskRecommendations;
95
- /**
96
- * Generate priority actions
97
- */
98
- private generatePriorityActions;
99
- /**
100
- * Initialize vulnerability database
101
- */
102
- private initializeVulnerabilityDatabase;
103
- }
104
- //# sourceMappingURL=vulnerabilityAssessment.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vulnerabilityAssessment.d.ts","sourceRoot":"","sources":["../../../src/security/assessment/vulnerabilityAssessment.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,iBAAiB,GAAG,KAAK,GAAG,gBAAgB,GAAG,OAAO,GAAG,WAAW,CAAC;IACjF,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;CAC1C;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,aAAa,EAAE,CAAC;IACjC,OAAO,EAAE;QACP,oBAAoB,EAAE,MAAM,CAAC;QAC7B,aAAa,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAA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