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.
npx agentmods add rules/adobe/aem-desktop/security-global-dangerous-flowsgit clone --depth 1 https://github.com/adobe/aem-desktopWhat 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 | $0.00015 | $0.01892 |
| Opus 5 | $0.00008 | $0.00946 |
| Sonnet 5 | $0.00003 | $0.00378 |
| Haiku 4.5 | $0.00002 | $0.00189 |
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 2d 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. 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.
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
- 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
-
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.
- Look for where routes or API endpoints are defined (e.g., Express
-
CLI/Native Applications
- Look for
process.argv,getopt, or directstdinusage. - Watch for file input,
envvariables, user config, or interactive prompts.
- Look for
-
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
-
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
-
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.
- 2d ago First seen · 257 lines · 15 tokens per session scan B c1d5ef612881
security-global-dangerous-flows is a cursor rule published in the GitHub repository adobe/aem-desktop (2 stars, last pushed 7d 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.
Other cursor rules, from other repositories
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-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.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.