Skip to content
Snippets Groups Projects

Add the right side of 'code flow' that including code viewer

Merged Chen Charnolevsky requested to merge 469653-vulnerability-code-flow-P5 into master
All threads resolved!

What does this MR do and why?

Add the right side of 'code flow' that including code viewer

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
Screen_Recording_2024-06-10_at_15.43.33 Screen_Recording_2024-07-07_at_14.45.03

How to set up and validate locally

  1. Upload a GitLab Ultimate license
  2. Enable the feature flag (echo "Feature.enable(:vulnerability_code_flow)" | rails c)
  3. Clone the code flow project and run his pipeline to display vulnerabilities
  4. Navigate to the project => Secure => Vulnerability report => Select the first vulnerability to navigate to the vulnerability details page
  5. Apply the following patch to show the new features
Patch
diff --git a/ee/app/assets/javascripts/vulnerabilities/components/vulnerability.vue b/ee/app/assets/javascripts/vulnerabilities/components/vulnerability.vue
index ca4110274476..319e8f7180ae 100644
--- a/ee/app/assets/javascripts/vulnerabilities/components/vulnerability.vue
+++ b/ee/app/assets/javascripts/vulnerabilities/components/vulnerability.vue
@@ -56,6 +56,7 @@ export default {
       },
     },
     showCodeFlowTabs() {
+      return true
       return (
         this.glFeatures.vulnerabilityCodeFlow && !isEmpty(this.vulnerability.details.codeFlows)
       );
diff --git a/ee/app/assets/javascripts/vulnerabilities/components/vulnerability_details.vue b/ee/app/assets/javascripts/vulnerabilities/components/vulnerability_details.vue
index bfbc47e4c041..72fd47398163 100644
--- a/ee/app/assets/javascripts/vulnerabilities/components/vulnerability_details.vue
+++ b/ee/app/assets/javascripts/vulnerabilities/components/vulnerability_details.vue
@@ -221,6 +221,7 @@ export default {
       return this.vulnerability.location?.file && this.vulnerability.location?.startLine;
     },
     showCodeFlowButton() {
+      return true
       return (
         this.glFeatures.vulnerabilityCodeFlow && !isEmpty(this.vulnerability.details.codeFlows)
       );
  1. Navigate to code flow tab
  2. Verify code viewer appears with highlighted lines
  3. Go through the steps using the up and down buttons and verify that the highlight has changed
  4. Change theme and verify the highlight colors change

Related to #469653 (closed) and #458062

Edited by Chen Charnolevsky

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Ammar Alakkad
  • Ammar Alakkad
  • Ammar Alakkad removed review request for @aalakkad

    removed review request for @aalakkad

  • Chen Charnolevsky added 799 commits

    added 799 commits

    • eac93591...80e4e126 - 788 commits from branch master
    • 935cde71 - 1 earlier commit
    • f25bbcf3 - CR changes
    • fd594aee - Add the left side of 'code flow' that including description and steps
    • 2c0ba398 - Disable feature flag
    • b2a1b401 - Add the left side of 'code flow' that including description and steps
    • 9a7357a8 - Disable feature flag
    • c3ebaee5 - Update 'vulnerability_file_contents' with new highlighted component
    • 29bc1143 - move functions
    • 0dc6f8af - Add the right side of 'code flow' that including code viewer
    • 9fedc161 - Coloring changes
    • 21f1fab4 - Update translate file

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • requested review from @aalakkad

  • Ammar Alakkad approved this merge request

    approved this merge request

  • Ammar Alakkad requested review from @aturinske and removed review request for @aalakkad

    requested review from @aturinske and removed review request for @aalakkad

  • Alexander Turinske
  • Alexander Turinske
  • Alexander Turinske
  • requested review from @mfangman

  • Alexander Turinske
  • Alexander Turinske
  • Alexander Turinske
  • Alexander Turinske
  • Alexander Turinske
  • Alexander Turinske
  • Alexander Turinske
  • Alexander Turinske
  • Chen Charnolevsky changed the description

    changed the description

  • Chen Charnolevsky changed the description

    changed the description

  • mentioned in issue #474433 (closed)

    • Resolved by Dheeraj Joshi

      Hi @ccharnolevsky, I’ve been trying to review this MR, but I’m having trouble getting a runner to execute the security scans. My local GDK isn’t working, and I’ve also had no luck with GitPod and GDK-in-a-box.

      I’ll continue troubleshooting the runner issue so I can review your work live, but screenshots of the code flow for each syntax highlighting theme could be a suitable alternative. If you have any tips or resources to help me set up a runner and review a tainted data vulnerability in the GDK, I’d greatly appreciate it. Thanks!

  • Alexander Turinske requested review from @djadmin and removed review request for @aturinske

    requested review from @djadmin and removed review request for @aturinske

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    • 93a7105c - Add the left side of 'code flow' that including description and steps

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    • 600345d3 - Add the left side of 'code flow' that including description and steps

    Compare with previous version

  • Michael Fangman approved this merge request

    approved this merge request

  • Michael Fangman removed review request for @mfangman

    removed review request for @mfangman

  • Dheeraj Joshi
  • Dheeraj Joshi
  • Dheeraj Joshi
  • Dheeraj Joshi
  • Dheeraj Joshi mentioned in merge request !158904 (merged)

    mentioned in merge request !158904 (merged)

  • mentioned in issue #475010 (closed)

  • mentioned in issue #475012 (closed)

  • mentioned in issue #475022 (closed)

  • added 1 commit

    • cdcad787 - CR changes + fix pipeline failure

    Compare with previous version

  • Chen Charnolevsky requested review from @djadmin

    requested review from @djadmin

  • Dheeraj Joshi resolved all threads

    resolved all threads

  • Dheeraj Joshi approved this merge request

    approved this merge request

  • Dheeraj Joshi
  • Great work, @ccharnolevsky! I really appreciate you considering all the review feedback and creating follow-up issues.

  • Dheeraj Joshi resolved all threads

    resolved all threads

  • Chen Charnolevsky added 1303 commits

    added 1303 commits

    • cdcad787...f2729d71 - 1301 commits from branch master
    • 9f2796b1 - Add the left side of 'code flow' that including description and steps
    • b761bf46 - CR changes + fix pipeline failure

    Compare with previous version

  • Dheeraj Joshi enabled automatic add to merge train when checks pass

    enabled automatic add to merge train when checks pass

  • Dheeraj Joshi started a merge train

    started a merge train

  • Dheeraj Joshi mentioned in commit 57eeba34

    mentioned in commit 57eeba34

  • added workflowstaging label and removed workflowcanary label

  • Miranda Fluharty mentioned in merge request !173342 (merged)

    mentioned in merge request !173342 (merged)

  • Samantha Ming mentioned in merge request !176597 (closed)

    mentioned in merge request !176597 (closed)

  • Please register or sign in to reply
    Loading