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/drupal-insecure-design)<a href="https://agentmods.dev/rules/ivangrynenko/cursorrules/drupal-insecure-design"><img src="https://agentmods.dev/badge/rules/ivangrynenko/cursorrules/drupal-insecure-design/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/drupal-insecure-design"><img src="https://agentmods.dev/badge/rules/ivangrynenko/cursorrules/drupal-insecure-design.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.01495 | $0.01495 |
| Opus 5.5 | $0.00598 | $0.00598 |
| Sonnet 5.5 | $0.00299 | $0.00299 |
| Haiku 4.5 | $0.00150 | $0.00150 |
Grade A, and why
drupal-insecure-design 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.
How it starts
The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Drupal Insecure Design Security Standards (OWASP A04:2021)
This rule enforces security best practices to prevent insecure design vulnerabilities in Drupal applications, as defined in OWASP Top 10:2021-A04.
Rule Details
-
Name: drupal_insecure_design
-
Description: Detect and prevent insecure design patterns in Drupal as defined in OWASP Top 10:2021-A04
Filters
- file extension pattern:
\\.(php|inc|module|install|theme|info\\.yml)$ - file path pattern:
(modules|themes|profiles)/custom
Enforcement Checks
- Conditions:
- pattern
\\$permissions\\[['\"][^'\"]+['\"]\\]\\s*=\\s*array\\((?![^)]*(administer|manage|edit|delete)[^)]*(content|configuration|users)).*?\\);– Permissions should follow Drupal naming patterns (verb + object) and be specific. Avoid overly broad permissions.- Pattern 1: Insecure permission design
- pattern
if\\s*\\([^\\)]*===?\\s*['\"][a-zA-Z0-9_]+['\"]\\s*\\)– Consider moving business logic rules to configuration to allow for proper adjustment without code changes.- Pattern 2: Hard-coded business logic values
- pattern
preg_replace|str_replace|strip_tags– Avoid ad hoc sanitization. Use Drupal's built-in sanitization tools: t(), Xss::filter(), etc.- Pattern 3: Ad hoc input sanitization
- pattern
class\\s+[a-zA-Z0-9_]+Controller.+\\{[^}]*->query\\(– Follow separation of concerns. Move database logic to services or repositories, not in controllers.- Pattern 4: Database logic in controllers
- pattern
function\\s+[a-zA-Z0-9_]+_entity_access\\([^)]*\\)\\s*\\{[^}]*return\\s+AccessResult::allowed\\(\\);– Avoid unconditional access grants. Implement proper conditional checks based on roles, permissions, or entity ownership.- Pattern 5: Weak entity access policy
- pattern
session_start|session_set_cookie_params– Avoid custom session management. Use Drupal's session handling system and services.- Pattern 6: Custom session management
- pattern
(?:\\\\Drupal::[a-zA-Z_]+\\(\\).*){3,}– Excessive static service calls indicate poor dependency injection. Use proper service injection.- Pattern 7: Excessive global state dependency
- pattern
password_verify\\(|password_hash\\(– Avoid custom authentication. Use Drupal's built-in authentication system and services.- Pattern 8: Custom user authentication
- pattern
function\\s+[a-zA-Z0-9_]+_schema\\(\\)[^{]*\\{[^}]*return\\s+\\$schema;(?![^}]*validate_utf8|[^}]*'not null')– Database schemas should enforce data integrity with proper constraints (NOT NULL, length, etc.).- Pattern 9: Missing schema definitions
- pattern
\\$config\\[['\"](mdc:?!secure_|security_|private_)[^'\"]+['\"]\\]\\s*=\\s*(?:FALSE|0|'0'|\"0\");– Security-related configuration should default to secure settings (opt-in for potentially insecure features).- Pattern 10: Insecure defaults
- pattern
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 · 103 lines · 1,495 tokens per session scan A 173c39cf13aa
drupal-insecure-design is a cursor rule published in the GitHub repository ivangrynenko/cursorrules (88 stars, last pushed 11mo ago), licensed MIT. It adds 1,495 tokens to every session, about $0.0060 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.
java
Modern Java: records, sealed classes, streams, virtual threads.
javascript
Modern JavaScript: ES2023+, async patterns, common traps.
accessibility
Accessibility: semantic HTML, ARIA, keyboard navigation, testing.
supabase
Supabase: RLS, edge functions, realtime.
claude-md
CLAUDE.md: structuring project context for Claude Code.