erosolar-cli 1.7.55 → 1.7.57
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/dist/shell/unifiedInputProcessor.d.ts +15 -12
- package/dist/shell/unifiedInputProcessor.d.ts.map +1 -1
- package/dist/shell/unifiedInputProcessor.js +45 -72
- package/dist/shell/unifiedInputProcessor.js.map +1 -1
- package/package.json +4 -4
- package/dist/active-stack-security.d.ts +0 -110
- package/dist/active-stack-security.js +0 -313
- package/dist/active-stack-security.js.map +0 -1
- package/dist/advanced-targeting.d.ts +0 -113
- package/dist/advanced-targeting.js +0 -252
- package/dist/advanced-targeting.js.map +0 -1
- package/dist/bin/adapters/node/index.js +0 -33
- package/dist/bin/adapters/types.js +0 -1
- package/dist/bin/alpha-zero/agentWrapper.js +0 -165
- package/dist/bin/alpha-zero/codeEvaluator.js +0 -272
- package/dist/bin/alpha-zero/competitiveRunner.js +0 -219
- package/dist/bin/alpha-zero/index.js +0 -98
- package/dist/bin/alpha-zero/introspection.js +0 -298
- package/dist/bin/alpha-zero/metricsTracker.js +0 -207
- package/dist/bin/alpha-zero/security/core.js +0 -269
- package/dist/bin/alpha-zero/security/google.js +0 -308
- package/dist/bin/alpha-zero/security/googleLoader.js +0 -40
- package/dist/bin/alpha-zero/security/index.js +0 -31
- package/dist/bin/alpha-zero/security/simulation.js +0 -274
- package/dist/bin/alpha-zero/selfModification.js +0 -231
- package/dist/bin/alpha-zero/types.js +0 -30
- package/dist/bin/bin/erosolar-optimized.js +0 -205
- package/dist/bin/capabilities/agentSpawningCapability.js +0 -116
- package/dist/bin/capabilities/bashCapability.js +0 -22
- package/dist/bin/capabilities/cloudCapability.js +0 -36
- package/dist/bin/capabilities/codeAnalysisCapability.js +0 -22
- package/dist/bin/capabilities/codeQualityCapability.js +0 -23
- package/dist/bin/capabilities/dependencySecurityCapability.js +0 -22
- package/dist/bin/capabilities/devCapability.js +0 -22
- package/dist/bin/capabilities/editCapability.js +0 -28
- package/dist/bin/capabilities/emailCapability.js +0 -20
- package/dist/bin/capabilities/enhancedGitCapability.js +0 -221
- package/dist/bin/capabilities/filesystemCapability.js +0 -22
- package/dist/bin/capabilities/globCapability.js +0 -28
- package/dist/bin/capabilities/interactionCapability.js +0 -20
- package/dist/bin/capabilities/learnCapability.js +0 -22
- package/dist/bin/capabilities/mcpCapability.js +0 -20
- package/dist/bin/capabilities/notebookCapability.js +0 -28
- package/dist/bin/capabilities/planningCapability.js +0 -27
- package/dist/bin/capabilities/refactoringCapability.js +0 -23
- package/dist/bin/capabilities/repoChecksCapability.js +0 -22
- package/dist/bin/capabilities/searchCapability.js +0 -22
- package/dist/bin/capabilities/skillCapability.js +0 -76
- package/dist/bin/capabilities/taskManagementCapability.js +0 -20
- package/dist/bin/capabilities/testingCapability.js +0 -23
- package/dist/bin/capabilities/toolManifest.js +0 -159
- package/dist/bin/capabilities/toolRegistry.js +0 -114
- package/dist/bin/capabilities/webCapability.js +0 -20
- package/dist/bin/config.js +0 -139
- package/dist/bin/contracts/v1/agent.js +0 -7
- package/dist/bin/contracts/v1/agentProfileManifest.js +0 -8
- package/dist/bin/contracts/v1/agentRules.js +0 -9
- package/dist/bin/contracts/v1/toolAccess.js +0 -8
- package/dist/bin/erosolar-optimized.d.ts +0 -12
- package/dist/bin/erosolar-optimized.d.ts.map +0 -1
- package/dist/bin/erosolar-optimized.js +0 -239
- package/dist/bin/erosolar-optimized.js.map +0 -1
- package/dist/bin/headless/headlessApp.js +0 -172
- package/dist/bin/mcp/config.js +0 -202
- package/dist/bin/mcp/stdioClient.js +0 -172
- package/dist/bin/mcp/toolBridge.js +0 -104
- package/dist/bin/mcp/types.js +0 -1
- package/dist/bin/plugins/index.js +0 -113
- package/dist/bin/plugins/providers/anthropic/index.js +0 -25
- package/dist/bin/plugins/providers/deepseek/index.js +0 -24
- package/dist/bin/plugins/providers/google/index.js +0 -26
- package/dist/bin/plugins/providers/index.js +0 -19
- package/dist/bin/plugins/providers/ollama/index.js +0 -59
- package/dist/bin/plugins/providers/openai/index.js +0 -26
- package/dist/bin/plugins/providers/xai/index.js +0 -24
- package/dist/bin/plugins/tools/agentSpawning/agentSpawningPlugin.js +0 -8
- package/dist/bin/plugins/tools/bash/localBashPlugin.js +0 -13
- package/dist/bin/plugins/tools/checks/localRepoChecksPlugin.js +0 -13
- package/dist/bin/plugins/tools/cloud/cloudPlugin.js +0 -13
- package/dist/bin/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +0 -13
- package/dist/bin/plugins/tools/codeQuality/codeQualityPlugin.js +0 -13
- package/dist/bin/plugins/tools/dependency/dependencyPlugin.js +0 -11
- package/dist/bin/plugins/tools/development/devPlugin.js +0 -13
- package/dist/bin/plugins/tools/edit/editPlugin.js +0 -14
- package/dist/bin/plugins/tools/email/emailPlugin.js +0 -11
- package/dist/bin/plugins/tools/enhancedGit/enhancedGitPlugin.js +0 -8
- package/dist/bin/plugins/tools/filesystem/localFilesystemPlugin.js +0 -13
- package/dist/bin/plugins/tools/glob/globPlugin.js +0 -14
- package/dist/bin/plugins/tools/index.js +0 -2
- package/dist/bin/plugins/tools/interaction/interactionPlugin.js +0 -11
- package/dist/bin/plugins/tools/learn/learnPlugin.js +0 -13
- package/dist/bin/plugins/tools/mcp/mcpPlugin.js +0 -8
- package/dist/bin/plugins/tools/nodeDefaults.js +0 -56
- package/dist/bin/plugins/tools/notebook/notebookPlugin.js +0 -14
- package/dist/bin/plugins/tools/planning/planningPlugin.js +0 -14
- package/dist/bin/plugins/tools/refactoring/refactoringPlugin.js +0 -11
- package/dist/bin/plugins/tools/registry.js +0 -57
- package/dist/bin/plugins/tools/search/localSearchPlugin.js +0 -13
- package/dist/bin/plugins/tools/skills/skillPlugin.js +0 -8
- package/dist/bin/plugins/tools/taskManagement/taskManagementPlugin.js +0 -11
- package/dist/bin/plugins/tools/testing/testingPlugin.js +0 -11
- package/dist/bin/plugins/tools/web/webPlugin.js +0 -11
- package/dist/bin/providers/anthropicProvider.js +0 -329
- package/dist/bin/providers/googleProvider.js +0 -203
- package/dist/bin/providers/openaiChatCompletionsProvider.js +0 -208
- package/dist/bin/providers/openaiResponsesProvider.js +0 -249
- package/dist/bin/providers/providerFactory.js +0 -24
- package/dist/bin/runtime/agentController.js +0 -321
- package/dist/bin/runtime/agentHost.js +0 -153
- package/dist/bin/runtime/agentSession.js +0 -195
- package/dist/bin/runtime/node.js +0 -10
- package/dist/bin/runtime/universal.js +0 -28
- package/dist/bin/skills/skillRepository.js +0 -236
- package/dist/bin/skills/types.js +0 -1
- package/dist/bin/subagents/taskRunner.js +0 -269
- package/dist/bin/tools/backgroundBashTools.js +0 -211
- package/dist/bin/tools/bashTools.js +0 -159
- package/dist/bin/tools/cloudTools.js +0 -864
- package/dist/bin/tools/codeAnalysisTools.js +0 -641
- package/dist/bin/tools/codeQualityTools.js +0 -294
- package/dist/bin/tools/dependencyTools.js +0 -282
- package/dist/bin/tools/devTools.js +0 -238
- package/dist/bin/tools/diffUtils.js +0 -137
- package/dist/bin/tools/editTools.js +0 -134
- package/dist/bin/tools/emailTools.js +0 -448
- package/dist/bin/tools/fileTools.js +0 -282
- package/dist/bin/tools/globTools.js +0 -173
- package/dist/bin/tools/grepTools.js +0 -332
- package/dist/bin/tools/interactionTools.js +0 -170
- package/dist/bin/tools/learnTools.js +0 -1818
- package/dist/bin/tools/notebookEditTools.js +0 -196
- package/dist/bin/tools/planningTools.js +0 -46
- package/dist/bin/tools/refactoringTools.js +0 -293
- package/dist/bin/tools/repoChecksTools.js +0 -160
- package/dist/bin/tools/searchTools.js +0 -206
- package/dist/bin/tools/skillTools.js +0 -177
- package/dist/bin/tools/taskManagementTools.js +0 -156
- package/dist/bin/tools/testingTools.js +0 -232
- package/dist/bin/tools/webTools.js +0 -480
- package/dist/bin/workspace.js +0 -106
- package/dist/bin/workspace.validator.js +0 -213
- package/dist/capabilities/offensiveSecurityCapability.d.ts +0 -26
- package/dist/capabilities/offensiveSecurityCapability.d.ts.map +0 -1
- package/dist/capabilities/offensiveSecurityCapability.js +0 -58
- package/dist/capabilities/offensiveSecurityCapability.js.map +0 -1
- package/dist/capabilities/realSecurityCapability.d.ts +0 -26
- package/dist/capabilities/realSecurityCapability.d.ts.map +0 -1
- package/dist/capabilities/realSecurityCapability.js +0 -53
- package/dist/capabilities/realSecurityCapability.js.map +0 -1
- package/dist/capabilities/securityCapability.d.ts +0 -32
- package/dist/capabilities/securityCapability.d.ts.map +0 -1
- package/dist/capabilities/securityCapability.js +0 -57
- package/dist/capabilities/securityCapability.js.map +0 -1
- package/dist/capabilities/ultimateSecurityCapability.d.ts +0 -42
- package/dist/capabilities/ultimateSecurityCapability.d.ts.map +0 -1
- package/dist/capabilities/ultimateSecurityCapability.js +0 -96
- package/dist/capabilities/ultimateSecurityCapability.js.map +0 -1
- package/dist/core/designThoughtCheck.d.ts +0 -196
- package/dist/core/designThoughtCheck.d.ts.map +0 -1
- package/dist/core/designThoughtCheck.js +0 -287
- package/dist/core/designThoughtCheck.js.map +0 -1
- package/dist/core/designThoughtCheckEngine.d.ts +0 -58
- package/dist/core/designThoughtCheckEngine.d.ts.map +0 -1
- package/dist/core/designThoughtCheckEngine.js +0 -358
- package/dist/core/designThoughtCheckEngine.js.map +0 -1
- package/dist/core/designThoughtCheckIntegration.d.ts +0 -103
- package/dist/core/designThoughtCheckIntegration.d.ts.map +0 -1
- package/dist/core/designThoughtCheckIntegration.js +0 -207
- package/dist/core/designThoughtCheckIntegration.js.map +0 -1
- package/dist/core/intelligenceTools.d.ts +0 -19
- package/dist/core/intelligenceTools.d.ts.map +0 -1
- package/dist/core/intelligenceTools.js +0 -453
- package/dist/core/intelligenceTools.js.map +0 -1
- package/dist/core/operationalTools.d.ts +0 -19
- package/dist/core/operationalTools.d.ts.map +0 -1
- package/dist/core/operationalTools.js +0 -467
- package/dist/core/operationalTools.js.map +0 -1
- package/dist/offensive/core/offensive-engine.d.ts +0 -171
- package/dist/offensive/core/offensive-engine.d.ts.map +0 -1
- package/dist/offensive/core/offensive-engine.js +0 -345
- package/dist/offensive/core/offensive-engine.js.map +0 -1
- package/dist/offensive/core/offensive-integration.d.ts +0 -129
- package/dist/offensive/core/offensive-integration.d.ts.map +0 -1
- package/dist/offensive/core/offensive-integration.js +0 -364
- package/dist/offensive/core/offensive-integration.js.map +0 -1
- package/dist/offensive/core/offensive-tools.d.ts +0 -55
- package/dist/offensive/core/offensive-tools.d.ts.map +0 -1
- package/dist/offensive/core/offensive-tools.js +0 -438
- package/dist/offensive/core/offensive-tools.js.map +0 -1
- package/dist/offensive/offensive-cli.d.ts +0 -48
- package/dist/offensive/offensive-cli.d.ts.map +0 -1
- package/dist/offensive/offensive-cli.js +0 -233
- package/dist/offensive/offensive-cli.js.map +0 -1
- package/dist/security/apt-simulation-cli.d.ts +0 -57
- package/dist/security/apt-simulation-cli.d.ts.map +0 -1
- package/dist/security/apt-simulation-cli.js +0 -278
- package/dist/security/apt-simulation-cli.js.map +0 -1
- package/dist/security/apt-simulation-engine-complete.d.ts +0 -97
- package/dist/security/apt-simulation-engine-complete.d.ts.map +0 -1
- package/dist/security/apt-simulation-engine-complete.js +0 -441
- package/dist/security/apt-simulation-engine-complete.js.map +0 -1
- package/dist/security/apt-simulation-engine.d.ts +0 -97
- package/dist/security/apt-simulation-engine.d.ts.map +0 -1
- package/dist/security/apt-simulation-engine.js +0 -441
- package/dist/security/apt-simulation-engine.js.map +0 -1
- package/dist/security/authorization.d.ts +0 -45
- package/dist/security/authorization.d.ts.map +0 -1
- package/dist/security/authorization.js +0 -128
- package/dist/security/authorization.js.map +0 -1
- package/dist/security/comprehensive-security-research.d.ts +0 -84
- package/dist/security/comprehensive-security-research.d.ts.map +0 -1
- package/dist/security/comprehensive-security-research.js +0 -211
- package/dist/security/comprehensive-security-research.js.map +0 -1
- package/dist/security/offensive/exploitationEngine.d.ts +0 -54
- package/dist/security/offensive/exploitationEngine.d.ts.map +0 -1
- package/dist/security/offensive/exploitationEngine.js +0 -263
- package/dist/security/offensive/exploitationEngine.js.map +0 -1
- package/dist/security/real/networkExploitation.d.ts +0 -92
- package/dist/security/real/networkExploitation.d.ts.map +0 -1
- package/dist/security/real/networkExploitation.js +0 -316
- package/dist/security/real/networkExploitation.js.map +0 -1
- package/dist/security/real/persistenceImplementation.d.ts +0 -62
- package/dist/security/real/persistenceImplementation.d.ts.map +0 -1
- package/dist/security/real/persistenceImplementation.js +0 -323
- package/dist/security/real/persistenceImplementation.js.map +0 -1
- package/dist/security/real/vulnerabilityScanner.d.ts +0 -73
- package/dist/security/real/vulnerabilityScanner.d.ts.map +0 -1
- package/dist/security/real/vulnerabilityScanner.js +0 -341
- package/dist/security/real/vulnerabilityScanner.js.map +0 -1
- package/dist/shell/capturePastePatch.d.ts +0 -9
- package/dist/shell/capturePastePatch.d.ts.map +0 -1
- package/dist/shell/capturePastePatch.js +0 -98
- package/dist/shell/capturePastePatch.js.map +0 -1
- package/dist/shell/enhancedInteractiveShell.d.ts +0 -90
- package/dist/shell/enhancedInteractiveShell.d.ts.map +0 -1
- package/dist/shell/enhancedInteractiveShell.js +0 -248
- package/dist/shell/enhancedInteractiveShell.js.map +0 -1
- package/dist/shell/inputProcessor.d.ts +0 -56
- package/dist/shell/inputProcessor.d.ts.map +0 -1
- package/dist/shell/inputProcessor.js +0 -172
- package/dist/shell/inputProcessor.js.map +0 -1
- package/dist/shell/interactiveShell-patch.d.ts +0 -27
- package/dist/shell/interactiveShell-patch.d.ts.map +0 -1
- package/dist/shell/interactiveShell-patch.js +0 -38
- package/dist/shell/interactiveShell-patch.js.map +0 -1
- package/dist/shell/interactiveShell-robust.d.ts +0 -26
- package/dist/shell/interactiveShell-robust.d.ts.map +0 -1
- package/dist/shell/interactiveShell-robust.js +0 -34
- package/dist/shell/interactiveShell-robust.js.map +0 -1
- package/dist/shell/multiLinePasteManager.d.ts +0 -106
- package/dist/shell/multiLinePasteManager.d.ts.map +0 -1
- package/dist/shell/multiLinePasteManager.js +0 -308
- package/dist/shell/multiLinePasteManager.js.map +0 -1
- package/dist/shell/processInputBlockPatch.d.ts +0 -8
- package/dist/shell/processInputBlockPatch.d.ts.map +0 -1
- package/dist/shell/processInputBlockPatch.js +0 -133
- package/dist/shell/processInputBlockPatch.js.map +0 -1
- package/dist/tools/enhancedSecurityTools.d.ts +0 -19
- package/dist/tools/enhancedSecurityTools.d.ts.map +0 -1
- package/dist/tools/enhancedSecurityTools.js +0 -215
- package/dist/tools/enhancedSecurityTools.js.map +0 -1
- package/dist/tools/offensiveSecurityTools.d.ts +0 -16
- package/dist/tools/offensiveSecurityTools.d.ts.map +0 -1
- package/dist/tools/offensiveSecurityTools.js +0 -285
- package/dist/tools/offensiveSecurityTools.js.map +0 -1
- package/dist/tools/realSecurityTools.d.ts +0 -18
- package/dist/tools/realSecurityTools.d.ts.map +0 -1
- package/dist/tools/realSecurityTools.js +0 -468
- package/dist/tools/realSecurityTools.js.map +0 -1
- package/dist/tools/securityTools.d.ts +0 -20
- package/dist/tools/securityTools.d.ts.map +0 -1
- package/dist/tools/securityTools.js +0 -449
- package/dist/tools/securityTools.js.map +0 -1
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import { Readline } from 'readline/promises';
|
|
2
|
-
export
|
|
2
|
+
export type DisplayFormat = 'inline' | 'block' | 'paste-chip';
|
|
3
|
+
export interface ProcessedInput {
|
|
3
4
|
content: string;
|
|
4
5
|
isMultiLine: boolean;
|
|
6
|
+
displayFormat: DisplayFormat;
|
|
5
7
|
lineCount: number;
|
|
6
|
-
displayFormat: 'inline' | 'block' | 'paste-chip';
|
|
7
8
|
summary?: string;
|
|
8
9
|
}
|
|
9
10
|
export declare class UnifiedInputProcessor {
|
|
10
11
|
private rl;
|
|
11
|
-
private readonly MAX_INLINE_LINES;
|
|
12
|
-
private readonly MAX_SUMMARY_LENGTH;
|
|
13
|
-
private pasteBuffer;
|
|
14
|
-
private isPasting;
|
|
15
12
|
constructor(rl: Readline);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Process input and determine how it should be displayed
|
|
15
|
+
*/
|
|
16
|
+
processInput(input: string): ProcessedInput;
|
|
17
|
+
/**
|
|
18
|
+
* Format processed input for display in the terminal
|
|
19
|
+
*/
|
|
20
|
+
formatForDisplay(processed: ProcessedInput): string;
|
|
21
|
+
/**
|
|
22
|
+
* Get the full content to send (always the original content)
|
|
23
|
+
*/
|
|
24
|
+
getContentToSend(processed: ProcessedInput): string;
|
|
22
25
|
}
|
|
23
26
|
//# sourceMappingURL=unifiedInputProcessor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unifiedInputProcessor.d.ts","sourceRoot":"","sources":["../../src/shell/unifiedInputProcessor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unifiedInputProcessor.d.ts","sourceRoot":"","sources":["../../src/shell/unifiedInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAC;AAE9D,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,aAAa,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,qBAAqB;IAChC,OAAO,CAAC,EAAE,CAAW;gBAET,EAAE,EAAE,QAAQ;IAIxB;;OAEG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc;IAgC3C;;OAEG;IACH,gBAAgB,CAAC,SAAS,EAAE,cAAc,GAAG,MAAM;IAmBnD;;OAEG;IACH,gBAAgB,CAAC,SAAS,EAAE,cAAc,GAAG,MAAM;CAGpD"}
|
|
@@ -1,92 +1,65 @@
|
|
|
1
1
|
export class UnifiedInputProcessor {
|
|
2
2
|
rl;
|
|
3
|
-
MAX_INLINE_LINES = 3;
|
|
4
|
-
MAX_SUMMARY_LENGTH = 80;
|
|
5
|
-
pasteBuffer = [];
|
|
6
|
-
isPasting = false;
|
|
7
3
|
constructor(rl) {
|
|
8
4
|
this.rl = rl;
|
|
9
|
-
this.setupPasteListeners();
|
|
10
|
-
}
|
|
11
|
-
setupPasteListeners() {
|
|
12
|
-
this.rl.input.on('paste-start', () => {
|
|
13
|
-
this.isPasting = true;
|
|
14
|
-
this.pasteBuffer = [];
|
|
15
|
-
});
|
|
16
|
-
this.rl.input.on('paste-end', () => {
|
|
17
|
-
this.isPasting = false;
|
|
18
|
-
const pastedText = this.pasteBuffer.join('\\n');
|
|
19
|
-
this.rl.write(pastedText);
|
|
20
|
-
this.pasteBuffer = [];
|
|
21
|
-
});
|
|
22
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* Process input and determine how it should be displayed
|
|
8
|
+
*/
|
|
23
9
|
processInput(input) {
|
|
24
|
-
const
|
|
25
|
-
const lines = trimmed.split('\\n').filter(line => line.trim().length > 0);
|
|
10
|
+
const lines = input.split('\n');
|
|
26
11
|
const lineCount = lines.length;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
const displayFormat = this.determineDisplayFormat(trimmed, lineCount);
|
|
36
|
-
const summary = this.generateSummary(lines, displayFormat);
|
|
37
|
-
return {
|
|
38
|
-
content: trimmed,
|
|
39
|
-
isMultiLine: lineCount > 1,
|
|
40
|
-
lineCount,
|
|
41
|
-
displayFormat,
|
|
42
|
-
summary
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
determineDisplayFormat(content, lineCount) {
|
|
46
|
-
if (lineCount <= this.MAX_INLINE_LINES) {
|
|
47
|
-
return 'inline';
|
|
48
|
-
}
|
|
49
|
-
if (lineCount > 10) {
|
|
50
|
-
return 'paste-chip';
|
|
12
|
+
const isMultiLine = lineCount > 1;
|
|
13
|
+
let displayFormat;
|
|
14
|
+
let summary;
|
|
15
|
+
if (lineCount <= 1) {
|
|
16
|
+
// Single line - inline display
|
|
17
|
+
displayFormat = 'inline';
|
|
51
18
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (displayFormat !== 'paste-chip') {
|
|
56
|
-
return undefined;
|
|
57
|
-
}
|
|
58
|
-
const firstLine = lines[0] || '';
|
|
59
|
-
const truncated = firstLine.length > this.MAX_SUMMARY_LENGTH
|
|
60
|
-
? `${firstLine.slice(0, this.MAX_SUMMARY_LENGTH - 3)}...`
|
|
61
|
-
: firstLine;
|
|
62
|
-
const contentType = this.getContentType(lines);
|
|
63
|
-
return `[Pasted ${lines.length} lines of ${contentType}]: ${truncated}`;
|
|
64
|
-
}
|
|
65
|
-
getContentType(lines) {
|
|
66
|
-
const content = lines.join('\\n');
|
|
67
|
-
if (content.includes('import ') || content.includes('export ') || content.includes('function ') || content.includes('class ')) {
|
|
68
|
-
return 'code';
|
|
19
|
+
else if (lineCount <= 3) {
|
|
20
|
+
// 2-3 lines - inline with newline indicators
|
|
21
|
+
displayFormat = 'inline';
|
|
69
22
|
}
|
|
70
|
-
if (
|
|
71
|
-
|
|
23
|
+
else if (lineCount <= 10) {
|
|
24
|
+
// 4-10 lines - block display
|
|
25
|
+
displayFormat = 'block';
|
|
72
26
|
}
|
|
73
|
-
|
|
74
|
-
|
|
27
|
+
else {
|
|
28
|
+
// More than 10 lines - paste chip with summary
|
|
29
|
+
displayFormat = 'paste-chip';
|
|
30
|
+
summary = `[Pasted ${lineCount} lines]: ${lines[0]}`;
|
|
75
31
|
}
|
|
76
|
-
return
|
|
32
|
+
return {
|
|
33
|
+
content: input,
|
|
34
|
+
isMultiLine,
|
|
35
|
+
displayFormat,
|
|
36
|
+
lineCount,
|
|
37
|
+
summary,
|
|
38
|
+
};
|
|
77
39
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Format processed input for display in the terminal
|
|
42
|
+
*/
|
|
43
|
+
formatForDisplay(processed) {
|
|
44
|
+
switch (processed.displayFormat) {
|
|
81
45
|
case 'inline':
|
|
82
|
-
|
|
46
|
+
// Replace newlines with ↵ symbol for inline display
|
|
47
|
+
return processed.content.split('\n').join(' ↵ ');
|
|
83
48
|
case 'block':
|
|
84
|
-
|
|
49
|
+
// Show full content as-is for block display
|
|
50
|
+
return processed.content;
|
|
85
51
|
case 'paste-chip':
|
|
86
|
-
|
|
52
|
+
// Show summary for large pastes
|
|
53
|
+
return processed.summary || `[Pasted ${processed.lineCount} lines]`;
|
|
87
54
|
default:
|
|
88
|
-
return content;
|
|
55
|
+
return processed.content;
|
|
89
56
|
}
|
|
90
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Get the full content to send (always the original content)
|
|
60
|
+
*/
|
|
61
|
+
getContentToSend(processed) {
|
|
62
|
+
return processed.content;
|
|
63
|
+
}
|
|
91
64
|
}
|
|
92
65
|
//# sourceMappingURL=unifiedInputProcessor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unifiedInputProcessor.js","sourceRoot":"","sources":["../../src/shell/unifiedInputProcessor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unifiedInputProcessor.js","sourceRoot":"","sources":["../../src/shell/unifiedInputProcessor.ts"],"names":[],"mappings":"AAYA,MAAM,OAAO,qBAAqB;IACxB,EAAE,CAAW;IAErB,YAAY,EAAY;QACtB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,KAAa;QACxB,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChC,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC;QAC/B,MAAM,WAAW,GAAG,SAAS,GAAG,CAAC,CAAC;QAElC,IAAI,aAA4B,CAAC;QACjC,I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|
3
|
+
"version": "1.7.57",
|
|
4
4
|
"description": "Unified AI agent framework for the command line - Multi-provider support with schema-driven tools, code intelligence, and transparent reasoning",
|
|
5
5
|
"main": "dist/bin/erosolar-optimized.js",
|
|
6
6
|
"type": "module",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"config/security-deployment.json"
|
|
26
26
|
],
|
|
27
27
|
"bin": {
|
|
28
|
-
"erosolar-ts": "dist/bin/erosolar
|
|
29
|
-
"erosolar-cli": "dist/bin/erosolar
|
|
30
|
-
"erosolar": "dist/bin/erosolar
|
|
28
|
+
"erosolar-ts": "dist/bin/erosolar.js",
|
|
29
|
+
"erosolar-cli": "dist/bin/erosolar.js",
|
|
30
|
+
"erosolar": "dist/bin/erosolar.js"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"preinstall": "node scripts/preinstall-clean-bins.mjs",
|
|
@@ -1,110 +0,0 @@
|
|
|
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;
|
|
@@ -1,313 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,CAAC,MAAM,cACT,OAAO,EAAE,IAAI,EACb,aAAa,EAAE;gBACb,GAAG,EAAE,IAAI;gBACT,YAAY,EAAE,IAAI;gBAClB,QAAQ,EAAE,IAAI;gBACd,QAAQ,EAAE,IAAI;aACf,EACD,iBAAiB,EAAE;gBACjB,WAAW,EAAE,IAAI;gBACjB,sBAAsB,EAAE,IAAI;gBAC5B,eAAe,EAAE,IAAI;gBACrB,aAAa,EAAE,IAAI;aACpB,EACD,UAAU,EAAE;gBACV,gBAAgB,EAAE,IAAI;gBACtB,cAAc,EAAE,IAAI;gBACpB,gBAAgB,EAAE,IAAI;gBACtB,eAAe,EAAE,IAAI;aACtB,IACE,MAAM,CACV,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,mDAAqB,GAArB,UAAsB,QAAgB,EAAE,SAAsC;QAC5E,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACzB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QAC5C,CAAC;QAED,IAAM,cAAc,GAAG,IAAA,mBAAO,EAAC,QAAQ,CAAC,CAAC;QACzC,IAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAE1B,yCAAyC;QACzC,IAAM,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;QAC/D,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YACxB,IAAI,CAAC,gBAAgB,CAAC;gBACpB,IAAI,E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