Coverage Fuzzing artifact download shows up incorrectly on Pipeline -> Security Tab
Summary
Bug introduced as a result of a recent refactor - #328194 (closed)
The security tab shows the Coverage Fuzzing
download dropdown when there are not artifacts for it, and when no jobs of that type were run.
Bug Cause:
We don't conditionally render the button based on the enabledReports
type like we do in MR widgets. On a MR we know the enabled reports for that report. For pipeline we don't know what's 'enabled" ahead of time. We need to use a different approach for determining if a pipeline has a certain report type.
We can use the securityReportSummary
field from GraphQL, and infer based on the report summaries that aren't null, which report types we have data for.
Implementation Plan
- Create computed prop
hasCoverageFuzzing
that doesreturn Boolean(securityReportSummary.coverageFuzzing)
- Add
v-if=hasCoverageFuzzing
topipeline-artifact-download
component in https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/assets/javascripts/security_dashboard/components/security_dashboard_vuex.vue#L116
Steps to reproduce
- Run any security job other than coverage fuzzing
- Navigate to the Pipeline -> Security Tab
Example Project
What is the current bug behavior?
Shows coverage fuzzing download UI even though there is no coverage fuzzing job.
What is the expected correct behavior?
Coverage fuzzing dropdown only shows up when there was a fuzzing job run and there is an artifact to download.
Relevant logs and/or screenshots
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)