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/matank001/cursor-security-rules/dangerous-flowsgit clone --depth 1 https://github.com/matank001/cursor-security-rulesWhat 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.00014 | $0.01891 |
| Opus 5 | $0.00007 | $0.00945 |
| Sonnet 5 | $0.00003 | $0.00378 |
| Haiku 4.5 | $0.00001 | $0.00189 |
Grade C, and why
dangerous-flows scanned grade C 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 deletehighDestructive 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 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. Copies of this mod
2 near-identical copies found in the catalogue:
- security-global-dangerous-flows — 98% identical, 4 lines differ
- security-global-dangerous-flows — 98% identical, 4 lines differ
How it starts
The opening of the file, as written. The whole thing — 259 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 · 259 lines · 14 tokens per session scan C 59742e1e4894
dangerous-flows is a cursor rule published in the GitHub repository matank001/cursor-security-rules (378 stars, last pushed 1y ago), licensed MIT. It adds 14 tokens to every session and 1,891 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 3 findings (recursive force delete, makes network calls, runs shell commands). 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
ankra-cli
Ankra CLI rules and best practices for managing Kubernetes clusters via the Ankra platform.
go-backend-scalability-cursorrules-prompt-file
Cursor rules for Go development with backend scalability.
cloudflare-email-telegram-cursorrules-prompt-file
Cursor rules for setting up email-to-Telegram forwarding via Cloudflare Email Routing and Workers using the mail2tg CLI.
flutter-riverpod-cursorrules-prompt-file
Cursor rules for Flutter Riverpod.
angular-novo-elements-cursorrules-prompt-file
Cursor rules for Angular development with Novo Elements UI library.
automl-hyperparameter-optimization
AutoML and hyperparameter optimization rules for Python ML projects using Ray Tune, Optuna, PyCaret, and time-series AutoML libraries.