@rebasepro/rls-check 0.16.0 → 0.16.1-canary.g2d1aec8

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.
@@ -1,4 +1,4 @@
1
- import type { Check } from "../types";
1
+ import type { Check } from "../types.js";
2
2
  /**
3
3
  * A write policy that lets an unauthenticated caller through, backed by a real grant.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Check } from "../types";
1
+ import type { Check } from "../types.js";
2
2
  /**
3
3
  * `current_setting('x')` in a policy, without the `missing_ok` second argument.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Check } from "../types";
1
+ import type { Check } from "../types.js";
2
2
  /**
3
3
  * A DML privilege granted to PUBLIC.
4
4
  *
@@ -6,7 +6,7 @@
6
6
  * is not, which is why the list is ordered by severity rather than alphabetically
7
7
  * — it is read by humans deciding what to look at first.
8
8
  */
9
- import type { Check, DbSnapshot, Finding } from "../types";
9
+ import type { Check, DbSnapshot, Finding } from "../types.js";
10
10
  export declare const CHECKS: Check[];
11
11
  export interface RunOptions {
12
12
  /** Run only these check ids. */
@@ -1,4 +1,4 @@
1
- import type { Check } from "../types";
1
+ import type { Check } from "../types.js";
2
2
  /**
3
3
  * The edge table of a many-to-many relationship, left without RLS while both
4
4
  * endpoints have it.
@@ -1,4 +1,4 @@
1
- import type { Check } from "../types";
1
+ import type { Check } from "../types.js";
2
2
  /**
3
3
  * A materialized view over an RLS-protected table, readable by an untrusted role.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Check } from "../types";
1
+ import type { Check } from "../types.js";
2
2
  /**
3
3
  * A PERMISSIVE policy whose expression is a constant truth, targeted at a role
4
4
  * an untrusted caller reaches.
@@ -1,4 +1,4 @@
1
- import type { Check } from "../types";
1
+ import type { Check } from "../types.js";
2
2
  /**
3
3
  * `auth.uid() IS NOT NULL` and its relatives.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Check } from "../types";
1
+ import type { Check } from "../types.js";
2
2
  /**
3
3
  * Every policy on a table names roles that nothing can arrive as.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Check } from "../types";
1
+ import type { Check } from "../types.js";
2
2
  /**
3
3
  * A table with RLS off *and* a DML grant to a role an untrusted caller arrives as.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Check } from "../types";
1
+ import type { Check } from "../types.js";
2
2
  /**
3
3
  * RLS on, zero policies — deny-all for everyone except the table's owner.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Check } from "../types";
1
+ import type { Check } from "../types.js";
2
2
  /**
3
3
  * RLS on, FORCE off — the table owner is exempt from its own policies.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Check } from "../types";
1
+ import type { Check } from "../types.js";
2
2
  /**
3
3
  * A SECURITY DEFINER routine whose `search_path` is not pinned.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Check } from "../types";
1
+ import type { Check } from "../types.js";
2
2
  /**
3
3
  * A bare column reference inside a policy subquery that resolves to the *inner*
4
4
  * relation when the outer row was meant.
@@ -6,7 +6,7 @@
6
6
  * noise, and noise is what gets a tool like this uninstalled — so the helpers
7
7
  * below err towards "no" whenever the catalog is ambiguous.
8
8
  */
9
- import type { DbGrant, DbPolicy, DbRelation, DbSnapshot, Finding, Severity } from "../types";
9
+ import type { DbGrant, DbPolicy, DbRelation, DbSnapshot, Finding, Severity } from "../types.js";
10
10
  export declare const SEVERITY_ORDER: Severity[];
11
11
  export declare const docsFor: (id: string) => string;
12
12
  export type Privilege = DbGrant["privileges"][number];
@@ -1,4 +1,4 @@
1
- import type { Check, DbSnapshot, DbView } from "../types";
1
+ import type { Check, DbSnapshot, DbView } from "../types.js";
2
2
  /** Base relations of `view` that have RLS turned on. */
3
3
  export declare function protectedBaseTables(snapshot: DbSnapshot, view: DbView): string[];
4
4
  /**
package/dist/cli.d.ts CHANGED
@@ -18,7 +18,7 @@
18
18
  * could have come from `pg`, Node or the user goes through `redactSecrets`
19
19
  * on its way out.
20
20
  */
21
- import type { ScanResult, Severity } from "./types";
21
+ import type { ScanResult, Severity } from "./types.js";
22
22
  /** Clean, or nothing at or above `--fail-on`. */
23
23
  export declare const EXIT_OK = 0;
24
24
  /** Findings at or above `--fail-on`. */
package/dist/index.d.ts CHANGED
@@ -16,14 +16,14 @@
16
16
  * at production databases by people who have never heard of us, and the install
17
17
  * has to be something they can read in full before they run it.
18
18
  */
19
- export { runCli, scan, selectCheckIds, EXIT_OK, EXIT_FINDINGS, EXIT_ERROR } from "./cli";
20
- export type { ScanOptions, CliIo, CliOptions } from "./cli";
21
- export { introspect } from "./introspect";
22
- export type { ConnectOptions } from "./introspect";
23
- export { CHECKS, runChecks } from "./checks";
24
- export { renderReport, renderJson, renderCheckCatalog, severityRank, maxSeverity, exceedsThreshold, formatTarget } from "./report";
25
- export type { RenderOptions } from "./report";
26
- export { redactConnectionString, redactSecrets, parseConnectionString, formatEndpoint } from "./redact";
27
- export type { ConnectionTarget } from "./redact";
28
- export { SEVERITIES } from "./types";
29
- export type { Check, DbColumn, DbForeignKey, DbGrant, DbPolicy, DbRelation, DbRole, DbRoutine, DbSnapshot, DbView, Finding, FindingTarget, PolicyCommand, PgRelationKind, ScanResult, Severity } from "./types";
19
+ export { runCli, scan, selectCheckIds, EXIT_OK, EXIT_FINDINGS, EXIT_ERROR } from "./cli.js";
20
+ export type { ScanOptions, CliIo, CliOptions } from "./cli.js";
21
+ export { introspect } from "./introspect.js";
22
+ export type { ConnectOptions } from "./introspect.js";
23
+ export { CHECKS, runChecks } from "./checks/index.js";
24
+ export { renderReport, renderJson, renderCheckCatalog, severityRank, maxSeverity, exceedsThreshold, formatTarget } from "./report.js";
25
+ export type { RenderOptions } from "./report.js";
26
+ export { redactConnectionString, redactSecrets, parseConnectionString, formatEndpoint } from "./redact.js";
27
+ export type { ConnectionTarget } from "./redact.js";
28
+ export { SEVERITIES } from "./types.js";
29
+ export type { Check, DbColumn, DbForeignKey, DbGrant, DbPolicy, DbRelation, DbRole, DbRoutine, DbSnapshot, DbView, Finding, FindingTarget, PolicyCommand, PgRelationKind, ScanResult, Severity } from "./types.js";
@@ -1,4 +1,4 @@
1
- import type { DbSnapshot } from "./types";
1
+ import type { DbSnapshot } from "./types.js";
2
2
  export interface ConnectOptions {
3
3
  connectionString: string;
4
4
  /** Explicit schema allowlist. Default: every non-system schema. */
package/dist/report.d.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * judgement. A tool that mixes "your table is public" with "this might be a
14
14
  * junction table" trains people to distrust both.
15
15
  */
16
- import type { Check, Finding, ScanResult, Severity } from "./types";
16
+ import type { Check, Finding, ScanResult, Severity } from "./types.js";
17
17
  /** Higher is worse. `info` = 0 … `critical` = 4. */
18
18
  export declare function severityRank(severity: Severity): number;
19
19
  /** The worst severity present, or `null` for an empty list. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebasepro/rls-check",
3
- "version": "0.16.0",
3
+ "version": "0.16.1-canary.g2d1aec8",
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
  "main": "./dist/index.es.js",
6
6
  "module": "./dist/index.es.js",
@@ -53,7 +53,7 @@
53
53
  "scripts": {
54
54
  "test": "vitest run",
55
55
  "test:e2e": "vitest run --config vitest.e2e.config.ts",
56
- "build": "vite build && tsc --emitDeclarationOnly -p tsconfig.prod.json && node ../../scripts/assert-build-output.mjs",
56
+ "build": "vite build && tsc --emitDeclarationOnly -p tsconfig.prod.json && node ../../scripts/add-dts-extensions.mjs dist && node ../../scripts/assert-build-output.mjs",
57
57
  "clean": "rm -rf dist && find ./src -name '*.js' -type f | xargs rm -f",
58
58
  "typecheck": "tsc --noEmit -p tsconfig.json"
59
59
  }