README.txt

Same filename in this branch
  1. main sites/README.txt
  2. main composer/Template/README.txt
  3. main composer/Metapackage/README.txt
  4. main profiles/README.txt
  5. main themes/README.txt
  6. main modules/README.txt
  7. main core/profiles/demo_umami/themes/umami/README.txt
  8. main core/profiles/demo_umami/themes/umami/images/classy/README.txt
  9. main core/profiles/demo_umami/themes/umami/css/classy/README.txt
  10. main core/profiles/demo_umami/themes/umami/js/classy/README.txt
  11. main core/profiles/demo_umami/themes/umami/templates/classy/README.txt
  12. main core/themes/stable9/README.txt
  13. main core/themes/claro/images/classy/README.txt
  14. main core/themes/claro/css/classy/README.txt
  15. main core/themes/claro/js/classy/README.txt
  16. main core/themes/claro/templates/classy/README.txt
  17. main core/themes/stark/README.txt
  18. main core/modules/system/tests/src/Functional/UpdateSystem/README.txt
  19. main core/modules/system/tests/src/Functional/Update/README.txt
  20. main core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/fruit/README.txt
  21. main core/tests/fixtures/files/README.txt
  22. main core/assets/scaffold/README.txt
  23. main core/assets/vendor/tabbable/README.txt
  24. main core/lib/Drupal/Core/README.txt
  25. main core/lib/Drupal/Component/Render/README.txt
  26. main core/lib/Drupal/Component/Assertion/README.txt
  27. main core/lib/Drupal/Component/Discovery/README.txt
  28. main core/lib/Drupal/Component/FileSecurity/README.txt
  29. main core/lib/Drupal/Component/FileCache/README.txt
  30. main core/lib/Drupal/Component/Utility/README.txt
  31. main core/lib/Drupal/Component/README.txt
  32. main core/lib/Drupal/Component/Graph/README.txt
  33. main core/lib/Drupal/Component/DependencyInjection/README.txt
  34. main core/lib/Drupal/Component/FrontMatter/README.txt
  35. main core/lib/Drupal/Component/Version/README.txt
  36. main core/lib/Drupal/Component/Serialization/README.txt
  37. main core/lib/Drupal/Component/ClassFinder/README.txt
  38. main core/lib/Drupal/Component/ProxyBuilder/README.txt
  39. main core/lib/Drupal/Component/EventDispatcher/README.txt
  40. main core/lib/Drupal/Component/Diff/README.txt
  41. main core/lib/Drupal/Component/FileSystem/README.txt
  42. main core/lib/Drupal/Component/Gettext/README.txt
  43. main core/lib/Drupal/Component/PhpStorage/README.txt
  44. main core/lib/Drupal/Component/Datetime/README.txt
  45. main core/lib/Drupal/Component/Transliteration/README.txt
  46. main core/lib/Drupal/Component/Annotation/README.txt
  47. main core/lib/Drupal/Component/HttpFoundation/README.txt
  48. main core/lib/Drupal/Component/Uuid/README.txt
  49. main core/lib/Drupal/Component/Plugin/README.txt
  50. main core/lib/README.txt
Same filename and directory in other branches
  1. 10 core/modules/sdc/README.txt
  2. 10 sites/README.txt
  3. 10 composer/Template/README.txt
  4. 10 composer/Metapackage/README.txt
  5. 10 composer/Plugin/VendorHardening/README.txt
  6. 10 profiles/README.txt
  7. 10 themes/README.txt
  8. 10 modules/README.txt
  9. 10 core/profiles/demo_umami/themes/umami/README.txt
  10. 10 core/profiles/demo_umami/themes/umami/images/classy/README.txt
  11. 10 core/profiles/demo_umami/themes/umami/css/classy/README.txt
  12. 10 core/profiles/demo_umami/themes/umami/js/classy/README.txt
  13. 10 core/profiles/demo_umami/themes/umami/templates/classy/README.txt
  14. 10 core/themes/stable9/README.txt
  15. 10 core/themes/claro/images/classy/README.txt
  16. 10 core/themes/claro/css/classy/README.txt
  17. 10 core/themes/claro/js/classy/README.txt
  18. 10 core/themes/claro/templates/classy/README.txt
  19. 10 core/themes/stark/README.txt
  20. 11.x sites/README.txt
  21. 11.x composer/Template/README.txt
  22. 11.x composer/Metapackage/README.txt
  23. 11.x composer/Plugin/VendorHardening/README.txt
  24. 11.x profiles/README.txt
  25. 11.x themes/README.txt
  26. 11.x modules/README.txt
  27. 11.x core/profiles/demo_umami/themes/umami/README.txt
  28. 11.x core/profiles/demo_umami/themes/umami/images/classy/README.txt
  29. 11.x core/profiles/demo_umami/themes/umami/css/classy/README.txt
  30. 11.x core/profiles/demo_umami/themes/umami/js/classy/README.txt
  31. 11.x core/profiles/demo_umami/themes/umami/templates/classy/README.txt
  32. 11.x core/themes/stable9/README.txt
  33. 11.x core/themes/claro/images/classy/README.txt
  34. 11.x core/themes/claro/css/classy/README.txt
  35. 11.x core/themes/claro/js/classy/README.txt
  36. 11.x core/themes/claro/templates/classy/README.txt
  37. 11.x core/themes/stark/README.txt
  38. 11.x core/modules/system/tests/src/Functional/UpdateSystem/README.txt
  39. 11.x core/modules/system/tests/src/Functional/Update/README.txt
  40. 11.x core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/fruit/README.txt
  41. 11.x core/tests/fixtures/files/README.txt
  42. 11.x core/assets/scaffold/README.txt
  43. 11.x core/assets/vendor/tabbable/README.txt
  44. 11.x core/lib/Drupal/Core/README.txt
  45. 11.x core/lib/Drupal/Component/Render/README.txt
  46. 11.x core/lib/Drupal/Component/Assertion/README.txt
  47. 11.x core/lib/Drupal/Component/Discovery/README.txt
  48. 11.x core/lib/Drupal/Component/FileSecurity/README.txt
  49. 11.x core/lib/Drupal/Component/FileCache/README.txt
  50. 11.x core/lib/Drupal/Component/Utility/README.txt
  51. 11.x core/lib/Drupal/Component/README.txt
  52. 11.x core/lib/Drupal/Component/Graph/README.txt
  53. 11.x core/lib/Drupal/Component/DependencyInjection/README.txt
  54. 11.x core/lib/Drupal/Component/FrontMatter/README.txt
  55. 11.x core/lib/Drupal/Component/Version/README.txt
  56. 11.x core/lib/Drupal/Component/Serialization/README.txt
  57. 11.x core/lib/Drupal/Component/ClassFinder/README.txt
  58. 11.x core/lib/Drupal/Component/ProxyBuilder/README.txt
  59. 11.x core/lib/Drupal/Component/EventDispatcher/README.txt
  60. 11.x core/lib/Drupal/Component/Diff/README.txt
  61. 11.x core/lib/Drupal/Component/FileSystem/README.txt
  62. 11.x core/lib/Drupal/Component/Gettext/README.txt
  63. 11.x core/lib/Drupal/Component/PhpStorage/README.txt
  64. 11.x core/lib/Drupal/Component/Datetime/README.txt
  65. 11.x core/lib/Drupal/Component/Transliteration/README.txt
  66. 11.x core/lib/Drupal/Component/Annotation/README.txt
  67. 11.x core/lib/Drupal/Component/HttpFoundation/README.txt
  68. 11.x core/lib/Drupal/Component/Uuid/README.txt
  69. 11.x core/lib/Drupal/Component/Plugin/README.txt
  70. 11.x core/lib/README.txt
  71. 10 core/modules/system/tests/src/Functional/UpdateSystem/README.txt
  72. 10 core/modules/system/tests/src/Functional/Update/README.txt
  73. 10 core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/fruit/README.txt
  74. 10 core/tests/fixtures/files/README.txt
  75. 10 core/assets/scaffold/README.txt
  76. 10 core/assets/vendor/tabbable/README.txt
  77. 10 core/lib/Drupal/Core/README.txt
  78. 10 core/lib/Drupal/Component/Render/README.txt
  79. 10 core/lib/Drupal/Component/Assertion/README.txt
  80. 10 core/lib/Drupal/Component/Discovery/README.txt
  81. 10 core/lib/Drupal/Component/FileSecurity/README.txt
  82. 10 core/lib/Drupal/Component/FileCache/README.txt
  83. 10 core/lib/Drupal/Component/Utility/README.txt
  84. 10 core/lib/Drupal/Component/README.txt
  85. 10 core/lib/Drupal/Component/Graph/README.txt
  86. 10 core/lib/Drupal/Component/DependencyInjection/README.txt
  87. 10 core/lib/Drupal/Component/FrontMatter/README.txt
  88. 10 core/lib/Drupal/Component/Version/README.txt
  89. 10 core/lib/Drupal/Component/Serialization/README.txt
  90. 10 core/lib/Drupal/Component/ClassFinder/README.txt
  91. 10 core/lib/Drupal/Component/ProxyBuilder/README.txt
  92. 10 core/lib/Drupal/Component/EventDispatcher/README.txt
  93. 10 core/lib/Drupal/Component/Diff/README.txt
  94. 10 core/lib/Drupal/Component/FileSystem/README.txt
  95. 10 core/lib/Drupal/Component/Gettext/README.txt
  96. 10 core/lib/Drupal/Component/PhpStorage/README.txt
  97. 10 core/lib/Drupal/Component/Datetime/README.txt
  98. 10 core/lib/Drupal/Component/Transliteration/README.txt
  99. 10 core/lib/Drupal/Component/Annotation/README.txt
  100. 10 core/lib/Drupal/Component/HttpFoundation/README.txt
  101. 10 core/lib/Drupal/Component/Uuid/README.txt
  102. 10 core/lib/Drupal/Component/Plugin/README.txt
  103. 10 core/lib/README.txt
  104. 9 sites/README.txt
  105. 9 composer/Template/README.txt
  106. 9 composer/Metapackage/README.txt
  107. 9 composer/Plugin/VendorHardening/README.txt
  108. 9 profiles/README.txt
  109. 9 themes/README.txt
  110. 9 modules/README.txt
  111. 9 core/profiles/demo_umami/themes/umami/README.txt
  112. 9 core/profiles/demo_umami/themes/umami/images/classy/README.txt
  113. 9 core/profiles/demo_umami/themes/umami/css/classy/README.txt
  114. 9 core/profiles/demo_umami/themes/umami/js/classy/README.txt
  115. 9 core/profiles/demo_umami/themes/umami/templates/classy/README.txt
  116. 9 core/themes/stable9/README.txt
  117. 9 core/themes/stable9/images/README.txt
  118. 9 core/themes/seven/README.txt
  119. 9 core/themes/seven/images/classy/README.txt
  120. 9 core/themes/seven/css/classy/README.txt
  121. 9 core/themes/seven/js/classy/README.txt
  122. 9 core/themes/seven/templates/classy/README.txt
  123. 9 core/themes/claro/images/classy/README.txt
  124. 9 core/themes/claro/css/classy/README.txt
  125. 9 core/themes/claro/js/classy/README.txt
  126. 9 core/themes/claro/templates/classy/README.txt
  127. 9 core/themes/stark/README.txt
  128. 9 core/themes/bartik/README.txt
  129. 9 core/themes/bartik/images/classy/README.txt
  130. 9 core/themes/bartik/css/classy/README.txt
  131. 9 core/themes/bartik/js/classy/README.txt
  132. 9 core/themes/bartik/templates/classy/README.txt
  133. 9 core/themes/stable/README.txt
  134. 9 core/themes/classy/README.txt
  135. 9 core/modules/system/tests/src/Functional/UpdateSystem/README.txt
  136. 9 core/modules/system/tests/src/Functional/Update/README.txt
  137. 9 core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/fruit/README.txt
  138. 9 core/tests/fixtures/files/README.txt
  139. 9 core/assets/scaffold/README.txt
  140. 9 core/assets/vendor/tabbable/README.txt
  141. 9 core/lib/Drupal/Core/README.txt
  142. 9 core/lib/Drupal/Component/Render/README.txt
  143. 9 core/lib/Drupal/Component/Assertion/README.txt
  144. 9 core/lib/Drupal/Component/Discovery/README.txt
  145. 9 core/lib/Drupal/Component/FileSecurity/README.txt
  146. 9 core/lib/Drupal/Component/FileCache/README.txt
  147. 9 core/lib/Drupal/Component/Utility/README.txt
  148. 9 core/lib/Drupal/Component/README.txt
  149. 9 core/lib/Drupal/Component/Graph/README.txt
  150. 9 core/lib/Drupal/Component/DependencyInjection/README.txt
  151. 9 core/lib/Drupal/Component/FrontMatter/README.txt
  152. 9 core/lib/Drupal/Component/Version/README.txt
  153. 9 core/lib/Drupal/Component/Serialization/README.txt
  154. 9 core/lib/Drupal/Component/ClassFinder/README.txt
  155. 9 core/lib/Drupal/Component/ProxyBuilder/README.txt
  156. 9 core/lib/Drupal/Component/EventDispatcher/README.txt
  157. 9 core/lib/Drupal/Component/Diff/README.txt
  158. 9 core/lib/Drupal/Component/FileSystem/README.txt
  159. 9 core/lib/Drupal/Component/Gettext/README.txt
  160. 9 core/lib/Drupal/Component/Bridge/README.txt
  161. 9 core/lib/Drupal/Component/PhpStorage/README.txt
  162. 9 core/lib/Drupal/Component/Datetime/README.txt
  163. 9 core/lib/Drupal/Component/Transliteration/README.txt
  164. 9 core/lib/Drupal/Component/Annotation/README.txt
  165. 9 core/lib/Drupal/Component/HttpFoundation/README.txt
  166. 9 core/lib/Drupal/Component/Uuid/README.txt
  167. 9 core/lib/Drupal/Component/Plugin/README.txt
  168. 9 core/lib/README.txt
  169. 8.9.x sites/README.txt
  170. 8.9.x composer/Template/README.txt
  171. 8.9.x composer/Metapackage/README.txt
  172. 8.9.x composer/Plugin/VendorHardening/README.txt
  173. 8.9.x profiles/README.txt
  174. 8.9.x README.txt
  175. 8.9.x themes/README.txt
  176. 8.9.x modules/README.txt
  177. 8.9.x core/profiles/demo_umami/themes/umami/README.txt
  178. 8.9.x core/profiles/demo_umami/themes/umami/images/classy/README.txt
  179. 8.9.x core/profiles/demo_umami/themes/umami/css/classy/README.txt
  180. 8.9.x core/profiles/demo_umami/themes/umami/js/classy/README.txt
  181. 8.9.x core/profiles/demo_umami/themes/umami/templates/classy/README.txt
  182. 8.9.x core/themes/seven/README.txt
  183. 8.9.x core/themes/seven/images/classy/README.txt
  184. 8.9.x core/themes/seven/css/classy/README.txt
  185. 8.9.x core/themes/seven/js/classy/README.txt
  186. 8.9.x core/themes/seven/templates/classy/README.txt
  187. 8.9.x core/themes/claro/images/classy/README.txt
  188. 8.9.x core/themes/claro/css/classy/README.txt
  189. 8.9.x core/themes/claro/js/classy/README.txt
  190. 8.9.x core/themes/claro/templates/classy/README.txt
  191. 8.9.x core/themes/stark/README.txt
  192. 8.9.x core/themes/bartik/README.txt
  193. 8.9.x core/themes/bartik/images/classy/README.txt
  194. 8.9.x core/themes/bartik/css/classy/README.txt
  195. 8.9.x core/themes/bartik/js/classy/README.txt
  196. 8.9.x core/themes/bartik/templates/classy/README.txt
  197. 8.9.x core/themes/stable/README.txt
  198. 8.9.x core/themes/classy/README.txt
  199. 8.9.x core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/fruit/README.txt
  200. 8.9.x core/tests/fixtures/files/README.txt
  201. 8.9.x core/assets/scaffold/README.txt
  202. 8.9.x core/lib/Drupal/Core/README.txt
  203. 8.9.x core/lib/Drupal/Component/Render/README.txt
  204. 8.9.x core/lib/Drupal/Component/Assertion/README.txt
  205. 8.9.x core/lib/Drupal/Component/Discovery/README.txt
  206. 8.9.x core/lib/Drupal/Component/FileSecurity/README.txt
  207. 8.9.x core/lib/Drupal/Component/FileCache/README.txt
  208. 8.9.x core/lib/Drupal/Component/Utility/README.txt
  209. 8.9.x core/lib/Drupal/Component/README.txt
  210. 8.9.x core/lib/Drupal/Component/Graph/README.txt
  211. 8.9.x core/lib/Drupal/Component/DependencyInjection/README.txt
  212. 8.9.x core/lib/Drupal/Component/Version/README.txt
  213. 8.9.x core/lib/Drupal/Component/Serialization/README.txt
  214. 8.9.x core/lib/Drupal/Component/ClassFinder/README.txt
  215. 8.9.x core/lib/Drupal/Component/ProxyBuilder/README.txt
  216. 8.9.x core/lib/Drupal/Component/EventDispatcher/README.txt
  217. 8.9.x core/lib/Drupal/Component/Diff/README.txt
  218. 8.9.x core/lib/Drupal/Component/FileSystem/README.txt
  219. 8.9.x core/lib/Drupal/Component/Gettext/README.txt
  220. 8.9.x core/lib/Drupal/Component/Bridge/README.txt
  221. 8.9.x core/lib/Drupal/Component/PhpStorage/README.txt
  222. 8.9.x core/lib/Drupal/Component/Datetime/README.txt
  223. 8.9.x core/lib/Drupal/Component/Transliteration/README.txt
  224. 8.9.x core/lib/Drupal/Component/Annotation/README.txt
  225. 8.9.x core/lib/Drupal/Component/HttpFoundation/README.txt
  226. 8.9.x core/lib/Drupal/Component/Uuid/README.txt
  227. 8.9.x core/lib/Drupal/Component/Plugin/README.txt
  228. 8.9.x core/lib/README.txt
  229. 7.x sites/README.txt
  230. 7.x sites/all/themes/README.txt
  231. 7.x sites/all/modules/README.txt
  232. 7.x sites/all/libraries/README.txt
  233. 7.x profiles/README.txt
  234. 7.x profiles/standard/translations/README.txt
  235. 7.x profiles/minimal/translations/README.txt
  236. 7.x README.txt
  237. 7.x themes/README.txt
  238. 7.x themes/stark/README.txt
  239. 7.x modules/README.txt
  240. 7.x modules/simpletest/files/README.txt
The Drupal Vendor Hardening Composer Plugin
===========================================

Thanks for using this Drupal component.

You can participate in its development on Drupal.org, through our issue system:
https://www.drupal.org/project/issues/drupal

You can get the full Drupal repo here:
https://www.drupal.org/project/drupal/git-instructions

You can browse the full Drupal repo here:
https://git.drupalcode.org/project/drupal

What does it do?
----------------

This Composer plugin does two things:

1) It removes extraneous directories from the project's vendor directory.
They're typically directories which might contain executable files, such as test
directories.

This sort of processing is required for projects that have a vendor directory
inside the HTTP server docroot. This is a common layout for Drupal.

By default, the plugin knows how to clean up packages for Drupal core, so you
can require drupal/core-vendor-hardening in your project and the rest will
happen automatically.

The plugin can also be configured to clean up additional packages using the
project's composer.json extra field.

This plugin can also clean up packages that were installed outside of the
vendor directory, using composer/installers. This allows users to configure the
plugin to clean up, for instance, Drupal extensions and Drupal core.

2) The plugin also adds .htaccess file to the root of the
project's vendor directory. The file will perform due diligence to keep the
web server from serving file from within the vendor directory.

How do I set it up?
-------------------

Require this Composer plugin into your project:

    composer require drupal/core-vendor-hardening

When you install or update, this plugin will look through each package and
remove directories it knows about.

You can see the list of default package cleanups for this plugin in Config.php.
If you discover that this list needs updating, file an issue about it:
https://www.drupal.org/project/issues/drupal

In addition to the default list of packages, you can configure the plugin using
the root package's composer.json extra field, like this:

    "extra": {
      "drupal-core-vendor-hardening": {
        "vendor/package": ["test", "documentation"]
      }
    }

The above code will tell the plugin to remove the test/ and documentation/
directories from the 'vendor/package' package when it is installed or updated.

For packages installed outside of the vendor directory, such as those installed
by composer/installers, the paths to remove should be relative to the package
base. As an example, a Drupal module package named drupal/module_name might be
installed by composer/installers to web/modules/contrib/module_name/. Cleanup
paths specified for this package might look like this:

    "extra": {
      "drupal-core-vendor-hardening": {
        "drupal/module_name": ["tests", "src/Tests"]
      }
    }

This would then cause the plugin to try and remove
web/modules/contrib/module_name/tests and
web/modules/contrib/module_name/src/Tests.

The plugin can be configured to NOT clean certain packages. This is not
recommended, but it may be useful for advanced use cases, such as allowing
Drupal to use a copy of Composer installed locally in the project. For
example, to prevent the plugin from cleaning `composer/composer`:

    "extra": {
      "drupal-core-vendor-hardening": {
        "composer/composer": false
      }
    }

File

composer/Plugin/VendorHardening/README.txt

View source
  1. The Drupal Vendor Hardening Composer Plugin
  2. ===========================================
  3. Thanks for using this Drupal component.
  4. You can participate in its development on Drupal.org, through our issue system:
  5. https://www.drupal.org/project/issues/drupal
  6. You can get the full Drupal repo here:
  7. https://www.drupal.org/project/drupal/git-instructions
  8. You can browse the full Drupal repo here:
  9. https://git.drupalcode.org/project/drupal
  10. What does it do?
  11. ----------------
  12. This Composer plugin does two things:
  13. 1) It removes extraneous directories from the project's vendor directory.
  14. They're typically directories which might contain executable files, such as test
  15. directories.
  16. This sort of processing is required for projects that have a vendor directory
  17. inside the HTTP server docroot. This is a common layout for Drupal.
  18. By default, the plugin knows how to clean up packages for Drupal core, so you
  19. can require drupal/core-vendor-hardening in your project and the rest will
  20. happen automatically.
  21. The plugin can also be configured to clean up additional packages using the
  22. project's composer.json extra field.
  23. This plugin can also clean up packages that were installed outside of the
  24. vendor directory, using composer/installers. This allows users to configure the
  25. plugin to clean up, for instance, Drupal extensions and Drupal core.
  26. 2) The plugin also adds .htaccess file to the root of the
  27. project's vendor directory. The file will perform due diligence to keep the
  28. web server from serving file from within the vendor directory.
  29. How do I set it up?
  30. -------------------
  31. Require this Composer plugin into your project:
  32. composer require drupal/core-vendor-hardening
  33. When you install or update, this plugin will look through each package and
  34. remove directories it knows about.
  35. You can see the list of default package cleanups for this plugin in Config.php.
  36. If you discover that this list needs updating, file an issue about it:
  37. https://www.drupal.org/project/issues/drupal
  38. In addition to the default list of packages, you can configure the plugin using
  39. the root package's composer.json extra field, like this:
  40. "extra": {
  41. "drupal-core-vendor-hardening": {
  42. "vendor/package": ["test", "documentation"]
  43. }
  44. }
  45. The above code will tell the plugin to remove the test/ and documentation/
  46. directories from the 'vendor/package' package when it is installed or updated.
  47. For packages installed outside of the vendor directory, such as those installed
  48. by composer/installers, the paths to remove should be relative to the package
  49. base. As an example, a Drupal module package named drupal/module_name might be
  50. installed by composer/installers to web/modules/contrib/module_name/. Cleanup
  51. paths specified for this package might look like this:
  52. "extra": {
  53. "drupal-core-vendor-hardening": {
  54. "drupal/module_name": ["tests", "src/Tests"]
  55. }
  56. }
  57. This would then cause the plugin to try and remove
  58. web/modules/contrib/module_name/tests and
  59. web/modules/contrib/module_name/src/Tests.
  60. The plugin can be configured to NOT clean certain packages. This is not
  61. recommended, but it may be useful for advanced use cases, such as allowing
  62. Drupal to use a copy of Composer installed locally in the project. For
  63. example, to prevent the plugin from cleaning `composer/composer`:
  64. "extra": {
  65. "drupal-core-vendor-hardening": {
  66. "composer/composer": false
  67. }
  68. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.