supabase
Handles the full Supabase workflow from schema changes to deployment, with built-in security guardrails that catch common traps like RLS...
cors-configuration-validator
Automatically validates Cloudflare Workers CORS configuration, ensuring proper headers, OPTIONS handling, and origin validation for cross-origin requests
Full skill instructions
This SKILL automatically activates when:
new Response() objects are created// These patterns trigger immediate alerts:
// Missing CORS headers
export default {
async fetch(request: Request, env: Env) {
return new Response(JSON.stringify(data));
// Browsers will block cross-origin requests!
}
}
// Overly permissive for authenticated APIs
const corsHeaders = {
'Access-Control-Allow-Origin': '*', // ANY origin can call!
'Access-Control-Allow-Credentials': 'true' // With credentials!
};
// These patterns are validated as correct:
// Proper CORS with origin validation
function getCorsHeaders(origin: string) {
const allowedOrigins = ['https://app.example.com', 'https://example.com'];
const allowOrigin = allowedOrigins.includes(origin) ? origin : allowedOrigins[0];
return {
'Access-Control-Allow-Origin': allowOrigin,
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',
'Access-Control-Allow-Headers': 'Content-Type, Authorization',
'Access-Control-Max-Age': '86400',
};
}
export default {
async fetch(request: Request, env: Env) {
const origin = request.headers.get('Origin') || '';
if (request.method === 'OPTIONS') {
return new Response(null, { headers: getCorsHeaders(origin) });
}
const response = new Response(JSON.stringify(data));
Object.entries(getCorsHeaders(origin)).forEach(([k, v]) => {
response.headers.set(k, v);
});
return response;
}
}
cloudflare-security-sentinel agentcloudflare-security-sentinel agentcloudflare-security-sentinel agentAccess-Control-Allow-Origin: * with credentialsAccess-Control-Allow-Methods: * with sensitive operationsAccess-Control-Max-Age for preflight caching// ❌ Critical: No CORS headers (browsers block requests)
export default {
async fetch(request: Request, env: Env) {
const data = { message: 'Hello from API' };
return new Response(JSON.stringify(data), {
headers: { 'Content-Type': 'application/json' }
// Missing CORS headers!
});
}
}
// ✅ Correct: Complete CORS implementation
function getCorsHeaders(origin: string) {
const allowedOrigins = ['https://app.example.com', 'https://example.com'];
const allowOrigin = allowedOrigins.includes(origin) ? origin : allowedOrigins[0];
return {
'Access-Control-Allow-Origin': allowOrigin,
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',
'Access-Control-Allow-Headers': 'Content-Type, Authorization',
'Access-Control-Max-Age': '86400',
};
}
export default {
async fetch(request: Request, env: Env) {
const origin = request.headers.get('Origin') || '';
// Handle preflight requests
if (request.method === 'OPTIONS') {
return new Response(null, { headers: getCorsHeaders(origin) });
}
const data = { message: 'Hello from API' };
return new Response(JSON.stringify(data), {
headers: {
'Content-Type': 'application/json',
...getCorsHeaders(origin)
}
});
}
}
// ❌ High: Overly permissive for authenticated API
export default {
async fetch(request: Request, env: Env) {
const corsHeaders = {
'Access-Control-Allow-Origin': '*', // ANY origin!
'Access-Control-Allow-Credentials': 'true', // With credentials!
'Access-Control-Allow-Methods': '*', // ANY method!
};
// This allows any website to make authenticated requests!
return new Response('Sensitive data', { headers: corsHeaders });
}
}
// ✅ Correct: Secure CORS for authenticated API
function getSecureCorsHeaders(origin: string) {
const allowedOrigins = [
'https://app.example.com',
'https://admin.example.com',
'https://example.com'
];
// Only allow known origins
const allowOrigin = allowedOrigins.includes(origin) ? origin : allowedOrigins[0];
return {
'Access-Control-Allow-Origin': allowOrigin,
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE', // Specific methods
'Access-Control-Allow-Headers': 'Content-Type, Authorization',
'Access-Control-Allow-Credentials': 'true',
'Access-Control-Max-Age': '86400',
};
}
export default {
async fetch(request: Request, env: Env) {
const origin = request.headers.get('Origin') || '';
// Verify authentication
const authHeader = request.headers.get('Authorization');
if (!authHeader || !isValidAuth(authHeader)) {
return new Response('Unauthorized', { status: 401 });
}
return new Response('Sensitive data', {
headers: getSecureCorsHeaders(origin)
});
}
}
// ❌ Critical: No OPTIONS handling (preflight fails)
export default {
async fetch(request: Request, env: Env) {
if (request.method === 'POST') {
// Handle POST request
return new Response('POST handled');
}
return new Response('Method not allowed', { status: 405 });
}
}
// ✅ Correct: Proper OPTIONS handling
export default {
async fetch(request: Request, env: Env) {
const origin = request.headers.get('Origin') || '';
// Handle preflight requests
if (request.method === 'OPTIONS') {
return new Response(null, {
headers: {
'Access-Control-Allow-Origin': origin,
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',
'Access-Control-Allow-Headers': 'Content-Type, Authorization',
'Access-Control-Max-Age': '86400',
}
});
}
if (request.method === 'POST') {
return new Response('POST handled', {
headers: {
'Access-Control-Allow-Origin': origin,
}
});
}
return new Response('Method not allowed', { status: 405 });
}
}
// ❌ Medium: Hardcoded origins (not flexible)
function getCorsHeaders() {
return {
'Access-Control-Allow-Origin': 'https://app.example.com', // Hardcoded
'Access-Control-Allow-Methods': 'GET, POST',
};
}
// ✅ Correct: Configurable and secure CORS
function getCorsHeaders(origin: string, env: Env) {
// Get allowed origins from environment
const allowedOrigins = (env.ALLOWED_ORIGINS || 'https://app.example.com')
.split(',')
.map(o => o.trim());
const allowOrigin = allowedOrigins.includes(origin) ? origin : allowedOrigins[0];
return {
'Access-Control-Allow-Origin': allowOrigin,
'Access-Control-Allow-Methods': env.ALLOWED_METHODS || 'GET, POST, PUT, DELETE',
'Access-Control-Allow-Headers': env.ALLOWED_HEADERS || 'Content-Type, Authorization',
'Access-Control-Max-Age': '86400',
};
}
export default {
async fetch(request: Request, env: Env) {
const origin = request.headers.get('Origin') || '';
if (request.method === 'OPTIONS') {
return new Response(null, { headers: getCorsHeaders(origin, env) });
}
return new Response('Response', {
headers: getCorsHeaders(origin, env)
});
}
}
{
'Access-Control-Allow-Origin': 'https://example.com', // Required
'Access-Control-Allow-Methods': 'GET, POST, OPTIONS', // Required for preflight
'Access-Control-Allow-Headers': 'Content-Type, Authorization', // Required for preflight
}
{
'Access-Control-Max-Age': '86400', // Cache preflight for 24 hours
'Access-Control-Allow-Credentials': 'true', // For cookies/auth
'Vary': 'Origin', // Important for caching with multiple origins
}
// ❌ Don't do this for authenticated APIs:
{
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Credentials': 'true'
}
// ✅ Do this instead:
{
'Access-Control-Allow-Origin': 'https://app.example.com', // Specific origin
'Access-Control-Allow-Credentials': 'true'
}
When Cloudflare MCP server is available:
// Developer types: new Response(data)
// SKILL immediately activates: "⚠️ HIGH: Response missing CORS headers. Cross-origin requests will be blocked by browsers."
// Developer types: 'Access-Control-Allow-Origin': '*'
// SKILL immediately activates: "⚠️ HIGH: Overly permissive CORS with wildcard origin. Consider specific origins for security."
// Developer types: if (request.method === 'POST') { ... }
// SKILL immediately activates: "⚠️ HIGH: Missing OPTIONS handler for preflight requests. Add OPTIONS method handling."
Access-Control-Allow-Origin header setAccess-Control-Allow-Methods header for preflightAccess-Control-Allow-Headers header for preflightAccess-Control-Max-Age header setVary: Origin header for cachingThis SKILL ensures CORS is configured correctly by providing immediate, autonomous validation of CORS patterns, preventing common cross-origin issues and security vulnerabilities.
Handles the full Supabase workflow from schema changes to deployment, with built-in security guardrails that catch common traps like RLS...
Comprehensive guides and best practices for Neon Serverless Postgres, covering setup, connection methods, authentication, and platform APIs.
Guide for setting up and using Firebase Authentication. Use this skill when the user's app requires user sign-in, user management, or secure data access using auth rules.
A skill to evaluate how secure Firestore security rules are. Use this when Firestore security rules are updated to ensure that the generated rules are extremely secure and robust.
Official skill for integrating Firebase AI Logic (Gemini API) into web applications. Covers setup, multimodal inference, structured output, and security.
Complete Better Auth server and client setup with database adapters, session management, plugins, and security configuration.
Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".
Complete Cloudflare platform integration with decision trees for compute, storage, AI, networking, security, and infrastructure-as-code.
Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.
Send, read, and manage Gmail messages, drafts, labels, and account settings.
Comprehensive website auditing across 230+ rules in 21 categories including SEO, performance, security, and accessibility.
Shared authentication, CLI syntax, and output formatting patterns for gws Google Workspace commands.
Discover your celebrity doppelgänger with StarByFace!
GeoSpy: Pricing, Features, FAQs, and Alternatives for AI Teams
Detect AI-generated voices to protect against audio fraud.
Ensure Your Content's Originality with AI Plagiarism Checker
Upscale images by 400% without quality loss
Protect your social media from copyright disputes
Accurately Detect AI-Generated Content with TheChecker.AI
Chrome extension that detects and flags AI-generated content