Repository navigation
Conversation
This branch has not been deployed
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.
Compatibility clarification
Advisors stays visible, discoverable, documented, and usable alongside Issues. Deprecation is planned for a future release; the informational notices do not announce removal or a removal date. Existing contracts and permissions remain supported.
Verified correction at
089e9b262db advisorsremains listed in CLI help; flags, output and exit behavior are unchanged. The stderr notice and reference text now describe planned future deprecation. Independent QA passed all 57 Advisors integration tests with retries disabled and shuffle seed 1114; formatting/lint and worker help checks passed. Earlier screenshots below remain evidence for unchanged Issues output.Latest-head CI passes, including CLI integration and end-to-end suites. Conditional duplicate, benchmark, maintenance, and preview jobs are skipped.
Problem
Studio is moving from Advisors to Issues Inbox, while the CLI still exposes
supabase db advisors. CLI users also need remote health checks alongside security and performance findings.What this adds
supabase issuescombines security, performance, and remote health checks, grouping affected resources under each issue.logs.--output-format jsonandstream-json, including affected resources, evidence, and remediation links. Detected coding agents retain the CLI's JSON default.--type, minimum--severity, and--fail-on. Defaults areall,info, andnonerespectively.db advisorsretains its flags, defaults, output, and exit behavior, with an informational notice on stderr about planned future deprecation. Both commands reuse existing Advisors endpoints and check modules.Local and direct database targets keep SQL checks and report health as unavailable; explicitly requesting local health is rejected. Use
--output-format, not the older-oflag. Issue IDs identify project-scoped checks, not persistent incidents; lifecycle actions and banned-IP signals are outside this PR.Command and flags reference
Issues flags
These are the check-selection, filtering, and exit-control flags exposed by the new command.
--type <value>all,security,performance,healthallallrequests all three categories. Health requires a hosted project target.--severity <value>info,warning,criticalinfoinfoincludes everything,warningincludes warning and critical issues, andcriticalincludes only critical issues. A group's severity is its highest affected-resource severity; matching groups retain all affected resources and evidence.--fail-on <value>none,info,warning,criticalnone1when a displayed issue meets or exceeds this threshold.nonedisables failure based on findings; it does not suppress command errors or unavailable remote checks.Severities map from the underlying Advisors levels:
INFO→info,WARN→warning,ERROR→critical.--severityfilters the results before--fail-onis evaluated. Neither flag changes which API checks are requested.Target selection
The command reuses the existing CLI target flags; these are not new global flags.
--remote--remote=<project-ref>--remote=<branch>--remote=<postgresql-url>Use
=when supplying a remote target, for example--remote=erppftcfodkcyoftaqvb, rather than--remote erppftcfodkcyoftaqvb. Local and direct-URL security/performance checks run in a transaction that is always rolled back. With those targets,--type allreports health as unavailable; explicit--type healthfails with guidance to use a hosted project.The shared, hidden compatibility flags remain accepted but are deprecated for removal in CLI v4:
--local(omit the target flag),--linked(use--remote),--project-ref <ref>(use--remote=<ref>), and--db-url <url>(use--remote=<url>).Shared output and execution flags
These existing global flags apply to
issues:--output-format <value>text,json,stream-json; normallytexttextprints a table or narrow-terminal stacked fields, followed by coverage.jsonincludes fullissuesandchecks.stream-jsonemits newline-delimited JSON events, with the structured result in the result event.--agent <value>auto,yes,no; defaultauto--agent noto exercise normal human defaults; an explicit output format selects the requested format.--profile <name>--workdir <path>supabase/exactly, without ancestor search. This determines the local project context and linked project.--debug--help,-hOther inherited global options remain listed in
supabase issues --help; this PR does not change them. Although inherited help lists--output/-o, this command rejects that legacy output flag and directs callers to--output-format.Exit behavior
--fail-on0. Findings alone do not fail the default--fail-on nonerun.--fail-onthreshold1.1, even with--fail-on none.--type allcannot run health1. The findings threshold still applies.For example,
--severity critical --fail-on warningfails only if a critical issue is displayed. Warning issues have already been filtered out. An empty result means no issues match the filter, not that every check completed successfully.Examples
For scoped access tokens, hosted checks require
advisors_read. Project selection may additionally requireprojects_read; branch resolution may requirebranching_development_readorbranching_production_read.project_admin_readis optional for this command, as reported by--help.Earlier verification
b2c21a6b7Mockamaster has no critical, mixed-severity, or unavailable checks. Those cases are covered by fixtures, not claimed as live coverage. Conditional/draft CI jobs are skipped; the separate CodeQL comparison is neutral due to the base branch's obsolete Go configuration.
Earlier verification on head 681ec2d
1112; types, changed-file lint/formatting, and binary build passed.How to test
Using a build of this branch and an authenticated project:
Expect readable tables in a normal terminal and stacked fields at 40 columns. JSON modes retain full findings and coverage.
--fail-on warningexits nonzero when matching warning-or-higher findings exist. The legacy command preserves its response and adds its informational future-deprecation notice on stderr.--agent noexplicitly selects human defaults when testing from a coding-agent environment.Screenshots
Actual compiled CLI against Mockamaster. The 80-column screenshot records head
681ec2d; output at 80/120 columns was verified unchanged by the narrow-terminal follow-up.80-column table
Additional live screenshots: 120-column table, security warnings, and empty health results
Captured from head
681ec2dagainst Mockamaster in Jordi - Team, using the actual compiled CLI in a read-only localhost browser terminal. Output was not reconstructed or projected through jq, and no project resources changed. PTY width was set after browser initialization; the browser canvas may be wider than the configured PTY.Default issues, 120 columns
All 11 grouped issues, complete security/performance/health coverage, exit 0.
Security warnings, 80 columns
--type security --severity warning: six warning issues and 11 affected findings, wrapped titles, complete coverage, exit 0.Empty health results, 120 columns
--type health: no matching issues, complete health coverage, exit 0.40-column stacked output
Fresh run of
b2c21a6b7against Mockamaster: six security-warning issues, complete security coverage, exit 0. Two screenshots show the beginning and end of the same run. The PTY is 40 columns; shared CLI update notices retain their existing behavior.Linked issue: CLI-2888.