I would like to have multi-sites that share the some code base and one SQL database in Drupal 8.
Is this possible and recommended? I am interested also in security concerns. Is this safe?
This is very much possible using the domain module:
"The Domain Access project is a suite of modules that provide tools for running a group of affiliated sites from one Drupal installation and a single shared database."
Which is currently under development for Drupal 8 here:
This of course assumes you are not talking about actual Drupal multi-sites which are intended to share the same codebase but always have separate databases.