Managed pg_net is non-relocatable and remains in public (extrelocatable=false) #47079
Replies: 3 comments
-
🔗 Related PRs#46686 - Remove unexposed extensions [merged] 📝 Issue PlannerCheck the box below or use the
🧪 Issue enrichment is currently in open beta.You can configure auto-planning by selecting labels in the issue_enrichment configuration. To disable automatic issue enrichment, add the following to your issue_enrichment:
auto_enrich:
enabled: false💬 Have feedback or questions? Drop into our discord! |
Beta Was this translation helpful? Give feedback.
-
|
Hey — clear report, and your diagnosis is correct: First, a note on the actual exposure. 1) Is moving pg_net off Yes — but not via One caveat specific to pg_net: it's the engine behind Database Webhooks, and it's commonly called from triggers and pg_cron jobs. A 2) Official migration sequence (hosted) Option A — Support-assisted (no drop; recommended for production). This is the same managed-safe procedure Supabase documents for non-relocatable extensions like PostGIS. Open a ticket at Dashboard → Support and ask them to run: begin;
update pg_extension set extrelocatable = true where extname = 'pg_net';
alter extension pg_net set schema extensions;
update pg_extension set extrelocatable = false where extname = 'pg_net';
commit;It temporarily flips the relocatable flag, moves the extension's namespace out of Option B — Self-service drop/recreate. If you'd rather do it yourself and can recreate dependents: -- 1. Back up first (CLI: `supabase db dump`, or pg_dump).
-- 2. WARNING: this cascades — Database Webhooks and any net.http_* callers get dropped.
drop extension if exists pg_net cascade;
-- 3. Recreate outside public
create extension pg_net with schema extensions;
-- 4. Re-create the webhooks / triggers / cron jobs that called net.*After either path, re-run the Security Advisor and the 3) If you choose not to relocate — accepted-exception posture This is fully supported, and given pg_net's functions already live in
Net recommendation: if the audit requires zero open advisories, use Option A (Support-assisted, lowest risk). If the audit accepts documented exceptions, disable the rule and record the rationale (callable functions reside in Happy to help draft the support ticket or the exception rationale if that's useful. |
Beta Was this translation helpful? Give feedback.
-
|
Short version: on hosted Supabase you can't relocate
So the recommended posture for audit purposes is:
That's genuinely the correct answer here rather than a workaround — the one remaining advisory item being a non-relocatable managed extension is a defensible "accepted risk" line in a hardening review. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Context
Project team flagged a remaining Supabase security advisor finding after migration cleanup:
extension_in_publicforpg_net.What we observed in production
pg_netpublic0.19.5extrelocatable:falseQuery used:
SELECT extname, extversion, extnamespace::regnamespace, extrelocatable FROM pg_extension WHERE extname='pg_net';Problem
pg_netremains installed inpublic, and advisor flags this extension placement. We need to know if there is an official/managed-safe way to relocatepg_netto a non-public schema.ALTER EXTENSION pg_net SET SCHEMAappears not applicable in our case (extrelocatable=false), and we want to avoid unsupported forced approaches.Request
pg_netoff public.Why this matters
For production readiness and audit evidence, this warning remains the only unresolved advisory item in a security-hardening remediations set.
Beta Was this translation helpful? Give feedback.
All reactions