Security: Should I move vendor dir and composer.json outside of document root?
Just started working with composer. Installed some stuff with composer into my <documentroot>/vendor/ dir. Now, everybody (every hacker) can read my composer.json at http://foo.tld/composer.json Then they know, which software is installed. Then they may probe my <documentroot>/vendor/ dir with URLs like http://foo.tld/vendor/symfony/ . What should I do? a) I could: chmod 0600 composer.json put a .htaccess into the vendor dir, to deny all access b) Move the vendor dir outside the document root (which is not always possible in shared hosting environments. You should move it out of DOCUMENT_ROOT.