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.
npx agentmods add skills/emre-guler/websec/corsnpx skills add emre-guler/websec --skill corsgit clone --depth 1 https://github.com/emre-guler/websecWrote 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.
[](https://agentmods.dev/skills/emre-guler/websec/cors)<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>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.
| Model | Per session | Once 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 |
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.
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): amessagelistener that fails to compareevent.originis 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 compareOriginitself. 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.
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.
- 3d ago First seen · 169 lines · 0 tokens per session scan A 1b8e0a414d3f
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.
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…
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.
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.
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.
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…
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…