All users who have access to the project policy page and are not project owners will instead view a
button linking out to the associated security policy project. If no security policy project has been
associated then the linking button does not appear.
## Policy management
## Policy management
The Policies page displays deployed
The Policies page displays deployed
...
@@ -57,6 +107,7 @@ You can use the policy editor to create, edit, and delete policies:
...
@@ -57,6 +107,7 @@ You can use the policy editor to create, edit, and delete policies:
1. On the top bar, select **Menu > Projects** and find your group.
1. On the top bar, select **Menu > Projects** and find your group.
1. On the left sidebar, select **Security & Compliance > Policies**.
1. On the left sidebar, select **Security & Compliance > Policies**.
- To create a new policy, select **New policy** which is located in the **Policies** page's header.
- To create a new policy, select **New policy** which is located in the **Policies** page's header.
You can then select which type of policy to create.
- To edit an existing policy, select **Edit policy** in the selected policy drawer.
- To edit an existing policy, select **Edit policy** in the selected policy drawer.
The policy editor has two modes:
The policy editor has two modes:
...
@@ -78,44 +129,12 @@ by the Rule mode, Rule mode is automatically
...
@@ -78,44 +129,12 @@ by the Rule mode, Rule mode is automatically
disabled. If the YAML is incorrect, you must use YAML
disabled. If the YAML is incorrect, you must use YAML
mode to fix your policy before Rule mode is available again.
mode to fix your policy before Rule mode is available again.
## Security Policies project
When you finish creating or editing your policy, save and apply it by selecting the
**Configure with a merge request** button and then merging the resulting merge request. When you
NOTE:
press this button, the policy YAML is validated and any resulting errors are displayed.
We recommend using the [Security Policies project](#security-policies-project)
Additionally, if you are a project owner and a security policy project has not been previously
exclusively for managing policies for the project. Do not add your application's source code to such
associated with this project, then a new project is created and associated automatically at the same
projects.
time that the first policy merge request is created.
The Security Policies feature is a repository to store policies. All security policies are stored in
the `.gitlab/security-policies/policy.yml` YAML file. The format for this YAML is specific to the type of policy that is being stored there. Examples and schema information are available for the following policy types: