Metadrop / drupal-boilerplate

Drupal projects up and running with Docker and many other tools in minutes
28 stars 23 forks source link

Drush command policy for dangerous commands (ie: sql:drop,) #138

Closed lpeidro closed 6 months ago

lpeidro commented 6 months ago

Motivation

Through the Drush commands using aliases, actions can be performed from the local environment on production that could cause a disaster, for example, executing the command "drush sql:drop". It would be desirable to have a system that allows us to prevent the execution of these commands under certain scenarios.

Solution:

Drush command policies have been implemented to prevent the execution of certain drush commands: 'core:sync', 'sql:sync', and 'sql:drop' in production or other environment instances.

To apply these policies, two actions must be taken:

MR:

https://github.com/Metadrop/drupal-boilerplate/pull/137