Skill
CSRF and CORS Hardening
Sets up CORS and CSRF protection that fits how your app authenticates, with cookies or bearer tokens, and removes the wildcard shortcuts.
csrf-and-cors-hardening/SKILL.md
1First decide how the app authenticates. The answer decides everything else.
2Steps
31. Identify the credential: cookie session, bearer token in a header, or both. List the state-changing routes (POST, PUT, PATCH, DELETE) and any GET that changes state.
42. CORS policy:
5- Allowlist exact origins from configuration. Never reflect the request `Origin` without checking it against that list, and never combine `*` with credentials.
Claude CodeCodex
{ }
CSRF and CORS Hardening
SkillSecurity
Free