ctrlshiftleft
Version:
AI-powered toolkit for embedding QA and security testing into development workflows
29 lines (28 loc) • 941 B
TypeScript
/**
* Utilities for calculating and displaying diffs between files
* Used for security change analysis in the watch command
*/
export interface DiffChange {
value: string;
added?: boolean;
removed?: boolean;
}
/**
* Compute diff between two strings
* @param oldStr Previous string content
* @param newStr New string content
* @returns Array of diff changes
*/
export declare function diff(oldStr: string, newStr: string): DiffChange[];
/**
* Check if a line contains security-sensitive changes
* @param line Line of code to check
* @returns Whether line contains security-sensitive keywords
*/
export declare function isSecuritySensitiveChange(line: string): boolean;
/**
* Highlight security-sensitive changes in diff output
* @param changes Diff changes to analyze
* @returns Formatted string with highlighted security changes
*/
export declare function highlightSecurityChanges(changes: DiffChange[]): string;