Problem/Motivation
In this Drupal application, the Composer vendor directory may be located inside the publicly accessible webroot, which can expose library source code and tooling to direct HTTP access and increase the risk of information disclosure or exploitation.
Steps to reproduce
Proposed resolution
Add a new Security FitCheck plugin VendorDirectoryOutsideWebrootCheck that:
- Determines the webroot path and the current location of the
vendordirectory for the Drupal installation. - Fails with
FitWeight::Highifvendoris inside the webroot (or otherwise directly web-accessible), and passes withFitWeight::Okwhen it is outside or properly protected. - Outputs a short help message recommending moving
vendoroutside the webroot or blocking HTTP access to it at the server level.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3558970-4.patch | 5.98 KB | shubham.prakash |
Issue fork drupalfit-3558970
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
harivansh commentedComment #3
shubham.prakash commentedComment #4
shubham.prakash commentedComment #6
harivansh commentedComment #8
harivansh commented