cors

cors is a skill for Claude Code, Codex from emre-guler/websec. It costs 84 tokens per session (5,489 once invoked), scanned A, original, MIT.

A security review for cross-origin resource sharing (CORS), a browser rule that controls whether one website can read responses from another website. It checks how the server decides which website origins may access its responses.

In plain words
What is it for?
Use it to inspect origin checks, credentialed requests, allowlists, wildcard settings, the special null origin, insecure HTTP origins, and matching rules such as startsWith or endsWith.
Why use it?
It helps find policies that let an attacker’s website read private responses, send requests with a victim’s login cookies, or use the victim’s browser to reach internal services.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the websec plugin — 36 skills, 2 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/emre-guler/websec/cors
Any agent
npx skills add emre-guler/websec --skill cors
Clone the repo
git clone --depth 1 https://github.com/emre-guler/websec

Made for: Claude Code, Codex.

Or install websec, the plugin that ships this one along with the rest of its 36 skills, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cors

README.md
[![agentmods](https://agentmods.dev/badge/skills/emre-guler/websec/cors.svg)](https://agentmods.dev/skills/emre-guler/websec/cors)
Your own site
<a href="https://agentmods.dev/skills/emre-guler/websec/cors"><img src="https://agentmods.dev/badge/skills/emre-guler/websec/cors.svg" alt="Measured on agentmods" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,489 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00084 $0.05489
Opus 5 $0.00042 $0.02745
Sonnet 5 $0.00017 $0.01098
Haiku 4.5 $0.00008 $0.00549

Measured 3d ago against content hash 1b8e0a414d3f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cors scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/cors/SKILL.md · 169 lines

How it starts

The opening of the file, as written. The whole thing — 169 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CORS Misconfiguration Detection

Overview

Cross-origin resource sharing is a controlled relaxation of the same-origin policy: by default a browser lets a page send a cross-origin request but forbids its script from reading the response, and CORS response headers name the origins allowed to read it and whether credentials may be included. The vulnerability is never in the mechanism but in the server's trust decision — reflecting whatever origin the request carried, matching an allowlist with sloppy string logic, trusting the literal null origin, or trusting an insecure scheme. When such a policy also permits credentials, any page the victim visits can issue a cookie-bearing request to the application, read the authenticated response, and forward it to the attacker: session-scoped records, API keys, personal data, and anti-forgery tokens that unlock further attacks. A wildcard policy on an internal service is a related pivot — the victim's browser becomes a proxy into a network the attacker cannot otherwise reach. This skill locates every place cross-origin headers are produced or origins are validated, checks each one in parallel, and merges results into <output_dir>/cors-results.md.

What it is NOT

  • Cross-site request forgery (/websec:csrf): these are opposites and are constantly confused. A permissive sharing policy grants read access; it does not let an attacker forge a state change, and forgery needs no such policy because an HTML form does the job. Test: does the attack depend on reading the response body? Yes is this class; no is /websec:csrf. Never report a permissive policy as a forgery defence gap, and never claim a restrictive one prevents forgery.
  • Information disclosure (/websec:information-disclosure): there the application volunteers data to anyone — a debug page, a backup, a verbose error. Here the data is properly protected by authentication, and the flaw is that a third-party origin is permitted to read it through the victim's session. If the endpoint returns sensitive data with no authentication at all, the header is secondary and the finding belongs there.
  • Broken access control (/websec:access-control): if the server would return another user's data to a direct request, the missing ownership check is the bug; sharing headers only decide who may read a response the server already agreed to produce.
  • Server-side request forgery (/websec:ssrf): a browser-driven pivot into an internal network via a permissive policy is this class; the server itself making an attacker-chosen request is /websec:ssrf.
  • Script injection on an allowlisted origin (/websec:xss): a correct allowlist still creates a trust link, and injection on a trusted origin defeats it. The injection itself belongs to /websec:xss; record here that the allowlist entry inherits that risk.
  • Cross-document messaging origin checks (/websec:dom-based): a message listener that fails to compare event.origin is a client-side taint problem, not a response-header policy.
  • Socket handshake origin checks (/websec:websockets): sharing headers are the browser's read policy on an HTTP response; a socket upgrade is not covered by them, which is why the server must compare Origin itself. Test: is the control an HTTP response header the browser enforces (here), or an origin comparison the server performs at the upgrade (there)?
  • Not a finding: same-origin traffic, which needs no header at all; a wildcard on genuinely public, unauthenticated, non-sensitive data — browsers refuse to expose a credentialed response under a wildcard, so nothing authenticated leaks; origin reflection on an endpoint that returns nothing an unauthenticated caller could not already fetch; a documented allowlist of exact origins the organisation controls; a preflight response that permits methods and headers but whose actual response carries a correctly restricted origin.

Read the full file on GitHub · 169 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 169 lines · 0 tokens per session scan A 1b8e0a414d3f

Subscribe to this mod's changes

cors is a skill published in the GitHub repository emre-guler/websec (2 stars, last pushed 7d ago), licensed MIT. It adds 84 tokens to every session and 5,489 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

ponytail-sec-audit

Full project security audit. Scans the entire codebase across three passes: code that shouldn't exist, all dependencies assessed, all hardening findings. Produces a comprehensive numbered report with blast-radius narrative. Persists findings to .ponytail-sec/ for cross-scan tracking. For per-diff review use…

andypitcher/ponytail-sec · 74 tokens

ponytail-sec

Security companion for active development. Scopes to the current diff or changed files. Three passes: YAGNI code review, new-dep assessment, and up to 3 material hardening findings. Lean by design — surfaces the one thing to fix before merging, not a backlog. Use ponytail-sec-audit for a full project scan.

andypitcher/ponytail-sec · 74 tokens

dockerfile

Binary Dockerfile image-build hardening check. Use when reviewing Dockerfiles, container image builds, multi-stage builds, runtime users, pinned bases, or reproducible dependency installs. Minimal output only: OK or NOTOK: RULE, RULE.

andypitcher/ponytail-sec · 51 tokens

k8s-securitycontext

Binary Kubernetes securityContext hardening check. Use when reviewing Pods, Deployments, StatefulSets, DaemonSets, Jobs, CronJobs, Helm templates, or Kubernetes manifests that define containers. Minimal output only: OK or NOTOK: RULE, RULE.

andypitcher/ponytail-sec · 57 tokens

Mixed-Language Monorepos

This skill should be used when the user is auditing a "polyglot monorepo", "multi-language codebase", "microservices with different languages", "Go + Python + TypeScript", or any codebase with services written in different programming languages. Provides strategies for cross-service security analysis and unified…

allsmog/vuln-scout · 71 tokens

OWASP API Security Top 10

This skill should be used when the user asks about "API security", "OWASP API Top 10", "BOLA", "broken object level authorization", "API authentication", "mass assignment", "GraphQL security", "gRPC security", "rate limiting", "API abuse", "REST API vulnerabilities", or needs to identify API-specific security issues…

allsmog/vuln-scout · 85 tokens