drupal-security-patterns

Apply OWASP-aligned security patterns to Drupal 10/11 code reviews.

1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/AJV009/drupal-devkit --skill drupal-security-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drupal-security-patterns
Source: https://github.com/AJV009/drupal-devkit/tree/main/plugins/drupal-core/skills/drupal-security-patterns
Command: npx skills add https://github.com/AJV009/drupal-devkit --skill drupal-security-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identify and remediate common Drupal security vulnerabilities by applying OWASP-aligned patterns during code reviews, module hardening, and security audits.

Core Features & Use Cases

  • OWASP-aligned SQL injection prevention, input sanitization, and safe database access patterns.
  • Robust access control guidance, route protection, and secure rendering for Drupal 10/11 modules.
  • XSS protection through proper escaping, output handling, and secure rendering practices.
  • Use Case: Audit a custom module to detect risky practices and implement safe, maintainable alternatives.

Quick Start

Review a sample Drupal module against these security patterns to identify and fix vulnerabilities.

Frequently Asked Questions about drupal-security-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent SQL injection in Drupal 10/11 custom modules?

Prevent SQL injection in Drupal by enforcing parameterized queries and safe database access patterns during code reviews, ensuring user input is never directly concatenated into database queries.

What is the best way to protect against XSS vulnerabilities in Drupal?

XSS protection in Drupal requires proper output escaping and secure rendering practices, ensuring all dynamically generated content is appropriately sanitized before being displayed to the end user.

How do I implement proper access control and route protection for Drupal modules?

Implement Drupal access control by applying proper route access checks and CSRF protections within your module architecture, ensuring only authorized users can execute restricted actions.

Can I use OWASP security patterns to audit existing Drupal module code?

Yes, you can audit existing custom Drupal modules against OWASP-aligned security patterns to detect risky practices, identify vulnerabilities, and implement safe, maintainable alternatives.

What security checks are required for a Drupal module code review?

A Drupal module code review requires checking for parameterized queries, proper input sanitization, correct access checks, output escaping, route access validation, and active CSRF protections.