# Sh kb open redirect

> Sh kb open redirect is an open-source agent skill for security. Guides an agent in hunting open redirect flaws across web frameworks and OAuth flows. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/dmdhrumilmistry/indra/tree/main/plugins/indra/skills/sh-kb-open-redirect
- **Repository:** https://github.com/dmdhrumilmistry/indra
- **GitHub stars:** 44
- **License:** MIT
- **Skill name:** sh-kb-open-redirect
- **Collection:** https://github.com/dmdhrumilmistry/indra
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-12-03

## About

This knowledge base equips an agent to audit code and requests for open or unvalidated redirects, where a user-supplied URL sends visitors to an external site. It lists the sink functions and framework helpers to grep for in Python, JavaScript, Java, PHP, Go, C#, Ruby, Laravel and FastAPI or Nest codebases, along with client-side and header-based redirect patterns.

The workflow is a structured recipe: locate redirect calls, trace the target back to its input source (query, form, cookie, Referer, OAuth state or stored values), then examine any validator for common incomplete fixes such as substring allowlists, mismatched decoding, or unchecked schemes. It also covers OAuth and SAML redirect_uri comparisons, variant hunting across sibling flows, payload ideas for testing, and false-positive filters for framework guards like allowed-host checks.

The skill is a reference document only: it contains no scripts. It refers to a grep-style search with the graft tool and expects the agent to have access to the target source code or live endpoints. Coverage includes detection signals, ATT&CK mapping, CWE-601 and OWASP A01:2021 context, and mitigation guidance.

## When your agent uses it

> Knowledge base for finding open/unvalidated redirects - user-controlled redirect targets that send victims to attacker sites, enabling phishing, token leakage, and OAuth/SSO abuse. Use when hunting open redirects. CWE-601, OWASP A01:2021-Broken Access Control.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/dmdhrumilmistry/indra/tree/HEAD/plugins/indra/skills/sh-kb-open-redirect)
- [License: MIT](https://github.com/dmdhrumilmistry/indra/tree/HEAD/plugins/indra/skills/sh-kb-open-redirect)

## Features

- **Redirect sink catalogue:** Lists dangerous redirect calls and grep patterns across many web frameworks and languages.
- **Input source tracing:** Guides tracing redirect targets back to query, form, cookie, Referer and stored values.
- **Validator bypass checks:** Describes typical incomplete allowlist and normalization flaws to examine in validators.
- **OAuth redirect_uri review:** Covers prefix, wildcard and unchecked redirect_uri and RelayState weaknesses in SSO flows.
- **Variant and chain hunting:** Suggests sibling flows and chains such as OAuth code theft or SSRF bypass to escalate impact.
- **Defender detection signals:** Lists log sources and behaviour ideas for spotting redirect abuse and phishing campaigns.

## Good for

- Audit a Flask or Django app for open redirects in login and logout flows
- Check an OAuth callback for weak redirect_uri validation
- Review a Rails controller for redirect_to calls that accept user input
- Find unsafe Location header construction in a reverse proxy configuration
- Write proof-of-concept payloads to test a redirect parameter

## Install

### Claude Code

This skill ships in the `indra` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add dmdhrumilmistry/indra
/plugin install indra@indra
```

Or copy only this skill to `~/.claude/skills/sh-kb-open-redirect`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/sh-kb-open-redirect &&
cp -R "$tmp/plugins/indra/skills/sh-kb-open-redirect" ~/.claude/skills/sh-kb-open-redirect &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/sh-kb-open-redirect` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/sh-kb-open-redirect` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/sh-kb-open-redirect &&
cp -R "$tmp/plugins/indra/skills/sh-kb-open-redirect" ~/.agents/skills/sh-kb-open-redirect &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/sh-kb-open-redirect` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/sh-kb-open-redirect` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/sh-kb-open-redirect &&
cp -R "$tmp/plugins/indra/skills/sh-kb-open-redirect" ~/.cursor/skills/sh-kb-open-redirect &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/sh-kb-open-redirect` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/dmdhrumilmistry/indra.git --path plugins/indra/skills/sh-kb-open-redirect
```

Or copy the folder to `~/.gemini/skills/sh-kb-open-redirect` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/sh-kb-open-redirect`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/sh-kb-open-redirect &&
cp -R "$tmp/plugins/indra/skills/sh-kb-open-redirect" ~/.copilot/skills/sh-kb-open-redirect &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/sh-kb-open-redirect` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git
```

Then copy `indra/plugins/indra/skills/sh-kb-open-redirect` into your agent's skills folder as `sh-kb-open-redirect`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does Sh kb open redirect change or run any code?

No. It has no scripts and only provides a knowledge base of sinks, checks and payloads for the agent to follow.

### What does the agent need to use Sh kb open redirect?

Access to the code or endpoints under review. The recipe uses a grep-style search with the graft tool and checks the validator logic in the source.

### What vulnerability classes does Sh kb open redirect cover?

Open and unvalidated redirects, mapped to CWE-601 and OWASP A01:2021, including chained impacts such as OAuth token leakage and account takeover.

### Which languages and frameworks are covered?

Python, JavaScript and TypeScript, Java, PHP, Go, C#/ASP.NET, Ruby on Rails, Laravel, FastAPI/Starlette and NestJS, plus proxy rewrite rules.

### How do I install Sh kb open redirect in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/sh-kb-open-redirect to use it in all your projects, or to .claude/skills/sh-kb-open-redirect in one project. Or install the indra plugin, which includes it: /plugin marketplace add dmdhrumilmistry/indra, then /plugin install indra@indra.

### Does Sh kb open redirect run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Sh kb open redirect?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Sh kb open redirect?

The closest alternatives to Sh kb open redirect are Sh kb ssrf, Sh kb access control, Sh kb deserialization, Sh kb csrf and Sh kb sqli.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Sh kb ssrf](https://ai-powered.com/skills/sh-kb-ssrf): Sh kb ssrf is an open-source agent skill for security.
- [Sh kb access control](https://ai-powered.com/skills/sh-kb-access-control): Sh kb access control is an open-source agent skill for security.
- [Sh kb deserialization](https://ai-powered.com/skills/sh-kb-deserialization): Sh kb deserialization is an open-source agent skill for security.
- [Sh kb csrf](https://ai-powered.com/skills/sh-kb-csrf): Sh kb csrf is an open-source agent skill for security.
- [Sh kb sqli](https://ai-powered.com/skills/sh-kb-sqli): Sh kb sqli is an open-source agent skill for security.
- [Sh kb path traversal](https://ai-powered.com/skills/sh-kb-path-traversal): Sh kb path traversal is an open-source agent skill for security.
- [Sh kb xss](https://ai-powered.com/skills/sh-kb-xss): Sh kb xss is an open-source agent skill for security.
- [Sh kb auth](https://ai-powered.com/skills/sh-kb-auth): Sh kb auth is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/sh-kb-open-redirect
