This project is not covered by Drupal’s security advisory policy.

The Entity Sanitizer module provides the Drush entity-sanitize command. It creates (SQL) Database queries to replace all values for all fields with a standardized message. This allows you to safely reuse content structures from production databases without exposing production user content.

Warning: This module is still in active development and still contains debug statements as well as TODO's. The code may not be pretty. It has been published in order to retrieve early feedback from the community as well as give people the possibility to help in finding a proper solution for sanitizing all website content.

Supported field types

The following field types currently have a sanitize plugin within the module.

  • text_with_summary
  • string
  • string_long
  • text_long
  • email
  • link
  • image
  • file
  • telephone
  • address
  • geolocation

The following fields are currently considered to be safe and are not altered. The reason is that they're either an atomic value defined in code/configuration or a reference to another (sanitized) entity.

  • block_field
  • boolean
  • dropdown
  • datetime
  • comment
  • list_string
  • list_integer
  • entity_access_field
  • entity_reference
  • entity_reference_revisions
  • dynamic_entity_reference
  • video_embed_field
  • weight

Limitations

  • The module does not yet do any sanitizing of user login credentials. The drush sql-sanitize command can be used for this.
  • Due to database layout currently only fields added using the Field API are supported
  • Currently only SQL databases are supported
  • There's no possibility yet to alter which fields are sanitized.

Roadmap/Potential Features

  • Support for entity base fields should be added as soon as possible
  • Support for whitelisting certain fields or entities that should not be sanitized
  • Support for other databases than MySQL (if possible)
Supporting organizations: 
Module Development
Module Development

Project information

Releases