UNPKG

ctrlshiftleft

Version:

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

29 lines (28 loc) 922 B
/** * API Route Analyzer * * This module provides enhanced static analysis for API routes in various frameworks * including Express, Next.js API routes, and other Node.js server frameworks. */ export interface ApiSecurityPattern { pattern: RegExp; severity: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' | 'INFO'; title: string; description: string; remediation: string; framework?: string[]; category?: string; } /** * Express.js specific security patterns */ export declare const EXPRESS_API_PATTERNS: ApiSecurityPattern[]; /** * Generic Node.js API security patterns applicable across multiple frameworks */ export declare const GENERIC_API_PATTERNS: ApiSecurityPattern[]; /** * Combines all API security patterns into a single array * @param frameworks Optionally filter patterns by framework */ export declare const getAllApiPatterns: (frameworks?: string[]) => ApiSecurityPattern[];