Skip to content

Pipeline execution policies with compliance framework are not visible in framework page

Summary

When a security policy is scoped to a compliance framework, the compliance framework page shows the policies that are linked to the framework. This works correctly for approval policy and scan execution policy, but it does not work for pipeline execution policy type.

Currently we link a policy to a compliance framework through compliance_framework_security_policies table. But we do not link the policy with type pipeline_execution_policy to the framework. As a part of this issue we want to fix it by linking pipeline execution policy too so that it is visible in the framework page.

Steps to reproduce

  • Create a compliance framework at a root level group
  • Create a pipeline execution policy for the root group and add the compliance framework within policy_scope
  • Go to Compliance Center -> Frameworks and select the framework and verify that the policy is not listed under Policies section
  • Go to Edit framework Screen of the framework with security policy - expand Policies section - the policy is not listed there as well.

Example Project

https://gitlab.com/groups/gl-demo-ultimate-skumar/-/security/compliance_dashboard/frameworks?id=1015773

What is the current bug behavior?

What is the expected correct behavior?

Relevant logs and/or screenshots

Policy with framework

Screenshot_2024-09-20_at_8.08.35_PM

Policies section in Framework page

Screenshot_2024-09-20_at_8.08.58_PM

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by Nataliia Radina