Skip to main content

security_configuration

Gets or lists a security_configuration resource.

Overview​

Namesecurity_configuration
TypeResource
Idgitlab.security.security_configuration

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
auto_devops_enabledbooleanWhether Auto DevOps is enabled for the project.
auto_devops_help_page_pathstringPath to Auto DevOps help documentation.
auto_devops_pathstringPath to Auto DevOps settings.
can_apply_profilesbooleanWhether the current user can apply security profiles.
can_enable_auto_devopsbooleanWhether the current user can enable Auto DevOps.
can_manage_attributesbooleanWhether the current user can manage security attributes.
can_read_attributesbooleanWhether the current user can read security attributes.
container_scanning_for_registry_enabledbooleanWhether container scanning for registry is enabled.
gitlab_ci_history_pathstringPath to the GitLab CI configuration file history.
gitlab_ci_presentbooleanWhether a GitLab CI configuration file exists in the project.
group_full_pathstringFull path of the root ancestor group.
group_manage_attributes_pathstringPath to manage group security attributes.
help_page_pathstringPath to application security help documentation.
latest_pipeline_pathstringPath to the latest pipeline on the default branch.
license_configuration_sourcestringSource of license configuration.
license_scanning_for_cyclonedx_enabledbooleanWhether license scanning for CycloneDX SBOM files is enabled.
max_tracked_refsintegerMaximum number of refs that can be tracked for security scanning.
secret_detection_configuration_pathstringPath to secret detection configuration.
secret_push_protection_availablebooleanWhether secret push protection is available for projects in the instance.
secret_push_protection_enabledbooleanWhether secret push protection is enabled for the project.
secret_push_protection_enforcedbooleanWhether secret push protection is automatically enforced for all projects in the instance.
security_scan_profiles_licensedbooleanWhether the project has a license for security scan profiles.
security_training_enabledbooleanWhether security training is available for the project.
upgrade_pathstringPath to upgrade security features.
user_is_project_adminbooleanWhether the current user has admin permissions for security testing.
validity_checks_availablebooleanWhether secret detection validity checks are available.
validity_checks_enabledbooleanWhether secret detection validity checks are enabled.
vulnerability_archive_export_pathstringPath to export vulnerability archives via API.
vulnerability_training_docs_pathstringPath to vulnerability training documentation.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectproject_id, hostSecurity configuration for the project Generated from the GitLab GraphQL schema field Query.securityConfiguration (SecurityConfiguration).

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)
project_idstringProject to get the security configuration for.

SELECT examples​

Security configuration for the project Generated from the GitLab GraphQL schema field Query.securityConfiguration (SecurityConfiguration).

SELECT
auto_devops_enabled,
auto_devops_help_page_path,
auto_devops_path,
can_apply_profiles,
can_enable_auto_devops,
can_manage_attributes,
can_read_attributes,
container_scanning_for_registry_enabled,
gitlab_ci_history_path,
gitlab_ci_present,
group_full_path,
group_manage_attributes_path,
help_page_path,
latest_pipeline_path,
license_configuration_source,
license_scanning_for_cyclonedx_enabled,
max_tracked_refs,
secret_detection_configuration_path,
secret_push_protection_available,
secret_push_protection_enabled,
secret_push_protection_enforced,
security_scan_profiles_licensed,
security_training_enabled,
upgrade_path,
user_is_project_admin,
validity_checks_available,
validity_checks_enabled,
vulnerability_archive_export_path,
vulnerability_training_docs_path
FROM gitlab.security.security_configuration
WHERE project_id = '{{ project_id }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
;