Banish
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
Module to banish modules, themes, and more so they can't be installed and don't even show up in the UI. On cache_clear, banish will disable and uninstall any modules that should have been banished already so you can push new items to banish and your production server will automatically remove them.
Example: Remove PHP Filter module
Say you want to make sure the php module is never turned on. Simply add the following to an enabled modules info file.
banish[module][] = php
You may need to clear your caches first, but the result is that the php module no longer shows up in the list of modules. If you try to enable it via drush, your request will be rejected. If the module is on, it will be disabled and uninstalled.
Themes
You can also banish themes, including base themes, to remove the clutter of the theme UI. For instance you might want to banish all the stock themes that come with drupal like stark, garland, bartik, and seven.
banish[theme][] = stark
banish[theme][] = garland
banish[theme][] = bartik
banish[theme][] = seven
Menu Paths / Routes
You can also banish menu paths. For instance the node module creates a default homepage at /node, but most people use something else for their hompage. Still, that /node path still exists and probably isn't themed. You can disable it with by adding the following to the info file of your custom module.
banish[menu][] = node
Security
Using this module should improve the security of your site because you now have the power to ensure questionable modules are not able to be installed, but as long as the offending code still lives in your codebase, there are potentially ways to side-load that code without enabling the module, and if banish is ever disabled, then those can still be enabled. When you can, you should remove modules that you aren't using from your codebase.
