Move 'code flow' to 'ee/vue_shared' folder
What does this MR do and why?
'code flow' needs to be in shared folder because there is more then one component that use it:
- Vulnerability report > details view;
- Pipeline vuln report > details view;
- MR widget > details view; (still in dev)
- MR diff > details view (still in dev)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Upload a GitLab Ultimate license
- Clone the code flow project and run his pipeline to display vulnerabilities
- If the pipeline is failed, do those steps:
- Go to your locally project and edit with web IDE
- Create a new file called:
gl-sast-report.json
and copy the content from here: gl-sast-report.json - Edit
.gitlab-ci.yml
and pasted this content: gitlab-ci.yml - Create an MR and merge him
- Then the pipeline will be successful and you will see two more vulnerabilities in the
vulnerability report
page because this pipeline is simulates the artifact
- For vulnerability report page:
- Navigate to the project => Secure => Vulnerability report => Select the first vulnerability to navigate to the vulnerability details page
- Apply the following patch to show the new features
- For pipeline page:
- Navigate to the project => Build => Pipelines => Select the first vulnerability to navigate to the vulnerability details page
- Apply the following patch to show the new features
Patch
diff --git a/ee/app/assets/javascripts/security_dashboard/components/shared/vulnerability_details_graphql/index.vue b/ee/app/assets/javascripts/security_dashboard/components/shared/vulnerability_details_graphql/index.vue
--- a/ee/app/assets/javascripts/security_dashboard/components/shared/vulnerability_details_graphql/index.vue
+++ b/ee/app/assets/javascripts/security_dashboard/components/shared/vulnerability_details_graphql/index.vue
@@ -56,6 +56,7 @@ export default {
},
},
showCodeFlowButton() {
+ return true
return (
this.glFeatures.vulnerabilityCodeFlow &&
this.glFeatures.pipelineVulnerabilityCodeFlow &&
vulnDetailCodeFlow &&
vulnDetailCodeFlow?.items.length > 0
);
diff --git a/ee/app/assets/javascripts/security_dashboard/components/pipeline/vulnerability_finding_modal.vue b/ee/app/assets/javascripts/security_dashboard/components/pipeline/vulnerability_finding_modal.vue
--- a/ee/app/assets/javascripts/security_dashboard/components/pipeline/vulnerability_finding_modal.vue
+++ b/ee/app/assets/javascripts/security_dashboard/components/pipeline/vulnerability_finding_modal.vue
@@ -56,6 +56,7 @@ export default {
},
},
showCodeFlowTabs() {
+ return true
return (
this.glFeatures.vulnerabilityCodeFlow &&
this.glFeatures.pipelineVulnerabilityCodeFlow &&
this.codeFlowData?.items.length > 0
);
- Verify that all content in 'Code flow' tab behaves as expected
Numbered steps to set up and validate the change are strongly suggested.
Related to #493810 (closed)