Skip to content

Security checklist

Check each item before the server handles its first request. Each line links to the page that explains it.

  • [mode] default is "production". Development mode serves static files and every .nvs file by its path. Configuration
  • nvs config check reports no error. Configuration
  • You know what server work may do with no nvs.toml. It reads its app folder and connects to any public host. Configuration
  • read and connect list only the folders and hosts the program uses. Configuration
  • Secrets are outside the app folder, or in files whose names start with .. Server work cannot read those files by default. Configuration
  • A package gets only the capabilities in its own line. Each line lists only what that package uses. Configuration
  • No password is in nvs.toml. Each one is read with password_file. Reference: secrets from files
  • [limits] sets memory and wall_time, and [limits.hard] sets a maximum. Limits and logs
  • You know what closes a WebSocket or an event stream. wall_time does not close it. [server.connection] max_lifetime does, after one day by default. Limits and logs
  • Only an administrator can change the configuration files. The server does not start when another account can write to them. Install on a server
  • The account that runs the server cannot change your code.
  • [log] target is a file or syslog, and somebody reads it. Limits and logs
  • nvs serve listens on 127.0.0.1 or a Unix socket. A reverse proxy handles TLS. Behind a reverse proxy
  • trusted_proxies has the address of your proxy, and nothing more. Behind a reverse proxy
  • The proxy limits the requests and connections of each client address, and the login attempts. It closes the requests for unknown host names. Behind a reverse proxy
  • The service runs as its own account, not as root or the system account. Run as a service
  • Text from a request stays tainted until a check removes it. Tainted input
  • HTML is built with html templates, so every value is escaped.
  • An error response does not show the message of an unexpected error. Errors
  • nvs test passes in your build before each deploy. Testing your app