Skip to main content

namespace_security_projects

Gets or lists a namespace_security_projects resource.

Overview​

Namenamespace_security_projects
TypeResource
Idgitlab.security.namespace_security_projects

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
idstringID of the project.
namestringName of the project without the namespace.
actual_repository_size_limitnumberSize limit for the repository in bytes.
admin_edit_pathstringAdmin path for editing project. Only available to admins.
admin_show_pathstringAdmin path of the project. Only available to admins.
allow_merge_on_skipped_pipelinebooleanIf only_allow_merge_if_pipeline_succeeds is true, indicates if merge requests of the project can also be merged with skipped jobs.
allows_multiple_merge_request_assigneesbooleanProject allows assigning multiple users to a merge request.
allows_multiple_merge_request_reviewersbooleanProject allows assigning multiple reviewers to a merge request.
archivedbooleanIndicates if the project or any ancestor is archived.
autoclose_referenced_issuesbooleanIndicates if issues referenced by merge requests and commits within the default branch are closed automatically.
avatar_urlstringAvatar URL of the project.
ci_config_path_or_defaultstringPath of the CI configuration file.
container_registry_enabledbooleanIndicates if Container registry is enabled for the current user
container_scanning_for_registry_enabledbooleanIndicates whether container scanning for registry is enabled or not for the project. Returns null if unauthorized.
created_atstringTimestamp of the project creation.
descriptionstringShort description of the project.
edit_pathstringPath for editing project.
forks_countintegerNumber of times the project has been forked.
full_pathstringFull path of the project.
group_objectGroup identity (id, full_path, name)
has_jira_vulnerability_issue_creation_enabledbooleanIndicates whether Jira issue creation from vulnerabilities is enabled.
http_url_to_repostringURL to connect to the project via HTTPS.
import_statusstringStatus of import background job of the project.
is_forkedbooleanProject is forked.
issues_enabledbooleanIndicates if Issues are enabled for the current user
jira_import_statusstringStatus of Jira import background job of the project.
jobs_enabledbooleanIndicates if CI/CD pipeline jobs are enabled for the current user.
last_activity_atstringTimestamp of the project last activity.
lfs_enabledbooleanIndicates if the project has Large File Storage (LFS) enabled.
merge_commit_templatestringTemplate used to create merge commit message in merge requests.
merge_request_title_regexstringRegex used to validate the title of merge requests.
merge_request_title_regex_descriptionstringDescription of the regex used to validate the title of merge requests.
merge_requests_disable_committers_approvalbooleanIndicates that committers of the given merge request cannot approve.
merge_requests_enabledbooleanIndicates if Merge requests are enabled for the current user
merge_requests_ff_only_enabledbooleanIndicates if no merge commits should be created and all merges should instead be fast-forwarded, which means that merging is only allowed if the branch could be fast-forwarded.
name_with_namespacestringName of the project including the namespace.
namespaceobjectNamespace identity (id, full_path, name)
only_allow_merge_if_all_discussions_are_resolvedbooleanIndicates if merge requests of the project can only be merged when all the discussions are resolved.
only_allow_merge_if_all_status_checks_passedbooleanIndicates that merges of merge requests should be blocked unless all status checks have passed.
only_allow_merge_if_pipeline_succeedsbooleanIndicates if merge requests of the project can only be merged with successful jobs.
open_issues_countintegerNumber of open issues for the project.
open_merge_requests_countintegerNumber of open merge requests for the project.
pages_force_httpsbooleanProject's Pages site redirects unsecured connections to HTTPS.
pages_use_unique_domainbooleanProject's Pages site uses a unique subdomain.
pathstringPath of the project.
pre_receive_secret_detection_enabledbooleanIndicates whether secret push protection is on or not for the project.
prevent_merge_without_jira_issue_enabledbooleanIndicates if an associated issue from Jira is required.
printing_merge_request_link_enabledbooleanIndicates if a link to create or view a merge request should display after a push to Git repositories of the project from the command line.
public_jobsbooleanIndicates if there is public access to pipelines and job details of the project, including output logs and artifacts.
remove_source_branch_after_mergebooleanIndicates if Delete source branch option should be enabled by default for all new merge requests of the project.
repository_size_excessnumberSize of repository that exceeds the limit in bytes.
request_access_enabledbooleanIndicates if users can request member access to the project.
secret_push_protection_enabledbooleanIndicates whether secret push protection is on or not for the project.
security_configuration_pathstringPath to project's security configuration.
security_dashboard_pathstringPath to project's security dashboard.
service_desk_addressstringE-mail address of the Service Desk.
service_desk_enabledbooleanIndicates if the project has Service Desk enabled.
shared_runners_enabledbooleanIndicates if shared runners are enabled for the project.
snippets_enabledbooleanIndicates if Snippets are enabled for the current user
squash_commit_templatestringTemplate used to create squash commit message in merge requests.
squash_read_onlybooleanIndicates if squashReadOnly is enabled.
ssh_url_to_repostringURL to connect to the project via SSH.
star_countintegerNumber of times the project has been starred.
suggestion_commit_messagestringCommit message used to apply merge request suggestions.
topicsarray
updated_atstringTimestamp of when the project was last updated.
visibilitystringVisibility of the project.
web_pathstringWeb path of the project.
web_urlstringWeb URL of the project.
wiki_enabledbooleanIndicates if Wikis are enabled for the current user

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectnamespace_id, hostinclude_subgroups, searchSecurity-filtered projects for a namespace Generated from the GitLab GraphQL schema field Query.namespaceSecurityProjects (connection of Project nodes).

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
hoststringGitLab host, with an optional port (default gitlab.com). Resolved from the GITLAB_HOST environment variable when it is set (x-stackQL-envVar); a WHERE host value always takes precedence. Self-managed instances: the provider is generated from the gitlab.com schema, so older instances may reject fields they do not serve. (default: gitlab.com, x-stackQL-envVar: GITLAB_HOST)
namespace_idstringGlobal ID of the namespace.
include_subgroupsbooleanInclude also subgroup projects.

SELECT examples​

Security-filtered projects for a namespace Generated from the GitLab GraphQL schema field Query.namespaceSecurityProjects (connection of Project nodes).

SELECT
id,
name,
actual_repository_size_limit,
admin_edit_path,
admin_show_path,
allow_merge_on_skipped_pipeline,
allows_multiple_merge_request_assignees,
allows_multiple_merge_request_reviewers,
archived,
autoclose_referenced_issues,
avatar_url,
ci_config_path_or_default,
container_registry_enabled,
container_scanning_for_registry_enabled,
created_at,
description,
edit_path,
forks_count,
full_path,
group_,
has_jira_vulnerability_issue_creation_enabled,
http_url_to_repo,
import_status,
is_forked,
issues_enabled,
jira_import_status,
jobs_enabled,
last_activity_at,
lfs_enabled,
merge_commit_template,
merge_request_title_regex,
merge_request_title_regex_description,
merge_requests_disable_committers_approval,
merge_requests_enabled,
merge_requests_ff_only_enabled,
name_with_namespace,
namespace,
only_allow_merge_if_all_discussions_are_resolved,
only_allow_merge_if_all_status_checks_passed,
only_allow_merge_if_pipeline_succeeds,
open_issues_count,
open_merge_requests_count,
pages_force_https,
pages_use_unique_domain,
path,
pre_receive_secret_detection_enabled,
prevent_merge_without_jira_issue_enabled,
printing_merge_request_link_enabled,
public_jobs,
remove_source_branch_after_merge,
repository_size_excess,
request_access_enabled,
secret_push_protection_enabled,
security_configuration_path,
security_dashboard_path,
service_desk_address,
service_desk_enabled,
shared_runners_enabled,
snippets_enabled,
squash_commit_template,
squash_read_only,
ssh_url_to_repo,
star_count,
suggestion_commit_message,
topics,
updated_at,
visibility,
web_path,
web_url,
wiki_enabled
FROM gitlab.security.namespace_security_projects
WHERE namespace_id = '{{ namespace_id }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
AND include_subgroups = '{{ include_subgroups }}'
AND search = '{{ search }}'
;