GitLab Compliance - Hands-On Lab: Scan Execution Policies
Estimated time to complete: 15 minutes
Objectives
Scan execution policies allow you to run security scans against projects and groups in a consistent manner. In this lab, you will learn how to add a scan execution policy to your project.
Task A. Create a scan execution policy
-
In the left sidebar, select Secure > Policies.
-
Select New policy.
-
Under Scan execution policy, select Select policy.
-
In the name, input
run scan
. -
In the Actions, set the scan to run a Secret Detection scan. Leave all action configurations at default.
-
In the Conditions section, set to Triggers: for all branches with No exceptions.
-
Select Configure with a merge request.
-
Select Merge.
Task B. Testing your scan execution policy
-
Navigate back to your
Compliance Project
project. -
Select + > New file.
-
Enter anything for the Filename and file contents.
-
Select Commit changes.
-
Select Create merge request.
-
Review the merge request pipeline. Note that there is now a secret detection scan job.
Lab Guide Complete
You have completed this lab exercise. You can view the other lab guides for this course.
Suggestions?
If you’d like to suggest changes to the Hands-On Guide for GitLab Compliance, please submit them via merge request.
9be4ec57
)