Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/project_type.rb')
-rw-r--r--app/graphql/types/project_type.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/graphql/types/project_type.rb b/app/graphql/types/project_type.rb
index f66d8926a9f..41a4edd20a5 100644
--- a/app/graphql/types/project_type.rb
+++ b/app/graphql/types/project_type.rb
@@ -16,6 +16,10 @@ module Types
field :path, GraphQL::STRING_TYPE, null: false,
description: 'Path of the project'
+ field :sast_ci_configuration, Types::CiConfiguration::Sast::Type, null: true,
+ calls_gitaly: true,
+ description: 'SAST CI configuration for the project'
+
field :name_with_namespace, GraphQL::STRING_TYPE, null: false,
description: 'Full name of the project with its namespace'
field :name, GraphQL::STRING_TYPE, null: false,
@@ -359,6 +363,12 @@ module Types
project.container_repositories.size
end
+ def sast_ci_configuration
+ return unless Ability.allowed?(current_user, :download_code, object)
+
+ ::Security::CiConfiguration::SastParserService.new(object).configuration
+ end
+
private
def project