Repository navigation
chore(cli): map project network command permissions - #7171
Merged
Merged
Conversation
…work command permissions Declares the Management API operations that vanity-subdomains, ssl-enforcement, encryption, network-bans and network-restrictions commands call, so the permission registry covers them. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds postgresConfigRead and postgresConfigWrite blocks beside the shared helpers and composes them into get, update and delete. update only reads first when --replace-existing-overrides is false. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Runs the picker and the real linked-project cache together for each of the 15 commands and checks recorded requests against the declarations, including guards for the flag-gated calls. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Points the linked-project cache at <workdir>/supabase/.temp/linked-project.json and adds the project picker and cache-fill routes. Replaces claims about a .supabase/config.json file that nothing reads. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ssion tests Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🤖 AI Review
Both independent reviews completed and reported zero findings. Reading the permission declarations, corresponding handlers, shared picker/cache logic, and trusted conventions revealed no additional concrete defects. No fundamental conflict was identified in the supplied next-branch context. Runtime tests were not run.
Findings
No issues found.
Stats
Claude findings: 0 · Codex findings: 0 · Confirmed: 0 · Refuted: 0 · Uncertain: 0
Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: auto · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
Coly010
approved these changes
Oct 15, 2026
Coly010
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thanks! one small wording nit inline, happy for you to take it or leave it
…ey=value check Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…on-map-project-network
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Declares the Management API permissions for the project network commands:
vanity-subdomains(get, check-availability, activate, delete),ssl-enforcement(get, update),encryption(get-root-key, update-root-key),network-bans(get, remove),network-restrictions(get, update) andpostgres-config(get, update, delete). Each leaf composes the project-ref picker and the linked-project cache.Shared change:
postgresConfigReadandpostgresConfigWriteare new blocks inpostgres-config.shared.ts, next to the helpers that issue the calls (postgres-configreaches the API throughexecuteRawon the typed client, so the drift matcher resolves them).getuses the read block,updatethe read block (only when--replace-existing-overridesis false) plus the write block, anddeleteboth.Conditions declared
network-restrictions update:ison--appendselects the POST/applyor the PATCH.ssl-enforcement update: the PUT is declared once per switch (--enable-db-ssl-enforcement,--disable-db-ssl-enforcement), each withis: true.vanity-subdomains activateandcheck-availability: the call is declared for--desired-subdomainpresent and foroneOf: [""], because the handlers send an empty value to the API. Both also composeupgradeSuggestion.Findings
v1-get-pgsodium-configis a GET that needsproject_admin_write, andcheck-availabilityis a POST that needsvanity_subdomain_write.postgres-configmakes no restart call and has no delete endpoint:deleteis a GET followed by a PUT, and--no-restartonly shapes the PUT body.network-bans removefills the linked-project cache even when an IP is invalid, whilenetwork-restrictions updateandssl-enforcement updatevalidate before resolving the ref and fill nothing.postgres-config updateonly checks that each--configvalue is akey=valuepair before resolving; an unknown key is rejected after the ref resolves and the GET, so the cache is still filled.encryptionresolves the ref outside the cache-fill scope.~/.supabase/<workdir-hash>/, described a.supabase/config.jsonthat nothing reads, and omitted the picker and cache-fill routes. They now match the code.Not covered
ssl-enforcement updateover-declares when both switches are true, a run that fails before any call.linkedProjectCachefrom vanityactivateorcheck-availabilityfails no test, becauseupgradeSuggestionalso declaresv1-get-project.--switch=falseand--desired-subdomain=are exercised with parsed values, not through the flag parser.OPERATIONS_WITHOUT_FGA.🤖 Generated with Claude Code