@fuzdev/fuz_app 0.154.0 → 0.155.0

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.
Files changed (47) hide show
  1. package/dist/actions/CLAUDE.md +2 -2
  2. package/dist/actions/action_event.d.ts.map +1 -1
  3. package/dist/actions/action_event.js +14 -14
  4. package/dist/actions/peer_ping.js +3 -3
  5. package/dist/actions/perform_action.d.ts +12 -10
  6. package/dist/actions/perform_action.d.ts.map +1 -1
  7. package/dist/actions/perform_action.js +19 -16
  8. package/dist/auth/cell_actions.d.ts +6 -4
  9. package/dist/auth/cell_actions.d.ts.map +1 -1
  10. package/dist/auth/cell_actions.js +10 -9
  11. package/dist/http/CLAUDE.md +14 -8
  12. package/dist/http/schema_helpers.d.ts +102 -23
  13. package/dist/http/schema_helpers.d.ts.map +1 -1
  14. package/dist/http/schema_helpers.js +241 -38
  15. package/dist/http/surface.d.ts +7 -2
  16. package/dist/http/surface.d.ts.map +1 -1
  17. package/dist/http/surface.js +37 -14
  18. package/dist/primitive_schemas.d.ts +13 -4
  19. package/dist/primitive_schemas.d.ts.map +1 -1
  20. package/dist/primitive_schemas.js +13 -4
  21. package/dist/schema_issues.d.ts +96 -0
  22. package/dist/schema_issues.d.ts.map +1 -0
  23. package/dist/schema_issues.js +110 -0
  24. package/dist/schema_meta.d.ts +35 -12
  25. package/dist/schema_meta.d.ts.map +1 -1
  26. package/dist/schema_meta.js +60 -12
  27. package/dist/testing/CLAUDE.md +22 -9
  28. package/dist/testing/adversarial_404.d.ts +15 -0
  29. package/dist/testing/adversarial_404.d.ts.map +1 -1
  30. package/dist/testing/adversarial_404.js +26 -19
  31. package/dist/testing/adversarial_input_cases.d.ts.map +1 -1
  32. package/dist/testing/adversarial_input_cases.js +2 -2
  33. package/dist/testing/cross_backend/cell_crud.d.ts.map +1 -1
  34. package/dist/testing/cross_backend/cell_crud.js +7 -5
  35. package/dist/testing/cross_backend/identity_parity.js +2 -2
  36. package/dist/testing/cross_backend/standard.d.ts +3 -2
  37. package/dist/testing/cross_backend/standard.d.ts.map +1 -1
  38. package/dist/testing/daemon_info.d.ts +7 -2
  39. package/dist/testing/daemon_info.d.ts.map +1 -1
  40. package/dist/testing/daemon_info.js +8 -3
  41. package/dist/testing/data_exposure.d.ts +43 -9
  42. package/dist/testing/data_exposure.d.ts.map +1 -1
  43. package/dist/testing/data_exposure.js +151 -35
  44. package/dist/testing/schema_generators.d.ts +21 -9
  45. package/dist/testing/schema_generators.d.ts.map +1 -1
  46. package/dist/testing/schema_generators.js +52 -47
  47. package/package.json +3 -3
@@ -76,7 +76,7 @@ import '../assert_dev_env.js';
76
76
  *
77
77
  * **Email format (creation):** the optional signup `email` is validated to a
78
78
  * loose `local@domain.tld` shape on both spines — TS `Email`
79
- * (`^[^\s@]+@[^\s@]+\.[^\s@]+$` plus a 254-byte (RFC 5321 octet) length bound; whitespace `White_Space ∪ {U+FEFF}`), Rust the
79
+ * (`^[^\s\u0085@]+@[^\s\u0085@]+\.[^\s\u0085@]+$` plus a 254-byte (RFC 5321 octet) length bound; whitespace `White_Space ∪ {U+FEFF}`), Rust the
80
80
  * hand-rolled `is_valid_email`. A malformed email → 400, a well-formed one →
81
81
  * 403 no-matching-invite (the same accept/reject settle the username tables
82
82
  * use). The accepted siblings include the single-char-TLD `a@b.c` that Zod's
@@ -195,7 +195,7 @@ const USERNAME_FORMAT_CASES = [
195
195
  ];
196
196
  /**
197
197
  * Signup email-format cases for the loose `Email` shape `local@domain.tld`
198
- * (TS `^[^\s@]+@[^\s@]+\.[^\s@]+$` plus the 254 length bound; Rust the
198
+ * (TS `^[^\s\u0085@]+@[^\s\u0085@]+\.[^\s\u0085@]+$` plus the 254 length bound; Rust the
199
199
  * hand-rolled `is_valid_email`). The rejected cases each violate the shape at
200
200
  * a different point — no `@`, no dot in the domain, empty local/domain, a dot
201
201
  * at a domain edge, surrounding whitespace, over the length bound — so a
@@ -95,8 +95,9 @@ export interface StandardCrossProcessTestOptions {
95
95
  round_trip_skip_routes?: Array<string>;
96
96
  /**
97
97
  * Forwarded to `describe_data_exposure_tests` as `skip_routes`
98
- * (`'METHOD /path'` keys), as the in-process bundle's consumers pass it
99
- * directly.
98
+ * (`'METHOD /path'` keys for routes, `'/path method_name'` for RPC or WS
99
+ * method outputs, `'/path method_name params'` for params the server pushes
100
+ * over WS), as the in-process bundle's consumers pass it directly.
100
101
  */
101
102
  data_exposure_skip_routes?: Array<string>;
102
103
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"standard.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/standard.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAI5D,OAAO,EAAiC,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE9F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,WAAW,+BAA+B;IAC/C,2CAA2C;IAC3C,UAAU,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,cAAc,EAAE,cAAc,CAAC;IAC/B;;;;OAIG;IACH,YAAY,EAAE,mBAAmB,CAAC;IAClC,uFAAuF;IACvF,eAAe,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACxC;;;;;OAKG;IACH,aAAa,EAAE,uBAAuB,CAAC;IACvC;;;OAGG;IACH,KAAK,CAAC,EAAE,gBA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AAC,CAAA;KAAE,CAAC,CACnF,CAAC;CACF;AAED;;;;GAIG;AACH,eAAO,MAAM,qCAAqC,GACjD,SAAS,+BAA+B,KACtC,IAuCF,CAAC"}
@@ -38,8 +38,13 @@ export declare const DaemonInfo: import("@fuzdev/fuz_schema/schema.ts").Schema<{
38
38
  pid: import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>;
39
39
  /** Port the server is listening on. */
40
40
  port: import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>;
41
- /** ISO timestamp when server started. */
42
- started: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
41
+ /**
42
+ * When the server started, an RFC 3339 date and time in UTC
43
+ * (`2026-01-01T00:00:00.000Z`): a four-digit year, seconds required, a
44
+ * fraction of up to 9 digits or none, `Z` and no offset — fuz_schema's
45
+ * `iso_datetime`.
46
+ */
47
+ started: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>;
43
48
  /** Package version of the application. */
44
49
  app_version: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
45
50
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"daemon_info.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/daemon_info.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B;;;;;GAKG;AAEH,OAAO,EAMN,KAAK,KAAK,EACV,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGjG;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,SAAS,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,MAAM,KAAG,MAAM,GAAG,IAGtF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;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AS,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,MAAM,KAAG,MAAM,GAAG,IAGtF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;IACtB,sBAAsB;;IAEtB,yBAAyB;;IAEzB,uCAAuC;;IAEvC;;;;;OAKG;;IAEH,0CAA0C;;EAEzC,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAElD;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAChC,SAAS,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,EACjC,MAAM,MAAM,KACV,MAAM,GAAG,IAGX,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAC7B,SAAS,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,iBAAiB,GAAG,QAAQ,CAAC,EAC7F,MAAM,MAAM,EACZ,MAAM,UAAU,KACd,OAAO,CAAC,IAAI,CAWd,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAC5B,SAAS,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,gBAAgB,CAAC,GAAG,OAAO,EACzF,MAAM,MAAM,KACV,OAAO,CAAC,UAAU,GAAG,IAAI,CAwB3B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAU,SAAS,WAAW,EAAE,KAAK,MAAM,KAAG,OAAO,CAAC,OAAO,CAG1F,CAAC"}
@@ -5,7 +5,7 @@ import './assert_dev_env.js';
5
5
  *
6
6
  * @module
7
7
  */
8
- import { format_issue, number, object, parse, string } from '@fuzdev/fuz_schema/schema.ts';
8
+ import { format_issue, iso_datetime, number, object, parse, pipe, string } from '@fuzdev/fuz_schema/schema.ts';
9
9
  import { write_file_atomic } from '../runtime/fs.js';
10
10
  /**
11
11
  * Get an app's home directory path (`~/.{name}`).
@@ -29,8 +29,13 @@ export const DaemonInfo = object({
29
29
  pid: number,
30
30
  /** Port the server is listening on. */
31
31
  port: number,
32
- /** ISO timestamp when server started. */
33
- started: string,
32
+ /**
33
+ * When the server started, an RFC 3339 date and time in UTC
34
+ * (`2026-01-01T00:00:00.000Z`): a four-digit year, seconds required, a
35
+ * fraction of up to 9 digits or none, `Z` and no offset — fuz_schema's
36
+ * `iso_datetime`.
37
+ */
38
+ started: pipe(string, iso_datetime),
34
39
  /** Package version of the application. */
35
40
  app_version: string
36
41
  });
@@ -1,21 +1,49 @@
1
1
  import './assert_dev_env.js';
2
- import type { AppSurface, AppSurfaceSpec } from '../http/surface.js';
2
+ import type { AppSurfaceSpec } from '../http/surface.js';
3
3
  import type { SetupTest } from './cross_backend/setup.js';
4
4
  /**
5
5
  * Recursively collect all property names from a JSON Schema.
6
6
  *
7
- * Walks `properties`, `items`, `allOf`/`anyOf`/`oneOf`, and
8
- * `additionalProperties` to find every declared field name at any depth.
7
+ * Walks `properties`, `patternProperties`, `additionalProperties`, `items`,
8
+ * `prefixItems`, `contains`, `allOf`/`anyOf`/`oneOf`, `not`/`if`/`then`/`else`,
9
+ * and the values of `$defs`/`definitions` (where a recursive or registered
10
+ * schema's body sits behind a `$ref`) to find every declared field name at
11
+ * any depth.
9
12
  */
10
13
  export declare const collect_json_schema_property_names: (schema: unknown) => Set<string>;
11
14
  /**
12
- * Assert that no output schema in the surface contains sensitive field names.
15
+ * Assert that no output schema — of a route, an RPC method, or a WebSocket
16
+ * method, or the params of a message the server pushes over WebSocket (a
17
+ * `remote_notification`, or a `request_response` the backend initiates) —
18
+ * contains sensitive field names.
19
+ *
20
+ * Each output is read on both sides (`schema_to_surface`): the output side the
21
+ * surface records, and the input side, since a transform's output has no JSON
22
+ * Schema form and a field inside a transformed subtree shows only there. The
23
+ * input side is a superset, so a transform that deliberately drops a
24
+ * sensitive field is flagged too; skip that output by its key.
25
+ *
26
+ * @param surface_source - the surface with the specs it was generated from
27
+ * @param sensitive_fields - field names no output may carry
28
+ * @param skip_routes - outputs to skip: `'METHOD /path'` for a route, `'/path method_name'` for an RPC or WS method, `'/path method_name params'` for pushed params
29
+ * @throws Error when an output schema can't be written as JSON Schema on either side
13
30
  */
14
- export declare const assert_output_schemas_no_sensitive_fields: (surface: AppSurface, sensitive_fields?: ReadonlyArray<string>) => void;
31
+ export declare const assert_output_schemas_no_sensitive_fields: (surface_source: AppSurfaceSpec, sensitive_fields?: ReadonlyArray<string>, skip_routes?: ReadonlyArray<string>) => void;
15
32
  /**
16
- * Assert that non-admin route output schemas don't contain admin-only fields.
33
+ * Assert that route output schemas a non-admin can reach — routes without an
34
+ * admin or keeper gate — don't contain admin-only field names. Reads both
35
+ * sides of each output, as `assert_output_schemas_no_sensitive_fields` does.
36
+ *
37
+ * Routes only: the default blocklist matches by name (`created_by`,
38
+ * `updated_by`), and RPC and WebSocket methods return domain shapes that
39
+ * carry those columns legitimately (cells, invites a member created).
40
+ *
41
+ * @param surface_source - the surface with the specs it was generated from
42
+ * @param admin_only_fields - field names no non-admin route output may carry
43
+ * @param skip_routes - routes to skip, as `'METHOD /path'`
44
+ * @throws Error when an output schema can't be written as JSON Schema on either side
17
45
  */
18
- export declare const assert_non_admin_schemas_no_admin_fields: (surface: AppSurface, admin_only_fields?: ReadonlyArray<string>) => void;
46
+ export declare const assert_non_admin_schemas_no_admin_fields: (surface_source: AppSurfaceSpec, admin_only_fields?: ReadonlyArray<string>, skip_routes?: ReadonlyArray<string>) => void;
19
47
  /** Options for `describe_data_exposure_tests`. */
20
48
  export interface DataExposureTestOptions {
21
49
  /** Per-test fixture-producing function (per-describe cadence). */
@@ -29,14 +57,20 @@ export interface DataExposureTestOptions {
29
57
  sensitive_fields?: ReadonlyArray<string>;
30
58
  /** Fields that must not appear in non-admin responses. Default: `admin_only_field_blocklist`. */
31
59
  admin_only_fields?: ReadonlyArray<string>;
32
- /** Routes to skip, in `'METHOD /path'` format. */
60
+ /**
61
+ * Routes to skip, in `'METHOD /path'` format, and RPC or WebSocket method
62
+ * outputs to skip in the schema-level checks, as `'/path method_name'`
63
+ * (`'/path method_name params'` for params the server pushes over WebSocket).
64
+ */
33
65
  skip_routes?: Array<string>;
34
66
  }
35
67
  /**
36
68
  * Composable data exposure test suite.
37
69
  *
38
70
  * Three test groups:
39
- * 1. Schema-level — walk JSON Schema output/error schemas for sensitive field names
71
+ * 1. Schema-level — walk route, RPC, and WebSocket output schemas (both sides
72
+ * of a transform), pushed WebSocket params, and route error schemas for
73
+ * sensitive field names, and non-admin route outputs for admin-only ones
40
74
  * 2. Runtime — fire real requests and check response bodies against blocklists
41
75
  * 3. Cross-privilege — admin routes return 403 for non-admin, error responses
42
76
  * contain no sensitive fields
@@ -1 +1 @@
1
- {"version":3,"file":"data_exposure.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/data_exposure.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAqB7B,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAiBrE,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,0BAA0B,CAAC;AAIvE;;;;;GAKG;AACH,eAAO,MAAM,kCAAkC,GAAI,QAAQ,OAAO,KAAG,GAAG,CAAC,MAAM,CAuB9E,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,yCAAyC,GACrD,SAAS,UAAU,EACnB,mBAAkB,aAAa,CAAC,MAAM,CAA6B,KACjE,IAWF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wCAAwC,GACpD,SAAS,UAAU,EACnB,oBAAmB,aAAa,CAAC,MAAM,CAA8B,KACnE,IAgBF,CAAC;AAIF,kDAAkD;AAClD,MAAM,WAAW,uBAAuB;IACvC,kEAAkE;IAClE,UAAU,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,cAAc,EAAE,cAAc,CAAC;IAC/B,2FAA2F;IAC3F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C,CAAC;IAC1C;;;;OAIG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B,GAAI,SAAS,uBAAuB,KAAG,IAiM/E,CAAC"}
@@ -3,7 +3,10 @@ import './assert_dev_env.js';
3
3
  * Composable data exposure test suite.
4
4
  *
5
5
  * Verifies that sensitive database fields never leak through HTTP responses:
6
- * - Schema-level: walks JSON Schema output/error schemas for blocklisted property names
6
+ * - Schema-level: walks the JSON Schema of every route, RPC, and WebSocket
7
+ * output (both sides of a transform), the params the server pushes over
8
+ * WebSocket, and every route error schema for sensitive property names,
9
+ * and non-admin route outputs for admin-only ones
7
10
  * - Runtime: fires real requests and checks response bodies against field blocklists
8
11
  * - Cross-privilege: verifies admin routes return 403 for non-admin users,
9
12
  * and non-admin responses exclude admin-only fields
@@ -16,18 +19,21 @@ import './assert_dev_env.js';
16
19
  * @module
17
20
  */
18
21
  import { describe, test, beforeAll, assert } from 'vitest';
19
- import { ROLE_ADMIN } from '../auth/role_schema.js';
22
+ import { ROLE_ADMIN, ROLE_KEEPER } from '../auth/role_schema.js';
20
23
  import { create_test_request_headers } from './test_origin.js';
21
24
  import { resolve_valid_path, generate_valid_body, to_route_content_type } from './schema_generators.js';
22
- import { is_null_schema, is_strict_object_schema } from '../http/schema_helpers.js';
25
+ import { is_null_schema, is_strict_object_schema, schema_to_surface } from '../http/schema_helpers.js';
23
26
  import { is_keeper_auth, is_public_auth } from '../http/auth_shape.js';
24
27
  import { sensitive_field_blocklist, admin_only_field_blocklist, assert_no_sensitive_fields_in_json, pick_auth_headers } from './integration_helpers.js';
25
28
  // --- Schema introspection ---
26
29
  /**
27
30
  * Recursively collect all property names from a JSON Schema.
28
31
  *
29
- * Walks `properties`, `items`, `allOf`/`anyOf`/`oneOf`, and
30
- * `additionalProperties` to find every declared field name at any depth.
32
+ * Walks `properties`, `patternProperties`, `additionalProperties`, `items`,
33
+ * `prefixItems`, `contains`, `allOf`/`anyOf`/`oneOf`, `not`/`if`/`then`/`else`,
34
+ * and the values of `$defs`/`definitions` (where a recursive or registered
35
+ * schema's body sits behind a `$ref`) to find every declared field name at
36
+ * any depth.
31
37
  */
32
38
  export const collect_json_schema_property_names = (schema) => {
33
39
  const names = new Set();
@@ -41,54 +47,164 @@ export const collect_json_schema_property_names = (schema) => {
41
47
  walk(prop_schema);
42
48
  }
43
49
  }
44
- if (obj.items)
45
- walk(obj.items);
46
- for (const key of ['allOf', 'anyOf', 'oneOf']) {
50
+ // `items` is a schema, or an array of them in older drafts
51
+ for (const key of ['items', 'additionalProperties', 'contains', 'not', 'if', 'then', 'else']) {
52
+ const sub = obj[key];
53
+ if (Array.isArray(sub)) {
54
+ for (const item of sub)
55
+ walk(item);
56
+ }
57
+ else {
58
+ walk(sub);
59
+ }
60
+ }
61
+ for (const key of ['prefixItems', 'allOf', 'anyOf', 'oneOf']) {
47
62
  if (Array.isArray(obj[key])) {
48
63
  for (const sub of obj[key])
49
64
  walk(sub);
50
65
  }
51
66
  }
52
- if (obj.additionalProperties && typeof obj.additionalProperties === 'object') {
53
- walk(obj.additionalProperties);
67
+ // schema maps: walk the values, the keys aren't field names
68
+ for (const key of ['patternProperties', '$defs', 'definitions']) {
69
+ const map = obj[key];
70
+ if (map && typeof map === 'object') {
71
+ for (const sub of Object.values(map))
72
+ walk(sub);
73
+ }
54
74
  }
55
75
  };
56
76
  walk(schema);
57
77
  return names;
58
78
  };
59
- // --- Schema-level assertions ---
60
- /**
61
- * Assert that no output schema in the surface contains sensitive field names.
62
- */
63
- export const assert_output_schemas_no_sensitive_fields = (surface, sensitive_fields = sensitive_field_blocklist) => {
64
- for (const route of surface.routes) {
65
- if (route.output_schema === null)
66
- continue;
67
- const prop_names = collect_json_schema_property_names(route.output_schema);
68
- for (const field of sensitive_fields) {
69
- assert.ok(!prop_names.has(field), `${route.method} ${route.path}: output schema contains sensitive field '${field}'`);
79
+ // any-of roles gate only admins and the keeper when every role is one of them
80
+ const is_elevated_roles = (roles) => !!roles?.length && roles.every((r) => r === ROLE_ADMIN || r === ROLE_KEEPER);
81
+ const is_elevated_auth = (auth) => auth !== null && (is_keeper_auth(auth) || is_elevated_roles(auth.roles));
82
+ // every schema a caller can receive: route outputs, RPC method outputs, and
83
+ // over WS the method outputs plus the params the server pushes — a
84
+ // `remote_notification`'s payload, and the request of a `request_response`
85
+ // the backend can initiate (`local_call` specs never dispatch over WS, as in
86
+ // `generate_app_surface`)
87
+ const collect_output_schema_entries = (surface_source) => {
88
+ const entries = [];
89
+ for (const r of surface_source.route_specs) {
90
+ entries.push({
91
+ key: `${r.method} ${r.path}`,
92
+ kind: 'route',
93
+ schema: r.output,
94
+ elevated: is_elevated_auth(r.auth)
95
+ });
96
+ }
97
+ for (const ep of surface_source.rpc_endpoints) {
98
+ for (const a of ep.actions) {
99
+ entries.push({
100
+ key: `${ep.path} ${a.spec.method}`,
101
+ kind: 'rpc',
102
+ schema: a.spec.output,
103
+ elevated: is_elevated_auth(a.spec.auth)
104
+ });
70
105
  }
71
106
  }
107
+ for (const ep of surface_source.ws_endpoints) {
108
+ // the upgrade gate holds for every message on the socket
109
+ const endpoint_elevated = is_elevated_roles(ep.required_roles);
110
+ for (const a of ep.actions) {
111
+ const { spec } = a;
112
+ if (spec.kind === 'local_call')
113
+ continue;
114
+ const params_entry = {
115
+ key: `${ep.path} ${spec.method} params`,
116
+ kind: 'ws',
117
+ schema: spec.input,
118
+ // a pushed message reaches every socket on the endpoint
119
+ elevated: endpoint_elevated
120
+ };
121
+ if (spec.kind === 'remote_notification') {
122
+ // its `output` is `z.void()`: the payload is its params
123
+ entries.push(params_entry);
124
+ continue;
125
+ }
126
+ entries.push({
127
+ key: `${ep.path} ${spec.method}`,
128
+ kind: 'ws',
129
+ schema: spec.output,
130
+ elevated: endpoint_elevated || is_elevated_auth(spec.auth)
131
+ });
132
+ if (spec.initiator === 'backend' || spec.initiator === 'both')
133
+ entries.push(params_entry);
134
+ }
135
+ }
136
+ return entries;
72
137
  };
73
- /**
74
- * Assert that non-admin route output schemas don't contain admin-only fields.
75
- */
76
- export const assert_non_admin_schemas_no_admin_fields = (surface, admin_only_fields = admin_only_field_blocklist) => {
77
- const non_admin = surface.routes.filter((r) => !is_keeper_auth(r.auth) && !(r.auth.roles?.includes('admin') ?? false));
78
- for (const route of non_admin) {
79
- if (route.output_schema === null)
138
+ // the property names an output schema can carry on each side: its output
139
+ // side, as the surface writes it, and its input side — a transform's output
140
+ // has no JSON Schema form and is written as `{}` on the output side, so a
141
+ // field inside a transformed subtree is only seen on the input side, the
142
+ // pre-transform shape and a conservative superset
143
+ const collect_output_property_names = (entry) => ({
144
+ output: collect_json_schema_property_names(schema_to_surface(entry.schema, { io: 'output', source: `${entry.key} output` })),
145
+ input: collect_json_schema_property_names(schema_to_surface(entry.schema, { io: 'input', source: `${entry.key} output (input side)` }))
146
+ });
147
+ const assert_output_entries_exclude = (entries, fields, skip_routes, label) => {
148
+ const skip_set = new Set(skip_routes);
149
+ for (const entry of entries) {
150
+ if (skip_set.has(entry.key))
80
151
  continue;
81
- const prop_names = collect_json_schema_property_names(route.output_schema);
82
- for (const field of admin_only_fields) {
83
- assert.ok(!prop_names.has(field), `${route.method} ${route.path}: non-admin output schema contains admin-only field '${field}'`);
152
+ const names = collect_output_property_names(entry);
153
+ for (const field of fields) {
154
+ assert.ok(!names.output.has(field), `${entry.key}: ${label} '${field}'`);
155
+ assert.ok(!names.input.has(field), `${entry.key}: ${label} '${field}' on its input side, inside a transformed ` +
156
+ `subtree — if the transform drops it, add '${entry.key}' to skip_routes`);
84
157
  }
85
158
  }
86
159
  };
160
+ /**
161
+ * Assert that no output schema — of a route, an RPC method, or a WebSocket
162
+ * method, or the params of a message the server pushes over WebSocket (a
163
+ * `remote_notification`, or a `request_response` the backend initiates) —
164
+ * contains sensitive field names.
165
+ *
166
+ * Each output is read on both sides (`schema_to_surface`): the output side the
167
+ * surface records, and the input side, since a transform's output has no JSON
168
+ * Schema form and a field inside a transformed subtree shows only there. The
169
+ * input side is a superset, so a transform that deliberately drops a
170
+ * sensitive field is flagged too; skip that output by its key.
171
+ *
172
+ * @param surface_source - the surface with the specs it was generated from
173
+ * @param sensitive_fields - field names no output may carry
174
+ * @param skip_routes - outputs to skip: `'METHOD /path'` for a route, `'/path method_name'` for an RPC or WS method, `'/path method_name params'` for pushed params
175
+ * @throws Error when an output schema can't be written as JSON Schema on either side
176
+ */
177
+ export const assert_output_schemas_no_sensitive_fields = (surface_source, sensitive_fields = sensitive_field_blocklist, skip_routes) => {
178
+ assert_output_entries_exclude(collect_output_schema_entries(surface_source), sensitive_fields, skip_routes, 'output schema contains sensitive field');
179
+ };
180
+ /**
181
+ * Assert that route output schemas a non-admin can reach — routes without an
182
+ * admin or keeper gate — don't contain admin-only field names. Reads both
183
+ * sides of each output, as `assert_output_schemas_no_sensitive_fields` does.
184
+ *
185
+ * Routes only: the default blocklist matches by name (`created_by`,
186
+ * `updated_by`), and RPC and WebSocket methods return domain shapes that
187
+ * carry those columns legitimately (cells, invites a member created).
188
+ *
189
+ * @param surface_source - the surface with the specs it was generated from
190
+ * @param admin_only_fields - field names no non-admin route output may carry
191
+ * @param skip_routes - routes to skip, as `'METHOD /path'`
192
+ * @throws Error when an output schema can't be written as JSON Schema on either side
193
+ */
194
+ export const assert_non_admin_schemas_no_admin_fields = (surface_source, admin_only_fields = admin_only_field_blocklist, skip_routes) => {
195
+ assert_output_entries_exclude(
196
+ // TODO: replace name-matching with schema identity — flag a non-admin output
197
+ // (route, RPC, or WS) that embeds `AdminAccountJson`, `InviteJson`, or
198
+ // `AppSettingsJson`, which would also cover RPC and WS outputs
199
+ collect_output_schema_entries(surface_source).filter((entry) => !entry.elevated && entry.kind === 'route'), admin_only_fields, skip_routes, 'non-admin output schema contains admin-only field');
200
+ };
87
201
  /**
88
202
  * Composable data exposure test suite.
89
203
  *
90
204
  * Three test groups:
91
- * 1. Schema-level — walk JSON Schema output/error schemas for sensitive field names
205
+ * 1. Schema-level — walk route, RPC, and WebSocket output schemas (both sides
206
+ * of a transform), pushed WebSocket params, and route error schemas for
207
+ * sensitive field names, and non-admin route outputs for admin-only ones
92
208
  * 2. Runtime — fire real requests and check response bodies against blocklists
93
209
  * 3. Cross-privilege — admin routes return 403 for non-admin, error responses
94
210
  * contain no sensitive fields
@@ -99,10 +215,10 @@ export const describe_data_exposure_tests = (options) => {
99
215
  const skip_set = new Set(options.skip_routes);
100
216
  describe('data exposure — schema-level', () => {
101
217
  test('no sensitive fields in any output schema', () => {
102
- assert_output_schemas_no_sensitive_fields(surface, sensitive_fields);
218
+ assert_output_schemas_no_sensitive_fields(options.surface_source, sensitive_fields, options.skip_routes);
103
219
  });
104
220
  test('no admin-only fields in non-admin output schemas', () => {
105
- assert_non_admin_schemas_no_admin_fields(surface, admin_only_fields);
221
+ assert_non_admin_schemas_no_admin_fields(options.surface_source, admin_only_fields, options.skip_routes);
106
222
  });
107
223
  test('no sensitive fields in any error schema', () => {
108
224
  for (const route of surface.routes) {
@@ -206,7 +322,7 @@ export const describe_data_exposure_tests = (options) => {
206
322
  if (skip_set.has(route_key))
207
323
  continue;
208
324
  // keeper auth (daemon token) is strictly more privileged than admin
209
- const is_elevated = is_keeper_auth(spec.auth) || (spec.auth.roles?.includes('admin') ?? false);
325
+ const is_elevated = is_elevated_auth(spec.auth);
210
326
  const url = resolve_valid_path(spec.path, spec.params);
211
327
  const body = generate_valid_body(spec.input);
212
328
  const headers = pick_auth_headers(spec, fixture, authed_account, admin_account);
@@ -10,29 +10,41 @@ import './assert_dev_env.js';
10
10
  */
11
11
  import { z } from 'zod';
12
12
  import { type ZodFieldInfo } from '../zod.js';
13
+ import type { ValidationSchema } from '../schema_issues.js';
13
14
  /**
14
15
  * The JSON Schema of a field's input side — where its format, pattern and
15
- * bounds live — or `null` when JSON Schema can't render the field or any part
16
- * of it (`z.date()`, `z.custom()`, a union with a `z.date()` branch).
16
+ * bounds live. Takes a Zod or a `@fuzdev/fuz_schema` field.
17
17
  *
18
18
  * Rendered with `io: 'input'`, so a field carrying a `.transform()` or a pipe
19
19
  * (`Username`) still yields the constraints its input is checked against;
20
20
  * the default output side throws on a transform. A pipe yields its input
21
21
  * side only, so constraints of the stage after it are not here. A
22
22
  * `.nullable()` / `.nullish()` field renders as
23
- * `anyOf: [{…}, {type: 'null'}]`; its one non-null branch is returned, so
24
- * the bounds and pattern read the same as on the bare field. A union of two
25
- * or more non-null branches returns the whole schema — its branches' bounds
26
- * are no single field's bounds.
23
+ * `anyOf: [{…}, {type: 'null'}]`, or a bare type as `type: [type, 'null']`;
24
+ * its one non-null branch or type is returned, so the bounds, pattern and
25
+ * `type` read the same as on the bare field. A union of two or more non-null
26
+ * branches returns the whole schema — its branches' bounds are no single
27
+ * field's bounds.
28
+ *
29
+ * Either library renders with `unrepresentable: 'any'`: a part JSON Schema
30
+ * can't say (a `z.date()`, a `z.custom()`, a fuz_schema `check` or `bigint`)
31
+ * is left out or `{}`, and the bounds around it still read, so a
32
+ * `pipe(string, max_length(n), check(…))` keeps its `maxLength` and a union
33
+ * with a `z.date()` branch keeps its other branches — every case the
34
+ * generators build from it is checked against the field itself before it's
35
+ * used. What an emitter refuses even then (a fuz_schema entry named like a
36
+ * member of `Object.prototype`, metadata that isn't JSON) throws: a mistake in
37
+ * the schema, not a gap in JSON Schema.
27
38
  *
28
39
  * A `.refine()` is never here: JSON Schema can't express one, so a bound a
29
40
  * refinement enforces (a code-point length, a cross-field rule) generates no
30
41
  * boundary case.
31
42
  *
32
43
  * @param field_schema - the field to read
33
- * @returns the field's input-side JSON Schema, or `null` when it can't be rendered
44
+ * @returns the field's input-side JSON Schema
45
+ * @throws Error when the emitter refuses `field_schema` with `unrepresentable: 'any'`
34
46
  */
35
- export declare const to_field_json_schema: (field_schema: z.ZodType) => Record<string, unknown> | null;
47
+ export declare const to_field_json_schema: (field_schema: ValidationSchema) => Record<string, unknown>;
36
48
  /**
37
49
  * The format constraint a field's input-side JSON Schema carries: its
38
50
  * `format` (e.g. `'uuid'`, `'email'`), `'pattern'` for a regex, or `null`.
@@ -49,7 +61,7 @@ export declare const detect_json_schema_format: (json: Record<string, unknown>)
49
61
  * (`to_field_json_schema`). Returns the format string (e.g. `'uuid'`,
50
62
  * `'email'`), `'pattern'` for a regex, or `null`.
51
63
  */
52
- export declare const detect_format: (field_schema: z.ZodType) => string | null;
64
+ export declare const detect_format: (field_schema: ValidationSchema) => string | null;
53
65
  /** Generate a valid-ish value for a field based on its base type. */
54
66
  export declare const generate_valid_value: (field: ZodFieldInfo, field_schema: z.ZodType) => unknown;
55
67
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"schema_generators.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/schema_generators.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAKN,KAAK,YAAY,EACjB,MAAM,WAAW,CAAC;AAInB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,oBAAoB,GAAI,cAAc,CAAC,CAAC,OAAO,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAcxF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,GAAI,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,MAAM,GAAG,IAWlF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,cAAc,CAAC,CAAC,OAAO,KAAG,MAAM,GAAG,IAGhE,CAAC;AAqHF,qEAAqE;AACrE,eAAO,MAAM,oBAAoB,GAAI,OAAO,YAAY,EAAE,cAAc,CAAC,CAAC,OAAO,KAAG,OAkGnF,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,qBAAqB,GACjC,eAAe,CAAC,CAAC,SAAS,EAC1B,QAAQ,CAAC,CAAC,O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