@every-env/cli
Version:
Multi-agent orchestrator for AI-powered development workflows
39 lines • 1.39 kB
TypeScript
/**
* List of allowed commands for agent execution
*/
export declare const ALLOWED_COMMANDS: string[];
/**
* Validates that a file path is within the allowed base directory
* @param filePath - The file path to validate
* @param basePath - The base directory that the file must be within
* @returns The normalized absolute path
* @throws Error if path traversal is detected
*/
export declare function validatePath(filePath: string, basePath: string): string;
/**
* Validates that a command is in the allowed list
* @param command - The command to validate
* @throws Error if command is not allowed
*/
export declare function validateCommand(command: string): void;
/**
* Sanitizes command arguments to prevent injection attacks
* @param args - The arguments to sanitize
* @returns Filtered array of safe arguments
*/
export declare function sanitizeArgs(args: string[]): string[];
/**
* Creates a safe environment for child processes
* @param env - The original environment variables
* @returns Filtered environment variables
*/
export declare function createSafeEnvironment(env?: Record<string, string>): Record<string, string>;
/**
* Resource limits for process execution
*/
export declare const RESOURCE_LIMITS: {
readonly MAX_OUTPUT_SIZE: number;
readonly PROCESS_TIMEOUT: number;
readonly MAX_MEMORY: number;
};
//# sourceMappingURL=security.d.ts.map