Review Supabase RLS with deterministic checks and a second semantic layer.
BoundaryCI checks the final state of ordered Supabase migrations in CI. High-confidence deterministic rules catch known unsafe shapes, while optional managed Fireworks AI reviews how policies, memberships, tenant keys, and privileged functions work together.
Use deterministic and AI review for different jobs
Deterministic rules are repeatable, explainable, and suitable for blocking a pull request. They find known final-state conditions such as a public USING (true) policy or a SECURITY DEFINER function left executable by PUBLIC.
Managed AI is the advisory second layer. It looks for relationships that are difficult to reduce to one syntax rule, then returns bounded findings with evidence, risk, and remediation through the same BoundaryCI report.
- Deterministic findings remain the default merge decision
- AI findings are advisory unless a team explicitly changes that setting
- Provider failure never stops deterministic scanning
- Both layers appear in pull-request and Cloud evidence
Catch membership checks that never correlate to the row
A policy can call auth.uid() and prove that a user belongs to an organization while still failing to compare that organization with the protected row's organization_id. The SQL looks security-aware, but a member of tenant A may still reach tenant B.
BoundaryCI's managed review is designed to flag that policy interaction for human review. You still validate the finding against application behavior and two-tenant tests before treating it as proven exposure.
sqlwhere membership.user_id = auth.uid()
and membership.organization_id = projects.organization_idRun the review inside the existing GitHub workflow
Connect a repository to BoundaryCI Cloud, add its bound token as BOUNDARYCI_CLOUD_TOKEN, and commit the generated Action workflow. Eligible paid organizations can authorize managed review in the dashboard without creating a Fireworks account or adding a provider key to GitHub.
yaml managed-fireworks: "true"
cloud-token: ${{ secrets.BOUNDARYCI_CLOUD_TOKEN }}Keep consent and repository controls explicit
An organization owner or administrator must accept the managed-AI disclosure. BoundaryCI checks plan eligibility, consent, and the repository setting before the runner sends any migration text.
When authorized, the runner redacts common secret patterns locally and sends at most 80,000 characters transiently through BoundaryCI to Fireworks. BoundaryCI does not store the migration input; normalized findings and bounded operational metadata can enter Cloud history.
Know what AI review does not prove
A static AI review does not execute JWT claims, application queries, storage policies, generated SQL, or service-role code. It is another review signal—not a penetration test, formal proof, or replacement for active two-tenant authorization tests.
Frequently asked questions
Does AI replace BoundaryCI's deterministic RLS checks?
No. The deterministic rules remain the reliable source of truth for merge decisions. Managed AI adds advisory analysis for policy relationships and context that fixed syntax checks may not capture.
Do customers need a Fireworks API key?
No. Team, Growth, and Enterprise organizations can use BoundaryCI's server-side Fireworks credential after an owner or administrator authorizes managed review. Bring-your-own-key mode remains available for advanced direct use.
Are Supabase migration files stored by BoundaryCI?
Not as managed-AI input. Authorized, locally redacted migration text passes transiently through BoundaryCI to Fireworks, while normalized findings and bounded metadata can be preserved in Cloud history.