Skip to content

Resolve "Follow-up from "Fix artifact downloads on Security tab""

What does this MR do and why?

It makes hasDastArtifactDownload within ee/app/assets/javascripts/security_dashboard/components/pipeline/security_reports_summary.vue more readable, as per a review suggestion:

Maintainer

Suggestion (non-blocking / follow-up): This took me a while to understand. 😅 WDYT about making this condition more declarative through variable names? For example creating a computed prop to describe this.findArtifacts(SECURITY_REPORT_TYPE_ENUM_DAST).length > 0) and then referencing it here. I think it would help make this more maintainable.

See comment: !89217 (comment 984727926)

Screenshots or screen recordings

N/A

How to set up and validate locally

  1. Import the following gitlab project 2022-06-03_05-04-949_gitlab-examples_security_secur_export.tar.gz

  2. Run the pipeline on master, wait for it to complete

  3. Navigate to the pipeline page

  4. Click on a single pipeline

  5. Then click on the Security tab

  6. Verify you can download each artifact

  7. Verify artifact contents correspond to the report type

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #365202 (closed)

Edited by Jiaan Louw

Merge request reports