diff --git a/app/services/auth/container_registry_authentication_service.rb b/app/services/auth/container_registry_authentication_service.rb
index d58ff589be1cee6c82b32806af3e359ba01b3df1..5e151b0f044a5d4078a750636e7cd61e4200d091 100644
--- a/app/services/auth/container_registry_authentication_service.rb
+++ b/app/services/auth/container_registry_authentication_service.rb
@@ -64,8 +64,6 @@ module Auth
     end
 
     def process_repository_access(type, path, actions)
-      # TODO, add specs for invalid paths
-      #
       return unless path.valid?
 
       requested_project = path.repository_project
diff --git a/spec/services/auth/container_registry_authentication_service_spec.rb b/spec/services/auth/container_registry_authentication_service_spec.rb
index a4a6430011e995cf50663399ccb08c937f41296c..e273dfe1552da94e96d4cbcb7dc235e66d909e21 100644
--- a/spec/services/auth/container_registry_authentication_service_spec.rb
+++ b/spec/services/auth/container_registry_authentication_service_spec.rb
@@ -81,13 +81,13 @@ describe Auth::ContainerRegistryAuthenticationService, services: true do
   end
 
   shared_examples 'container repository factory' do
-    it 'creates a new containe repository resource' do
+    it 'creates a new container repository resource' do
       expect { subject }
         .to change { project.container_repositories.count }.by(1)
     end
   end
 
-  shared_examples 'container repository factory' do
+  shared_examples 'not a container repository factory' do
     it 'does not create a new container repository resource' do
       expect { subject }.not_to change { ContainerRepository.count }
     end
@@ -183,6 +183,15 @@ describe Auth::ContainerRegistryAuthenticationService, services: true do
         it_behaves_like 'an inaccessible'
         it_behaves_like 'not a container repository factory'
       end
+
+      context 'when repository name is invalid' do
+        let(:current_params) do
+          { scope: 'repository:invalid:push' }
+        end
+
+        it_behaves_like 'an inaccessible'
+        it_behaves_like 'not a container repository factory'
+      end
     end
 
     context 'for internal project' do