@rebasepro/rls-check 0.30.1 → 0.31.0-canary.g59cd6fd

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,8 +4,9 @@ import type { DbSnapshot, Finding } from "./types.js";
4
4
  *
5
5
  * - `sql`: run {@link Remediation.sql}, as a migration, after filling in its
6
6
  * placeholders.
7
- * - `rebase-config`: the object is compiled by Rebase from a collection's
8
- * `securityRules` and re-made on every boot, so SQL would be undone. Edit
7
+ * - `rebase-config`: the object is compiled by Rebase from a table's `rls`
8
+ * (a `defineTable` in `backend/schema/`) and re-made on every boot, so SQL
9
+ * would be undone. Edit
9
10
  * the rule ({@link RebaseEquivalent.snippet}) and run `rebase db push`.
10
11
  * - `manual`: no statement can be written without a decision only a person
11
12
  * can make. {@link Remediation.summary} says what to decide.
@@ -25,11 +26,11 @@ export interface AlternativeFix {
25
26
  }
26
27
  /** The same fix, said the Rebase way. */
27
28
  export interface RebaseEquivalent {
28
- /** False when `securityRules` cannot express this fix; `note` says why. */
29
+ /** False when a table's `rls` cannot express this fix; `note` says why. */
29
30
  applicable: boolean;
30
- /** The `securityRules` array, as TypeScript source. Null when not applicable. */
31
- securityRules: string | null;
32
- /** A `defineCollection({ … })` excerpt showing where the rules go. */
31
+ /** The `rls` array, as TypeScript source. Null when not applicable. */
32
+ rls: string | null;
33
+ /** A `defineTable("…", { … })` excerpt showing where the rules go. */
33
34
  snippet: string | null;
34
35
  note: string;
35
36
  }
@@ -1,7 +1,7 @@
1
1
  import { type Remediation } from "./remediation.js";
2
2
  import type { DbSnapshot, Finding, ScanResult, Severity } from "./types.js";
3
3
  /** Bumped when a key is renamed or removed; adding one does not bump it. */
4
- export declare const AGENT_FORMAT_VERSION = 1;
4
+ export declare const AGENT_FORMAT_VERSION = 2;
5
5
  export interface AgentFinding {
6
6
  /**
7
7
  * Stable across runs: `<checkId>:<schema>.<object>[:<policy>][:<column>]`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebasepro/rls-check",
3
- "version": "0.30.1",
3
+ "version": "0.31.0-canary.g59cd6fd",
4
4
  "description": "Audit Row-Level Security on any PostgreSQL database — finds tables served without RLS, permissive tautologies, unqualified columns in policy subqueries, RLS-bypassing views and unprotected junction tables. Read-only.",
5
5
  "keywords": [
6
6
  "postgres",