security-global-dangerous-flows

security-global-dangerous-flows is a cursor rule for Cursor from AdobeDocs/ff-services-docs. It costs 15 tokens per session (1,892 once invoked), scanned B, a copy of dangerous-flows, Apache-2.0.

Security guidance for tracing untrusted input through an application to find dangerous behavior, such as unauthorized file access or command injection. It is intended for testing existing logic and insecure flows.

In plain words
What is it for?
Use it to review web routes, APIs, file access, commands, network requests, and other code paths that process user input.
Why use it?
It helps reveal where user-controlled data can cause vulnerabilities, unexpected system interactions, or broken access controls before those paths are abused.

Cursor rule for Cursor

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 rules/adobedocs/ff-services-docs/security-global-dangerous-flows
Clone the repo
git clone --depth 1 https://github.com/AdobeDocs/ff-services-docs

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 security-global-dangerous-flows

README.md
[![agentmods](https://agentmods.dev/badge/rules/adobedocs/ff-services-docs/security-global-dangerous-flows.svg)](https://agentmods.dev/rules/adobedocs/ff-services-docs/security-global-dangerous-flows)
Your own site
<a href="https://agentmods.dev/rules/adobedocs/ff-services-docs/security-global-dangerous-flows"><img src="https://agentmods.dev/badge/rules/adobedocs/ff-services-docs/security-global-dangerous-flows.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 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,892 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 3 findings. Scan, not verified.
Origin 98% copy Near-identical to another mod 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.00015 $0.01892
Opus 5 $0.00008 $0.00946
Sonnet 5 $0.00003 $0.00378
Haiku 4.5 $0.00002 $0.00189

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

Security

Grade B, and why

security-global-dangerous-flows scanned grade B with 3 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 3d 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.

Recursive force deletemediumDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

exec(`rm -rf ${userInput}`); // Unvalidated input = command injection

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

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

* `fetch()`, `axios.get()`, `requests.get()`, `urllib`, `http.get()`, etc.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

* `exec`, `spawn`, `system`, `popen`, `ProcessBuilder`, `subprocess.run`, etc.
Origin

This is a copy

98% identical to dangerous-flows — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/rules/security-global/security-global-dangerous-flows.mdc · 257 lines

How it starts

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

Dangerous Flow Identification

A Dangerous Flow occurs when user input—or data derived from it—is used in a way that introduces vulnerabilities, undefined behavior, or unwanted system interactions. This can range from command injection, SSRF, and path traversal to logic bugs and broken access controls. The goal is to trace the lifecycle of untrusted inputs and assess whether their use is safe.


Starting the Session

  1. If the project is very large, you may ask the user for what specific flow he wishes to test or for where more specific area of the code he is interested in.

Example of Dangerous Flow in JavaScript

const express = require('express');
const fs = require('fs');
const app = express();

app.get('/read', (req, res) => {
  const filename = req.query.file; // User input
  fs.readFile(`/home/userdata/${filename}`, (err, data) => {  // Dangerous usage
    if (err) return res.status(500).send("Error reading file");
    res.send(data);
  });
});

Danger: This allows for Path Traversal (e.g., ?file=../../etc/passwd), enabling unauthorized file access.


Identifying User Inputs

  1. Web/Backend Projects

    • Look for where routes or API endpoints are defined (e.g., Express app.get(), Flask @app.route, FastAPI).
    • Search for request/response objects: req, res, request, ctx, etc.
  2. CLI/Native Applications

    • Look for process.argv, getopt, or direct stdin usage.
    • Watch for file input, env variables, user config, or interactive prompts.
  3. Persisted Inputs

    • Even if sanitized once, data stored in a DB, config, or file can be reused unsafely.
    • These create second-order injection risks.

Following the Flow

  1. Start Point Detection

    • Look for parameters from user input:

      • req.body, req.query, input(), prompt(), fs.readFileSync(userInput), etc.
    • Example:

      username = input("Enter username:")  # user input
      

Read the full file on GitHub · 257 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. 3d ago First seen · 257 lines · 15 tokens per session scan B c1d5ef612881

Subscribe to this mod's changes

security-global-dangerous-flows is a cursor rule published in the GitHub repository AdobeDocs/ff-services-docs (4 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 15 tokens to every session and 1,892 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 3 findings (recursive force delete, makes network calls, runs shell commands). It is 98% identical to dangerous-flows, differing in 4 lines, and is treated as a copy.