vibe-guard
Version:
██ Vibe-Guard Security Scanner - 28 essential security rules to catch vulnerabilities before they catch you! Zero dependencies, instant setup, works everywhere, optimized performance. Detects SQL injection, XSS, exposed secrets, CSRF, CORS issues, contain
35 lines • 1.31 kB
TypeScript
import { BaseRule, FileContent, SecurityIssue } from '../types';
export declare class CsrfProtectionRule extends BaseRule {
readonly name = "csrf-protection";
readonly description = "Detects missing CSRF protection and unsafe cookie configurations with context-aware analysis";
readonly severity: "high";
private readonly csrfPatterns;
private readonly cookiePatterns;
private readonly safePatterns;
check(fileContent: FileContent): SecurityIssue[];
private validateFormWithoutCsrf;
private validateFormMissingCsrfInput;
private validateHiddenInputWithoutCsrf;
private validateExpressRouteWithoutCsrf;
private validateExpressRouterWithoutCsrf;
private detectLanguage;
private detectFramework;
private hasCsrfProtection;
private hasSecureCookies;
private analyzeContext;
private isSafeContext;
private isInComment;
private isInString;
private isInTestFile;
private isInDocumentation;
private isInDevelopment;
private calculateConfidence;
private calculateSeverity;
private getLineContext;
private generateSuggestion;
private validateHttpOnlyDisabled;
private validateSecureDisabled;
private validateSameSiteNone;
private validateSameSiteLax;
}
//# sourceMappingURL=csrf-protection.d.ts.map