Skip to content

docs(agents): broaden supabase-backend-auditor triggers to api/* (THI-339)#368

Merged
thierryvm merged 1 commit into
mainfrom
docs/thi-339-supabase-auditor-trigger
Jun 2, 2026
Merged

docs(agents): broaden supabase-backend-auditor triggers to api/* (THI-339)#368
thierryvm merged 1 commit into
mainfrom
docs/thi-339-supabase-auditor-trigger

Conversation

@thierryvm

Copy link
Copy Markdown
Owner

Contexte

Finding d'auto-critique de scope remonté par supabase-backend-auditor lui-même lors du re-run WS3 du 02/06/2026 (son tout premier run post-fix THI-326, enfin invocable).

En auditant la surface support (THI-319/320/325), l'agent a localisé le sender Resend dans une route Vercel Edge api/support/notify.tspas dans une Edge Function Deno supabase/functions/*.

Gap corrigé

Le description: frontmatter listait comme triggers supabase/functions/*, policy storage.objects, code d'upload, et rendu de contenu uploadé — mais pas les routes api/* Vercel qui manipulent un secret backend (RESEND_API_KEY) ou font du BOLA sur un objet. Le body (ligne 10) couvrait déjà la frontière de scope sur api/support/notify.ts, mais le trigger ne la captait pas → un main agent lisant la description au pied de la lettre pouvait ne pas invoquer l'agent sur le fichier qu'il devait justement auditer.

Le bon discriminant = la SURFACE (upload / storage / secret-backend), pas le RUNTIME (Deno vs Vercel Edge).

Changement

1 ligne de frontmatter : ajout d'une phrase au description: élargissant le trigger aux routes api/* runtime-agnostic.

Sécurité du changement (anti-THI-326)

Liens

  • Doctrine flotte auto-améliorante : THI-321
  • Fix chargement agent : THI-326
  • Ticket : THI-339

🤖 Generated with Claude Code

…ad/storage/secret routes (THI-339)

Self-critique finding from the 02/06 WS3 re-run (first run post-THI-326):
the Resend sender lives in a Vercel Edge route (api/support/notify.ts),
not a Deno Edge Function. The frontmatter only listed supabase/functions/*
as a trigger, so the agent could be skipped on the very file it should
audit (backend secret + BOLA on an object).

Broaden the trigger: the discriminant is the SURFACE (upload / storage /
secret-backend), not the runtime (Deno vs Vercel Edge). Single-line
frontmatter edit, no colon+space (THI-326 trap), guarded by
src/test/agentFrontmatter.test.ts (21/21 green).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
terminal-learning Ready Ready Preview, Comment Jun 2, 2026 6:42pm

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @thierryvm, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@thierryvm thierryvm merged commit 19ae363 into main Jun 2, 2026
4 checks passed
@thierryvm thierryvm deleted the docs/thi-339-supabase-auditor-trigger branch June 2, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant