Skip to content

graphql: Missing query complexity and alias bounds on repos field #428

Description

@euxaristia

Summary

POST /graphql accepts anonymous queries without depth, alias, or complexity limits (crates/gitlawb-node/src/graphql/mod.rs:79-88). Each aliased repos root field executes two unpaginated database queries (crates/gitlawb-node/src/graphql/query.rs:12-45).

Impact

One request with many aliased root fields multiplies database queries and heap allocations.

Remediation

  1. Enforce query complexity and alias limits before execution.
  2. Paginate repository results.
  3. Batch visibility lookups."

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    crate:nodegitlawb-node — the serving node and REST APIkind:securityVulnerability fix or hardeningsev:highMajor break or real security/trust risk, no easy workaroundsubsystem:apiNode REST API request/response surface

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions