open-redirect

open-redirect is a skill for Claude Code, Codex from emre-guler/websec. It costs 94 tokens per session (7,111 once invoked), scanned A, original, MIT.

A security review for open redirects, where a trusted website sends a visitor to a destination controlled by a request parameter.

In plain words
What is it for?
Reviewing login returns, post-action redirects, Location headers, meta refreshes, and navigation URLs built from user input.
Why use it?
It helps find links that attackers could use for convincing phishing or to carry sensitive codes and tokens to another site.

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/open-redirect
Any agent
npx skills add emre-guler/websec --skill open-redirect
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 open-redirect

README.md
[![agentmods](https://agentmods.dev/badge/skills/emre-guler/websec/open-redirect.svg)](https://agentmods.dev/skills/emre-guler/websec/open-redirect)
Your own site
<a href="https://agentmods.dev/skills/emre-guler/websec/open-redirect"><img src="https://agentmods.dev/badge/skills/emre-guler/websec/open-redirect.svg" alt="Measured on agentmods" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,111 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.00094 $0.07111
Opus 5 $0.00047 $0.03556
Sonnet 5 $0.00019 $0.01422
Haiku 4.5 $0.00009 $0.00711

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

Security

Grade A, and why

open-redirect 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 4d 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/open-redirect/SKILL.md · 193 lines

How it starts

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

Open Redirect Detection

Overview

An open redirect exists when the destination of a server-issued navigation is influenced by the incoming request and is not constrained to the application's own origin. The application answers with a 3xx and a Location header (or a meta refresh, or a server-rendered script assignment) pointing wherever the request asked it to point. The attacker is remote and unauthenticated: they craft a link on the real domain, with the real certificate, and let the victim's own browser carry them to attacker-controlled ground. The gain is rarely the navigation itself — it is what rides along. A redirect on a trusted domain is a phishing primitive that survives link filters and user inspection, and an exfiltration channel for anything the redirecting URL carries (an authorization code, an access token, a session identifier, a reset nonce) — in the forwarded query string, or in the Referer the browser attaches to the attacker's page. This skill finds such redirects by locating every site where a redirect destination is assembled from request data, verifying each one in parallel, and merging the results into <output_dir>/open-redirect-results.md.

What it is NOT

  • Client-side navigation from a client-side source (/websec:dom-based): script reads location.search, location.hash, document.referrer, window.name, or an inbound message and assigns it to location, location.href, location.assign(), location.replace(), or window.open(). Test: does the server emit the destination (in a Location header, a rendered <meta http-equiv="refresh">, or a value the server interpolated into the page), or does script read it from the URL and assign it without the server ever seeing it? Server emits → here. Script reads and assigns → sibling. A fragment-only source never reaches the server, so it is always the sibling's.
  • Server-side request forgery (/websec:ssrf): the server itself dereferences the supplied URL. Test: who makes the request to the attacker's destination — the victim's browser (this skill) or the application's own HTTP client (sibling)? A next value fetched server-side to render a preview is SSRF; the same value returned as a Location is this class.
  • Host-header driven URLs (/websec:host-header): the destination's host comes from Host, X-Forwarded-Host, X-Forwarded-Proto, or a similar incoming header rather than from a parameter, body field, or stored return target. Test: which request element supplies the host — a header (sibling) or a value the application treats as an application-level parameter (here)? Absolute URLs built from req.hostname or $_SERVER['HTTP_HOST'] belong to the sibling even when the path comes from a parameter.
  • Authorization-server redirect URI validation (/websec:oauth): a redirect_uri matched by a provider against a set registered for a client. Test: is the check the provider's redirect_uri matching against registered values, or the application's own return-URL handling on an ordinary route? A loose match on the provider is the sibling's finding; an ordinary open redirect that happens to sit on a host registered as a callback is this skill's finding, with the token-theft consequence recorded in Impact.
  • Script execution in the victim's origin (/websec:xss): a javascript: or data: destination that the browser executes rather than navigates to. Test: does the payload execute script in the application's origin, or does it only move the browser elsewhere? Report the missing scheme restriction here, note the escalation in Impact, and hand the execution finding to the sibling under "Also observed".
  • Cross-site request to a state-changing endpoint (/websec:csrf): arriving at an endpoint cross-site and having it act is that class. Being bounced to an attacker's site after the endpoint runs is this one. The two chain — a state-changing GET with a next parameter is often both — but each is judged by its own owner.
  • Not a finding: a destination selected from a fixed map or enum where the request only supplies a key; a value that, after normalisation, is a relative path with no scheme, no authority, and no protocol-relative or backslash-authority form; a redirect to a constant or to a route generated from a fixed route name; an outbound-link interstitial that is intentionally public, carries no credential, token, or Referer from an authenticated page, and does not claim to validate its target.

Read the full file on GitHub · 193 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. 4d ago First seen · 193 lines · 94 tokens per session scan A 158db5088ed4

Subscribe to this mod's changes

open-redirect is a skill published in the GitHub repository emre-guler/websec (2 stars, last pushed 7d ago), licensed MIT. It adds 94 tokens to every session and 7,111 once invoked, about $0.0005 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