diff --git a/.rubocop_todo/database/multiple_databases.yml b/.rubocop_todo/database/multiple_databases.yml
index 28dddef7c79b8de84a0aaaba4221f347dfde3655..30e36802c42ee29b88d927b74bad1a9107f5fbb7 100644
--- a/.rubocop_todo/database/multiple_databases.yml
+++ b/.rubocop_todo/database/multiple_databases.yml
@@ -25,7 +25,6 @@ Database/MultipleDatabases:
   - lib/gitlab/import_export/group/relation_tree_restorer.rb
   - lib/gitlab/legacy_github_import/importer.rb
   - lib/gitlab/seeder.rb
-  - lib/system_check/orphans/repository_check.rb
   - spec/db/schema_spec.rb
   - spec/initializers/database_config_spec.rb
   - spec/lib/backup/manager_spec.rb
diff --git a/lib/system_check/orphans/repository_check.rb b/lib/system_check/orphans/repository_check.rb
index 33020417e95c1ffc3fb7bce5e14fbad4a808b830..8f15872de228d19719688d093112797dc275e551 100644
--- a/lib/system_check/orphans/repository_check.rb
+++ b/lib/system_check/orphans/repository_check.rb
@@ -57,8 +57,8 @@ def fetch_repositories(storage_name)
           WHERE (p.repository_storage LIKE ?)
         "
 
-        query = ActiveRecord::Base.send(:sanitize_sql_array, [sql, storage_name]) # rubocop:disable GitlabSecurity/PublicSend
-        ActiveRecord::Base.connection.select_all(query).rows.try(:flatten!) || []
+        query = ::Project.sanitize_sql_array([sql, storage_name])
+        ::Project.connection.select_all(query).rows.try(:flatten!) || []
       end
 
       def fetch_disk_namespaces(storage_path)