Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Easy Breadcrumb 2.0.11 — Minor update available for module easy_breadcrumb (2.0.11). Release: Bootstrap 8.x-3.42 — Minor update available for theme bootstrap (8.x-3.42). Release: Editoria11y Accessibility Checker 3.0.10 — Minor update available for module editoria11y (3.0.10). Release: Editoria11y Accessibility Checker 2.2.24 — Minor update available for module editoria11y (2.2.24). Release: Leaflet 10.4.13 — Minor update available for module leaflet (10.4.13). Release: Flag 5.1.1 — Minor update available for module flag (5.1.1). Release: Layout Paragraphs 3.0.0-beta5 — New beta version released for module layout_paragraphs (3.0.0-beta5). Module Revived: Bootstrap 8.x-3.41 — Theme bootstrap updated after 6 months of inactivity (8.x-3.41). Usage Milestone: Mime Mail — Module mimemail crossed 50,000 active installs.

Ai Recipe Guardrails Pii

Security covered

Part of the AI ecosystem · 339 projects

View on drupal.org

This Drupal recipe installs AI guardrails that use regular expressions to detect and block personally identifiable information (PII) in AI interactions. It can be applied to any site where AI features process user input or generate output that might contain sensitive personal data, helping to protect user privacy and comply with data protection regulations.

A Drupal recipe that installs a set of regex-based AI guardrails to detect and block personally identifiable information (PII) in AI interactions. Apply this recipe to any site where AI features process user input or generate output that may contain sensitive personal data.

What This Recipe Does

This recipe installs four individual guardrails and one guardrail set into a Drupal site running the AI module.

Each guardrail uses a regular expression to scan text for a specific type of PII. The pii_protection guardrail set applies all four guardrails to both the pre-generate (user input) and post-generate (AI output) phases, so PII is blocked in both directions.

When to use this recipe

  • Any public-facing AI interaction (chatbots, AI assistants, AI-powered search)
  • Sites with GDPR or data protection obligations
  • Environments where user content must not be forwarded to third-party AI providers containing sensitive identifiers

Requirements

How to Apply

Run the following Drush command from your Drupal root:

drush recipe ../recipes/ai_recipe_guardrails_pii

Configuration Installed

Guardrail Set

Machine name Label Description pii_protection PII Protection Applies all four PII guardrails to both pre- and post-generate phases. Stop threshold: 0.8.

Guardrails

Machine name Label Detects pii_email_address PII: Email Address Email addresses pii_credit_card_number PII: Credit Card Number Payment card numbers (Visa, Mastercard, Amex, Discover, etc.) pii_iban PII: IBAN IBAN bank account numbers pii_phone_number PII: Phone Number International phone numbers (E.164 / +XX format)

All guardrails use the regexp_guardrail plugin.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Mar 2026
Latest release
6 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core Release date
1.0.0 Stable Mar 23, 2026