erosolar-cli 1.7.324 → 1.7.326

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 (323) hide show
  1. package/README.md +148 -24
  2. package/dist/alpha-zero/agentWrapper.d.ts +84 -0
  3. package/dist/alpha-zero/agentWrapper.d.ts.map +1 -0
  4. package/dist/alpha-zero/agentWrapper.js +171 -0
  5. package/dist/alpha-zero/agentWrapper.js.map +1 -0
  6. package/dist/alpha-zero/codeEvaluator.d.ts +25 -0
  7. package/dist/alpha-zero/codeEvaluator.d.ts.map +1 -0
  8. package/dist/alpha-zero/codeEvaluator.js +273 -0
  9. package/dist/alpha-zero/codeEvaluator.js.map +1 -0
  10. package/dist/alpha-zero/competitiveRunner.d.ts +66 -0
  11. package/dist/alpha-zero/competitiveRunner.d.ts.map +1 -0
  12. package/dist/alpha-zero/competitiveRunner.js +224 -0
  13. package/dist/alpha-zero/competitiveRunner.js.map +1 -0
  14. package/dist/alpha-zero/index.d.ts +67 -0
  15. package/dist/alpha-zero/index.d.ts.map +1 -0
  16. package/dist/alpha-zero/index.js +99 -0
  17. package/dist/alpha-zero/index.js.map +1 -0
  18. package/dist/alpha-zero/introspection.d.ts +128 -0
  19. package/dist/alpha-zero/introspection.d.ts.map +1 -0
  20. package/dist/alpha-zero/introspection.js +300 -0
  21. package/dist/alpha-zero/introspection.js.map +1 -0
  22. package/dist/alpha-zero/metricsTracker.d.ts +71 -0
  23. package/dist/alpha-zero/metricsTracker.d.ts.map +1 -0
  24. package/dist/{core → alpha-zero}/metricsTracker.js +5 -2
  25. package/dist/alpha-zero/metricsTracker.js.map +1 -0
  26. package/dist/alpha-zero/security/core.d.ts +125 -0
  27. package/dist/alpha-zero/security/core.d.ts.map +1 -0
  28. package/dist/alpha-zero/security/core.js +271 -0
  29. package/dist/alpha-zero/security/core.js.map +1 -0
  30. package/dist/alpha-zero/security/google.d.ts +125 -0
  31. package/dist/alpha-zero/security/google.d.ts.map +1 -0
  32. package/dist/alpha-zero/security/google.js +311 -0
  33. package/dist/alpha-zero/security/google.js.map +1 -0
  34. package/dist/alpha-zero/security/googleLoader.d.ts +17 -0
  35. package/dist/alpha-zero/security/googleLoader.d.ts.map +1 -0
  36. package/dist/alpha-zero/security/googleLoader.js +41 -0
  37. package/dist/alpha-zero/security/googleLoader.js.map +1 -0
  38. package/dist/alpha-zero/security/index.d.ts +29 -0
  39. package/dist/alpha-zero/security/index.d.ts.map +1 -0
  40. package/dist/alpha-zero/security/index.js +32 -0
  41. package/dist/alpha-zero/security/index.js.map +1 -0
  42. package/dist/alpha-zero/security/simulation.d.ts +124 -0
  43. package/dist/alpha-zero/security/simulation.d.ts.map +1 -0
  44. package/dist/alpha-zero/security/simulation.js +277 -0
  45. package/dist/alpha-zero/security/simulation.js.map +1 -0
  46. package/dist/alpha-zero/selfModification.d.ts +109 -0
  47. package/dist/alpha-zero/selfModification.d.ts.map +1 -0
  48. package/dist/alpha-zero/selfModification.js +233 -0
  49. package/dist/alpha-zero/selfModification.js.map +1 -0
  50. package/dist/alpha-zero/types.d.ts +170 -0
  51. package/dist/alpha-zero/types.d.ts.map +1 -0
  52. package/dist/alpha-zero/types.js +31 -0
  53. package/dist/alpha-zero/types.js.map +1 -0
  54. package/dist/bin/erosolar.js +21 -5
  55. package/dist/bin/erosolar.js.map +1 -1
  56. package/dist/capabilities/agentSpawningCapability.d.ts.map +1 -1
  57. package/dist/capabilities/agentSpawningCapability.js +31 -56
  58. package/dist/capabilities/agentSpawningCapability.js.map +1 -1
  59. package/dist/capabilities/securityTestingCapability.d.ts +13 -0
  60. package/dist/capabilities/securityTestingCapability.d.ts.map +1 -0
  61. package/dist/capabilities/securityTestingCapability.js +25 -0
  62. package/dist/capabilities/securityTestingCapability.js.map +1 -0
  63. package/dist/contracts/agent-schemas.json +15 -0
  64. package/dist/contracts/tools.schema.json +9 -0
  65. package/dist/core/agent.d.ts +2 -2
  66. package/dist/core/agent.d.ts.map +1 -1
  67. package/dist/core/agent.js.map +1 -1
  68. package/dist/core/aiFlowOptimizer.d.ts +26 -0
  69. package/dist/core/aiFlowOptimizer.d.ts.map +1 -0
  70. package/dist/core/aiFlowOptimizer.js +31 -0
  71. package/dist/core/aiFlowOptimizer.js.map +1 -0
  72. package/dist/core/aiOptimizationEngine.d.ts +158 -0
  73. package/dist/core/aiOptimizationEngine.d.ts.map +1 -0
  74. package/dist/core/aiOptimizationEngine.js +428 -0
  75. package/dist/core/aiOptimizationEngine.js.map +1 -0
  76. package/dist/core/aiOptimizationIntegration.d.ts +93 -0
  77. package/dist/core/aiOptimizationIntegration.d.ts.map +1 -0
  78. package/dist/core/aiOptimizationIntegration.js +250 -0
  79. package/dist/core/aiOptimizationIntegration.js.map +1 -0
  80. package/dist/core/customCommands.d.ts +0 -1
  81. package/dist/core/customCommands.d.ts.map +1 -1
  82. package/dist/core/customCommands.js +0 -3
  83. package/dist/core/customCommands.js.map +1 -1
  84. package/dist/core/enhancedErrorRecovery.d.ts +100 -0
  85. package/dist/core/enhancedErrorRecovery.d.ts.map +1 -0
  86. package/dist/core/enhancedErrorRecovery.js +345 -0
  87. package/dist/core/enhancedErrorRecovery.js.map +1 -0
  88. package/dist/core/hooksSystem.d.ts +65 -0
  89. package/dist/core/hooksSystem.d.ts.map +1 -0
  90. package/dist/core/hooksSystem.js +273 -0
  91. package/dist/core/hooksSystem.js.map +1 -0
  92. package/dist/core/memorySystem.d.ts +48 -0
  93. package/dist/core/memorySystem.d.ts.map +1 -0
  94. package/dist/core/memorySystem.js +271 -0
  95. package/dist/core/memorySystem.js.map +1 -0
  96. package/dist/core/toolPreconditions.d.ts.map +1 -1
  97. package/dist/core/toolPreconditions.js +14 -0
  98. package/dist/core/toolPreconditions.js.map +1 -1
  99. package/dist/core/toolRuntime.d.ts +1 -22
  100. package/dist/core/toolRuntime.d.ts.map +1 -1
  101. package/dist/core/toolRuntime.js +5 -0
  102. package/dist/core/toolRuntime.js.map +1 -1
  103. package/dist/core/toolValidation.d.ts.map +1 -1
  104. package/dist/core/toolValidation.js +3 -14
  105. package/dist/core/toolValidation.js.map +1 -1
  106. package/dist/core/unified/errors.d.ts +189 -0
  107. package/dist/core/unified/errors.d.ts.map +1 -0
  108. package/dist/core/unified/errors.js +497 -0
  109. package/dist/core/unified/errors.js.map +1 -0
  110. package/dist/core/unified/index.d.ts +19 -0
  111. package/dist/core/unified/index.d.ts.map +1 -0
  112. package/dist/core/unified/index.js +68 -0
  113. package/dist/core/unified/index.js.map +1 -0
  114. package/dist/core/unified/schema.d.ts +101 -0
  115. package/dist/core/unified/schema.d.ts.map +1 -0
  116. package/dist/core/unified/schema.js +350 -0
  117. package/dist/core/unified/schema.js.map +1 -0
  118. package/dist/core/unified/toolRuntime.d.ts +179 -0
  119. package/dist/core/unified/toolRuntime.d.ts.map +1 -0
  120. package/dist/core/unified/toolRuntime.js +517 -0
  121. package/dist/core/unified/toolRuntime.js.map +1 -0
  122. package/dist/core/unified/tools.d.ts +127 -0
  123. package/dist/core/unified/tools.d.ts.map +1 -0
  124. package/dist/core/unified/tools.js +1333 -0
  125. package/dist/core/unified/tools.js.map +1 -0
  126. package/dist/core/unified/types.d.ts +352 -0
  127. package/dist/core/unified/types.d.ts.map +1 -0
  128. package/dist/core/unified/types.js +12 -0
  129. package/dist/core/unified/types.js.map +1 -0
  130. package/dist/core/unified/version.d.ts +209 -0
  131. package/dist/core/unified/version.d.ts.map +1 -0
  132. package/dist/core/unified/version.js +454 -0
  133. package/dist/core/unified/version.js.map +1 -0
  134. package/dist/core/validationRunner.d.ts +3 -1
  135. package/dist/core/validationRunner.d.ts.map +1 -1
  136. package/dist/core/validationRunner.js.map +1 -1
  137. package/dist/headless/headlessApp.d.ts.map +1 -1
  138. package/dist/headless/headlessApp.js +0 -21
  139. package/dist/headless/headlessApp.js.map +1 -1
  140. package/dist/mcp/sseClient.d.ts.map +1 -1
  141. package/dist/mcp/sseClient.js +18 -9
  142. package/dist/mcp/sseClient.js.map +1 -1
  143. package/dist/plugins/tools/build/buildPlugin.d.ts +6 -0
  144. package/dist/plugins/tools/build/buildPlugin.d.ts.map +1 -1
  145. package/dist/plugins/tools/build/buildPlugin.js +10 -4
  146. package/dist/plugins/tools/build/buildPlugin.js.map +1 -1
  147. package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -1
  148. package/dist/plugins/tools/nodeDefaults.js +2 -0
  149. package/dist/plugins/tools/nodeDefaults.js.map +1 -1
  150. package/dist/plugins/tools/security/securityPlugin.d.ts +3 -0
  151. package/dist/plugins/tools/security/securityPlugin.d.ts.map +1 -0
  152. package/dist/plugins/tools/security/securityPlugin.js +12 -0
  153. package/dist/plugins/tools/security/securityPlugin.js.map +1 -0
  154. package/dist/runtime/agentSession.d.ts +2 -2
  155. package/dist/runtime/agentSession.d.ts.map +1 -1
  156. package/dist/runtime/agentSession.js +2 -2
  157. package/dist/runtime/agentSession.js.map +1 -1
  158. package/dist/security/active-stack-security.d.ts +112 -0
  159. package/dist/security/active-stack-security.d.ts.map +1 -0
  160. package/dist/security/active-stack-security.js +296 -0
  161. package/dist/security/active-stack-security.js.map +1 -0
  162. package/dist/security/advanced-persistence-research.d.ts +92 -0
  163. package/dist/security/advanced-persistence-research.d.ts.map +1 -0
  164. package/dist/security/advanced-persistence-research.js +195 -0
  165. package/dist/security/advanced-persistence-research.js.map +1 -0
  166. package/dist/security/advanced-targeting.d.ts +119 -0
  167. package/dist/security/advanced-targeting.d.ts.map +1 -0
  168. package/dist/security/advanced-targeting.js +233 -0
  169. package/dist/security/advanced-targeting.js.map +1 -0
  170. package/dist/security/assessment/vulnerabilityAssessment.d.ts +104 -0
  171. package/dist/security/assessment/vulnerabilityAssessment.d.ts.map +1 -0
  172. package/dist/security/assessment/vulnerabilityAssessment.js +315 -0
  173. package/dist/security/assessment/vulnerabilityAssessment.js.map +1 -0
  174. package/dist/security/authorization/securityAuthorization.d.ts +88 -0
  175. package/dist/security/authorization/securityAuthorization.d.ts.map +1 -0
  176. package/dist/security/authorization/securityAuthorization.js +172 -0
  177. package/dist/security/authorization/securityAuthorization.js.map +1 -0
  178. package/dist/security/comprehensive-targeting.d.ts +85 -0
  179. package/dist/security/comprehensive-targeting.d.ts.map +1 -0
  180. package/dist/security/comprehensive-targeting.js +438 -0
  181. package/dist/security/comprehensive-targeting.js.map +1 -0
  182. package/dist/security/global-security-integration.d.ts +91 -0
  183. package/dist/security/global-security-integration.d.ts.map +1 -0
  184. package/dist/security/global-security-integration.js +218 -0
  185. package/dist/security/global-security-integration.js.map +1 -0
  186. package/dist/security/index.d.ts +38 -0
  187. package/dist/security/index.d.ts.map +1 -0
  188. package/dist/security/index.js +47 -0
  189. package/dist/security/index.js.map +1 -0
  190. package/dist/security/persistence-analyzer.d.ts +56 -0
  191. package/dist/security/persistence-analyzer.d.ts.map +1 -0
  192. package/dist/security/persistence-analyzer.js +187 -0
  193. package/dist/security/persistence-analyzer.js.map +1 -0
  194. package/dist/security/persistence-cli.d.ts +36 -0
  195. package/dist/security/persistence-cli.d.ts.map +1 -0
  196. package/dist/security/persistence-cli.js +160 -0
  197. package/dist/security/persistence-cli.js.map +1 -0
  198. package/dist/security/persistence-research.d.ts +92 -0
  199. package/dist/security/persistence-research.d.ts.map +1 -0
  200. package/dist/security/persistence-research.js +364 -0
  201. package/dist/security/persistence-research.js.map +1 -0
  202. package/dist/security/research/persistenceResearch.d.ts +97 -0
  203. package/dist/security/research/persistenceResearch.d.ts.map +1 -0
  204. package/dist/security/research/persistenceResearch.js +282 -0
  205. package/dist/security/research/persistenceResearch.js.map +1 -0
  206. package/dist/security/security-integration.d.ts +74 -0
  207. package/dist/security/security-integration.d.ts.map +1 -0
  208. package/dist/security/security-integration.js +137 -0
  209. package/dist/security/security-integration.js.map +1 -0
  210. package/dist/security/security-testing-framework.d.ts +112 -0
  211. package/dist/security/security-testing-framework.d.ts.map +1 -0
  212. package/dist/security/security-testing-framework.js +364 -0
  213. package/dist/security/security-testing-framework.js.map +1 -0
  214. package/dist/security/simulation/attackSimulation.d.ts +93 -0
  215. package/dist/security/simulation/attackSimulation.d.ts.map +1 -0
  216. package/dist/security/simulation/attackSimulation.js +341 -0
  217. package/dist/security/simulation/attackSimulation.js.map +1 -0
  218. package/dist/security/strategic-operations.d.ts +100 -0
  219. package/dist/security/strategic-operations.d.ts.map +1 -0
  220. package/dist/security/strategic-operations.js +276 -0
  221. package/dist/security/strategic-operations.js.map +1 -0
  222. package/dist/security/tool-security-wrapper.d.ts +58 -0
  223. package/dist/security/tool-security-wrapper.d.ts.map +1 -0
  224. package/dist/security/tool-security-wrapper.js +156 -0
  225. package/dist/security/tool-security-wrapper.js.map +1 -0
  226. package/dist/shell/claudeCodeStreamHandler.d.ts +145 -0
  227. package/dist/shell/claudeCodeStreamHandler.d.ts.map +1 -0
  228. package/dist/shell/claudeCodeStreamHandler.js +322 -0
  229. package/dist/shell/claudeCodeStreamHandler.js.map +1 -0
  230. package/dist/shell/inputQueueManager.d.ts +144 -0
  231. package/dist/shell/inputQueueManager.d.ts.map +1 -0
  232. package/dist/shell/inputQueueManager.js +290 -0
  233. package/dist/shell/inputQueueManager.js.map +1 -0
  234. package/dist/shell/interactiveShell.d.ts +7 -16
  235. package/dist/shell/interactiveShell.d.ts.map +1 -1
  236. package/dist/shell/interactiveShell.js +164 -233
  237. package/dist/shell/interactiveShell.js.map +1 -1
  238. package/dist/shell/metricsTracker.d.ts +60 -0
  239. package/dist/shell/metricsTracker.d.ts.map +1 -0
  240. package/dist/shell/metricsTracker.js +119 -0
  241. package/dist/shell/metricsTracker.js.map +1 -0
  242. package/dist/shell/shellApp.d.ts +0 -2
  243. package/dist/shell/shellApp.d.ts.map +1 -1
  244. package/dist/shell/shellApp.js +9 -40
  245. package/dist/shell/shellApp.js.map +1 -1
  246. package/dist/shell/streamingOutputManager.d.ts +115 -0
  247. package/dist/shell/streamingOutputManager.d.ts.map +1 -0
  248. package/dist/shell/streamingOutputManager.js +225 -0
  249. package/dist/shell/streamingOutputManager.js.map +1 -0
  250. package/dist/shell/systemPrompt.d.ts.map +1 -1
  251. package/dist/shell/systemPrompt.js +4 -1
  252. package/dist/shell/systemPrompt.js.map +1 -1
  253. package/dist/shell/terminalInput.d.ts +116 -140
  254. package/dist/shell/terminalInput.d.ts.map +1 -1
  255. package/dist/shell/terminalInput.js +520 -543
  256. package/dist/shell/terminalInput.js.map +1 -1
  257. package/dist/shell/terminalInputAdapter.d.ts +20 -71
  258. package/dist/shell/terminalInputAdapter.d.ts.map +1 -1
  259. package/dist/shell/terminalInputAdapter.js +30 -87
  260. package/dist/shell/terminalInputAdapter.js.map +1 -1
  261. package/dist/subagents/taskRunner.d.ts +1 -7
  262. package/dist/subagents/taskRunner.d.ts.map +1 -1
  263. package/dist/subagents/taskRunner.js +47 -180
  264. package/dist/subagents/taskRunner.js.map +1 -1
  265. package/dist/tools/securityTools.d.ts +22 -0
  266. package/dist/tools/securityTools.d.ts.map +1 -0
  267. package/dist/tools/securityTools.js +448 -0
  268. package/dist/tools/securityTools.js.map +1 -0
  269. package/dist/ui/ShellUIAdapter.d.ts.map +1 -1
  270. package/dist/ui/ShellUIAdapter.js +12 -13
  271. package/dist/ui/ShellUIAdapter.js.map +1 -1
  272. package/dist/ui/display.d.ts +45 -24
  273. package/dist/ui/display.d.ts.map +1 -1
  274. package/dist/ui/display.js +259 -140
  275. package/dist/ui/display.js.map +1 -1
  276. package/dist/ui/persistentPrompt.d.ts +50 -0
  277. package/dist/ui/persistentPrompt.d.ts.map +1 -0
  278. package/dist/ui/persistentPrompt.js +92 -0
  279. package/dist/ui/persistentPrompt.js.map +1 -0
  280. package/dist/ui/terminalUISchema.d.ts +195 -0
  281. package/dist/ui/terminalUISchema.d.ts.map +1 -0
  282. package/dist/ui/terminalUISchema.js +113 -0
  283. package/dist/ui/terminalUISchema.js.map +1 -0
  284. package/dist/ui/theme.d.ts.map +1 -1
  285. package/dist/ui/theme.js +8 -6
  286. package/dist/ui/theme.js.map +1 -1
  287. package/dist/ui/toolDisplay.d.ts +158 -0
  288. package/dist/ui/toolDisplay.d.ts.map +1 -1
  289. package/dist/ui/toolDisplay.js +348 -0
  290. package/dist/ui/toolDisplay.js.map +1 -1
  291. package/dist/ui/unified/layout.d.ts +0 -1
  292. package/dist/ui/unified/layout.d.ts.map +1 -1
  293. package/dist/ui/unified/layout.js +25 -15
  294. package/dist/ui/unified/layout.js.map +1 -1
  295. package/package.json +4 -4
  296. package/scripts/deploy-security-capabilities.js +178 -0
  297. package/dist/core/hooks.d.ts +0 -113
  298. package/dist/core/hooks.d.ts.map +0 -1
  299. package/dist/core/hooks.js +0 -267
  300. package/dist/core/hooks.js.map +0 -1
  301. package/dist/core/metricsTracker.d.ts +0 -122
  302. package/dist/core/metricsTracker.d.ts.map +0 -1
  303. package/dist/core/metricsTracker.js.map +0 -1
  304. package/dist/core/securityAssessment.d.ts +0 -91
  305. package/dist/core/securityAssessment.d.ts.map +0 -1
  306. package/dist/core/securityAssessment.js +0 -580
  307. package/dist/core/securityAssessment.js.map +0 -1
  308. package/dist/core/verification.d.ts +0 -137
  309. package/dist/core/verification.d.ts.map +0 -1
  310. package/dist/core/verification.js +0 -323
  311. package/dist/core/verification.js.map +0 -1
  312. package/dist/subagents/agentConfig.d.ts +0 -27
  313. package/dist/subagents/agentConfig.d.ts.map +0 -1
  314. package/dist/subagents/agentConfig.js +0 -89
  315. package/dist/subagents/agentConfig.js.map +0 -1
  316. package/dist/subagents/agentRegistry.d.ts +0 -33
  317. package/dist/subagents/agentRegistry.d.ts.map +0 -1
  318. package/dist/subagents/agentRegistry.js +0 -162
  319. package/dist/subagents/agentRegistry.js.map +0 -1
  320. package/dist/utils/frontmatter.d.ts +0 -10
  321. package/dist/utils/frontmatter.d.ts.map +0 -1
  322. package/dist/utils/frontmatter.js +0 -78
  323. package/dist/utils/frontmatter.js.map +0 -1
@@ -0,0 +1,119 @@
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
@@ -0,0 +1 @@
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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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 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
@@ -0,0 +1 @@
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,E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C,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"}
@@ -0,0 +1,104 @@
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
@@ -0,0 +1 @@
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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