API hardening: request size limit, anonymous cache growth, database error text sent to clients, unencrypted webhook secrets

Aperta
#217 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python, typescript

Direzione di ricerca

The body names app/astro.config.mjs, app/src/lib/.../schema-cache.ts, route files, and notification_channels.config. Start by reading those entry points and tracing how requests, cache rows, errors, webhook settings, and sign-in callbacks are handled. The items are independent and can be split; for any one, done means implementing its stated safeguard and confirming the affected behavior.

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

Descrizione

enhancement

Found in the 2026-11-29 whole-repo review. Reported by a reviewer; items are independent and can be split.

  • No request size limit. app/astro.config.mjs sets no body size limit, so the server adapter default (very large) applies; some routes read the whole body before checking their own 5 MB cap. Set a limit of a few MB.
  • Cache grows forever. The schema-fetch route stores each fetched URL in stac_higher.schema_cache (app/src/lib/.../schema-cache.ts) and nothing deletes old rows. Purge expired rows.
  • No rate limiting anywhere. Add basic per-user/per-address limits on the utility routes.
  • Raw error text returned. About 75 places across 47 route files do catch (err) { return jsonResponse(500, { error: err.message }) }, which sends database error text and object names to the browser. Add one shared helper that logs the detail and returns a generic message.
  • Webhook secrets in plain text. The signing secret for notification webhooks is stored unencrypted in notification_channels.config, while connection credentials are encrypted. Webhook URLs (which for chat tools are themselves secret) are shown to ordinary group members. Encrypt the secret; mask the URL except for operators.
  • Small login gaps. The sign-in callback only verifies the identity token if one is present; the session secret has no minimum length.
Lingua principale
Python
Stelle
0
Fork
2
Merge medio
8h 26m
PR unite (30g)
47

Preparare l'ambiente

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 TechTraverse/stac-higher

Tutte le issue di TechTraverse/stac-higher

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.