Skip to content

TypeError: "t.vulnerabilities is undefined" in dependencies page

Summary

Error TypeError: "t.vulnerabilities is undefined" in console, no dependencies scanning results is shown, This bug happens on GitLab.com

Steps to reproduce

visit using firefox:

https://gitlab.com/gitlab-org/gitlab/-/dependencies

or:

https://gitlab.com/almtoolbox/hamagen-ci/-/dependencies

open console (click F12), see the error.

TypeError: "t.vulnerabilities is undefined"
    anyDependencyHasVulnerabilities https://assets.gitlab-static.net/assets/webpack/pages.projects.dependencies.index.f453f92e.chunk.js:1
    anyDependencyHasVulnerabilities https://assets.gitlab-static.net/assets/webpack/pages.projects.dependencies.index.f453f92e.chunk.js:1

Implementation plan

  • Handle the case the API response might not define dependencies[].vulnerabilities, if the user doesn't have the necessary permissions. This means either:

The above could equally be done on the backend, but that's not obviously easier or better.

Edited by Mark Florian