cors-csrf-audit

Detect CORS misconfigurations and CSRF vulnerabilities in web applications.

1|1|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/abhijeetkakade1234/skills --skill cors-csrf-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cors-csrf-audit
Source: https://github.com/abhijeetkakade1234/skills/tree/main/security-audit-orchestrator/specialized/cors-csrf-audit
Command: npx skills add https://github.com/abhijeetkakade1234/skills --skill cors-csrf-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill identifies and remediates critical web security vulnerabilities related to Cross-Origin Resource Sharing (CORS) and Cross-Site Request Forgery (CSRF), which often lead to unauthorized data access and state-changing attacks.

Core Features & Use Cases

  • Vulnerability Detection: Scans for dangerous patterns like reflected origins, wildcard CORS configurations with credentials, and missing CSRF tokens on state-changing endpoints.
  • Remediation Guidance: Provides framework-specific fixes for Express, Django, Flask, Go, Spring, and .NET to ensure secure configuration.
  • Use Case: Use this skill to audit a legacy Node.js API that is currently reflecting the Origin header, ensuring it is updated to use a strict allowlist and proper CSRF protection.

Quick Start

Use the cors-csrf-audit skill to scan the codebase for reflected origin headers and missing CSRF tokens on all POST routes.

Frequently Asked Questions about cors-csrf-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit my web app for CORS misconfigurations and CSRF vulnerabilities?

CORS misconfigurations like reflected origins and wildcard configurations with credentials allow unauthorized cross-origin access. You can audit credentialed endpoints and authentication middleware to detect these dangerous patterns and enforce strict origin allowlists.

How do I fix a reflected Origin header in my Express API?

Fix a reflected Origin header in Express by implementing an explicit origin allowlist instead of reflecting the Origin header directly, ensuring only pre-approved domains can access credentialed endpoints.

Why are my state-changing routes vulnerable to CSRF without tokens?

State-changing routes without synchronizer token validation are vulnerable to CSRF because attackers can forge authenticated requests. You can scan POST routes for missing CSRF tokens and implement framework-specific token validation.

Does this CSRF and CORS audit support Django and Spring frameworks?

Yes, the audit supports Django and Spring. It provides framework-specific remediation guidance for Express, Django, Flask, Go, Spring, and .NET to implement secure configuration patterns like SameSite cookie enforcement.

When should I enforce SameSite cookies for CSRF protection?

Enforce SameSite cookies for CSRF protection when securing cookie-based authentication on state-changing routes. This prevents browsers from sending credentials in cross-site requests, mitigating CSRF vulnerabilities alongside synchronizer token validation.