fix(database): revoke the unused write grants on connections
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 56/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- next.js, playwright, postgresql, supabase, typescript
Línea de trabajo
Read the grants and RLS policies in supabase/migrations/20261031090100_integrations.sql, then review the connection writes in src/lib/connections/connect.ts and cooldown logic in supabase/migrations/20261031100000_sync_engine.sql. Add a migration and pgTAP coverage in supabase/tests/ for the specified grant changes, checking that rename remains allowed. Run npm run test:db and npm run db:types:check, then run the existing connections e2e spec to confirm rename, Sync now, and disconnect still work.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Context
Found by the Fable pre-production review on 2026-12-02 (main at cedc1914; every line reference below re-checked on main at cde5aa3b). Source: security and privacy readiness report, new issue 7.
authenticated may insert connections and update last_sync_requested_at (supabase/migrations/20261031090100_integrations.sql:173-175), but the app writes connections only through the admin client (src/lib/connections/connect.ts:162-164, :199-201), and the manual sync cooldown reads that column (supabase/migrations/20261031100000_sync_engine.sql:69-77; 300 s, MANUAL_SYNC_COOLDOWN_SECONDS, src/lib/jobs/queue.ts:21). No app code writes last_sync_requested_at with the user's client.
Impact: low. A workspace admin can set last_sync_requested_at to null through the Data API and request a sync again at once, skipping the cooldown, and can insert pending connection rows without limit. Both stay inside their own workspace.
Plan
- A migration revokes
insertonpublic.connectionsandupdate (last_sync_requested_at)fromauthenticated, keepingupdate (display_name)for rename. - Check the connections RLS policies and drop any insert policy that only served the grant.
- pgTAP pins the refusals and that rename still works.
Acceptance criteria
-
authenticatedcannot insert a connection or updatelast_sync_requested_at(pgTAP). - Rename, Sync now, and disconnect still work (existing e2e specs pass).
- Playwright e2e: no new spec; the existing connections specs cover the user paths.
Files and areas
One new migration, supabase/tests/ pgTAP, regenerated src/lib/supabase/database.types.ts if it changes.
Non-goals: other tables' grants.
Verification
npm run test:db, npm run db:types:check, the connections e2e spec.
Branch: <issue-number>-connections-write-grants
Model: anthropic/claude-opus-5-5 | Reasoning effort: unknown
- Lenguaje dominante
- TypeScript
- Estrellas
- 13
- Forks
- 2
- Merge medio
- 5 h 20 min
- PR fusionados (30 d)
- 287
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de eddiejaoude/StackDash
-
area: integrations documentation priority: P2 size: XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
eddiejaoude/StackDash#798 ·
Los mantenedores suelen responder en 1 día
-
area: ops documentation priority: P3 size: XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
eddiejaoude/StackDash#796 ·
Los mantenedores suelen responder en 1 día
-
area: docs documentation impact: low priority: P3 size: XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
eddiejaoude/StackDash#790 ·
Los mantenedores suelen responder en 1 día
-
area: ops bug impact: low priority: P3 size: XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
eddiejaoude/StackDash#785 ·
Los mantenedores suelen responder en 1 día
-
area: connections enhancement impact: low priority: P3 size: XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
eddiejaoude/StackDash#768 ·
Los mantenedores suelen responder en 1 día
Todos los issues de eddiejaoude/StackDash
Issues similares
-
bot:ai-assisted component:midnight-js status:untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
midnightntwrk/midnight-js#1790 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
area:vscode bug has repro platform:macos platform:vscode regression
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDAbiertocheck:passed streams:add
Dificultad 1/5 Menos de una hora Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
effort/l priority/p1 risk/high triage/core
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
iflytek/skillhub#1188 · 1 comentario ·
Los mantenedores suelen responder en 1 día