Add ability to search instanceSecurityDashboard.projects GraphQL query
What does this MR do?
Add the search ability to the InstanceSecurityDashboard.projects GraphQL query
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Database performance
from !62933 (comment 598537990)
SELECT
"projects".*
FROM
"projects"
LEFT JOIN project_features ON projects.id = project_features.project_id
WHERE
"projects"."id" IN (
SELECT
"users_security_dashboard_projects"."project_id"
FROM
"users_security_dashboard_projects"
WHERE
"users_security_dashboard_projects"."user_id" = 8748283
)
AND (
"project_features"."security_and_compliance_access_level" > 0
OR "project_features"."security_and_compliance_access_level" IS NULL
)
AND (
(
"projects"."path" ILIKE '%Shell%'
OR "projects"."name" ILIKE '%Shell%'
)
OR "projects"."description" ILIKE '%Shell%'
)
ORDER BY projects.id
LIMIT 100
cold:
Time: 79.008 ms
- planning: 12.758 ms
- execution: 66.250 ms
- I/O read: 57.567 ms
- I/O write: 0.000 ms
Shared buffers:
- hits: 2387 (~18.60 MiB) from the buffer pool
- reads: 1306 (~10.20 MiB) from the OS file cache, including disk I/O
- dirtied: 21 (~168.00 KiB)
- writes: 0
https://gitlab.slack.com/archives/CLJMDRD8C/p1623356285239000 Details and visualization: https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/4543/commands/15974
warm:
Time: 13.606 ms
- planning: 7.344 ms
- execution: 6.262 ms
- I/O read: 0.000 ms
- I/O write: 0.000 ms
Shared buffers:
- hits: 3693 (~28.90 MiB) from the buffer pool
- reads: 0 from the OS file cache, including disk I/O
- dirtied: 0
- writes: 0
https://gitlab.slack.com/archives/CLJMDRD8C/p1623356400241500
Details and visualization: https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/4543/commands/15975
Conformity
-
I have included a changelog entry, or it's not needed. (Does this MR need a changelog?) -
I have added/updated documentation, or it's not needed. (Is documentation required?) -
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) -
I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?) -
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.) -
I have tested this MR in all supported browsers, or it's not needed. -
I have informed the Infrastructure department of a default or new setting change per definition of done, or it's not needed.
Security
Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.
-
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
Related to #321966 (closed)
Edited by Toon Claes

