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/ivangrynenko/cursorrulesWrote 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/ivangrynenko/cursorrules/javascript-broken-access-control)<a href="https://agentmods.dev/rules/ivangrynenko/cursorrules/javascript-broken-access-control"><img src="https://agentmods.dev/badge/rules/ivangrynenko/cursorrules/javascript-broken-access-control/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.
<a href="https://agentmods.dev/rules/ivangrynenko/cursorrules/javascript-broken-access-control"><img src="https://agentmods.dev/badge/rules/ivangrynenko/cursorrules/javascript-broken-access-control.svg" alt="Reviewed on agentmods" width="80" 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.04163 | $0.04163 |
| Opus 5.5 | $0.01665 | $0.01665 |
| Sonnet 5.5 | $0.00833 | $0.00833 |
| Haiku 4.5 | $0.00416 | $0.00416 |
Grade A, and why
javascript-broken-access-control 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 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.
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.
Copies of this mod
1 near-identical copy found in the catalogue:
- javascript-broken-access-control — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 401 lines — stays where its author put it; the contents beside it link to each section on GitHub.
JavaScript Broken Access Control (OWASP A01:2021)
This rule identifies and prevents broken access control vulnerabilities in JavaScript applications, focusing on both browser and Node.js environments, as defined in OWASP Top 10:2021-A01.
actions:
-
type: enforce conditions:
Pattern 1: Detect Direct Reference to User-Supplied IDs (IDOR vulnerability)
- pattern: "(?:req|request)\.(?:params|query|body)\.(?:id|userId|recordId)[^\n]*?(?:findById|getById|find\(|get\()" message: "Potential Insecure Direct Object Reference (IDOR) vulnerability. User-supplied IDs should be validated against user permissions before database access."
Pattern 2: Detect Missing Authorization Checks in Route Handlers
- pattern: "(?:app|router)\.(?:get|post|put|delete|patch)\(['"][^'"]+['"],\s*(?:async)?\s*\(?(?:req|request),\s*(?:res|response)(?:,[^\)]+)?\)?\s*=>\s*\{[^\}]*?\}\)" negative_pattern: "(?:isAuthenticated|isAuthorized|checkPermission|verifyAccess|auth\.check|authenticate|authorize|userHasAccess|checkAuth|permissions\.|requireAuth|requiresAuth|ensureAuth|\bauth\b|\broles?\b|\bpermission\b|\baccess\b)" message: "Route handler appears to be missing authorization checks. Implement proper access control to verify user permissions before processing requests."
Pattern 3: Detect JWT Token Validation Issues
- pattern: "(?:jwt|jsonwebtoken)\.verify\((?:[^,]+),\s*'"['"]" message: "Hardcoded JWT secret detected. Store JWT secrets securely in environment variables or a configuration manager."
Pattern 4: Detect Client-Side Authorization Checks
- pattern: "if\s*\((?:user|currentUser)\.(?:role|isAdmin|hasPermission|can[A-Z][a-zA-Z]+|is[A-Z][a-zA-Z]+)\)\s*\{[^\}]?(?:fetch|axios|\$\.ajax|http\.get|http\.post)\([^\)]?\)" message: "Authorization logic implemented on client-side. Client-side authorization checks can be bypassed. Always enforce authorization on the server."
Pattern 5: Detect Improper CORS Configuration
- pattern: "(?:app\.use\(cors\(\{[^\}]?origin:\s['"]\['"])|Access-Control-Allow-Origin:\s['"]\*['"]" message: "Wildcard CORS policy detected. This allows any domain to make cross-origin requests. Restrict CORS to specific trusted domains."
Pattern 6: Detect Lack of Role Checks in Admin Functions
- pattern: "(?:function|const)\s+(?:admin|updateUser|deleteUser|createUser|updateRole|manageUsers|setPermission)[^\{]?\{[^\}]?\}" negative_pattern: "(?:role|permission|isAdmin|hasAccess|authorize|authenticate|auth\.check|checkPermission|checkRole|verifyRole|ensureAdmin|adminOnly|adminRequired|requirePermission)" message: "Administrative function appears to be missing role or permission checks. Implement proper authorization checks to restrict access to administrative functions."
Pattern 7: Detect Missing Login Rate Limiting
- pattern: "(?:function|const)\s+(?:login|signin|authenticate|auth)[^\{]?\{[^\}]?(?:compare(?:Sync)?|check(?:Password)?|match(?:Password)?|verify(?:Password)?)[^\}]*?\}" negative_pattern: "(?:rate(?:Limit)?|throttle|limit|delay|cooldown|attempt|counter|maxTries|maxAttempts|lockout|timeout)" message: "Login function appears to be missing rate limiting. Implement rate limiting to prevent brute force attacks."
Pattern 8: Detect Horizontal Privilege Escalation Vulnerability
- pattern: "(?:findById|findOne|findByPk|get)\((?:req|request)\.(?:params|query|body)\.(?:id|userId|accountId)\)" negative_pattern: "(?:!=|!==|===|==)\s*(?:req\.user\.id|req\.userId|currentUser\.id|user\.id|session\.userId)" message: "Potential horizontal privilege escalation vulnerability. Ensure the requested resource belongs to the authenticated user."
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.
- 1mo ago First seen · 401 lines · 4,163 tokens per session scan A 13b61a2e2d5b
javascript-broken-access-control is a cursor rule published in the GitHub repository ivangrynenko/cursorrules (88 stars, last pushed 11mo ago), licensed MIT. It adds 4,163 tokens to every session, about $0.0167 per session on Opus 5.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
refactoring
Refactoring: systematic approach, extract/inline, guard clauses, early returns.
cross-tool-config
Cross-tool AI config: what transfers between Cursor, Claude Code, Copilot, Windsurf, Gemini, and Codex.
angular
Angular: signals, standalone components, RxJS patterns.
django
Django: models, views, ORM best practices.
fastapi
FastAPI: Pydantic v2, dependency injection, async.
tailwind-css
Tailwind CSS: utility patterns, design tokens, component extraction.