mira-consciousness
Version:
Memory & Intelligence Retention Archive - Preserving The Spark
30 lines • 953 B
TypeScript
/**
* Security Configuration for MIRA
* Defines security policies and best practices
*/
export interface SecurityConfig {
allowedCommands: string[];
restrictedPaths: string[];
allowedHosts: string[];
sensitivePatterns: RegExp[];
maxFileSizeBytes: number;
commandTimeoutMs: number;
}
export declare const defaultSecurityConfig: SecurityConfig;
/**
* Validate if a command is allowed to execute
*/
export declare function isCommandAllowed(command: string, config?: SecurityConfig): boolean;
/**
* Check if a path is restricted
*/
export declare function isPathRestricted(filePath: string, config?: SecurityConfig): boolean;
/**
* Sanitize command arguments to prevent injection
*/
export declare function sanitizeCommandArgs(args: string[]): string[];
/**
* Create safe environment variables for subprocess
*/
export declare function getSafeEnvironment(): NodeJS.ProcessEnv;
//# sourceMappingURL=security-config.d.ts.map