erosolar-cli 1.5.3 → 1.5.5
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.
- package/config/security-deployment.json +54 -0
- package/dist/active-stack-security.d.ts +110 -0
- package/dist/active-stack-security.js +313 -0
- package/dist/active-stack-security.js.map +1 -0
- package/dist/advanced-targeting.d.ts +113 -0
- package/dist/advanced-targeting.js +252 -0
- package/dist/advanced-targeting.js.map +1 -0
- package/dist/bin/adapters/node/index.js +33 -0
- package/dist/bin/adapters/types.js +1 -0
- package/dist/bin/alpha-zero/agentWrapper.js +165 -0
- package/dist/bin/alpha-zero/codeEvaluator.js +272 -0
- package/dist/bin/alpha-zero/competitiveRunner.js +219 -0
- package/dist/bin/alpha-zero/index.js +98 -0
- package/dist/bin/alpha-zero/introspection.js +298 -0
- package/dist/bin/alpha-zero/metricsTracker.js +207 -0
- package/dist/bin/alpha-zero/security/core.js +269 -0
- package/dist/bin/alpha-zero/security/google.js +308 -0
- package/dist/bin/alpha-zero/security/googleLoader.js +40 -0
- package/dist/bin/alpha-zero/security/index.js +31 -0
- package/dist/bin/alpha-zero/security/simulation.js +274 -0
- package/dist/bin/alpha-zero/selfModification.js +231 -0
- package/dist/bin/alpha-zero/types.js +30 -0
- package/dist/bin/bin/erosolar-optimized.js +205 -0
- package/dist/bin/capabilities/agentSpawningCapability.js +116 -0
- package/dist/bin/capabilities/bashCapability.js +22 -0
- package/dist/bin/capabilities/cloudCapability.js +36 -0
- package/dist/bin/capabilities/codeAnalysisCapability.js +22 -0
- package/dist/bin/capabilities/codeQualityCapability.js +23 -0
- package/dist/bin/capabilities/dependencySecurityCapability.js +22 -0
- package/dist/bin/capabilities/devCapability.js +22 -0
- package/dist/bin/capabilities/editCapability.js +28 -0
- package/dist/bin/capabilities/emailCapability.js +20 -0
- package/dist/bin/capabilities/enhancedGitCapability.js +221 -0
- package/dist/bin/capabilities/filesystemCapability.js +22 -0
- package/dist/bin/capabilities/globCapability.js +28 -0
- package/dist/bin/capabilities/interactionCapability.js +20 -0
- package/dist/bin/capabilities/learnCapability.js +22 -0
- package/dist/bin/capabilities/mcpCapability.js +20 -0
- package/dist/bin/capabilities/notebookCapability.js +28 -0
- package/dist/bin/capabilities/planningCapability.js +27 -0
- package/dist/bin/capabilities/refactoringCapability.js +23 -0
- package/dist/bin/capabilities/repoChecksCapability.js +22 -0
- package/dist/bin/capabilities/searchCapability.js +22 -0
- package/dist/bin/capabilities/skillCapability.js +76 -0
- package/dist/bin/capabilities/taskManagementCapability.js +20 -0
- package/dist/bin/capabilities/testingCapability.js +23 -0
- package/dist/bin/capabilities/toolManifest.js +159 -0
- package/dist/bin/capabilities/toolRegistry.js +114 -0
- package/dist/bin/capabilities/webCapability.js +20 -0
- package/dist/bin/config.js +139 -0
- package/dist/bin/contracts/v1/agent.js +7 -0
- package/dist/bin/contracts/v1/agentProfileManifest.js +8 -0
- package/dist/bin/contracts/v1/agentRules.js +9 -0
- package/dist/bin/contracts/v1/toolAccess.js +8 -0
- package/dist/bin/core/agent.js +362 -0
- package/dist/bin/core/agentProfileManifest.js +187 -0
- package/dist/bin/core/agentProfiles.js +34 -0
- package/dist/bin/core/agentRulebook.js +135 -0
- package/dist/bin/core/agentSchemaLoader.js +233 -0
- package/dist/bin/core/contextManager.js +412 -0
- package/dist/bin/core/contextWindow.js +122 -0
- package/dist/bin/core/customCommands.js +80 -0
- package/dist/bin/core/errors/apiKeyErrors.js +114 -0
- package/dist/bin/core/errors/errorTypes.js +340 -0
- package/dist/bin/core/errors/safetyValidator.js +304 -0
- package/dist/bin/core/errors.js +32 -0
- package/dist/bin/core/modelDiscovery.js +755 -0
- package/dist/bin/core/preferences.js +224 -0
- package/dist/bin/core/schemaValidator.js +92 -0
- package/dist/bin/core/secretStore.js +199 -0
- package/dist/bin/core/sessionStore.js +187 -0
- package/dist/bin/core/toolRuntime.js +290 -0
- package/dist/bin/core/types.js +1 -0
- package/dist/bin/erosolar-optimized.d.ts +12 -0
- package/dist/bin/erosolar-optimized.d.ts.map +1 -0
- package/dist/bin/erosolar-optimized.js +239 -0
- package/dist/bin/erosolar-optimized.js.map +1 -0
- package/dist/bin/erosolar.js +14 -0
- package/dist/bin/erosolar.js.map +1 -1
- package/dist/bin/headless/headlessApp.js +172 -0
- package/dist/bin/mcp/config.js +202 -0
- package/dist/bin/mcp/stdioClient.js +172 -0
- package/dist/bin/mcp/toolBridge.js +104 -0
- package/dist/bin/mcp/types.js +1 -0
- package/dist/bin/plugins/index.js +113 -0
- package/dist/bin/plugins/providers/anthropic/index.js +25 -0
- package/dist/bin/plugins/providers/deepseek/index.js +24 -0
- package/dist/bin/plugins/providers/google/index.js +26 -0
- package/dist/bin/plugins/providers/index.js +19 -0
- package/dist/bin/plugins/providers/ollama/index.js +59 -0
- package/dist/bin/plugins/providers/openai/index.js +26 -0
- package/dist/bin/plugins/providers/xai/index.js +24 -0
- package/dist/bin/plugins/tools/agentSpawning/agentSpawningPlugin.js +8 -0
- package/dist/bin/plugins/tools/bash/localBashPlugin.js +13 -0
- package/dist/bin/plugins/tools/checks/localRepoChecksPlugin.js +13 -0
- package/dist/bin/plugins/tools/cloud/cloudPlugin.js +13 -0
- package/dist/bin/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +13 -0
- package/dist/bin/plugins/tools/codeQuality/codeQualityPlugin.js +13 -0
- package/dist/bin/plugins/tools/dependency/dependencyPlugin.js +11 -0
- package/dist/bin/plugins/tools/development/devPlugin.js +13 -0
- package/dist/bin/plugins/tools/edit/editPlugin.js +14 -0
- package/dist/bin/plugins/tools/email/emailPlugin.js +11 -0
- package/dist/bin/plugins/tools/enhancedGit/enhancedGitPlugin.js +8 -0
- package/dist/bin/plugins/tools/filesystem/localFilesystemPlugin.js +13 -0
- package/dist/bin/plugins/tools/glob/globPlugin.js +14 -0
- package/dist/bin/plugins/tools/index.js +2 -0
- package/dist/bin/plugins/tools/interaction/interactionPlugin.js +11 -0
- package/dist/bin/plugins/tools/learn/learnPlugin.js +13 -0
- package/dist/bin/plugins/tools/mcp/mcpPlugin.js +8 -0
- package/dist/bin/plugins/tools/nodeDefaults.js +56 -0
- package/dist/bin/plugins/tools/notebook/notebookPlugin.js +14 -0
- package/dist/bin/plugins/tools/planning/planningPlugin.js +14 -0
- package/dist/bin/plugins/tools/refactoring/refactoringPlugin.js +11 -0
- package/dist/bin/plugins/tools/registry.js +57 -0
- package/dist/bin/plugins/tools/search/localSearchPlugin.js +13 -0
- package/dist/bin/plugins/tools/skills/skillPlugin.js +8 -0
- package/dist/bin/plugins/tools/taskManagement/taskManagementPlugin.js +11 -0
- package/dist/bin/plugins/tools/testing/testingPlugin.js +11 -0
- package/dist/bin/plugins/tools/web/webPlugin.js +11 -0
- package/dist/bin/providers/anthropicProvider.js +329 -0
- package/dist/bin/providers/googleProvider.js +203 -0
- package/dist/bin/providers/openaiChatCompletionsProvider.js +208 -0
- package/dist/bin/providers/openaiResponsesProvider.js +249 -0
- package/dist/bin/providers/providerFactory.js +24 -0
- package/dist/bin/runtime/agentController.js +321 -0
- package/dist/bin/runtime/agentHost.js +153 -0
- package/dist/bin/runtime/agentSession.js +195 -0
- package/dist/bin/runtime/node.js +10 -0
- package/dist/bin/runtime/universal.js +28 -0
- package/dist/bin/shell/bracketedPasteManager.js +350 -0
- package/dist/bin/shell/fileChangeTracker.js +65 -0
- package/dist/bin/shell/interactiveShell.js +2908 -0
- package/dist/bin/shell/liveStatus.js +78 -0
- package/dist/bin/shell/shellApp.js +290 -0
- package/dist/bin/shell/systemPrompt.js +60 -0
- package/dist/bin/shell/updateManager.js +108 -0
- package/dist/bin/skills/skillRepository.js +236 -0
- package/dist/bin/skills/types.js +1 -0
- package/dist/bin/subagents/taskRunner.js +269 -0
- package/dist/bin/tools/backgroundBashTools.js +211 -0
- package/dist/bin/tools/bashTools.js +159 -0
- package/dist/bin/tools/cloudTools.js +864 -0
- package/dist/bin/tools/codeAnalysisTools.js +641 -0
- package/dist/bin/tools/codeQualityTools.js +294 -0
- package/dist/bin/tools/dependencyTools.js +282 -0
- package/dist/bin/tools/devTools.js +238 -0
- package/dist/bin/tools/diffUtils.js +137 -0
- package/dist/bin/tools/editTools.js +134 -0
- package/dist/bin/tools/emailTools.js +448 -0
- package/dist/bin/tools/fileTools.js +282 -0
- package/dist/bin/tools/globTools.js +173 -0
- package/dist/bin/tools/grepTools.js +332 -0
- package/dist/bin/tools/interactionTools.js +170 -0
- package/dist/bin/tools/learnTools.js +1818 -0
- package/dist/bin/tools/notebookEditTools.js +196 -0
- package/dist/bin/tools/planningTools.js +46 -0
- package/dist/bin/tools/refactoringTools.js +293 -0
- package/dist/bin/tools/repoChecksTools.js +160 -0
- package/dist/bin/tools/searchTools.js +206 -0
- package/dist/bin/tools/skillTools.js +177 -0
- package/dist/bin/tools/taskManagementTools.js +156 -0
- package/dist/bin/tools/testingTools.js +232 -0
- package/dist/bin/tools/webTools.js +480 -0
- package/dist/bin/ui/ShellUIAdapter.js +459 -0
- package/dist/bin/ui/UnifiedUIController.js +183 -0
- package/dist/bin/ui/animation/AnimationScheduler.js +430 -0
- package/dist/bin/ui/codeHighlighter.js +854 -0
- package/dist/bin/ui/designSystem.js +121 -0
- package/dist/bin/ui/display.js +1222 -0
- package/dist/bin/ui/interrupts/InterruptManager.js +437 -0
- package/dist/bin/ui/layout.js +139 -0
- package/dist/bin/ui/orchestration/StatusOrchestrator.js +403 -0
- package/dist/bin/ui/outputMode.js +38 -0
- package/dist/bin/ui/persistentPrompt.js +183 -0
- package/dist/bin/ui/richText.js +338 -0
- package/dist/bin/ui/shortcutsHelp.js +87 -0
- package/dist/bin/ui/telemetry/UITelemetry.js +443 -0
- package/dist/bin/ui/textHighlighter.js +210 -0
- package/dist/bin/ui/theme.js +116 -0
- package/dist/bin/ui/toolDisplay.js +423 -0
- package/dist/bin/ui/toolDisplayAdapter.js +357 -0
- package/dist/bin/workspace.js +106 -0
- package/dist/bin/workspace.validator.js +213 -0
- package/dist/capabilities/offensiveSecurityCapability.d.ts +26 -0
- package/dist/capabilities/offensiveSecurityCapability.d.ts.map +1 -0
- package/dist/capabilities/offensiveSecurityCapability.js +58 -0
- package/dist/capabilities/offensiveSecurityCapability.js.map +1 -0
- package/dist/capabilities/realSecurityCapability.d.ts +26 -0
- package/dist/capabilities/realSecurityCapability.d.ts.map +1 -0
- package/dist/capabilities/realSecurityCapability.js +53 -0
- package/dist/capabilities/realSecurityCapability.js.map +1 -0
- package/dist/capabilities/securityCapability.d.ts +32 -0
- package/dist/capabilities/securityCapability.d.ts.map +1 -0
- package/dist/capabilities/securityCapability.js +57 -0
- package/dist/capabilities/securityCapability.js.map +1 -0
- package/dist/capabilities/ultimateSecurityCapability.d.ts +42 -0
- package/dist/capabilities/ultimateSecurityCapability.d.ts.map +1 -0
- package/dist/capabilities/ultimateSecurityCapability.js +96 -0
- package/dist/capabilities/ultimateSecurityCapability.js.map +1 -0
- package/dist/core/LazyLoader.d.ts +129 -0
- package/dist/core/LazyLoader.d.ts.map +1 -0
- package/dist/core/LazyLoader.js +240 -0
- package/dist/core/LazyLoader.js.map +1 -0
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js +78 -8
- package/dist/core/agent.js.map +1 -1
- package/dist/core/contextManager.d.ts.map +1 -1
- package/dist/core/contextManager.js +117 -16
- package/dist/core/contextManager.js.map +1 -1
- package/dist/core/intelligenceTools.d.ts +19 -0
- package/dist/core/intelligenceTools.d.ts.map +1 -0
- package/dist/core/intelligenceTools.js +453 -0
- package/dist/core/intelligenceTools.js.map +1 -0
- package/dist/core/operationalTools.d.ts +19 -0
- package/dist/core/operationalTools.d.ts.map +1 -0
- package/dist/core/operationalTools.js +467 -0
- package/dist/core/operationalTools.js.map +1 -0
- package/dist/intelligence/codeIntelligence.d.ts.map +1 -1
- package/dist/intelligence/codeIntelligence.js +12 -0
- package/dist/intelligence/codeIntelligence.js.map +1 -1
- package/dist/offensive/core/offensive-engine.d.ts +171 -0
- package/dist/offensive/core/offensive-engine.d.ts.map +1 -0
- package/dist/offensive/core/offensive-engine.js +345 -0
- package/dist/offensive/core/offensive-engine.js.map +1 -0
- package/dist/offensive/core/offensive-integration.d.ts +129 -0
- package/dist/offensive/core/offensive-integration.d.ts.map +1 -0
- package/dist/offensive/core/offensive-integration.js +364 -0
- package/dist/offensive/core/offensive-integration.js.map +1 -0
- package/dist/offensive/core/offensive-tools.d.ts +55 -0
- package/dist/offensive/core/offensive-tools.d.ts.map +1 -0
- package/dist/offensive/core/offensive-tools.js +438 -0
- package/dist/offensive/core/offensive-tools.js.map +1 -0
- package/dist/offensive/offensive-cli.d.ts +48 -0
- package/dist/offensive/offensive-cli.d.ts.map +1 -0
- package/dist/offensive/offensive-cli.js +233 -0
- package/dist/offensive/offensive-cli.js.map +1 -0
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +2 -0
- package/dist/plugins/index.js.map +1 -1
- package/dist/security/active-stack-security.d.ts +112 -0
- package/dist/security/active-stack-security.d.ts.map +1 -0
- package/dist/security/active-stack-security.js +296 -0
- package/dist/security/active-stack-security.js.map +1 -0
- package/dist/security/advanced-persistence-research.d.ts +92 -0
- package/dist/security/advanced-persistence-research.d.ts.map +1 -0
- package/dist/security/advanced-persistence-research.js +195 -0
- package/dist/security/advanced-persistence-research.js.map +1 -0
- package/dist/security/advanced-targeting.d.ts +119 -0
- package/dist/security/advanced-targeting.d.ts.map +1 -0
- package/dist/security/advanced-targeting.js +233 -0
- package/dist/security/advanced-targeting.js.map +1 -0
- package/dist/security/apt-simulation-cli.d.ts +57 -0
- package/dist/security/apt-simulation-cli.d.ts.map +1 -0
- package/dist/security/apt-simulation-cli.js +278 -0
- package/dist/security/apt-simulation-cli.js.map +1 -0
- package/dist/security/apt-simulation-engine-complete.d.ts +97 -0
- package/dist/security/apt-simulation-engine-complete.d.ts.map +1 -0
- package/dist/security/apt-simulation-engine-complete.js +441 -0
- package/dist/security/apt-simulation-engine-complete.js.map +1 -0
- package/dist/security/apt-simulation-engine.d.ts +97 -0
- package/dist/security/apt-simulation-engine.d.ts.map +1 -0
- package/dist/security/apt-simulation-engine.js +441 -0
- package/dist/security/apt-simulation-engine.js.map +1 -0
- package/dist/security/assessment/vulnerabilityAssessment.d.ts +104 -0
- package/dist/security/assessment/vulnerabilityAssessment.d.ts.map +1 -0
- package/dist/security/assessment/vulnerabilityAssessment.js +315 -0
- package/dist/security/assessment/vulnerabilityAssessment.js.map +1 -0
- package/dist/security/authorization/securityAuthorization.d.ts +88 -0
- package/dist/security/authorization/securityAuthorization.d.ts.map +1 -0
- package/dist/security/authorization/securityAuthorization.js +172 -0
- package/dist/security/authorization/securityAuthorization.js.map +1 -0
- package/dist/security/authorization.d.ts +45 -0
- package/dist/security/authorization.d.ts.map +1 -0
- package/dist/security/authorization.js +128 -0
- package/dist/security/authorization.js.map +1 -0
- package/dist/security/comprehensive-security-research.d.ts +84 -0
- package/dist/security/comprehensive-security-research.d.ts.map +1 -0
- package/dist/security/comprehensive-security-research.js +211 -0
- package/dist/security/comprehensive-security-research.js.map +1 -0
- package/dist/security/comprehensive-targeting.d.ts +85 -0
- package/dist/security/comprehensive-targeting.d.ts.map +1 -0
- package/dist/security/comprehensive-targeting.js +438 -0
- package/dist/security/comprehensive-targeting.js.map +1 -0
- package/dist/security/global-security-integration.d.ts +91 -0
- package/dist/security/global-security-integration.d.ts.map +1 -0
- package/dist/security/global-security-integration.js +218 -0
- package/dist/security/global-security-integration.js.map +1 -0
- package/dist/security/index.d.ts +38 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +47 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/offensive/exploitationEngine.d.ts +54 -0
- package/dist/security/offensive/exploitationEngine.d.ts.map +1 -0
- package/dist/security/offensive/exploitationEngine.js +263 -0
- package/dist/security/offensive/exploitationEngine.js.map +1 -0
- package/dist/security/persistence-cli.d.ts +36 -0
- package/dist/security/persistence-cli.d.ts.map +1 -0
- package/dist/security/persistence-cli.js +160 -0
- package/dist/security/persistence-cli.js.map +1 -0
- package/dist/security/persistence-research.d.ts +11 -0
- package/dist/security/persistence-research.d.ts.map +1 -1
- package/dist/security/persistence-research.js +11 -0
- package/dist/security/persistence-research.js.map +1 -1
- package/dist/security/real/networkExploitation.d.ts +92 -0
- package/dist/security/real/networkExploitation.d.ts.map +1 -0
- package/dist/security/real/networkExploitation.js +316 -0
- package/dist/security/real/networkExploitation.js.map +1 -0
- package/dist/security/real/persistenceImplementation.d.ts +62 -0
- package/dist/security/real/persistenceImplementation.d.ts.map +1 -0
- package/dist/security/real/persistenceImplementation.js +323 -0
- package/dist/security/real/persistenceImplementation.js.map +1 -0
- package/dist/security/real/vulnerabilityScanner.d.ts +73 -0
- package/dist/security/real/vulnerabilityScanner.d.ts.map +1 -0
- package/dist/security/real/vulnerabilityScanner.js +341 -0
- package/dist/security/real/vulnerabilityScanner.js.map +1 -0
- package/dist/security/research/persistenceResearch.d.ts +97 -0
- package/dist/security/research/persistenceResearch.d.ts.map +1 -0
- package/dist/security/research/persistenceResearch.js +282 -0
- package/dist/security/research/persistenceResearch.js.map +1 -0
- package/dist/security/security-integration.d.ts +74 -0
- package/dist/security/security-integration.d.ts.map +1 -0
- package/dist/security/security-integration.js +137 -0
- package/dist/security/security-integration.js.map +1 -0
- package/dist/security/security-testing-framework.d.ts +120 -0
- package/dist/security/security-testing-framework.d.ts.map +1 -0
- package/dist/security/security-testing-framework.js +372 -0
- package/dist/security/security-testing-framework.js.map +1 -0
- package/dist/security/simulation/attackSimulation.d.ts +93 -0
- package/dist/security/simulation/attackSimulation.d.ts.map +1 -0
- package/dist/security/simulation/attackSimulation.js +341 -0
- package/dist/security/simulation/attackSimulation.js.map +1 -0
- package/dist/security/strategic-operations.d.ts +100 -0
- package/dist/security/strategic-operations.d.ts.map +1 -0
- package/dist/security/strategic-operations.js +276 -0
- package/dist/security/strategic-operations.js.map +1 -0
- package/dist/security/tool-security-wrapper.d.ts +58 -0
- package/dist/security/tool-security-wrapper.d.ts.map +1 -0
- package/dist/security/tool-security-wrapper.js +156 -0
- package/dist/security/tool-security-wrapper.js.map +1 -0
- package/dist/shell/bracketedPasteManager.d.ts +33 -0
- package/dist/shell/bracketedPasteManager.d.ts.map +1 -1
- package/dist/shell/bracketedPasteManager.js +101 -0
- package/dist/shell/bracketedPasteManager.js.map +1 -1
- package/dist/shell/interactiveShell.d.ts +22 -1
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +257 -24
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/shell/taskCompletionDetector.d.ts +101 -0
- package/dist/shell/taskCompletionDetector.d.ts.map +1 -0
- package/dist/shell/taskCompletionDetector.js +343 -0
- package/dist/shell/taskCompletionDetector.js.map +1 -0
- package/dist/tools/cloudTools.d.ts +11 -0
- package/dist/tools/cloudTools.d.ts.map +1 -1
- package/dist/tools/cloudTools.js +11 -0
- package/dist/tools/cloudTools.js.map +1 -1
- package/dist/tools/codeAnalysisTools.d.ts.map +1 -1
- package/dist/tools/codeAnalysisTools.js +23 -1
- package/dist/tools/codeAnalysisTools.js.map +1 -1
- package/dist/tools/enhancedSecurityTools.d.ts +19 -0
- package/dist/tools/enhancedSecurityTools.d.ts.map +1 -0
- package/dist/tools/enhancedSecurityTools.js +215 -0
- package/dist/tools/enhancedSecurityTools.js.map +1 -0
- package/dist/tools/fileTools.d.ts.map +1 -1
- package/dist/tools/fileTools.js +7 -0
- package/dist/tools/fileTools.js.map +1 -1
- package/dist/tools/grepTools.d.ts.map +1 -1
- package/dist/tools/grepTools.js +6 -0
- package/dist/tools/grepTools.js.map +1 -1
- package/dist/tools/offensiveSecurityTools.d.ts +16 -0
- package/dist/tools/offensiveSecurityTools.d.ts.map +1 -0
- package/dist/tools/offensiveSecurityTools.js +285 -0
- package/dist/tools/offensiveSecurityTools.js.map +1 -0
- package/dist/tools/realSecurityTools.d.ts +18 -0
- package/dist/tools/realSecurityTools.d.ts.map +1 -0
- package/dist/tools/realSecurityTools.js +468 -0
- package/dist/tools/realSecurityTools.js.map +1 -0
- package/dist/tools/securityTools.d.ts +20 -0
- package/dist/tools/securityTools.d.ts.map +1 -0
- package/dist/tools/securityTools.js +449 -0
- package/dist/tools/securityTools.js.map +1 -0
- package/dist/tools/webTools.js +9 -0
- package/dist/tools/webTools.js.map +1 -1
- package/package.json +26 -11
- package/scripts/deploy-security-capabilities.js +178 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"security": {
|
|
3
|
+
"capabilities": {
|
|
4
|
+
"ultimateSecurity": {
|
|
5
|
+
"enabled": true,
|
|
6
|
+
"options": {
|
|
7
|
+
"enableExploitation": true,
|
|
8
|
+
"enableAdvancedExploitation": true,
|
|
9
|
+
"enablePayloadGeneration": true,
|
|
10
|
+
"requireAuthorization": true
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"authorization": {
|
|
15
|
+
"defaultScope": {
|
|
16
|
+
"targets": ["127.0.0.1", "localhost"],
|
|
17
|
+
"techniques": ["*"],
|
|
18
|
+
"durationHours": 24,
|
|
19
|
+
"authorizedBy": "Security Team",
|
|
20
|
+
"contactInfo": "security@example.com"
|
|
21
|
+
},
|
|
22
|
+
"environment": {
|
|
23
|
+
"SECURITY_AUTHORIZATION_TOKEN": "${SECURITY_AUTHORIZATION_TOKEN}",
|
|
24
|
+
"BYPASS_AUTHORIZATION": false
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"tools": {
|
|
28
|
+
"realSecurity": {
|
|
29
|
+
"networkExploitation": true,
|
|
30
|
+
"vulnerabilityScanning": true,
|
|
31
|
+
"persistenceTesting": true
|
|
32
|
+
},
|
|
33
|
+
"offensiveSecurity": {
|
|
34
|
+
"reverseShells": true,
|
|
35
|
+
"filelessPersistence": true,
|
|
36
|
+
"webShells": true,
|
|
37
|
+
"dnsTunneling": true,
|
|
38
|
+
"phishingTemplates": true,
|
|
39
|
+
"backdoorUsers": true
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"reporting": {
|
|
43
|
+
"generateReports": true,
|
|
44
|
+
"saveEvidence": true,
|
|
45
|
+
"logActivities": true
|
|
46
|
+
},
|
|
47
|
+
"safety": {
|
|
48
|
+
"legalNotice": true,
|
|
49
|
+
"scopeValidation": true,
|
|
50
|
+
"activityLogging": true,
|
|
51
|
+
"evidenceCollection": true
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Active Stack Security Module
|
|
3
|
+
*
|
|
4
|
+
* Ensures Erosolar CLI only operates on the active stack and nothing else.
|
|
5
|
+
* Implements strict security rules to prevent vulnerabilities and unauthorized operations.
|
|
6
|
+
*
|
|
7
|
+
* @license MIT
|
|
8
|
+
* @author Bo Shang
|
|
9
|
+
*
|
|
10
|
+
* DISCLAIMER: This software is provided for security testing and defensive purposes only.
|
|
11
|
+
* Users are solely responsible for ensuring their use complies with applicable laws.
|
|
12
|
+
*/
|
|
13
|
+
export interface ActiveStackSecurityConfig {
|
|
14
|
+
/**
|
|
15
|
+
* Whether to enable strict active stack validation
|
|
16
|
+
*/
|
|
17
|
+
enabled: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Allowed target scopes for operations
|
|
20
|
+
*/
|
|
21
|
+
allowedScopes: {
|
|
22
|
+
/** Current working directory */
|
|
23
|
+
cwd: boolean;
|
|
24
|
+
/** Node.js project directories */
|
|
25
|
+
nodeProjects: boolean;
|
|
26
|
+
/** Git repositories */
|
|
27
|
+
gitRepos: boolean;
|
|
28
|
+
/** Temporary directories */
|
|
29
|
+
tempDirs: boolean;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Blocked operations
|
|
33
|
+
*/
|
|
34
|
+
blockedOperations: {
|
|
35
|
+
/** System file operations */
|
|
36
|
+
systemFiles: boolean;
|
|
37
|
+
/** Network operations to unauthorized targets */
|
|
38
|
+
unauthorizedNetworking: boolean;
|
|
39
|
+
/** File operations outside allowed scopes */
|
|
40
|
+
outOfScopeFiles: boolean;
|
|
41
|
+
/** Privileged operations */
|
|
42
|
+
privilegedOps: boolean;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Security validation rules
|
|
46
|
+
*/
|
|
47
|
+
validation: {
|
|
48
|
+
/** Require workspace context validation */
|
|
49
|
+
workspaceContext: boolean;
|
|
50
|
+
/** Validate file paths before operations */
|
|
51
|
+
pathValidation: boolean;
|
|
52
|
+
/** Check for suspicious patterns */
|
|
53
|
+
patternDetection: boolean;
|
|
54
|
+
/** Log security events */
|
|
55
|
+
securityLogging: boolean;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export interface SecurityValidationResult {
|
|
59
|
+
allowed: boolean;
|
|
60
|
+
reason?: string;
|
|
61
|
+
severity: 'low' | 'medium' | 'high' | 'critical';
|
|
62
|
+
details?: Record<string, unknown>;
|
|
63
|
+
}
|
|
64
|
+
export declare class ActiveStackSecurity {
|
|
65
|
+
private config;
|
|
66
|
+
private securityLog;
|
|
67
|
+
constructor(config?: Partial<ActiveStackSecurityConfig>);
|
|
68
|
+
/**
|
|
69
|
+
* Validate a file operation
|
|
70
|
+
*/
|
|
71
|
+
validateFileOperation(filePath: string, operation: 'read' | 'write' | 'delete'): SecurityValidationResult;
|
|
72
|
+
/**
|
|
73
|
+
* Validate a network operation
|
|
74
|
+
*/
|
|
75
|
+
validateNetworkOperation(target: string, operation: 'fetch' | 'search' | 'extract'): SecurityValidationResult;
|
|
76
|
+
/**
|
|
77
|
+
* Validate a command execution
|
|
78
|
+
*/
|
|
79
|
+
validateCommandExecution(command: string): SecurityValidationResult;
|
|
80
|
+
/**
|
|
81
|
+
* Get security log
|
|
82
|
+
*/
|
|
83
|
+
getSecurityLog(): SecurityEvent[];
|
|
84
|
+
/**
|
|
85
|
+
* Clear security log
|
|
86
|
+
*/
|
|
87
|
+
clearSecurityLog(): void;
|
|
88
|
+
private validatePathScope;
|
|
89
|
+
private detectSuspiciousPatterns;
|
|
90
|
+
private validateSystemFileProtection;
|
|
91
|
+
private isLocalhost;
|
|
92
|
+
private validateDomain;
|
|
93
|
+
private validateCommandSafety;
|
|
94
|
+
private logSecurityEvent;
|
|
95
|
+
}
|
|
96
|
+
export interface SecurityEvent {
|
|
97
|
+
type: string;
|
|
98
|
+
severity: 'low' | 'medium' | 'high' | 'critical';
|
|
99
|
+
operation: string;
|
|
100
|
+
timestamp: Date;
|
|
101
|
+
reason: string;
|
|
102
|
+
filePath?: string;
|
|
103
|
+
target?: string;
|
|
104
|
+
command?: string;
|
|
105
|
+
details?: Record<string, unknown>;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Global active stack security instance
|
|
109
|
+
*/
|
|
110
|
+
export declare const activeStackSecurity: ActiveStackSecurity;
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Active Stack Security Module
|
|
4
|
+
*
|
|
5
|
+
* Ensures Erosolar CLI only operates on the active stack and nothing else.
|
|
6
|
+
* Implements strict security rules to prevent vulnerabilities and unauthorized operations.
|
|
7
|
+
*
|
|
8
|
+
* @license MIT
|
|
9
|
+
* @author Bo Shang
|
|
10
|
+
*
|
|
11
|
+
* DISCLAIMER: This software is provided for security testing and defensive purposes only.
|
|
12
|
+
* Users are solely responsible for ensuring their use complies with applicable laws.
|
|
13
|
+
*/
|
|
14
|
+
var __assign = (this && this.__assign) || function () {
|
|
15
|
+
__assign = Object.assign || function(t) {
|
|
16
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
17
|
+
s = arguments[i];
|
|
18
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
19
|
+
t[p] = s[p];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
return __assign.apply(this, arguments);
|
|
24
|
+
};
|
|
25
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
26
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
27
|
+
if (ar || !(i in from)) {
|
|
28
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
29
|
+
ar[i] = from[i];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.activeStackSecurity = exports.ActiveStackSecurity = void 0;
|
|
36
|
+
var node_path_1 = require("node:path");
|
|
37
|
+
var ActiveStackSecurity = /** @class */ (function () {
|
|
38
|
+
function ActiveStackSecurity(config) {
|
|
39
|
+
this.securityLog = [];
|
|
40
|
+
this.config = __assign({ enabled: true, allowedScopes: {
|
|
41
|
+
cwd: true,
|
|
42
|
+
nodeProjects: true,
|
|
43
|
+
gitRepos: true,
|
|
44
|
+
tempDirs: true,
|
|
45
|
+
}, blockedOperations: {
|
|
46
|
+
systemFiles: true,
|
|
47
|
+
unauthorizedNetworking: true,
|
|
48
|
+
outOfScopeFiles: true,
|
|
49
|
+
privilegedOps: true,
|
|
50
|
+
}, validation: {
|
|
51
|
+
workspaceContext: true,
|
|
52
|
+
pathValidation: true,
|
|
53
|
+
patternDetection: true,
|
|
54
|
+
securityLogging: true,
|
|
55
|
+
} }, config);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Validate a file operation
|
|
59
|
+
*/
|
|
60
|
+
ActiveStackSecurity.prototype.validateFileOperation = function (filePath, operation) {
|
|
61
|
+
if (!this.config.enabled) {
|
|
62
|
+
return { allowed: true, severity: 'low' };
|
|
63
|
+
}
|
|
64
|
+
var normalizedPath = (0, node_path_1.resolve)(filePath);
|
|
65
|
+
var cwd = process.cwd();
|
|
66
|
+
// Check if path is within allowed scopes
|
|
67
|
+
var scopeCheck = this.validatePathScope(normalizedPath, cwd);
|
|
68
|
+
if (!scopeCheck.allowed) {
|
|
69
|
+
this.logSecurityEvent({
|
|
70
|
+
type: 'file_operation_blocked',
|
|
71
|
+
severity: 'high',
|
|
72
|
+
operation: operation,
|
|
73
|
+
filePath: normalizedPath,
|
|
74
|
+
reason: scopeCheck.reason,
|
|
75
|
+
timestamp: new Date(),
|
|
76
|
+
});
|
|
77
|
+
return scopeCheck;
|
|
78
|
+
}
|
|
79
|
+
// Check for suspicious patterns
|
|
80
|
+
var patternCheck = this.detectSuspiciousPatterns(normalizedPath, operation);
|
|
81
|
+
if (!patternCheck.allowed) {
|
|
82
|
+
this.logSecurityEvent({
|
|
83
|
+
type: 'suspicious_pattern_detected',
|
|
84
|
+
severity: patternCheck.severity,
|
|
85
|
+
operation: operation,
|
|
86
|
+
filePath: normalizedPath,
|
|
87
|
+
reason: patternCheck.reason,
|
|
88
|
+
timestamp: new Date(),
|
|
89
|
+
});
|
|
90
|
+
return patternCheck;
|
|
91
|
+
}
|
|
92
|
+
// Check for system file protection
|
|
93
|
+
var systemCheck = this.validateSystemFileProtection(normalizedPath, operation);
|
|
94
|
+
if (!systemCheck.allowed) {
|
|
95
|
+
this.logSecurityEvent({
|
|
96
|
+
type: 'system_file_protection',
|
|
97
|
+
severity: systemCheck.severity,
|
|
98
|
+
operation: operation,
|
|
99
|
+
filePath: normalizedPath,
|
|
100
|
+
reason: systemCheck.reason,
|
|
101
|
+
timestamp: new Date(),
|
|
102
|
+
});
|
|
103
|
+
return systemCheck;
|
|
104
|
+
}
|
|
105
|
+
return { allowed: true, severity: 'low' };
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Validate a network operation
|
|
109
|
+
*/
|
|
110
|
+
ActiveStackSecurity.prototype.validateNetworkOperation = function (target, operation) {
|
|
111
|
+
if (!this.config.enabled) {
|
|
112
|
+
return { allowed: true, severity: 'low' };
|
|
113
|
+
}
|
|
114
|
+
// Check for localhost/127.0.0.1 operations (allowed for development)
|
|
115
|
+
if (this.isLocalhost(target)) {
|
|
116
|
+
return { allowed: true, severity: 'low' };
|
|
117
|
+
}
|
|
118
|
+
// Check for suspicious domains
|
|
119
|
+
var domainCheck = this.validateDomain(target);
|
|
120
|
+
if (!domainCheck.allowed) {
|
|
121
|
+
this.logSecurityEvent({
|
|
122
|
+
type: 'network_operation_blocked',
|
|
123
|
+
severity: domainCheck.severity,
|
|
124
|
+
operation: operation,
|
|
125
|
+
target: target,
|
|
126
|
+
reason: domainCheck.reason,
|
|
127
|
+
timestamp: new Date(),
|
|
128
|
+
});
|
|
129
|
+
return domainCheck;
|
|
130
|
+
}
|
|
131
|
+
return { allowed: true, severity: 'low' };
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Validate a command execution
|
|
135
|
+
*/
|
|
136
|
+
ActiveStackSecurity.prototype.validateCommandExecution = function (command) {
|
|
137
|
+
if (!this.config.enabled) {
|
|
138
|
+
return { allowed: true, severity: 'low' };
|
|
139
|
+
}
|
|
140
|
+
// Check for dangerous commands
|
|
141
|
+
var commandCheck = this.validateCommandSafety(command);
|
|
142
|
+
if (!commandCheck.allowed) {
|
|
143
|
+
this.logSecurityEvent({
|
|
144
|
+
type: 'dangerous_command_blocked',
|
|
145
|
+
severity: commandCheck.severity,
|
|
146
|
+
operation: 'execute',
|
|
147
|
+
command: command,
|
|
148
|
+
reason: commandCheck.reason,
|
|
149
|
+
timestamp: new Date(),
|
|
150
|
+
});
|
|
151
|
+
return commandCheck;
|
|
152
|
+
}
|
|
153
|
+
return { allowed: true, severity: 'low' };
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* Get security log
|
|
157
|
+
*/
|
|
158
|
+
ActiveStackSecurity.prototype.getSecurityLog = function () {
|
|
159
|
+
return __spreadArray([], this.securityLog, true);
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* Clear security log
|
|
163
|
+
*/
|
|
164
|
+
ActiveStackSecurity.prototype.clearSecurityLog = function () {
|
|
165
|
+
this.securityLog = [];
|
|
166
|
+
};
|
|
167
|
+
ActiveStackSecurity.prototype.validatePathScope = function (filePath, cwd) {
|
|
168
|
+
// Check if path is within current working directory
|
|
169
|
+
if (!filePath.startsWith(cwd)) {
|
|
170
|
+
return {
|
|
171
|
+
allowed: false,
|
|
172
|
+
reason: 'File operation outside current working directory',
|
|
173
|
+
severity: 'high',
|
|
174
|
+
details: { filePath: filePath, cwd: cwd },
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
// Check for node_modules protection
|
|
178
|
+
if (filePath.includes('node_modules') && !filePath.includes(cwd + '/node_modules')) {
|
|
179
|
+
return {
|
|
180
|
+
allowed: false,
|
|
181
|
+
reason: 'Access to external node_modules directory',
|
|
182
|
+
severity: 'high',
|
|
183
|
+
details: { filePath: filePath, cwd: cwd },
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
// Check for system directory protection
|
|
187
|
+
var systemDirs = ['/etc', '/var', '/usr', '/bin', '/sbin', '/lib', '/sys', '/proc'];
|
|
188
|
+
for (var _i = 0, systemDirs_1 = systemDirs; _i < systemDirs_1.length; _i++) {
|
|
189
|
+
var dir = systemDirs_1[_i];
|
|
190
|
+
if (filePath.startsWith(dir)) {
|
|
191
|
+
return {
|
|
192
|
+
allowed: false,
|
|
193
|
+
reason: 'Access to system directory',
|
|
194
|
+
severity: 'critical',
|
|
195
|
+
details: { filePath: filePath, systemDir: dir },
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return { allowed: true, severity: 'low' };
|
|
200
|
+
};
|
|
201
|
+
ActiveStackSecurity.prototype.detectSuspiciousPatterns = function (filePath, operation) {
|
|
202
|
+
var suspiciousPatterns = [
|
|
203
|
+
{ pattern: /\.(pem|key|env|secret|config)$/i, severity: 'high', reason: 'Sensitive file extension' },
|
|
204
|
+
{ pattern: /(password|secret|token|api[_-]?key)/i, severity: 'medium', reason: 'Potential credential file' },
|
|
205
|
+
{ pattern: /\.(bashrc|bash_profile|zshrc|profile)$/, severity: 'medium', reason: 'Shell configuration file' },
|
|
206
|
+
{ pattern: /\.(git|ssh)\/config$/, severity: 'medium', reason: 'Git/SSH configuration' },
|
|
207
|
+
];
|
|
208
|
+
for (var _i = 0, suspiciousPatterns_1 = suspiciousPatterns; _i < suspiciousPatterns_1.length; _i++) {
|
|
209
|
+
var _a = suspiciousPatterns_1[_i], pattern = _a.pattern, severity = _a.severity, reason = _a.reason;
|
|
210
|
+
if (pattern.test(filePath)) {
|
|
211
|
+
return {
|
|
212
|
+
allowed: false,
|
|
213
|
+
reason: "".concat(reason, " detected"),
|
|
214
|
+
severity: severity,
|
|
215
|
+
details: { filePath: filePath, pattern: pattern.source },
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return { allowed: true, severity: 'low' };
|
|
220
|
+
};
|
|
221
|
+
ActiveStackSecurity.prototype.validateSystemFileProtection = function (filePath, operation) {
|
|
222
|
+
var systemFiles = [
|
|
223
|
+
'/etc/passwd', '/etc/shadow', '/etc/hosts', '/etc/resolv.conf',
|
|
224
|
+
'/etc/ssh/ssh_config', '/etc/ssh/sshd_config',
|
|
225
|
+
'/var/log/', '/var/spool/', '/var/mail/',
|
|
226
|
+
'/usr/bin/', '/usr/sbin/', '/usr/lib/',
|
|
227
|
+
];
|
|
228
|
+
for (var _i = 0, systemFiles_1 = systemFiles; _i < systemFiles_1.length; _i++) {
|
|
229
|
+
var sysFile = systemFiles_1[_i];
|
|
230
|
+
if (filePath.startsWith(sysFile)) {
|
|
231
|
+
return {
|
|
232
|
+
allowed: false,
|
|
233
|
+
reason: 'Access to system file',
|
|
234
|
+
severity: 'critical',
|
|
235
|
+
details: { filePath: filePath, systemFile: sysFile },
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return { allowed: true, severity: 'low' };
|
|
240
|
+
};
|
|
241
|
+
ActiveStackSecurity.prototype.isLocalhost = function (target) {
|
|
242
|
+
var localhostPatterns = [
|
|
243
|
+
'localhost',
|
|
244
|
+
'127.0.0.1',
|
|
245
|
+
'::1',
|
|
246
|
+
'0.0.0.0',
|
|
247
|
+
];
|
|
248
|
+
return localhostPatterns.some(function (pattern) { return target.includes(pattern); });
|
|
249
|
+
};
|
|
250
|
+
ActiveStackSecurity.prototype.validateDomain = function (target) {
|
|
251
|
+
var suspiciousDomains = [
|
|
252
|
+
'malicious.com',
|
|
253
|
+
'evil.org',
|
|
254
|
+
'hacker.net',
|
|
255
|
+
// Add more suspicious domains as needed
|
|
256
|
+
];
|
|
257
|
+
for (var _i = 0, suspiciousDomains_1 = suspiciousDomains; _i < suspiciousDomains_1.length; _i++) {
|
|
258
|
+
var domain = suspiciousDomains_1[_i];
|
|
259
|
+
if (target.includes(domain)) {
|
|
260
|
+
return {
|
|
261
|
+
allowed: false,
|
|
262
|
+
reason: 'Suspicious domain detected',
|
|
263
|
+
severity: 'high',
|
|
264
|
+
details: { target: target, domain: domain },
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
return { allowed: true, severity: 'low' };
|
|
269
|
+
};
|
|
270
|
+
ActiveStackSecurity.prototype.validateCommandSafety = function (command) {
|
|
271
|
+
var dangerousCommands = [
|
|
272
|
+
{ pattern: /rm\s+-rf/, severity: 'critical', reason: 'Recursive force delete' },
|
|
273
|
+
{ pattern: /chmod\s+[0-7]{3,4}\s+/, severity: 'high', reason: 'File permission modification' },
|
|
274
|
+
{ pattern: /chown\s+[^\s]+\s+/, severity: 'high', reason: 'File ownership change' },
|
|
275
|
+
{ pattern: /dd\s+if=.*of=/, severity: 'critical', reason: 'Disk cloning/destruction' },
|
|
276
|
+
{ pattern: /mkfs\./, severity: 'critical', reason: 'Filesystem creation' },
|
|
277
|
+
{ pattern: /fdisk\s+/, severity: 'critical', reason: 'Partition manipulation' },
|
|
278
|
+
{ pattern: /mount\s+/, severity: 'high', reason: 'Filesystem mounting' },
|
|
279
|
+
{ pattern: /umount\s+/, severity: 'high', reason: 'Filesystem unmounting' },
|
|
280
|
+
{ pattern: /passwd\s+/, severity: 'high', reason: 'Password change' },
|
|
281
|
+
{ pattern: /useradd\s+/, severity: 'high', reason: 'User creation' },
|
|
282
|
+
{ pattern: /userdel\s+/, severity: 'high', reason: 'User deletion' },
|
|
283
|
+
];
|
|
284
|
+
for (var _i = 0, dangerousCommands_1 = dangerousCommands; _i < dangerousCommands_1.length; _i++) {
|
|
285
|
+
var _a = dangerousCommands_1[_i], pattern = _a.pattern, severity = _a.severity, reason = _a.reason;
|
|
286
|
+
if (pattern.test(command)) {
|
|
287
|
+
return {
|
|
288
|
+
allowed: false,
|
|
289
|
+
reason: "".concat(reason, " command detected"),
|
|
290
|
+
severity: severity,
|
|
291
|
+
details: { command: command, pattern: pattern.source },
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
return { allowed: true, severity: 'low' };
|
|
296
|
+
};
|
|
297
|
+
ActiveStackSecurity.prototype.logSecurityEvent = function (event) {
|
|
298
|
+
if (this.config.validation.securityLogging) {
|
|
299
|
+
this.securityLog.push(event);
|
|
300
|
+
// Keep log size manageable
|
|
301
|
+
if (this.securityLog.length > 1000) {
|
|
302
|
+
this.securityLog = this.securityLog.slice(-500);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
return ActiveStackSecurity;
|
|
307
|
+
}());
|
|
308
|
+
exports.ActiveStackSecurity = ActiveStackSecurity;
|
|
309
|
+
/**
|
|
310
|
+
* Global active stack security instance
|
|
311
|
+
*/
|
|
312
|
+
exports.activeStackSecurity = new ActiveStackSecurity();
|
|
313
|
+
//# sourceMappingURL=active-stack-security.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"active-stack-security.js","sourceRoot":"","sources":["../src/security/active-stack-security.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;;;;;;;;;;;AAGH,uCAAmD;AA2DnD;IAIE,6BAAY,MAA2C;QAF/C,gBAAW,GAAoB,EAAE,CAAC;QAGxC,IAAI,C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,OAAO,aAAA,EAAE,QAAQ,cAAA,EAAE,MAAM,YAAA;YACpC,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC1B,OAAO;oBACL,OAAO,EAAE,KAAK;oBACd,MAAM,EAAE,UAAG,MAAM,sBAAmB;oBACpC,QAAQ,EAAE,QAA+B;oBACzC,OAAO,EAAE,EAAE,OAAO,SAAA,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE;iBAC9C,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC5C,CAAC;IAEO,8CAAgB,GAAxB,UAAyB,KAAoB;QAC3C,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC;YAC3C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAE7B,2BAA2B;YAC3B,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,EAAE,CAAC;gBACnC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;YAClD,CAAC;QACH,CAAC;IACH,CAAC;IACH,0BAAC;AAAD,CAAC,AAnTD,IAmTC;AAnTY,kDAAmB;AAiUhC;;GAEG;AACU,QAAA,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
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
|
+
import { type SecurityValidationResult } from './active-stack-security.js';
|
|
15
|
+
export interface TargetAuthorization {
|
|
16
|
+
/** Target identifier (domain, IP range, organization) */
|
|
17
|
+
target: string;
|
|
18
|
+
/** Authorization level */
|
|
19
|
+
level: 'research' | 'analysis' | 'testing' | 'operations';
|
|
20
|
+
/** Scope of authorized operations */
|
|
21
|
+
scope: string[];
|
|
22
|
+
/** Authorization source */
|
|
23
|
+
authorizedBy: string;
|
|
24
|
+
/** Expiration timestamp */
|
|
25
|
+
expiresAt?: Date;
|
|
26
|
+
/** Legal/compliance requirements */
|
|
27
|
+
compliance: {
|
|
28
|
+
jurisdiction: string;
|
|
29
|
+
legalFramework: string;
|
|
30
|
+
reportingRequirements: string[];
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface CriticalInfrastructureTarget {
|
|
34
|
+
/** Infrastructure category */
|
|
35
|
+
category: 'energy' | 'finance' | 'telecom' | 'government' | 'military' | 'healthcare' | 'transportation';
|
|
36
|
+
/** Target identifier */
|
|
37
|
+
identifier: string;
|
|
38
|
+
/** Country/region */
|
|
39
|
+
jurisdiction: string;
|
|
40
|
+
/** Sensitivity level */
|
|
41
|
+
sensitivity: 'low' | 'medium' | 'high' | 'critical';
|
|
42
|
+
/** Authorized operations */
|
|
43
|
+
authorizedOperations: string[];
|
|
44
|
+
/** Legal restrictions */
|
|
45
|
+
legalRestrictions: string[];
|
|
46
|
+
}
|
|
47
|
+
export interface OperationAuthorization {
|
|
48
|
+
/** Operation type */
|
|
49
|
+
type: 'scanning' | 'analysis' | 'vulnerability_assessment' | 'penetration_testing' | 'research';
|
|
50
|
+
/** Target information */
|
|
51
|
+
target: CriticalInfrastructureTarget | string;
|
|
52
|
+
/** Authorization level required */
|
|
53
|
+
requiredLevel: string;
|
|
54
|
+
/** Legal compliance requirements */
|
|
55
|
+
compliance: {
|
|
56
|
+
jurisdiction: string;
|
|
57
|
+
legalFramework: string;
|
|
58
|
+
reportingRequired: boolean;
|
|
59
|
+
evidenceCollection: boolean;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export declare class AdvancedTargetingSecurity {
|
|
63
|
+
private authorizedTargets;
|
|
64
|
+
private criticalInfrastructure;
|
|
65
|
+
private operationLog;
|
|
66
|
+
constructor();
|
|
67
|
+
/**
|
|
68
|
+
* Authorize a target for operations
|
|
69
|
+
*/
|
|
70
|
+
authorizeTarget(authorization: TargetAuthorization): void;
|
|
71
|
+
/**
|
|
72
|
+
* Validate operation on external target
|
|
73
|
+
*/
|
|
74
|
+
validateExternalOperation(operation: string, target: string, parameters: Record<string, unknown>): SecurityValidationResult;
|
|
75
|
+
/**
|
|
76
|
+
* Register critical infrastructure target
|
|
77
|
+
*/
|
|
78
|
+
registerCriticalInfrastructure(target: CriticalInfrastructureTarget): void;
|
|
79
|
+
/**
|
|
80
|
+
* Get authorized targets
|
|
81
|
+
*/
|
|
82
|
+
getAuthorizedTargets(): TargetAuthorization[];
|
|
83
|
+
/**
|
|
84
|
+
* Get critical infrastructure targets
|
|
85
|
+
*/
|
|
86
|
+
getCriticalInfrastructure(): CriticalInfrastructureTarget[];
|
|
87
|
+
/**
|
|
88
|
+
* Get operation log
|
|
89
|
+
*/
|
|
90
|
+
getOperationLog(): AdvancedOperationEvent[];
|
|
91
|
+
/**
|
|
92
|
+
* Generate targeting report
|
|
93
|
+
*/
|
|
94
|
+
generateTargetingReport(): string;
|
|
95
|
+
private initializeDefaultTargets;
|
|
96
|
+
private isOperationAuthorized;
|
|
97
|
+
private validateCriticalInfrastructureOperation;
|
|
98
|
+
private logAdvancedOperation;
|
|
99
|
+
}
|
|
100
|
+
export interface AdvancedOperationEvent {
|
|
101
|
+
type: string;
|
|
102
|
+
severity: 'low' | 'medium' | 'high' | 'critical';
|
|
103
|
+
operation: string;
|
|
104
|
+
target: string;
|
|
105
|
+
timestamp: Date;
|
|
106
|
+
authorizationLevel?: string;
|
|
107
|
+
authorizedBy?: string;
|
|
108
|
+
details?: Record<string, unknown>;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Global advanced targeting security instance
|
|
112
|
+
*/
|
|
113
|
+
export declare const advancedTargetingSecurity: AdvancedTargetingSecurity;
|