Skip to content

Add scanner filter in Vulnerability GraphQL API

Alan (Maciej) Paruszewski requested to merge 210327-add-scanner-filter into master

What does this MR do?

Related to #210327 (closed)

This MR adds a new filter that allows querying vulnerabilities by the scanner that discovered them.

Query Plan

SELECT "vulnerabilities".*
FROM "vulnerabilities"
  INNER JOIN "vulnerability_occurrences" ON "vulnerability_occurrences"."vulnerability_id" = "vulnerabilities"."id"
  INNER JOIN "vulnerability_scanners" ON "vulnerability_scanners"."id" = "vulnerability_occurrences"."scanner_id"
WHERE "vulnerability_scanners"."external_id" IN ('klar', 'gemnasium')
LIMIT 100

https://explain.depesz.com/s/H2vr (153ms)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Alan (Maciej) Paruszewski

Merge request reports