Make sure that `vulnerabilities` is always defined in the Dependency List
- Related issue: #218497 (closed)
What does this MR do?
This fixes a bug where we tried to access vulnerabilities.length
in dependencies objects even when vulnerabilities
doesn't exist, which would happen when the user is authorized to see the dependencies list but not the associated vulnerabilities.
How to test this?
- Make sure you have a public project with dependency scanning setup that has some entries in Security & Compliance > Dependency List.
- Open a new window in incognito mode and navigate to the project's Security & Compliance > Dependency List page.
Screenshots
Before | After |
---|---|
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines - [-] Merge request performance guidelines
-
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Edited by 🤖 GitLab Bot 🤖