

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
123456# Drupal Security Misconfiguration Standards (OWASP A05:2021)78This rule enforces security best practices to prevent misconfiguration vulnerabilities in Drupal applications, as defined in OWASP Top 10:2021-A05.910## Rule Details1112- **Name:** drupal_security_misconfiguration1314- **Description:** Detect and prevent security misconfigurations in Drupal as defined in OWASP Top 10:2021-A051516## Filters17- file extension pattern: `\\.(php|inc|module|install|theme|yml|info\\.yml)$`18- file path pattern: `.*`1920## Enforcement Checks21- Conditions:22 - pattern `\\$settings\\['update_free_access'\\]\\s*=\\s*TRUE|\\$settings\\['cache'\\]\\s*=\\s*FALSE|\\$settings\\['rebuild_access'\\]\\s*=\\s*TRUE|\\$config\\['system\\.performance'\\]\\['cache'\\]\\s*=\\s*FALSE` – Development settings detected in production code. Ensure these settings are only enabled in development environments.23 - Pattern 1: Development settings in production code24 - pattern `settings\\.php|settings\\.local\\.php` – Verify that $settings['trusted_host_patterns'] is properly configured to prevent HTTP Host header attacks.25 - Pattern 2: Missing or weak trusted host patterns26 - pattern `\\$config\\['system\\.logging'\\]\\['error_level'\\]\\s*=\\s*'verbose'|ini_set\\('display_errors'\\s*,\\s*'1'\\)|error_reporting\\(E_ALL\\)` – Error display should be disabled in production. Use 'hide' for error_level in production.27 - Pattern 3: Debugging/error display enabled28 - pattern `\\$settings\\['file_chmod_directory'\\]\\s*=\\s*0777|\\$settings\\['file_chmod_file'\\]\\s*=\\s*0666` – Excessively permissive file permissions detected. Use more restrictive permissions.29 - Pattern 4: Insecure file permissions settings30 - pattern `\\.htaccess|sites/default/default\\.settings\\.php` – Ensure Content-Security-Policy headers are properly configured to prevent XSS attacks.31 - Pattern 5: Disabled or misconfigured CSP headers32 - pattern `session\\.cookie_secure\\s*=\\s*0|session\\.cookie_httponly\\s*=\\s*0|\\$settings\\['cookie_secure_only'\\]\\s*=\\s*FALSE` – Session cookies should be secure and HTTP-only in production environments.33 - Pattern 6: Insecure session cookie settings34 - pattern `settings\\.php` – Ensure $settings['file_private_path'] is properly configured for storing sensitive files.35 - Pattern 7: Missing or misconfigured private file path36 - pattern `core\\.extension\\.yml` – Check for development modules (devel, webprofiler, etc.) that should not be enabled in production.37 - Pattern 8: Development modules enabled in production38 - pattern `function\\s+[a-zA-Z0-9_]+_install\\(\\)` – Remove or secure default/demo content and users in production environments.39 - Pattern 9: Default or demo content in production40 - pattern `\\.htaccess|nginx\\.conf` – Verify X-Frame-Options, X-Content-Type-Options, X-XSS-Protection, and Referrer-Policy headers are properly configured.41 - Pattern 10: Missing or misconfigured security headers4243## Suggestions44- Guidance:45**Drupal Security Configuration Best Practices:**46471. **Environment-Specific Configurations:**48 - Use `settings.local.php` for environment-specific settings49 - Maintain separate development, staging, and production configurations50 - Never enable development settings in production: update_free_access, rebuild_access, etc.51 - Use environment variables or secrets management for sensitive information52532. **Essential Security Settings:**54 - Configure trusted_host_patterns to prevent HTTP Host header attacks55 - Set secure file permissions (e.g., 0755 for directories, 0644 for files)56 - Configure private file path for sensitive uploads57 - Set file_scan_ignore_directories to prevent public access to sensitive directories58 - Implement secure session cookie settings (HTTPOnly, Secure, SameSite)59603. **Error Handling:**61 - Disable verbose error reporting in production with $config['system.logging']['error_level'] = 'hide'62 - Configure custom error pages that don't leak system information63 - Implement appropriate logging without exposing sensitive data64654. **Security Headers:**66 - Set Content-Security-Policy to restrict resource origins67 - Configure X-Frame-Options to prevent clickjacking68 - Enable X-Content-Type-Options to prevent MIME-type sniffing69 - Set Referrer-Policy to control information in HTTP referers70715. **Module & Extension Security:**72 - Disable and uninstall unnecessary modules in production73 - Keep core and contributed modules updated74 - Remove development modules from production (devel, webprofiler, etc.)75 - Implement proper configuration management workflows7677## Validation Checks78- Conditions:79 - pattern `\\$settings\\['trusted_host_patterns'\\]\\s*=\\s*\\[\\s*['\"][^\"']+['\"]` – Trusted host patterns are properly configured.80 - Check 1: Proper trusted host patterns81 - pattern `\\$settings\\['cookie_secure_only'\\]\\s*=\\s*TRUE|session\\.cookie_secure\\s*=\\s*1` – Secure cookie settings are properly configured.82 - Check 2: Secure session cookie settings83 - pattern `\\$settings\\['file_private_path'\\]\\s*=\\s*(\"|')[^\"']+(\"|')` – Private file path is configured for sensitive files.84 - Check 3: Private file path configuration85 - pattern `\\$config\\['system\\.logging'\\]\\['error_level'\\]\\s*=\\s*'hide'` – Error reporting is properly configured for production.86 - Check 4: Production error settings8788## Metadata89- Priority: high90- Version: 1.191- Tags: security, drupal, configuration, misconfiguration, owasp, language:php, framework:drupal, category:security, subcategory:configuration, standard:owasp-top10, risk:a05-misconfiguration92## References93- https://owasp.org/Top10/A05_2021-Security_Misconfiguration/94- https://www.drupal.org/docs/security-in-drupal/securing-your-site95- https://www.drupal.org/docs/security-in-drupal/drupal-security-best-practices96- https://www.drupal.org/docs/8/security/writing-secure-code-for-drupal-89798
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| ivangrynenko/cursorrules.cursor/rules/behat-steps.mdc · 87 | Cursor rules | lint-formatstyleperformanceagent-behaviour | 42/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/confluence-editing-standards.mdc · 87 | Cursor rules | stylearchsecuritydeployment | 60/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/cursor-rules.mdc · 87 | Cursor rules | teststylearchgit+2 | 77/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/debugging-standards.mdc · 87 | Cursor rules | no sections | 30/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-authentication-failures.mdc · 87 | Cursor rules | security | 48/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-broken-access-control.mdc · 87 | Cursor rules | stylesecurity | 52/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-cryptographic-failures.mdc · 87 | Cursor rules | security | 48/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-database-standards.mdc · 87 | Cursor rules | database | 30/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-file-permissions.mdc · 87 | Cursor rules | stylearchsecurity | 62/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-injection.mdc · 87 | Cursor rules | securitydo-not | 55/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-insecure-design.mdc · 87 | Cursor rules | security | 48/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-integrity-failures.mdc · 87 | Cursor rules | style | 60/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-logging-failures.mdc · 87 | Cursor rules | security | 48/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-ssrf.mdc · 87 | Cursor rules | style | 52/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-vulnerable-components.mdc · 87 | Cursor rules | stylesecurity | 67/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/git-commit-standards.mdc · 87 | Cursor rules | git | 44/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/github-actions-standards.mdc · 87 | Cursor rules | no sections | 44/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/improve-cursorrules-efficiency.mdc · 87 | Cursor rules | no sections | 34/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/javascript-broken-access-control.mdc · 87 | Cursor rules | securitydo-not | 39/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/javascript-cryptographic-failures.mdc · 87 | Cursor rules | security | 40/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| bybren-llc/safe-agentic-workflow.cursor/rules/10-backend-python.mdc · 399 | Cursor rules | testlint-formatstylegit+4 | 97/100 | today | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 46 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 14 days ago | |
| skillrecordings/egghead-next.cursor/rules/project-update-user-rules.mdc · 1.4k | Cursor rules | buildtestlint-formatstyle+7 | 96/100 | 14 days ago | |
| skillrecordings/egghead-next.cursor/rules/project-update-rules.mdc · 1.4k | Cursor rules | buildtestlint-formatstyle+7 | 96/100 | 14 days ago | |
| skillrecordings/egghead-next.cursor/rules/gh-task-plan.mdc · 1.4k | Cursor rules | teststylearchtypes+2 | 96/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/ivangrynenko-cursorrules-cursor-rules-drupal-security-misconfiguration)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.