Compliance frameworks
DETAILS: Tier: Premium, Ultimate Offering: SaaS, self-managed
- Introduced in GitLab 13.9.
- Feature flag removed in GitLab 13.12.
You can create a compliance framework that is a label to identify that your project has certain compliance requirements or needs additional oversight. The label can optionally enforce compliance pipeline configuration to the projects on which it is applied.
Compliance frameworks are created on top-level groups. Group owners can create, edit, and delete compliance frameworks:
- On the left sidebar, select Search or go to and find your group.
- Select Settings > General.
- Expand the Compliance frameworks section.
- Create, edit, or delete compliance frameworks.
Subgroups and projects have access to all compliance frameworks created on their top-level group. However, compliance frameworks cannot be created, edited, or deleted at the subgroup or project level. Project owners can choose a framework to apply to their projects.
Add a compliance framework to a project
Prerequisites:
- The group to which the project belongs must have a compliance framework.
NOTE: Frameworks cannot be added to projects in personal namespaces.
From compliance projects report
To assign a compliance framework to a project, apply the compliance framework through the Compliance projects report.
From group settings
To assign a compliance framework to a project:
- On the left sidebar, select Search or go to and find your project.
- Select Settings > General.
- Expand Compliance frameworks.
- Select a compliance framework.
- Select Save changes.
GraphQL API
- Introduced in GitLab 14.2.
You can use the GraphQL API to add a compliance framework to a project.
If you create compliance frameworks on subgroups with GraphQL, the framework is created on the root ancestor if the user has the correct permissions. The GitLab UI presents a read-only view to discourage this behavior.
Default compliance frameworks
- Introduced in GitLab 15.6.
Group owners can set a default compliance framework. The default framework is applied to all the new and imported projects that are created in that group. It does not affect the framework applied to the existing projects. The default framework cannot be deleted.
A compliance framework that is set to default has a default label.
Set and remove as default
Prerequisites:
- Owner of the group.
From compliance center
To set as default (or remove the default) from compliance projects report:
- On the left sidebar, select Search or go to and find your group.
- Select Secure > Compliance center.
- On the page, select the Projects tab.
- Hover over a compliance framework, select the Edit Framework tab.
- Select Set as default.
- Select Save changes.
To set as default (or remove the default) from compliance framework report:
- On the left sidebar, select Search or go to and find your group.
- Select Secure > Compliance center.
- On the page, select the Frameworks tab.
- Hover over a compliance framework, select the Edit Framework tab.
- Select Set as default.
- Select Save changes.
From group settings
- Introduced in GitLab 15.7.
To set as default (or remove the default) by using group settings:
- On the left sidebar, select Search or go to and find your group.
- Select Settings > General.
- Expand the Compliance frameworks section and locate the compliance framework to set (or remove) as default.
- Select the vertical ellipsis ({ellipsis_v}) for the compliance frame and then select Set default (or Remove default).
Example GraphQL mutations for setting a default compliance framework
Creating a new compliance framework and setting it as the default framework for the group.
mutation {
createComplianceFramework(
input: {params: {name: "SOX", description: "Sarbanes-Oxley Act", color: "#87CEEB", default: true}, namespacePath: "gitlab-org"}
) {
framework {
id
name
default
description
color
pipelineConfigurationFullPath
}
errors
}
}
Setting an existing compliance framework as the default framework the group.
mutation {
updateComplianceFramework(
input: {id: "gid://gitlab/ComplianceManagement::Framework/<id>", params: {default: true}}
) {
complianceFramework {
id
name
default
description
color
pipelineConfigurationFullPath
}
}
}
Remove a compliance framework to a project
Prerequisites:
- The group to which the project belongs must have a compliance framework.
From compliance projects report
To remove a compliance framework from one or multiple project in a group, remove the compliance framework through the Compliance projects report.
From group settings
To remove a compliance framework from one project in a group:
- On the left sidebar, select Search or go to and find your project.
- Select Settings > General.
- Expand Compliance frameworks.
- Select None.
- Select Save changes.