GitLab Compliance - Compliance Center and Frameworks

This Hands-On Guide demonstrates how to create and view compliance center events.

Estimated time to complete: 15 minutes

Objectives

Learners will run a few actions in GitLab that show up in the compliance center and view how you could see a framework in action.

Task A. Creating Compliance Center Events

  1. Navigate to your Compliance Project project.

  2. In the left sidebar, select Secure > Compliance center.

In this section, you will see three failed checks in your project. In cases where the Status is Fail, you will see View details (fix available) in the More information column. Let’s see what information is shown in this section.

  1. Select View details (fix available) in the At least one non-author approval row of your compliance center report.

  2. Review the details outlined in this section.

  3. Close the details panel.

Throughout the labs in this course, we will see how to fix each of these compliance issues.

Task B. Creating compliance center violations

In this task, we will complete some actions in our project that will result in compliance center violations.

  1. In the left sidebar, select Code > Repository.

  2. Select + > New file.

  3. For the filename, enter main.py.

  4. Add the following content to the file:

print("Start compliance project")
  1. Underneath the Commit Message in the Target Branch field, enter new-main.

  2. Ensure that Start a new merge request with these changes is selected.

  3. Select Commit changes.

  4. In the resulting merge request, select Assign to me in the Assignees section.

  5. Select Create merge request.

  6. Select Merge.

  7. After the merge request completes, select Secure > Compliance center.

  8. Select the Violations tab.

  9. Review the violation labelled Less than 2 approvers.

Lab Guide Complete

You have completed this lab exercise. You can view the other lab guides for this course.

Suggestions?

If you wish to make a change to the Hands-On Guide for GitLab Compliance, please submit your changes via Merge Request!

Last modified February 10, 2025: Swapped labs (9be4ec57)