Which built-in WordPress files are safe to edit?

Consider everything that comes with a vanilla WordPress installation a core file. Core files will be overwritten on updates, so it’s not safe to edit them. E.g. wp-config.php isn’t a core file, because the vanilla installation comes only with the sample version of that file.