Skip to content

Bound proto descriptor reads and add HTTP timeouts #597

@apstndb

Description

@apstndb

Part of #591.

Overview

Proto descriptor loading uses unbounded HTTP/file reads and http.Get() without explicit timeout handling.

Evidence

  • internal/mycli/system_variables.go:475-482
  • internal/mycli/system_variables.go:510-526
  • safer reference pattern at internal/mycli/sample_databases.go:350-385

Impact

Slow or infinite HTTP responses can hang the CLI, and large responses or unsafe local files can exhaust memory or block unexpectedly.

Acceptance criteria

  • Descriptor HTTP loads use context-aware requests with bounded timeouts.
  • Descriptor reads enforce a size limit for both HTTP and local files.
  • Local files use the repository’s hardened file-reading path where appropriate.
  • Regression coverage exists for timeout / oversize handling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions