/** * Security Event Logger * Issue #96: npm install CLI support * SF-SEC-2: Security event logging for CLI commands */ /** * Security event types */ export interface SecurityEvent { /** ISO timestamp */ timestamp: string; /** Command that triggered the event */ command: string; /** Event outcome */ action: 'success' | 'failure' | 'warning'; /** Additional details */ details?: string; } /** * Get security log file path * * Issue #4210: `CM_LOG_DIR` is judged the way `getLogDir()` * (`config/log-config.ts`) judges it for every other log writer. A value inside * `/proc`, `/sys` or `/dev` — literally, through a symlink, or as the absolute * form of a relative value — is refused and the default file is used. A * relative value is otherwise kept as given and so resolved against this * process's cwd, which is also what `getLogDir()` does: the file is only ever * opened by the process that resolved it, so nothing else has to agree on it. * * The default stays `~/.commandmate-security.log` rather than `getLogDir()`'s * `/data/logs`: a CLI run from an arbitrary directory has no `data/logs`. * * @returns The file security events are appended to */ export declare function getSecurityLogPath(): string; /** * Log a security event * Silently fails if file operations fail (non-critical) */ export declare function logSecurityEvent(event: SecurityEvent): void; /** * Mask sensitive data in log messages * SF-SEC-2: Mask authentication tokens in logs */ export declare function maskSensitiveData(input: string | undefined): string | undefined; //# sourceMappingURL=security-logger.d.ts.map