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-injection)<a href="https://agentmods.dev/rules/ivangrynenko/cursorrules/drupal-injection"><img src="https://agentmods.dev/badge/rules/ivangrynenko/cursorrules/drupal-injection/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-injection"><img src="https://agentmods.dev/badge/rules/ivangrynenko/cursorrules/drupal-injection.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.01482 | $0.01482 |
| Opus 5.5 | $0.00593 | $0.00593 |
| Sonnet 5.5 | $0.00296 | $0.00296 |
| Haiku 4.5 | $0.00148 | $0.00148 |
Grade A, and why
drupal-injection 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:
- drupal-injection — 89% identical, 206 lines differ
How it starts
The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Drupal Injection Security Standards (OWASP A03:2021)
This rule enforces security best practices to prevent injection vulnerabilities in Drupal applications, as defined in OWASP Top 10:2021-A03.
Rule Details
-
Name: drupal_injection
-
Description: Detect and prevent injection vulnerabilities in Drupal as defined in OWASP Top 10:2021-A03
Filters
- file extension pattern:
\\.(php|inc|module|install|theme)$ - file path pattern:
(modules|themes|profiles|core)/.*
Enforcement Checks
- Conditions:
- pattern
db_query\\(['\"][^'\"]*\\$[^'\"]*['\"]– Direct variables in SQL queries are vulnerable to SQL injection. Use parameterized queries with placeholders.- Pattern 1: Raw SQL queries without placeholders
- pattern
->query\\(['\"][^'\"]*\\$[^'\"]*['\"]– Use parameterized queries with placeholders to prevent SQL injection: ->query($sql, [$param1, $param2]).- Pattern 2: Modern DB API without placeholders
- pattern
<?=|<?php\\s+echo\\s+(?!(t|\\\\t|\\$this->t))[^;]*;– Direct output may lead to XSS. Use t(), escaped variables with Html::escape(), or Twig templates.- Pattern 3: Unescaped output
- pattern
[\"']#markup[\"']\\s*=>\\s*(?!t\\(|\\\\t\\(|Xss::filterAdmin|Html::escape)\\$– Never use unfiltered variables in #markup. Use t(), Xss::filterAdmin(), or Html::escape().- Pattern 4: Unfiltered user input in render arrays
- pattern
->addJsSettings\\(\\[(?![^\\]]*(Xss::filter|Json::encode))\\$– Filter variables before adding to JavaScript settings using Xss::filter() or properly encode with Json::encode().- Pattern 5: Unescaped variables in JavaScript settings
- pattern `exec\(|shell_exec\(|system\(|passthru\(|proc_open\(|popen\(|`` – Command execution functions can lead to command injection. Use Symfony\Component\Process\Process if necessary.
- Pattern 6: Direct command execution
- pattern
->redirect\\(\\s*\\$(?!(this->|allowed_destinations|config))– Unvalidated redirects can lead to open redirect vulnerabilities. Whitelist allowed destinations.- Pattern 7: Unvalidated redirect
- pattern
->condition\\([^,]*,\\s*\\$(?!(this->|config|entity|storage))[^,]*,– Use proper input validation before using variables in database conditions to prevent SQL injection.- Pattern 8: Raw user input in conditions
- pattern
(?<!buildForm|getFormId)\\s*function\\s+[a-zA-Z0-9_]+Form\\s*\\([^{]*\\{[^}]*return\\s+\\$form;(?![^}]*FormBuilderInterface|[^}]*::TOKEN|[^}]*#token)– Form submissions must include CSRF protection with $form['#token'].- Pattern 9: Missing CSRF protection in forms
- pattern
file_get_contents\\(\\s*\\$(?!(this->|allowed_paths|config))– Validate file paths before operations to prevent path traversal attacks.- Pattern 10: Unvalidated file operations
- 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 · 97 lines · 1,482 tokens per session scan A 2366d3a9a2a4
drupal-injection is a cursor rule published in the GitHub repository ivangrynenko/cursorrules (88 stars, last pushed 11mo ago), licensed MIT. It adds 1,482 tokens to every session, about $0.0059 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.