Skip to content

api(repos): Unbounded aggregate allocation in federated repository response #427

Description

@euxaristia

Summary

The anonymous endpoint GET /api/v1/repos/federated deserializes each reachable peer response into Vec<serde_json::Value> and accumulates rows without byte, row, or aggregate limits (crates/gitlawb-node/src/api/repos.rs:2945-2990).

Impact

A peer returning oversized JSON arrays causes unbounded heap retention and serialization work.

Remediation

  1. Bound peer HTTP response bytes.
  2. Cap rows per peer and aggregate total.
  3. Deserialize bounded typed DTOs.

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:mediumDegraded but workaround existssubsystem:apiNode REST API request/response surfacesubsystem:peersPeer announce, discovery, and registry

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions