feat: bound resource usage when processing sync source payloads

Aperta
#2,133 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@andrearcaina ci sta già lavorando.

Dal 24/11/2026.

  • #2138 di @andrearcaina — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
46/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go

Direzione di ricerca

Start with core/pkg/sync/http/http_sync.go and core/pkg/evaluator/json.go, then compare the HTTP body handling with the serving side's max-request-body and gRPC sync's MaxMsgSize. Trace how update failures are logged and how flag state is preserved. Done means oversized HTTP responses and evaluator expansion fail the update without a crash or changing existing flag state.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

good first issue help wanted

Sync sources are trusted, but we can cheaply guard against oversized or pathological payloads from a misbehaving source.

  • HTTP sync response size: core/pkg/sync/http/http_sync.go reads the full response body with io.ReadAll and no limit. Add a configurable cap (io.LimitReader), similar to max-request-body on the serving side and MaxMsgSize on gRPC sync.
  • $evaluators expansion: transposeEvaluators (core/pkg/evaluator/json.go) substitutes each $ref via string replacement on the serialized config, so output grows with evaluator size times reference count. Ideally resolve refs on parsed JSON and reject updates that exceed a limit.

Both should fail the update (and log) rather than crash, and leave the existing flag state intact.

Lingua principale
Go
Stelle
1k
Fork
151
Merge medio
5g 5h
PR unite (30g)
14

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di open-feature/flagd

Tutte le issue di open-feature/flagd

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.