javascript-server-side-request-forgery

javascript-server-side-request-forgery is a cursor rule for Cursor from ivangrynenko/cursorrules. It costs 7,288 tokens per session, scanned A, original, MIT.

A set of JavaScript security rules for detecting server-side request forgery, where an attacker tricks a server into making requests to unintended locations.

In plain words
What is it for?
Use it when reviewing fetch, Axios, Node.js HTTP requests, redirects, and other code that builds URLs from user-provided values.
Why use it?
It highlights network requests and redirects that use untrusted input, which can expose internal services or data.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when reviewing fetch, Axios, Node.js HTTP requests, redirects, and other code that builds URLs from user-provided values.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/ivangrynenko/cursorrules/javascript-server-side-request-forgery
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/ivangrynenko/cursorrules

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 javascript-server-side-request-forgery

README.md
[![agentmods](https://agentmods.dev/badge/rules/ivangrynenko/cursorrules/javascript-server-side-request-forgery/github.svg)](https://agentmods.dev/rules/ivangrynenko/cursorrules/javascript-server-side-request-forgery)
Your own site
<a href="https://agentmods.dev/rules/ivangrynenko/cursorrules/javascript-server-side-request-forgery"><img src="https://agentmods.dev/badge/rules/ivangrynenko/cursorrules/javascript-server-side-request-forgery/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 javascript-server-side-request-forgery

Your own site · 80×15
<a href="https://agentmods.dev/rules/ivangrynenko/cursorrules/javascript-server-side-request-forgery"><img src="https://agentmods.dev/badge/rules/ivangrynenko/cursorrules/javascript-server-side-request-forgery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7,288 This file is loaded in full into every session.
When invoked 7,288 The same file — it is already loaded in full.
Security scan A 1 finding. 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.07288 $0.07288
Opus 5.5 $0.02915 $0.02915
Sonnet 5.5 $0.01458 $0.01458
Haiku 4.5 $0.00729 $0.00729

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

Security

Grade A, and why

javascript-server-side-request-forgery scanned grade A with 1 finding 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 1mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- pattern: "function\\s+[a-zA-Z0-9_]*(?:request|fetch|get|http|curl)\\s*\\([^)]*\\)\\s*\\{[^}]*(?:fetch|axios|http\\.get|http\\.request|https\\.get|https\\.request)"
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.cursor/rules/javascript-server-side-request-forgery.mdc · 851 lines

How it starts

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

JavaScript Server-Side Request Forgery (OWASP A10:2021)

actions:

  • type: enforce conditions:

    Pattern 1: URL from User Input

    • pattern: "(fetch|axios\.get|axios\.post|axios\.put|axios\.delete|axios\.patch|http\.get|http\.request|https\.get|https\.request|\$\.ajax|XMLHttpRequest|got|request|superagent|needle)\s*\([^)]*(?:\$_GET|\$_POST|\$_REQUEST|req\.(?:body|query|params)|request\.(?:body|query|params)|event\.(?:body|queryStringParameters|pathParameters)|params|userInput|data\[" message: "Potential SSRF vulnerability: URL constructed from user input. Implement URL validation, allowlisting, or use a URL parser library to validate and sanitize user-provided URLs."

    Pattern 2: Dynamic URL in HTTP Request

    • pattern: "(fetch|axios|http\.get|http\.request|https\.get|https\.request|\$\.ajax|XMLHttpRequest|got|request|superagent|needle)\s*\(\s*['"]https?:\\/\\/[^'\"]['"`]\s\+\s*" message: "Potential SSRF vulnerability: Dynamic URL in HTTP request. Use URL parsing and validation before making the request."

    Pattern 3: URL Redirection Without Validation

    • pattern: "(res\.redirect|res\.location|window\.location|location\.href|location\.replace|location\.assign|location\.port|history\.pushState|history\.replaceState)\s*\([^)]*(?:req\.(?:query|body|params)|request\.(?:query|body|params)|userInput)" message: "URL redirection without proper validation may lead to SSRF. Implement strict validation for URLs before redirecting."

    Pattern 4: Direct IP Address Usage

    • pattern: "(fetch|axios\.get|axios\.post|axios\.put|axios\.delete|axios\.patch|http\.get|http\.request|https\.get|https\.request)\s*\(\s*['"`]https?:\/\/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}" message: "Direct use of IP addresses in requests may bypass hostname-based restrictions. Consider using allowlisted hostnames instead."

    Pattern 5: Local Network Access

    • pattern: "(fetch|axios\.get|axios\.post|axios\.put|axios\.delete|axios\.patch|http\.get|http\.request|https\.get|https\.request)\s*\(\s*['"`]https?:\/\/(?:localhost|127\.0\.0\.1|0\.0\.0\.0|192\.168\.|10\.|172\.(?:1[6-9]|2[0-9]|3[0-1])\.|::1)" message: "Request to internal network address detected. Restrict access to internal resources to prevent SSRF attacks."

    Pattern 6: File Protocol Usage

    • pattern: "(fetch|axios\.get|axios\.post|axios\.put|axios\.delete|axios\.patch|http\.get|http\.request|https\.get|https\.request)\s*\(\s*['"`]file:\/\/" message: "Use of file:// protocol may lead to local file access. Block or restrict file:// protocol usage."

    Pattern 7: Missing URL Validation

    • pattern: "(fetch|axios\.get|axios\.post|axios\.put|axios\.delete|axios\.patch|http\.get|http\.request|https\.get|https\.request)\s*\([^)]\burl\b[^)]\)" negative_pattern: "(validat|sanitiz|check|parse).*\burl\b|allowlist|whitelist|URL\.(parse|canParse)|new URL\(|isValidURL" message: "HTTP request without URL validation. Implement URL validation before making external requests."

    Pattern 8: HTTP Request in User-Defined Function

    • pattern: "function\s+[a-zA-Z0-9_](?:request|fetch|get|http|curl)\s\([^)]\)\s\{[^}](?:fetch|axios|http\.get|http\.request|https\.get|https\.request)" negative_pattern: "(validat|sanitiz|check|parse).\burl\b|allowlist|whitelist|new URL\(|isValidURL" message: "User-defined HTTP request function without URL validation. Implement proper URL validation and sanitization."

    Pattern 9: Proxy Functionality

    • pattern: "(?:proxy|forward|relay).(?:req\.(?:url|path)|request\.(?:url|path))" negative_pattern: "(validat|sanitiz|check|parse).\burl\b|allowlist|whitelist" message: "Proxy or request forwarding functionality detected. Implement strict URL validation and allowlisting."

Read the full file on GitHub · 851 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. 1mo ago First seen · 851 lines · 7,288 tokens per session scan A b64662fb2333

Subscribe to this mod's changes

javascript-server-side-request-forgery is a cursor rule published in the GitHub repository ivangrynenko/cursorrules (88 stars, last pushed 11mo ago), licensed MIT. It adds 7,288 tokens to every session, about $0.0292 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.