Pipeline - Security tab `Scan Details` component is empty while data loads

Summary

Steps to reproduce

Access a the security tab on a newly run pipeline. Example: https://gitlab.com/gitlab-org/gitlab/-/pipelines/711057263/security

Example Project

What is the current bug behavior?

The Scan Details component allows you to click the details button when no security report summary data is returned, resulting in an empty content area.

What is the expected correct behavior?

The component details should only be expandable if the data is available. Otherwise it should be hidden.

Relevant logs and/or screenshots

image

Output of checks

/label reproduced on GitLab.com

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

Implementation plan

  • Update v-if="reportSummary" in ee/app/assets/javascripts/security_dashboard/components/pipeline/pipeline_security_dashboard.vue#L149 to a computed property which checks whether any of the scanners has an object as value.

Verification steps

  1. import security-reports
  2. go to pipelines and click "Run pipeline" (run pipeline on master)
  3. it will redirect you to the pipeline
  4. you might need to refresh a couple of times until the security tab is visible
  5. click on security tab
  6. validate the "Scan details" component is not shown
  7. wait until pipeline from MR is finished and load "security" tab again
  8. validate that scan details is shown now and you can click "show details" to expand

scan-details-2

Edited by Lorenz van Herwaarden