[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M797TF3KM1K0J6Q1KBWWMYE2":3,"skill-same:01M797TF3KM1K0J6Q1KBWWMYE2":54},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":34,"repositoryHtmlUrl":35,"repositoryHomepageUrl":6,"ownerHtmlUrl":36,"ownerBlogUrl":37,"ownerDescription":38,"updatedAt":39,"install":40,"resources":53},"01M797TF3KM1K0J6Q1KBWWMYE2","validating-csrf-protection",null,"Validate CSRF protection implementations for security gaps. Use when reviewing form security or state-changing operations. Trigger with 'validate CSRF', 'check CSRF protection', or 'review token security'.","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsecurity--csrf-protection-validator--validating-csrf-protection\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: validating-csrf-protection\ndescription: Validate CSRF protection implementations for security gaps. Use when reviewing form security or state-changing operations. Trigger with 'validate CSRF', 'check CSRF protection', or 'review token security'.\nversion: 1.0.0\nallowed-tools: \"Read, Write, Edit, Grep, Glob, Bash(security:*), Bash(scan:*), Bash(audit:*)\"\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ncompatible-with: claude-code, codex, openclaw\ntags: [security, validating-csrf]\n---\n# Validating CSRF Protection\n\n## Overview\n\nValidate Cross-Site Request Forgery protection across web application endpoints,\nforms, and API routes. This skill examines synchronizer token patterns,\ndouble-submit cookie implementations, SameSite cookie attributes, Origin\u002FReferer\nheader validation, and custom header requirements to identify state-changing\noperations vulnerable to CSRF attacks.\n\n## Prerequisites\n\n- Access to the target codebase and configuration files in `${CLAUDE_SKILL_DIR}\u002F`\n- Familiarity with the web framework in use (Express, Django, Rails, Spring, Laravel, etc.)\n- Standard shell utilities and Grep\u002FGlob available for codebase scanning\n- Reference: `${CLAUDE_SKILL_DIR}\u002Freferences\u002FREADME.md` for CSRF protection methods, OWASP CSRF Prevention Cheat Sheet, and framework-specific API examples\n\n## Instructions\n\n1. Inventory all state-changing endpoints by scanning for POST, PUT, PATCH, and DELETE route handlers using Grep. Include form action attributes in HTML templates, AJAX calls in JavaScript, and API route definitions.\n2. For each state-changing endpoint, verify that at least one CSRF protection mechanism is in place: synchronizer token, double-submit cookie, SameSite cookie attribute, Origin validation, or custom header requirement.\n3. Validate synchronizer token implementation: confirm tokens are generated server-side using a CSPRNG, bound to the user session, included in forms as hidden fields or request headers, and validated on every state-changing request. Flag tokens that are static, predictable, or reused across sessions as CWE-352 (Cross-Site Request Forgery).\n4. Check double-submit cookie patterns: verify the cookie value matches the request body or header value, the cookie uses `Secure` and `HttpOnly` attributes, and the comparison is timing-safe to prevent token extraction.\n5. Assess SameSite cookie attributes on session cookies: verify `SameSite=Strict` or `SameSite=Lax` is set. Flag `SameSite=None` without `Secure` as severity high. Note that `SameSite=Lax` permits top-level GET navigations, which may be insufficient for GET endpoints that trigger state changes.\n6. Verify Origin\u002FReferer header validation: check that the server validates the `Origin` header against an allowlist on state-changing requests. Flag implementations that fall back to no protection when the header is absent.\n7. For API endpoints using token-based auth (JWT in Authorization header), confirm that cookies are not also sent -- if cookies are used alongside bearer tokens, CSRF protection remains necessary.\n8. Check for CSRF bypass vectors: look for state-changing GET endpoints, JSONP endpoints, content-type sniffing (missing `Content-Type` enforcement), and Flash\u002FSilverlight crossdomain.xml files.\n9. Classify each finding by severity (critical for unprotected financial\u002Fadmin endpoints, high for other state-changing endpoints, medium for defense-in-depth gaps).\n10. Generate remediation guidance with framework-specific CSRF middleware configuration examples.\n\n## Output\n\n- **Endpoint inventory**: Table of all state-changing endpoints with their CSRF protection status (Protected, Partially Protected, Unprotected)\n- **Findings report**: Each finding includes severity, CWE-352 reference, affected endpoint\u002Ffile, attack scenario description, and remediation code\n- **Protection coverage**: Percentage of state-changing endpoints with validated CSRF protection\n- **SameSite cookie audit**: Table of all session\u002Fauth cookies with their SameSite, Secure, HttpOnly, and Path attributes\n- **Remediation guide**: Framework-specific middleware setup (e.g., `csurf` for Express, `@csrf_protect` for Django, `csrf_meta_tags` for Rails)\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| No state-changing endpoints found | Unconventional routing patterns or SPA architecture | Check for client-side routing frameworks (React Router, Vue Router) and trace API calls from frontend code |\n| CSRF middleware detected but not applied globally | Middleware applied per-route rather than globally | Verify every state-changing route has the middleware applied; flag gaps in coverage |\n| Token generation source unclear | Framework abstracts CSRF token generation | Check framework documentation for default CSPRNG usage; inspect framework source if needed |\n| SameSite attribute not set in code | Cookie attributes set at infrastructure layer | Check reverse proxy, load balancer, or CDN cookie rewriting rules |\n| Mixed protection strategies | Different endpoints use different CSRF mechanisms | Document each strategy and verify consistency; recommend standardizing on one approach |\n\n## Examples\n\n### Express.js CSRF Token Validation\n\nScan `${CLAUDE_SKILL_DIR}\u002Fsrc\u002Froutes\u002F` for `router.post` and `router.put` handlers. Verify\neach includes `csurf` middleware or equivalent token validation. Flag any POST\nhandler that directly processes `req.body` without `csrfProtection` middleware\nas CWE-352, severity critical for financial operations, high for other state changes.\n\n### Django CSRF Middleware Audit\n\nGrep `${CLAUDE_SKILL_DIR}\u002Fsettings.py` for `django.middleware.csrf.CsrfViewMiddleware` in\nthe `MIDDLEWARE` list. Scan views for `@csrf_exempt` decorators -- flag each\nexempted view as a potential CSRF vulnerability requiring justification. Verify\ntemplates include `{% csrf_token %}` in all form tags.\n\n### SPA + API CSRF Assessment\n\nFor a React frontend calling a REST API, verify that the API enforces a custom\nheader requirement (e.g., `X-Requested-With`) or uses double-submit cookies.\nCheck that the SPA reads the CSRF token from a cookie and includes it in the\n`X-CSRF-Token` header. Flag API endpoints that accept `application\u002Fx-www-form-urlencoded`\nwithout CSRF validation as severity high (exploitable via HTML forms).\n\n## Resources\n\n- [OWASP CSRF Prevention Cheat Sheet](https:\u002F\u002Fcheatsheetseries.owasp.org\u002Fcheatsheets\u002FCross-Site_Request_Forgery_Prevention_Cheat_Sheet.html)\n- [CWE-352: Cross-Site Request Forgery](https:\u002F\u002Fcwe.mitre.org\u002Fdata\u002Fdefinitions\u002F352.html)\n- [SameSite Cookies Explained](https:\u002F\u002Fweb.dev\u002Fsamesite-cookies-explained\u002F)\n- [OWASP Testing for CSRF (OTG-SESS-005)](https:\u002F\u002Fowasp.org\u002Fwww-project-web-security-testing-guide\u002Flatest\u002F4-Web_Application_Security_Testing\u002F06-Session_Management_Testing\u002F05-Testing_for_Cross_Site_Request_Forgery)\n- [Synchronizer Token Pattern](https:\u002F\u002Fcheatsheetseries.owasp.org\u002Fcheatsheets\u002FCross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#synchronizer-token-pattern)","# Validating CSRF Protection\n\n## Overview\n\nValidate Cross-Site Request Forgery protection across web application endpoints,\nforms, and API routes. This skill examines synchronizer token patterns,\ndouble-submit cookie implementations, SameSite cookie attributes, Origin\u002FReferer\nheader validation, and custom header requirements to identify state-changing\noperations vulnerable to CSRF attacks.\n\n## Prerequisites\n\n- Access to the target codebase and configuration files in `${CLAUDE_SKILL_DIR}\u002F`\n- Familiarity with the web framework in use (Express, Django, Rails, Spring, Laravel, etc.)\n- Standard shell utilities and Grep\u002FGlob available for codebase scanning\n- Reference: `${CLAUDE_SKILL_DIR}\u002Freferences\u002FREADME.md` for CSRF protection methods, OWASP CSRF Prevention Cheat Sheet, and framework-specific API examples\n\n## Instructions\n\n1. Inventory all state-changing endpoints by scanning for POST, PUT, PATCH, and DELETE route handlers using Grep. Include form action attributes in HTML templates, AJAX calls in JavaScript, and API route definitions.\n2. For each state-changing endpoint, verify that at least one CSRF protection mechanism is in place: synchronizer token, double-submit cookie, SameSite cookie attribute, Origin validation, or custom header requirement.\n3. Validate synchronizer token implementation: confirm tokens are generated server-side using a CSPRNG, bound to the user session, included in forms as hidden fields or request headers, and validated on every state-changing request. Flag tokens that are static, predictable, or reused across sessions as CWE-352 (Cross-Site Request Forgery).\n4. Check double-submit cookie patterns: verify the cookie value matches the request body or header value, the cookie uses `Secure` and `HttpOnly` attributes, and the comparison is timing-safe to prevent token extraction.\n5. Assess SameSite cookie attributes on session cookies: verify `SameSite=Strict` or `SameSite=Lax` is set. Flag `SameSite=None` without `Secure` as severity high. Note that `SameSite=Lax` permits top-level GET navigations, which may be insufficient for GET endpoints that trigger state changes.\n6. Verify Origin\u002FReferer header validation: check that the server validates the `Origin` header against an allowlist on state-changing requests. Flag implementations that fall back to no protection when the header is absent.\n7. For API endpoints using token-based auth (JWT in Authorization header), confirm that cookies are not also sent -- if cookies are used alongside bearer tokens, CSRF protection remains necessary.\n8. Check for CSRF bypass vectors: look for state-changing GET endpoints, JSONP endpoints, content-type sniffing (missing `Content-Type` enforcement), and Flash\u002FSilverlight crossdomain.xml files.\n9. Classify each finding by severity (critical for unprotected financial\u002Fadmin endpoints, high for other state-changing endpoints, medium for defense-in-depth gaps).\n10. Generate remediation guidance with framework-specific CSRF middleware configuration examples.\n\n## Output\n\n- **Endpoint inventory**: Table of all state-changing endpoints with their CSRF protection status (Protected, Partially Protected, Unprotected)\n- **Findings report**: Each finding includes severity, CWE-352 reference, affected endpoint\u002Ffile, attack scenario description, and remediation code\n- **Protection coverage**: Percentage of state-changing endpoints with validated CSRF protection\n- **SameSite cookie audit**: Table of all session\u002Fauth cookies with their SameSite, Secure, HttpOnly, and Path attributes\n- **Remediation guide**: Framework-specific middleware setup (e.g., `csurf` for Express, `@csrf_protect` for Django, `csrf_meta_tags` for Rails)\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| No state-changing endpoints found | Unconventional routing patterns or SPA architecture | Check for client-side routing frameworks (React Router, Vue Router) and trace API calls from frontend code |\n| CSRF middleware detected but not applied globally | Middleware applied per-route rather than globally | Verify every state-changing route has the middleware applied; flag gaps in coverage |\n| Token generation source unclear | Framework abstracts CSRF token generation | Check framework documentation for default CSPRNG usage; inspect framework source if needed |\n| SameSite attribute not set in code | Cookie attributes set at infrastructure layer | Check reverse proxy, load balancer, or CDN cookie rewriting rules |\n| Mixed protection strategies | Different endpoints use different CSRF mechanisms | Document each strategy and verify consistency; recommend standardizing on one approach |\n\n## Examples\n\n### Express.js CSRF Token Validation\n\nScan `${CLAUDE_SKILL_DIR}\u002Fsrc\u002Froutes\u002F` for `router.post` and `router.put` handlers. Verify\neach includes `csurf` middleware or equivalent token validation. Flag any POST\nhandler that directly processes `req.body` without `csrfProtection` middleware\nas CWE-352, severity critical for financial operations, high for other state changes.\n\n### Django CSRF Middleware Audit\n\nGrep `${CLAUDE_SKILL_DIR}\u002Fsettings.py` for `django.middleware.csrf.CsrfViewMiddleware` in\nthe `MIDDLEWARE` list. Scan views for `@csrf_exempt` decorators -- flag each\nexempted view as a potential CSRF vulnerability requiring justification. Verify\ntemplates include `{% csrf_token %}` in all form tags.\n\n### SPA + API CSRF Assessment\n\nFor a React frontend calling a REST API, verify that the API enforces a custom\nheader requirement (e.g., `X-Requested-With`) or uses double-submit cookies.\nCheck that the SPA reads the CSRF token from a cookie and includes it in the\n`X-CSRF-Token` header. Flag API endpoints that accept `application\u002Fx-www-form-urlencoded`\nwithout CSRF validation as severity high (exploitable via HTML forms).\n\n## Resources\n\n- [OWASP CSRF Prevention Cheat Sheet](https:\u002F\u002Fcheatsheetseries.owasp.org\u002Fcheatsheets\u002FCross-Site_Request_Forgery_Prevention_Cheat_Sheet.html)\n- [CWE-352: Cross-Site Request Forgery](https:\u002F\u002Fcwe.mitre.org\u002Fdata\u002Fdefinitions\u002F352.html)\n- [SameSite Cookies Explained](https:\u002F\u002Fweb.dev\u002Fsamesite-cookies-explained\u002F)\n- [OWASP Testing for CSRF (OTG-SESS-005)](https:\u002F\u002Fowasp.org\u002Fwww-project-web-security-testing-guide\u002Flatest\u002F4-Web_Application_Security_Testing\u002F06-Session_Management_Testing\u002F05-Testing_for_Cross_Site_Request_Forgery)\n- [Synchronizer Token Pattern](https:\u002F\u002Fcheatsheetseries.owasp.org\u002Fcheatsheets\u002FCross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#synchronizer-token-pattern)",{"name":5,"tags":24,"author":27,"license":15,"version":28,"description":7,"allowed-tools":29,"compatible-with":30},[25,26],"security","validating-csrf","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Read, Write, Edit, Grep, Glob, Bash(security:*), Bash(scan:*), Bash(audit:*)","claude-code, codex, openclaw","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsecurity--csrf-protection-validator--validating-csrf-protection",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill validating-csrf-protection",{"tool":46,"command":47},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill validating-csrf-protection",{"tool":49,"command":50},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill validating-csrf-protection","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsecurity--csrf-protection-validator--validating-csrf-protection\u002FSKILL.md",true,[],[55,62,69,76,83,91],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":87,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]