UNPKG

ctrlshiftleft

Version:

AI-powered toolkit for embedding QA and security testing into development workflows

70 lines (69 loc) 1.88 kB
/** * Config Loader * * Loads custom validation patterns and configuration from the .ctrlshiftleft/config.js file * allowing users to customize the security analyzer behavior. */ /** * Configuration structure for ctrl.shift.left */ export interface CtrlShiftLeftConfig { security: { customPatterns?: SecurityPattern[]; disabledPatterns?: string[]; frameworks?: { react?: { enabled: boolean; customPatterns?: SecurityPattern[]; }; nextjs?: { enabled: boolean; customPatterns?: SecurityPattern[]; }; express?: { enabled: boolean; customPatterns?: SecurityPattern[]; }; }; output?: { format?: 'markdown' | 'json' | 'html'; directory?: string; }; }; testing?: { performance?: { enabled: boolean; reportDir?: string; }; generation?: { framework?: 'playwright' | 'selenium'; outputDir?: string; }; }; global?: { lineEndings?: 'auto' | 'lf' | 'crlf'; createDirs?: boolean; }; } /** * Security pattern structure */ export interface SecurityPattern { id?: string; pattern: RegExp | string; severity: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' | 'INFO'; title: string; description: string; remediation: string; category?: string; frameworks?: string[]; } /** * Loads the configuration from .ctrlshiftleft/config.js * Falls back to defaults if configuration doesn't exist */ export declare function loadConfig(projectRoot?: string): CtrlShiftLeftConfig; /** * Creates a sample configuration file if one doesn't exist */ export declare function createSampleConfig(projectRoot?: string): void;