The instances security dashboard retrieves a bunch of information by their relationship to a project subset. Likely a variety of these will need to be fixed here.
I'm asking this b/c I might end up using InstanceSecurityDashboard#project
to solve Resolve cross-join in ProjectsGrades.grades_for... (#503387 - closed)
when .grades_for gets an instance sec dashboard.
Then I would have to address this very issue,
and remove allow_cross_joins_across_databases.
OK, so in !171725 (closed) you're changing #vulnerabilities to collect project IDs separately (with a limit),
which solves one of the two cross-database joins that link to this issue.
rspec ./ee/spec/graphql/resolvers/vulnerabilities_resolver_spec.rb:262 # Resolvers::VulnerabilitiesResolver#resolve when resolving vulnerabilities for an instance security dashboard when user has valid projects returns vulnerabilities for all projects on the current user's instance security dashboardrspec ./ee/spec/graphql/resolvers/vulnerabilities/scanners_resolver_spec.rb:46 # Resolvers::Vulnerabilities::ScannersResolver#resolve when listing scanners for instance dashboard rspec './ee/spec/graphql/resolvers/vulnerability_severities_count_resolver_spec.rb[1:1:3:1:9:1:1:1:1:1]' # Resolvers::VulnerabilitySeveritiesCountResolver#resolve when resolving vulnerabilities for an instance security dashboard when there is a current user behaves like vulnerability filterable #validate_filters for owasp_top_10 when filters are valid filter_value: "none" does not raise any errorrspec './ee/spec/graphql/resolvers/vulnerability_severities_count_resolver_spec.rb[1:1:3:1:9:1:1:1:2:1]' # Resolvers::VulnerabilitySeveritiesCountResolver#resolve when resolving vulnerabilities for an instance security dashboard when there is a current user behaves like vulnerability filterable #validate_filters for owasp_top_10 when filters are valid filter_value: "A1_2017" does not raise any errorrspec ./ee/spec/graphql/resolvers/vulnerability_severities_count_resolver_spec.rb:374 # Resolvers::VulnerabilitySeveritiesCountResolver#resolve when resolving vulnerabilities for an instance security dashboard when there is a current user returns vulnerabilities for all projects on the current user's instance security dashboardrspec ./ee/spec/graphql/resolvers/vulnerability_severities_count_resolver_spec.rb:383 # Resolvers::VulnerabilitySeveritiesCountResolver#resolve when resolving vulnerabilities for an instance security dashboard when there is a current user when given a dismissal_reason returns vulnerability counts that match the dismissal reasonrspec ./ee/spec/graphql/resolvers/vulnerability_severities_count_resolver_spec.rb:391 # Resolvers::VulnerabilitySeveritiesCountResolver#resolve when resolving vulnerabilities for an instance security dashboard when there is a current user when filtering by state only returns vulnerabilities with matching statesrspec ./ee/spec/graphql/resolvers/vulnerability_severities_count_resolver_spec.rb:399 # Resolvers::VulnerabilitySeveritiesCountResolver#resolve when resolving vulnerabilities for an instance security dashboard when there is a current user when filtering by state and report type only returns vulnerabilities with matching statesrspec ./ee/spec/graphql/resolvers/vulnerability_severities_count_resolver_spec.rb:414 # Resolvers::VulnerabilitySeveritiesCountResolver#resolve when resolving vulnerabilities for an instance security dashboard when there is a current user when filtering by capped returns count with limit appliedrspec ./ee/spec/graphql/resolvers/vulnerability_severities_count_resolver_spec.rb:422 # Resolvers::VulnerabilitySeveritiesCountResolver#resolve when resolving vulnerabilities for an instance security dashboard when there is a current user when has_ai_resolution is set to true only returns count for vulnerabilities with AI resolutionsrspec ./ee/spec/graphql/resolvers/vulnerability_severities_count_resolver_spec.rb:430 # Resolvers::VulnerabilitySeveritiesCountResolver#resolve when resolving vulnerabilities for an instance security dashboard when there is a current user when has_ai_resolution is set to false only returns count for vulnerabilities without AI resolutionsrspec ./ee/spec/graphql/resolvers/vulnerability_severities_count_resolver_spec.rb:443 # Resolvers::VulnerabilitySeveritiesCountResolver#resolve when resolving vulnerabilities for an instance security dashboard when there is a current user when vulnerability_report_vr_filter FF is disabled when has_ai_resolution is set to true only ignores filter and returns all countrspec ./ee/spec/graphql/resolvers/vulnerability_severities_count_resolver_spec.rb:451 # Resolvers::VulnerabilitySeveritiesCountResolver#resolve when resolving vulnerabilities for an instance security dashboard when there is a current user when vulnerability_report_vr_filter FF is disabled when has_ai_resolution is set to false only ignores filter and returns all countrspec ./ee/spec/models/instance_security_dashboard_spec.rb:210 # InstanceSecurityDashboard#vulnerability_reads when the user cannot read all resources returns only vulnerability_reads from projects on their dashboard that they can readrspec ./ee/spec/models/instance_security_dashboard_spec.rb:218 # InstanceSecurityDashboard#vulnerability_reads when the user can read all resources returns vulnerability_reads from all projects on the user's dashboardrspec ./ee/spec/models/instance_security_dashboard_spec.rb:229 # InstanceSecurityDashboard#vulnerability_scanners when the user cannot read all resources returns only vulnerability scanners from projects on their dashboard that they can readrspec ./ee/spec/models/instance_security_dashboard_spec.rb:237 # InstanceSecurityDashboard#vulnerability_scanners when the user can read all resources returns vulnerability scanners from all projects on the user's dashboardrspec ./ee/spec/requests/api/graphql/vulnerabilities/cve_enrichment_spec.rb:51 # Query.vulnerabilities.cveEnrichment when security_dashboard feature is licensed returns cve enrichmentrspec ./ee/spec/requests/api/graphql/vulnerabilities/cve_enrichment_spec.rb:61 # Query.vulnerabilities.cveEnrichment when security_dashboard feature is licensed returns nil for non-cve identifierrspec ./ee/spec/requests/api/graphql/vulnerabilities/details_spec.rb:180 # Query.vulnerabilities.details returns a vulnerability detailsrspec ./ee/spec/requests/api/graphql/vulnerabilities/external_issue_links_spec.rb:125 # Query.vulnerabilities.externalIssueLinks when queried without reactive caching returns a list of all VulnerabilityExternalIssueLinkrspec ./ee/spec/requests/api/graphql/vulnerabilities/external_issue_links_spec.rb:60 # Query.vulnerabilities.externalIssueLinks when queried for the first time with reactive caching schedules a background job to fetch data from Jirarspec ./ee/spec/requests/api/graphql/vulnerabilities/external_issue_links_spec.rb:67 # Query.vulnerabilities.externalIssueLinks when queried for the first time with reactive caching returns null as value for externalIssuerspec ./ee/spec/requests/api/graphql/vulnerabilities/fields_spec.rb:50 # Query.vulnerabilities {...fields} allows nilrspec ./ee/spec/requests/api/graphql/vulnerabilities/fields_spec.rb:56 # Query.vulnerabilities {...fields} populates required fieldsrspec ./ee/spec/requests/api/graphql/vulnerabilities/fields_spec.rb:63 # Query.vulnerabilities {...fields} when finding has solution returns solutionrspec ./ee/spec/requests/api/graphql/vulnerabilities/fields_spec.rb:72 # Query.vulnerabilities {...fields} when vulnerability has no description and finding has description returns finding informationrspec ./ee/spec/requests/api/graphql/vulnerabilities/fields_spec.rb:86 # Query.vulnerabilities {...fields} when vulnerability has description and finding has description returns vulnerability informationrspec ./ee/spec/requests/api/graphql/vulnerabilities/identifiers_spec.rb:58 # Query.vulnerabilities.identifiers returns a vulnerability identifiersrspec ./ee/spec/requests/api/graphql/vulnerabilities/issue_links_spec.rb:49 # Query.vulnerabilities.issueLinks when valid linkType argument is provided returns a list of VulnerabilityIssueLink with `CREATED` linkTyperspec ./ee/spec/requests/api/graphql/vulnerabilities/issue_links_spec.rb:55 # Query.vulnerabilities.issueLinks when valid linkType argument is provided returns a list of VulnerabilityIssueLink with `RELATED` linkTyperspec ./ee/spec/requests/api/graphql/vulnerabilities/issue_links_spec.rb:63 # Query.vulnerabilities.issueLinks when no arguments are provided returns a list of all VulnerabilityIssueLinkrspec ./ee/spec/requests/api/graphql/vulnerabilities/location_spec.rb:127 # Query.vulnerabilities.location when the vulnerability was found by a container scan returns a container locationrspec ./ee/spec/requests/api/graphql/vulnerabilities/location_spec.rb:157 # Query.vulnerabilities.location when the vulnerability was found by a generic scanner returns a generic locationrspec ./ee/spec/requests/api/graphql/vulnerabilities/location_spec.rb:200 # Query.vulnerabilities.location when the vulnerability was found by a cluster image scan returns a cluster image scanning locationrspec ./ee/spec/requests/api/graphql/vulnerabilities/location_spec.rb:248 # Query.vulnerabilities.location when the vulnerability was found by a dependency scan returns a location in a dependencyrspec ./ee/spec/requests/api/graphql/vulnerabilities/location_spec.rb:287 # Query.vulnerabilities.location when the vulnerability was found by a SAST scan returns the file and line numbers where the vulnerability is locatedrspec ./ee/spec/requests/api/graphql/vulnerabilities/location_spec.rb:327 # Query.vulnerabilities.location when the vulnerability was found by a secret detection scan returns the file and line numbers where the vulnerability is locatedrspec ./ee/spec/requests/api/graphql/vulnerabilities/location_spec.rb:363 # Query.vulnerabilities.location when the vulnerability was found by a DAST scan returns the URL where the vulnerability was foundrspec ./ee/spec/requests/api/graphql/vulnerabilities/primary_identifier_spec.rb:55 # Query.vulnerabilities.primaryIdentifier returns a vulnerability identifiersrspec ./ee/spec/requests/api/graphql/vulnerabilities/scanner_spec.rb:52 # Query.vulnerabilities.scanner returns a vulnerability scannerrspec './ee/spec/requests/api/graphql/vulnerabilities/sort_spec.rb[1:1:1:1:2:1:1]' # Query.vulnerabilities.sort sort by severity sort by SEVERITY_ASC behaves like sorted paginated query when sorting sorts correctlyrspec './ee/spec/requests/api/graphql/vulnerabilities/sort_spec.rb[1:1:1:1:2:1:2:1]' # Query.vulnerabilities.sort sort by severity sort by SEVERITY_ASC behaves like sorted paginated query when sorting when paginating paginates correctlyrspec './ee/spec/requests/api/graphql/vulnerabilities/sort_spec.rb[1:1:2:1:2:1:1]' # Query.vulnerabilities.sort sort by severity sort by SEVERITY_DESC behaves like sorted paginated query when sorting sorts correctlyrspec './ee/spec/requests/api/graphql/vulnerabilities/sort_spec.rb[1:1:2:1:2:1:2:1]' # Query.vulnerabilities.sort sort by severity sort by SEVERITY_DESC behaves like sorted paginated query when sorting when paginating paginates correctlyrspec './ee/spec/requests/api/graphql/vulnerabilities/sort_spec.rb[1:2:1:1:2:1:1]' # Query.vulnerabilities.sort sort by severity sort by SEVERITY_ASC behaves like sorted paginated query when sorting sorts correctlyrspec './ee/spec/requests/api/graphql/vulnerabilities/sort_spec.rb[1:2:1:1:2:1:2:1]' # Query.vulnerabilities.sort sort by severity sort by SEVERITY_ASC behaves like sorted paginated query when sorting when paginating paginates correctlyrspec './ee/spec/requests/api/graphql/vulnerabilities/sort_spec.rb[1:2:2:1:2:1:1]' # Query.vulnerabilities.sort sort by severity sort by SEVERITY_DESC behaves like sorted paginated query when sorting sorts correctlyrspec './ee/spec/requests/api/graphql/vulnerabilities/sort_spec.rb[1:2:2:1:2:1:2:1]' # Query.vulnerabilities.sort sort by severity sort by SEVERITY_DESC behaves like sorted paginated query when sorting when paginating paginates correctly