-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check for .sql
files that could be easily publicly-exposed
#98
Comments
@danielbachhuber I want to work on this but I am not that familiar with protecting directories using .htaccess. Can you point me to a resource/example where I can get a fair idea about this? |
See https://stackoverflow.com/questions/9282124/deny-direct-access-to-a-folder-and-file-by-htaccess But, now that I've shared this, I don't think it's a hard requirement for the pull request. Directories may be blocked in some other way (e.g. Nginx) so it would be impossible to test them all. |
Would it make sense to add a |
On unix based systems, one way to solve would be a simple file permission check. If a .sql file is set open 777 (or anything with world permission not set to 0) you can recommend or automatically assigning 600 permissions. |
For instance,
{DB_NAME}.sql
in the web root orwp-content
directory can be easily guessed.However, we shouldn't flag SQL files generated by backup plugins and similar that either live in obscured directories (some hash appended) or are protected by
.htaccess
files.The text was updated successfully, but these errors were encountered: