Skip to content

Add graphql API to list Scan Execution Policies

Sashi Kumar Kumaresan requested to merge sk/329423-list-scan-policies-api into master

What does this MR do?

This MR implements new GraphQL API to list Scan Execution Policies(scanExecutionPolicies): #329423 (closed)

Setup Scan Policies for a project

Feature documentation: https://docs.gitlab.com/ee/user/application_security/policies/

  1. Clone and create a project from https://gitlab.com/sashi_kumar/security-orchestration-policies
  2. Enable security_orchestration_policies_configuration for the target project for which the scan policies should be enabled for by doing:
Feature.enable(:security_orchestration_policies_configuration, Project.find(<target_project.id>))
  1. Go to Security & Compliance -> Scan Policies for the target project Screenshot_2021-05-26_at_6.41.24_PM
  2. Select the policy project (security-orchestration-policies) that was created in step 1 and click save Screenshot_2021-05-26_at_6.43.27_PM

Screenshots (strongly suggested)

When the project have configured security policy project with valid policy:

Screenshot_2021-05-26_at_6.24.44_PM

When an user who is not a developer or maintainer of the security policy project:

Screenshot_2021-05-26_at_6.26.04_PM

When the project does not have a configured security policy project:

Screenshot_2021-05-26_at_6.25.19_PM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Sashi Kumar Kumaresan

Merge request reports