Filter by identifier name graphql api
What does this MR do and why?
Vulnerabilities GraphQL API to filter by identifier_name on the project level field alone.
It is intended to be used by the frontend in #452492 (closed)
The API arguent is behind FF vulnerability_filtering_by_identifier. The argument is ignored if the FF is not enabled.
Screenshots or screen recordings
Database
Query plans are available in !171463 (comment 2199663954)
How to set up and validate locally
-
Import project https://gitlab.com/gitlab-org/govern/threat-insights-demos/verification-projects/verify-owasp-top-10-grouping into local. After import, go to Build -> pipelines and start a new pipeline this will feed the vulnerabilities data.
-
In rails console enable FF
Feature.enable(:vulnerability_filtering_by_identifier) -
In GraphIQL run the below equivalent query for the imported project
{
project(fullPath: "bala-test-group/verify-filter-by-identifier") {
vulnerabilities(identifierName: "CVE-2019-10086") {
nodes {
id
identifiers {
name
}
}
}
}
}
- It should display only the filtered vulnerability with the identifier name as shown in the screenshot above.
Related to #432419 (closed)
Edited by Bala Kumar
