sc-csrf

Detect CSRF vulnerabilities in web applications by scanning tokens, cookies, and JSON handling.

56|5|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/ersinkoc/security-check --skill sc-csrf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sc-csrf
Source: https://github.com/ersinkoc/security-check/tree/main/skills/sc-csrf
Command: npx skills add https://github.com/ersinkoc/security-check --skill sc-csrf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

CSRF vulnerabilities allow state-changing actions to be performed without proper authorization when tokens are missing, SameSite cookies are misconfigured, or JSON-based APIs do not validate content-type. This Skill helps identify and remediate those weaknesses across modern web apps.

Core Features & Use Cases

  • Detect missing CSRF protection on state-changing endpoints (POST/PUT/DELETE) across popular web frameworks.
  • Identify SameSite cookie misconfigurations and improper token handling that weaken CSRF defenses.
  • Analyze JSON API endpoints for lack of content-type validation and anti-forgery checks, surfacing risky patterns.
  • Framework coverage includes Django, Laravel, Spring Security, Express, and ASP.NET, providing actionable remediation guidance.

Quick Start

Detect CSRF vulnerabilities in a web application by identifying missing CSRF tokens, misconfigured SameSite cookies, and unsafe JSON handling.

Frequently Asked Questions about sc-csrf

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

FAQPage Schema
How do I detect CSRF vulnerabilities in web applications?

Detect CSRF vulnerabilities by scanning state-changing endpoints like POST, PUT, and DELETE for missing CSRF tokens, misconfigured SameSite cookies, and unsafe JSON content-type handling. This analysis covers session-based apps across major frameworks including Django, Laravel, Spring Security, Express, and ASP.NET.

What causes cross-site request forgery in JSON APIs?

Cross-site request forgery in JSON APIs occurs when endpoints lack proper content-type validation and anti-forgery checks. Attackers can exploit unsafe JSON handling to perform unauthorized state-changing actions if the API does not verify the request origin or enforce strict content-type policies.

Does this CSRF detection work with Django and Laravel frameworks?

Yes, CSRF detection works with Django, Laravel, Spring Security, Express, and ASP.NET. It assesses framework-specific CSRF defaults and implementation details by scanning for tokens and middleware presence to identify missing protections on state-changing endpoints.

How do I check SameSite cookie misconfigurations for CSRF protection?

Check SameSite cookie misconfigurations by analyzing cookie headers to ensure they are properly set to prevent cross-origin request forgery. Misconfigured SameSite cookies weaken CSRF defenses by allowing browsers to send authentication cookies with unauthorized cross-site requests.

What is the best way to find missing CSRF tokens on state-changing endpoints?

The best way to find missing CSRF tokens is to scan state-changing POST, PUT, and DELETE endpoints for middleware presence and token validation. This approach identifies token bypasses and cross-origin request vulnerabilities while producing actionable remediation guidance.