Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 55.2k
    • Issues 55.2k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1.6k
    • Merge requests 1.6k
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #288755
Closed
Open
Issue created Nov 26, 2020 by Thiago Figueiró@thiagocsfDeveloper

Vulnerability identifier shows as link even though it doesn't have a link

Summary

Identifiers in a vulnerability finding are always rendered as a link even when the identifier doesn't have a URL associated with it.

Steps to reproduce

  1. Create a vulnerability report with an identifier that doesn't have a link; e.g.:
       "identifiers": [
         {
           "type": "test",
           "name": "1",
           "value": "1"
         }
       ]
  2. Run a CI pipeline with a job that imports said report; e.g.:
    container-scanning:
      script:
        - mv fake-report.json gl-container-scanning-report.json
      artifacts:
        reports:
          container_scanning: gl-container-scanning-report.json
  3. If the pipeline wasn't on the default branch, merge it so the findings show in the vulnerability report
  4. Open the vulnerability

Example Project

https://gitlab.com/thiagocsf-group/security-reports/-/security/vulnerabilities/4893215

What is the current bug behavior?

The identifier will show in the page as a link.

What is the expected correct behavior?

The identifier doesn't have a link.

Relevant logs and/or screenshots

image

image

Output of checks

This bug happens on GitLab.com

Possible fixes

In ee/app/assets/javascripts/vulnerabilities/components/details.vue line 285, don't use gl-link when identifier.url is empty/blank

285           <gl-link :href="identifier.url" data-testid="identifier" target="_blank">
286             {{ identifier.name }}
287           </gl-link>
<a data-testid="identifier" rel="noopener noreferrer" target="_blank" class="gl-link">
          1
        </a>

/cc @matt_wilson @andyvolpe @lkerr

Edited Nov 27, 2020 by Thiago Figueiró
Assignee
Assign to
Time tracking