@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.
- package/dist/checks/anonymous-write-allowed.d.ts +1 -1
- package/dist/checks/current-setting-throws.d.ts +1 -1
- package/dist/checks/grant-to-public.d.ts +1 -1
- package/dist/checks/index.d.ts +1 -1
- package/dist/checks/junction-table-unprotected.d.ts +1 -1
- package/dist/checks/matview-bypasses-rls.d.ts +1 -1
- package/dist/checks/policy-always-true.d.ts +1 -1
- package/dist/checks/policy-anonymous-tautology.d.ts +1 -1
- package/dist/checks/policy-role-unreachable.d.ts +1 -1
- package/dist/checks/rls-disabled.d.ts +1 -1
- package/dist/checks/rls-enabled-no-policies.d.ts +1 -1
- package/dist/checks/rls-enabled-not-forced.d.ts +1 -1
- package/dist/checks/security-definer-mutable-search-path.d.ts +1 -1
- package/dist/checks/unqualified-column-in-subquery.d.ts +1 -1
- package/dist/checks/util.d.ts +1 -1
- package/dist/checks/view-bypasses-rls.d.ts +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/introspect.d.ts +1 -1
- package/dist/report.d.ts +1 -1
- package/package.json +2 -2
package/dist/checks/index.d.ts
CHANGED
|
@@ -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. */
|
package/dist/checks/util.d.ts
CHANGED
|
@@ -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";
|
package/dist/introspect.d.ts
CHANGED
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.
|
|
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
|
}
|