UNPKG

vibe-guard

Version:

🛡️ Vibe-Guard Security Scanner - Catch security issues before they catch you!

66 lines 1.78 kB
export type SeverityLevel = 'critical' | 'high' | 'medium' | 'low'; export interface SecurityIssue { rule: string; severity: SeverityLevel; message: string; file: string; line: number; column: number; code: string; suggestion: string; } export interface ScanOptions { target: string; format: 'table' | 'json'; verbose: boolean; exclude?: string[]; include?: string[]; } export interface RuleMatch { pattern: RegExp; message: string; severity: SeverityLevel; suggestion: string; } export interface FileContent { path: string; content: string; lines: string[]; } export interface ScanResult { issues: SecurityIssue[]; filesScanned: number; issuesFound: number; summary: { critical: number; high: number; medium: number; low: number; }; } export interface RuleConfig { enabled: boolean; severity?: SeverityLevel; patterns?: string[]; excludePatterns?: string[]; } export interface VibeGuardConfig { rules: Record<string, RuleConfig>; exclude: string[]; include: string[]; outputFormat: 'table' | 'json'; } export declare abstract class BaseRule { abstract readonly name: string; abstract readonly description: string; abstract readonly severity: SeverityLevel; abstract check(fileContent: FileContent): SecurityIssue[]; protected createIssue(file: string, line: number, column: number, code: string, message: string, suggestion: string, severity?: SeverityLevel): SecurityIssue; protected findMatches(content: string, pattern: RegExp): Array<{ match: RegExpMatchArray; line: number; column: number; lineContent: string; }>; } //# sourceMappingURL=index.d.ts.map