Backend: Add hasRemediations filter to Vulnerability Report
Why are we doing this work
This is the backend issue to add hasRemediations:boolean parameter to the vulnerabilities query.
query {
project(fullPath: "gitlab-org/gitlab") {
vulnerabilities(reportType:DEPENDENCY_SCANNING, hasRemediations:true) {
nodes {
hasRemediations
}
}
}
}Relevant links
Non-functional requirements
- Documentation: Update GraphQL docs
- Performance: Need to see how this would affect the performance of
vulnerability_reads - Testing: New tests will need to be added
- E2E testing: Make sure e2e: package-and-test is run and govern specs are green
Implementation plan
This issue is going to require multiple MRs (pending some discussion with the backend team on vulnerabiity_reads usage):
database implementations are tracked in #420617 (closed)
- backend : Add
has_remediationsrelation toVulnerabilities::Readmodel - backend : Add
has_remediationsfilter toVulnerabilityReadsFinder - backend : Add
hasRemediationsfield and argument tovulnerabilitiesquery - backend : Add
hasRemediationsfield and argument toVulnerabilitySeveritiesCountquery
backend implementations are tracked in this issue.
Once MR 1 is completed, MR groups 2/3 and 4/5/6 can be done in parallel
Verification steps
Edited by Subashis Chakraborty