

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
123456# Drupal Software and Data Integrity Failures Standards (OWASP A08:2021)78This rule enforces security best practices to prevent software and data integrity failures in Drupal applications, as defined in OWASP Top 10:2021-A08.910## Rule Details1112- **Name:** drupal_integrity_failures1314- **Description:** Detect and prevent software and data integrity failures in Drupal as defined in OWASP Top 10:2021-A081516## Filters17- file extension pattern: `\\.(php|inc|module|install|theme|yml|json)$`18- file path pattern: `.*`1920## Enforcement Checks21- Conditions:22 - pattern `unserialize\\(\\$|unserialize\\([^,]+\\$|php_unserialize\\(\\$` – Insecure PHP deserialization detected. Use safer alternatives like JSON for data interchange or implement proper validation before deserialization.23 - Pattern 1: Insecure deserialization24 - pattern `eval\\(|assert\\(|create_function\\(` – Potentially dangerous code execution function detected. Avoid dynamic code execution whenever possible.25 - Pattern 2: Unsafe use of eval or similar functions26 - pattern `module_load_include\\(\\$|require(_once)?\\s*\\(\\s*\\$|include(_once)?\\s*\\(\\s*\\$` – Dynamic inclusion of files based on user input is dangerous. Use validated, allowlisted paths only.27 - Pattern 3: Insecure plugin/module loading28 - pattern `update\\.settings\\.yml|function [a-zA-Z0-9_]+_update_[0-9]+\\(\\)` – Ensure update hooks validate the integrity of updates and data transformations to prevent unauthorized modifications.29 - Pattern 4: Missing update verification30 - pattern `ConfigImporter|\\$config_importer|config_import|cmci` – Validate configuration before import to ensure integrity and detect potentially malicious changes.31 - Pattern 5: Unsafe configuration imports32 - pattern `drupal_http_request\\(|\\\\Drupal::httpClient\\(\\)->get\\(|curl_exec\\(` – Always validate data from remote sources before processing or storing it. Implement integrity checks for remote content.33 - Pattern 6: Unchecked remote data34 - pattern `composer\\.json` – Verify you're using secure Composer practices: validate package signatures, pin dependencies, and use composer.lock.35 - Pattern 7: Insecure Composer usage36 - pattern `INSERT\\s+INTO|UPDATE\\s+[a-zA-Z0-9_]+\\s+SET|db_update\\(|->update\\(|->insert\\(` – Direct database modifications should implement validation to preserve data integrity. Prefer using entity API.37 - Pattern 8: Direct database modifications38 - pattern `file_save_data\\(|file_save_upload\\(|file_copy\\(|file_move\\(` – Implement file integrity checking for uploaded or manipulated files to prevent malicious content.39 - Pattern 9: Missing file integrity verification40 - pattern `\\$entity\\s*=\\s*new\\s+[A-Za-z]+\\(|::create\\(\\$` – Validate all input used to create entity objects to maintain data integrity and prevent creating malicious entities.41 - Pattern 10: Unsafe entity creation4243## Suggestions44- Guidance:45**Drupal Data & Software Integrity Best Practices:**46471. **Secure Deserialization:**48 - Avoid PHP's unserialize() with untrusted data entirely49 - Use JSON or other structured formats for data interchange50 - When deserialization is necessary, implement allowlists and validation51 - Consider using Drupal's typed data API for structured data handling52 - Avoid serializing sensitive data that could be tampered with53542. **Update & Configuration Integrity:**55 - Validate data before and after migrations/updates56 - Implement checksums/hashing for critical configuration57 - Use Drupal's Configuration Management system properly58 - Monitor configuration changes for unauthorized modifications59 - Implement proper workflow for configuration management60613. **Dependency & Plugin Security:**62 - Verify the integrity of downloaded modules and themes63 - Use Composer with package signature verification64 - Pin dependencies to specific versions in production65 - Maintain awareness of security advisories66 - Implement proper validation for plugin/module loading67684. **CI/CD Pipeline Security:**69 - Sign build artifacts70 - Verify signatures during deployment71 - Implement proper secrets management72 - Control access to build and deployment systems73 - Validate code changes through code reviews74755. **Data Integrity Validation:**76 - Use database constraints to enforce data integrity77 - Implement validation at every layer of the application78 - Add integrity checks for critical data flows79 - Maintain audit logs for data modifications80 - Regularly verify data consistency8182## Validation Checks83- Conditions:84 - pattern `json_encode|json_decode|\\\\Drupal::service\\('serialization\\.|->toArray\\(\\)` – Using safer serialization alternatives.85 - Check 1: Secure serialization alternatives86 - pattern `\\$entity->validate\\(\\)|\\$violations\\s*=\\s*\\$entity->validate\\(\\)` – Properly validating entity data.87 - Check 2: Proper entity validation88 - pattern `::validateSyncedConfig\\(|ConfigImporter::validate|->getUnprocessedConfiguration\\(\\)` – Implementing configuration validation.89 - Check 3: Config verification90 - pattern `file_validate_|FileValidatorInterface|\\$validators` – Using file validation mechanisms.91 - Check 4: Safe file handling9293## Metadata94- Priority: high95- Version: 1.196- Tags: security, drupal, integrity, deserialization, owasp, language:php, framework:drupal, category:security, subcategory:integrity, standard:owasp-top10, risk:a08-integrity-failures97## References98- https://owasp.org/Top10/A08_2021-Software_and_Data_Integrity_Failures/99- https://www.drupal.org/docs/develop/security-in-drupal/drupal-8-sanitizing-output100- https://www.drupal.org/docs/8/api/configuration-api/configuration-api-overview101- https://www.drupal.org/docs/develop/using-composer102103
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-logging-failures.mdc · 87 | Cursor rules | security | 48/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-security-misconfiguration.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 |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| bybren-llc/safe-agentic-workflow.cursor/rules/10-backend-python.mdc · 399 | Cursor rules | testlint-formatstylegit+4 | 97/100 | today | |
| 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/gh-task-plan.mdc · 1.4k | Cursor rules | teststylearchtypes+2 | 96/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 | |
| hiromaily/go-crypto-wallet.cursor/rules/proto.mdc · 126 | Cursor rules | buildlint-formatstylearch+3 | 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-integrity-failures)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.