import { CommandLineOptions } from '../CommandLineOptions'; /** * Masks sensitive API key in CLI options before logging. * * @param cliOptions - The command line options to mask * @returns A copy of the options with the API key masked as '****' * * @remarks * Creates a shallow copy to avoid mutating the original options. * Only masks the key if it exists. */ export declare function maskCliOptions(cliOptions: CommandLineOptions): CommandLineOptions; /** * Sanitizes error messages by masking potential tokens and sensitive data. * * Removes or masks sensitive information that might appear in error messages, * stack traces, or error objects before they are logged or displayed. * * @param error - Error object or string to sanitize * @returns Sanitized error message string with sensitive data masked * * @remarks * Security features: * - Masks potential API tokens (20+ alphanumeric characters) * - Masks "token: value" and "token=value" patterns * - Masks "key: value" and "key=value" patterns * - Masks "password: value" and "password=value" patterns * - Masks "secret: value" and "secret=value" patterns * - Preserves stack trace structure while masking sensitive data * * @example * ```typescript * const error = new Error('API failed with token: abc123xyz789'); * const safe = sanitizeError(error); * // Returns: "API failed with token: ****" * * const message = 'Authentication key=secretKey123 invalid'; * const safe2 = sanitizeError(message); * // Returns: "Authentication key: **** invalid" * ``` * * @category Security * @since 2.1.0 */ export declare function sanitizeError(error: Error | string): string; //# sourceMappingURL=utils.d.ts.map