fix(supabase): revoke PUBLIC EXECUTE on private helpers, audited visibility RPC, input caps, authz-first RPCs, +32 pgTAP checks

This commit is contained in:
bchanot committed 2026-10-08 23:59:39 +02:00
1 parent 6966c54a2e
commit d3fa65af29
15 files changed
+682 -221

No files matched your search

+10
View File
@@ -151,6 +151,7 @@ export type Database = {
description: string
id: string
is_official: boolean
last_version_number: number
name: string
slug: string
species_id: string
@@ -170,6 +171,7 @@ export type Database = {
description?: string
id?: string
is_official?: boolean
last_version_number?: number
name: string
slug: string
species_id: string
@@ -188,6 +190,7 @@ export type Database = {
description?: string
id?: string
is_official?: boolean
last_version_number?: number
name?: string
slug?: string
species_id?: string
@@ -428,6 +431,13 @@ export type Database = {
}
Returns: string
}
set_sheet_visibility: {
Args: {
sheet_id: string
visibility: Database['public']['Enums']['sheet_visibility']
}
Returns: string
}
}
Enums: {
platform_role: 'owner' | 'admin' | 'moderator' | 'support'
@@ -57,6 +57,7 @@ const expectedColumns = {
'description',
'id',
'is_official',
'last_version_number',
'name',
'slug',
'species_id',
@@ -125,6 +126,7 @@ const expectedFunctionArgs = {
register_sheet_asset: ['byte_size', 'file_name', 'sha256', 'sheet_id'],
restore_anatomical_sheet: ['sheet_id'],
revoke_platform_role: ['reason', 'role', 'target_user_id'],
set_sheet_visibility: ['sheet_id', 'visibility'],
} as const satisfies FunctionArgs
type MissingArgs = {