It is recommended that the file permissions of config.php are changed after installation so that the file cannot be modified by the web server. Please note that this measure does not improve security of the server significantly, though it may slow down or limit general exploits.
If https communication is enabled, it is recommended to enable sending of secure cookies. You should have permanent redirection from http to https and ideally serve HSTS headers as well.
All logged in users are given capabilities of the default user role. Please make sure no risky capabilities are allowed in this role.
The only supported legacy type for the default user role is Authenticated user. The course view capability must not be enabled.
Enabling the PHP setting display_errors is not recommended on production sites because error messages can reveal sensitive information about your server.
display_errors
It is recommended that an email confirmation step is required when users change their email address in their profile. If disabled, spammers may try to exploit the server to send spam.
Email field may be also locked from authentication plugins, this possibility is not considered here.
Unlimited object embedding is very dangerous - any registered user may launch an XSS attack against other server users. This setting should be disabled on production servers.
The default frontpage role is given to all registered users for frontpage activities. Please make sure no risky capabilities are allowed for this role.
It is recommended that a special role is created for this purpose and a legacy type role is not used.
The Open to Google setting enables search engines to enter courses with guest access. There is no point in enabling this setting if guest login is not allowed.
The guest role is used for guests, not logged in users and temporary guest course access. Please make sure no risky capabilities are allowed in this role.
The only supported legacy type for guest role is Guest.
Automatic swf embedding is very dangerous - any registered user may launch an XSS attack against other server users. Please disable it on production servers.
The No authentication plugin is not intended for production sites. Please disable it unless this is a development test site.
The directory {$a->path} contains Node.js modules and their dependencies, typically installed by the NPM utility. These modules may be needed for local Moodle development, such as for using the grunt framework. They are not needed to run a Moodle site in production and they can contain potentially dangerous code exposing your site to remote attacks.
It is strongly recommended to remove the directory if the site is available via a public URL, or at least prohibit web access to it in your webserver configuration.
Force users to log in for profiles
Force users to log in
It is recommended that a password policy is set, since password guessing is very often the easiest way to gain unauthorised access. Do not make the requirements too strict though, as this can result in users not being able to remember their passwords and either forgetting them or writing them down.
Allowing executable paths to be set via the Admin GUI is a vector for privilege escalation.
Please verify the following list of system administrators:
It is recommended to assign administrator role in the system context only. The following users have (unsupported) admin role assignments in other contexts:
These active overrides give users the ability to include user data in backups. Please make sure this permission is necessary.
The following system roles currently allow users to include user data in backups. Please make sure this permission is necessary.
Because of the above roles or local overrides, the following user accounts currently have permission to make backups containing private data from any users enrolled in their course. Make sure they are (a) trusted and (b) protected by strong passwords:
RISK_XSS denotes all dangerous capabilities that only trusted users may use.
Please verify the following list of users and make sure that you trust them completely on this server:
{$a}
The dataroot directory must not be accessible via web. The best way to make sure the directory is not accessible is to use a directory outside the public web directory.
If you move the directory, you need to update the $CFG->dataroot setting in config.php accordingly.
$CFG->dataroot
config.php
The directory {$a->path} contains various third-party libraries and their dependencies, typically installed by the PHP Composer. These libraries may be needed for local Moodle development, such as for installing the PHPUnit framework. They are not needed to run a Moodle site in production and they can contain potentially dangerous code exposing your site to remote attacks.
Running the cron from a web browser can expose privileged information to anonymous users. It is recommended to only run the cron from the command line or set a cron password for remote access.