audit-cors
Skill4 starsChanged 2 months agoMITView on GitHub
Audit Cross-Origin Resource Sharing configuration for web applications and APIs. Use when reviewing server middleware, API gateway settings, deployment config, credentials/cookies, or production launch readiness for wildcard origins, overly broad methods/headers, or mismatched client-domain allowlists.
In this repository25 other files it gives its agents.
- audit-asset-pipelineSkill
- audit-auth-and-access-controlSkill
- audit-database-performanceSkill
- audit-input-validationSkill
- audit-rate-limitingSkill
- audit-resilience-and-observabilitySkill
- audit-secrets-and-configSkill
- audit-type-safetySkill
- ios-prelaunch-checklistSkill
- security-reviewSkill
- code-review-loopSkill
- error-logging-reviewSkill
- hive-parallel-review-loopSkill
- hive-review-loopSkill
- input-contract-hardeningSkill
- microskills-review-generatorSkill
- microskills-review-runnerSkill
- parallel-code-review-loopSkill
- perf-optimizationSkill
- parallel-plan-implementationSkill
- phase-commit-reviewerSkill
- product-implementation-plannerSkill
- product-plan-compilerSkill
- test-quality-reviewSkill
- verified-commit-splitSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Check that CORS is explicitly configured, production-safe, and aligned with actual client domains.
- Distinctive: line 15
Read app config, env vars, deployment files, docs, frontend base URLs, native app webviews if applicable, and production/staging domains.
- Very specific: line 31
Search for CORS and header terms such as cors, origin, Access-Control-Allow-Origin, Access-Control-Allow-Credentials, OPTIONS, …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Audit CORS
Check that CORS is explicitly configured, production-safe, and aligned with actual client domains.
Workflow
- Find all CORS enforcement points:
- Server middleware, framework config, route-specific handlers, API gateway, CDN, reverse proxy, serverless platform config, and custom
OPTIONShandlers.
- Server middleware, framework config, route-specific handlers, API gateway, CDN, reverse proxy, serverless platform config, and custom
- Identify allowed origins:
- Read app config, env vars, deployment files, docs, frontend base URLs, native app webviews if applicable, and production/staging domains.
- Compare configured allowlists to actual client domains used by the app.
- Check unsafe patterns:
- Wildcard
*in production APIs. - Reflecting any request
Originwithout allowlist validation. Access-Control-Allow-Credentials: truecombined with broad or reflected origins.- Overly broad methods or headers when only a smaller set is needed.
- Missing
Vary: Originwhen origin responses vary. - Inconsistent CORS behavior between normal responses and error responses.
- Wildcard
- Verify preflight handling:
OPTIONSresponses succeed for allowed origins.- Disallowed origins are rejected or receive no permissive CORS headers.
- Authenticated cookie/session APIs do not accidentally allow arbitrary origins.
Useful Searches
Search for CORS and header terms such as cors, origin, Access-Control-Allow-Origin, Access-Control-Allow-Credentials, OPTIONS, allowedOrigins, allow_origin, credentials, Vary, headers, methods, gateway config, CDN config, and reverse proxy config.
Output
Report:
- CORS locations inspected.
- Allowed origins found.
- Actual client domains inferred from the repo.
- Findings with file and line references.
- Recommended production and development allowlist values.
For each finding include the exact risky header/config and a minimal fix matching the app's framework.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

