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/abderrahimghazali/cursor-rules/drupal-integrity-failuresgit clone --depth 1 https://github.com/abderrahimghazali/cursor-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.00000 | $0.01506 |
| Opus 5 | $0.00000 | $0.00753 |
| Sonnet 5 | $0.00000 | $0.00301 |
| Haiku 4.5 | $0.00000 | $0.00151 |
Grade A, and why
drupal-integrity-failures 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 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.
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.
This is a copy
91% identical to drupal-integrity-failures — 216 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 — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Drupal Software and Data Integrity Failures Standards (OWASP A08:2021)
This rule enforces security best practices to prevent software and data integrity failures in Drupal applications, as defined in OWASP Top 10:2021-A08.
actions:
-
type: enforce conditions:
Pattern 1: Insecure deserialization
- pattern: "unserialize\(\$|unserialize\([^,]+\$|php_unserialize\(\$" message: "Insecure PHP deserialization detected. Use safer alternatives like JSON for data interchange or implement proper validation before deserialization."
Pattern 2: Unsafe use of eval or similar functions
- pattern: "eval\(|assert\(|create_function\(" message: "Potentially dangerous code execution function detected. Avoid dynamic code execution whenever possible."
Pattern 3: Insecure plugin/module loading
- pattern: "module_load_include\(\$|require(_once)?\s*\(\s*\$|include(_once)?\s*\(\s*\$" message: "Dynamic inclusion of files based on user input is dangerous. Use validated, allowlisted paths only."
Pattern 4: Missing update verification
- pattern: "update\.settings\.yml|function [a-zA-Z0-9_]+update[0-9]+\(\)" message: "Ensure update hooks validate the integrity of updates and data transformations to prevent unauthorized modifications."
Pattern 5: Unsafe configuration imports
- pattern: "ConfigImporter|\$config_importer|config_import|cmci" message: "Validate configuration before import to ensure integrity and detect potentially malicious changes."
Pattern 6: Unchecked remote data
- pattern: "drupal_http_request\(|\\Drupal::httpClient\(\)->get\(|curl_exec\(" message: "Always validate data from remote sources before processing or storing it. Implement integrity checks for remote content."
Pattern 7: Insecure Composer usage
- pattern: "composer\.json" message: "Verify you're using secure Composer practices: validate package signatures, pin dependencies, and use composer.lock."
Pattern 8: Direct database modifications
- pattern: "INSERT\s+INTO|UPDATE\s+[a-zA-Z0-9_]+\s+SET|db_update\(|->update\(|->insert\(" message: "Direct database modifications should implement validation to preserve data integrity. Prefer using entity API."
Pattern 9: Missing file integrity verification
- pattern: "file_save_data\(|file_save_upload\(|file_copy\(|file_move\(" message: "Implement file integrity checking for uploaded or manipulated files to prevent malicious content."
Pattern 10: Unsafe entity creation
- pattern: "\$entity\s*=\s*new\s+[A-Za-z]+\(|::create\(\$" message: "Validate all input used to create entity objects to maintain data integrity and prevent creating malicious entities."
-
type: suggest message: | Drupal Data & Software Integrity Best Practices:
-
Secure Deserialization:
- Avoid PHP's unserialize() with untrusted data entirely
- Use JSON or other structured formats for data interchange
- When deserialization is necessary, implement allowlists and validation
- Consider using Drupal's typed data API for structured data handling
- Avoid serializing sensitive data that could be tampered with
-
Update & Configuration Integrity:
- Validate data before and after migrations/updates
- Implement checksums/hashing for critical configuration
- Use Drupal's Configuration Management system properly
- Monitor configuration changes for unauthorized modifications
- Implement proper workflow for configuration management
-
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 · 139 lines · 1,506 tokens per session scan A eb8fc578e69c
drupal-integrity-failures is a cursor rule published in the GitHub repository abderrahimghazali/cursor-rules (2 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,506 tokens. A static security scan graded it A with 0 findings. It is 91% identical to drupal-integrity-failures, differing in 216 lines, and is treated as a copy.
Other cursor rules, from other repositories
creating-cursor-rules
Meta-rule for creating effective Cursor IDE rules with best practices, patterns, and examples.
creating-skills
Meta-guide for creating effective Claude Code skills with proper structure, CSO optimization, and real examples.
cursorrules
You are a disciplined senior engineer working with someone who may be a domain expert, not a programmer. Build it correctly and safely, not just fast.
cursorrules
Cursor rule "cursorrules" from BlueBirdBack/godot-cursorrules, covering godot 4.4 game development .cursorrules, core development guidelines, code style, naming conventions and scene organization.
new_feature
You are an expert Product Owner and Technical Lead focused on helping users define and plan new features through collaborative discovery and structured documentation.
new_project
You are an expert Product Owner focused on helping users define new software projects through collaborative vision creation.