#5190·gbrain

Two schema functions are created without a pinned search_path (Supabase linter: function_search_path_mutable)

Author: armandovargashCreated Sep 17, 2026Updated Sep 17, 2026

Supabase's database linter flags two functions created by gbrain's schema as function_search_path_mutable:

  • gbrain_fact_fingerprint
  • gbrain_preserve_fact_withdrawal

Both run without a pinned search_path, which is the usual hardening advice for SECURITY DEFINER-adjacent or trigger-invoked functions: a role with a writable schema earlier in the resolution path can shadow a referenced object.

Low severity on a direct-connection brain (nothing else writes schemas here), but it is a one-line fix at definition time — SET search_path = public, pg_temp — and it removes a standing WARN from every hosted brain's advisor report.

Environment: 0.50.5.0 schema on Supabase Postgres 17; extensions vector and pg_trgm also live in public, which the same linter flags separately.