@conarium-ai/core 0.2.20 → 0.2.21

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 (70) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +8 -3
  3. package/bin/conarium-doctor.mjs +46 -2
  4. package/conformance/KNOWN-GAPS.md +20 -0
  5. package/conformance/README.md +85 -0
  6. package/conformance/adapters/README.md +59 -0
  7. package/conformance/adapters/conarium.mjs +17 -0
  8. package/conformance/cases/coverage/expect-count-pin.json +13 -0
  9. package/conformance/cases/coverage/tail-without-pin.json +15 -0
  10. package/conformance/cases/evidence/001-single-receipt.json +16 -0
  11. package/conformance/cases/evidence/002-chain-of-three.json +16 -0
  12. package/conformance/cases/evidence/003-tampered-field.json +16 -0
  13. package/conformance/cases/evidence/004-prevhash-break.json +16 -0
  14. package/conformance/cases/evidence/005-seq-gap.json +16 -0
  15. package/conformance/cases/evidence/006-bad-signature.json +16 -0
  16. package/conformance/cases/evidence/007-schema-invalid.json +16 -0
  17. package/conformance/cases/evidence/008-unsigned-no-pubkey.json +13 -0
  18. package/conformance/cases/evidence/009-unsigned-but-pubkey-given.json +16 -0
  19. package/conformance/cases/gate/deny-alias.json +13 -0
  20. package/conformance/cases/gate/deny-case-fold.json +13 -0
  21. package/conformance/cases/gate/deny-comment-between.json +13 -0
  22. package/conformance/cases/gate/deny-cte.json +13 -0
  23. package/conformance/cases/gate/deny-join.json +13 -0
  24. package/conformance/cases/gate/deny-plain.json +13 -0
  25. package/conformance/cases/gate/deny-quoted-lower.json +13 -0
  26. package/conformance/cases/gate/deny-schema-qualify.json +13 -0
  27. package/conformance/cases/gate/deny-string-agg.json +13 -0
  28. package/conformance/cases/gate/deny-subquery.json +13 -0
  29. package/conformance/cases/gate/deny-unqualified.json +13 -0
  30. package/conformance/cases/gate/deny-updlock.json +13 -0
  31. package/conformance/cases/gate/deny-user-fn.json +13 -0
  32. package/conformance/cases/gate/fail-empty.json +13 -0
  33. package/conformance/cases/gate/fail-garbage.json +13 -0
  34. package/conformance/cases/gate/fail-two-statements.json +13 -0
  35. package/conformance/cases/gate/write-copy.json +13 -0
  36. package/conformance/cases/gate/write-create.json +13 -0
  37. package/conformance/cases/gate/write-delete.json +13 -0
  38. package/conformance/cases/gate/write-drop.json +13 -0
  39. package/conformance/cases/gate/write-insert.json +13 -0
  40. package/conformance/cases/gate/write-merge.json +13 -0
  41. package/conformance/cases/gate/write-truncate.json +13 -0
  42. package/conformance/cases/gate/write-update.json +13 -0
  43. package/conformance/cases/inference/cohort-narrowing.json +13 -0
  44. package/conformance/cases/inference/count-channel.json +13 -0
  45. package/conformance/cases/inference/exists-channel.json +13 -0
  46. package/conformance/cases/inference/repeated-probe.json +13 -0
  47. package/conformance/cases/masking/mask-alias.json +14 -0
  48. package/conformance/cases/masking/mask-case.json +14 -0
  49. package/conformance/cases/masking/mask-concat.json +14 -0
  50. package/conformance/cases/masking/mask-subquery.json +14 -0
  51. package/conformance/cases/rowcap/cap-nested.json +14 -0
  52. package/conformance/cases/rowcap/cap-raise-limit.json +14 -0
  53. package/conformance/cases/rowcap/cap-union.json +14 -0
  54. package/conformance/claims/conarium.json +12 -0
  55. package/conformance/lib/status.mjs +48 -0
  56. package/conformance/policies/mask-email.json +5 -0
  57. package/conformance/policies/protected-email.json +6 -0
  58. package/conformance/policies/sql-gate.json +6 -0
  59. package/conformance/profiles.md +15 -0
  60. package/conformance/run.mjs +208 -0
  61. package/conformance/schema/case.json +42 -0
  62. package/dist/config.d.ts +12 -0
  63. package/dist/config.d.ts.map +1 -1
  64. package/dist/config.js +7 -2
  65. package/dist/config.js.map +1 -1
  66. package/dist/types.d.ts +5 -0
  67. package/dist/types.d.ts.map +1 -1
  68. package/docs/CONTRIBUTING.md +7 -0
  69. package/package.json +2 -1
  70. package/scripts/gacs-query-adapter.mjs +52 -0
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "gate/deny-subquery",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "table-policy",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "SELECT id FROM (SELECT id FROM public.secrets) AS x",
9
+ "rationale": "A table that is denied (or not allowed) is refused, including through alias, join, CTE, subquery, quoting, and comments.",
10
+ "doesNotTest": "Database-role grants; information_schema contents; dialects other than the postgres spelling used here.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#deny-subquery",
12
+ "expect": "deny"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "gate/deny-unqualified",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "table-policy",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "SELECT id FROM secrets",
9
+ "rationale": "A table that is denied (or not allowed) is refused, including through alias, join, CTE, subquery, quoting, and comments.",
10
+ "doesNotTest": "Database-role grants; information_schema contents; dialects other than the postgres spelling used here.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#deny-unqualified",
12
+ "expect": "deny"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "gate/deny-updlock",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "table-policy",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "SELECT id FROM dbo.customers WITH (UPDLOCK)",
9
+ "rationale": "A locking hint is a side effect and is refused.",
10
+ "doesNotTest": "Session isolation settings applied outside the statement.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#deny-updlock",
12
+ "expect": "deny"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "gate/deny-user-fn",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "table-policy",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "SELECT app.pkg.fn(id) FROM public.customers",
9
+ "rationale": "Serialization and dump aggregates are refused.",
10
+ "doesNotTest": "Leakage through allowed aggregates such as count or avg.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#deny-user-fn",
12
+ "expect": "deny"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "gate/fail-empty",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "table-policy",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": " ",
9
+ "rationale": "Unparseable or multi-statement input is refused rather than executed.",
10
+ "doesNotTest": "Parser differences across dialects; the exact error string.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#fail-empty",
12
+ "expect": "deny"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "gate/fail-garbage",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "table-policy",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "not sql at all !!!",
9
+ "rationale": "Unparseable or multi-statement input is refused rather than executed.",
10
+ "doesNotTest": "Parser differences across dialects; the exact error string.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#fail-garbage",
12
+ "expect": "deny"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "gate/fail-two-statements",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "table-policy",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "SELECT id FROM public.customers; SELECT id FROM public.secrets",
9
+ "rationale": "Unparseable or multi-statement input is refused rather than executed.",
10
+ "doesNotTest": "Parser differences across dialects; the exact error string.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#fail-two-statements",
12
+ "expect": "deny"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "gate/write-copy",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "table-policy",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "COPY public.customers TO STDOUT",
9
+ "rationale": "A write token is refused on a read-only gate.",
10
+ "doesNotTest": "Whether the database role itself could execute the write if the gate were bypassed.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#write-copy",
12
+ "expect": "deny"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "gate/write-create",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "table-policy",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "CREATE TABLE public.x (id int)",
9
+ "rationale": "A write token is refused on a read-only gate.",
10
+ "doesNotTest": "Whether the database role itself could execute the write if the gate were bypassed.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#write-create",
12
+ "expect": "deny"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "gate/write-delete",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "table-policy",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "DELETE FROM public.customers",
9
+ "rationale": "A write token is refused on a read-only gate.",
10
+ "doesNotTest": "Whether the database role itself could execute the write if the gate were bypassed.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#write-delete",
12
+ "expect": "deny"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "gate/write-drop",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "table-policy",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "DROP TABLE public.customers",
9
+ "rationale": "A write token is refused on a read-only gate.",
10
+ "doesNotTest": "Whether the database role itself could execute the write if the gate were bypassed.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#write-drop",
12
+ "expect": "deny"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "gate/write-insert",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "table-policy",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "INSERT INTO public.customers (id) VALUES (1)",
9
+ "rationale": "A write token is refused on a read-only gate.",
10
+ "doesNotTest": "Whether the database role itself could execute the write if the gate were bypassed.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#write-insert",
12
+ "expect": "deny"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "gate/write-merge",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "table-policy",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "MERGE INTO public.customers t USING public.customers s ON t.id = s.id WHEN MATCHED THEN UPDATE SET id = s.id",
9
+ "rationale": "A write token is refused on a read-only gate.",
10
+ "doesNotTest": "Whether the database role itself could execute the write if the gate were bypassed.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#write-merge",
12
+ "expect": "deny"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "gate/write-truncate",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "table-policy",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "TRUNCATE public.customers",
9
+ "rationale": "A write token is refused on a read-only gate.",
10
+ "doesNotTest": "Whether the database role itself could execute the write if the gate were bypassed.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#write-truncate",
12
+ "expect": "deny"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "gate/write-update",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "table-policy",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "UPDATE public.customers SET id = 1",
9
+ "rationale": "A write token is refused on a read-only gate.",
10
+ "doesNotTest": "Whether the database role itself could execute the write if the gate were bypassed.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#write-update",
12
+ "expect": "deny"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "inference/cohort-narrowing",
3
+ "regime": "resistance",
4
+ "profile": "GACS-I1",
5
+ "claim": "inference-control",
6
+ "harness": "query",
7
+ "policy": "policies/mask-email.json",
8
+ "query": "SELECT city, count(*) FROM public.customers GROUP BY city",
9
+ "expectedStatus": "NOT_COVERED",
10
+ "expectedFail": true,
11
+ "rationale": "Grouping on an allowed column yields cohort sizes. Combined with other filters this narrows identity.",
12
+ "doesNotTest": "Whether a particular cohort is unique in a real table; that needs data."
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "inference/count-channel",
3
+ "regime": "resistance",
4
+ "profile": "GACS-I1",
5
+ "claim": "inference-control",
6
+ "harness": "query",
7
+ "policy": "policies/mask-email.json",
8
+ "query": "SELECT count(*) FROM public.customers WHERE email LIKE 'a%'",
9
+ "expectedStatus": "NOT_COVERED",
10
+ "expectedFail": true,
11
+ "rationale": "A row count of one versus zero answers a question about a masked value without displaying it.",
12
+ "doesNotTest": "Timing side channels; a session-wide probe budget."
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "inference/exists-channel",
3
+ "regime": "resistance",
4
+ "profile": "GACS-I1",
5
+ "claim": "inference-control",
6
+ "harness": "query",
7
+ "policy": "policies/mask-email.json",
8
+ "query": "SELECT id FROM public.customers WHERE id IN (SELECT id FROM public.customers WHERE email LIKE 'a%')",
9
+ "expectedStatus": "NOT_COVERED",
10
+ "expectedFail": true,
11
+ "rationale": "A filtered subquery on a masked column still answers whether any row matches. SQL EXISTS is already refused as an unknown function; this IN form is the remaining 1/0 path.",
12
+ "doesNotTest": "The EXISTS keyword itself; timing; a session-wide probe budget."
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "inference/repeated-probe",
3
+ "regime": "resistance",
4
+ "profile": "GACS-I1",
5
+ "claim": "inference-control",
6
+ "harness": "query",
7
+ "policy": "policies/mask-email.json",
8
+ "query": "SELECT id FROM public.customers WHERE email LIKE 'ab%'",
9
+ "expectedStatus": "NOT_COVERED",
10
+ "expectedFail": true,
11
+ "rationale": "The same policy accepts successive narrowing predicates. There is no per-session probe budget.",
12
+ "doesNotTest": "A single-query denial; this case is about repetition, which a one-shot harness can only declare."
13
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "id": "masking/mask-alias",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "masking",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "SELECT email AS contact FROM public.customers",
9
+ "rationale": "A configured column is marked for masking in the result, including through alias, concat, CASE, and subquery.",
10
+ "doesNotTest": "Inference through predicates on the same column; content detectors on other fields.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#mask-alias",
12
+ "expect": "allow",
13
+ "expectMaskedContains": "contact"
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "id": "masking/mask-case",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "masking",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "SELECT CASE WHEN true THEN email ELSE 'x' END AS picked FROM public.customers",
9
+ "rationale": "A configured column is marked for masking in the result, including through alias, concat, CASE, and subquery.",
10
+ "doesNotTest": "Inference through predicates on the same column; content detectors on other fields.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#mask-case",
12
+ "expect": "allow",
13
+ "expectMaskedContains": "picked"
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "id": "masking/mask-concat",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "masking",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "SELECT email || '@x' AS glued FROM public.customers",
9
+ "rationale": "A configured column is marked for masking in the result, including through alias, concat, CASE, and subquery.",
10
+ "doesNotTest": "Inference through predicates on the same column; content detectors on other fields.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#mask-concat",
12
+ "expect": "allow",
13
+ "expectMaskedContains": "glued"
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "id": "masking/mask-subquery",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "masking",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "SELECT email FROM (SELECT email FROM public.customers) AS x",
9
+ "rationale": "A configured column is marked for masking in the result, including through alias, concat, CASE, and subquery.",
10
+ "doesNotTest": "Inference through predicates on the same column; content detectors on other fields.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#mask-subquery",
12
+ "expect": "allow",
13
+ "expectMaskedContains": "email"
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "id": "rowcap/cap-nested",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "row-cap",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "SELECT id FROM (SELECT id FROM public.customers LIMIT 9999) AS x",
9
+ "rationale": "A requested row count above the policy cap is rewritten down to the cap.",
10
+ "doesNotTest": "Session-wide extraction by repeating the query with OFFSET.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#cap-nested",
12
+ "expect": "allow",
13
+ "expectRewritten": "limit\\s+\\(?50"
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "id": "rowcap/cap-raise-limit",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "row-cap",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "SELECT id FROM public.customers LIMIT 9999",
9
+ "rationale": "A requested row count above the policy cap is rewritten down to the cap.",
10
+ "doesNotTest": "Session-wide extraction by repeating the query with OFFSET.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#cap-raise-limit",
12
+ "expect": "allow",
13
+ "expectRewritten": "limit\\s+\\(?50"
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "id": "rowcap/cap-union",
3
+ "regime": "conformance",
4
+ "profile": "GACS-E1",
5
+ "claim": "row-cap",
6
+ "harness": "query",
7
+ "policy": "policies/sql-gate.json",
8
+ "query": "SELECT id FROM public.customers UNION ALL SELECT id FROM public.customers",
9
+ "rationale": "A requested row count above the policy cap is rewritten down to the cap.",
10
+ "doesNotTest": "Session-wide extraction by repeating the query with OFFSET.",
11
+ "sourceVector": "test-vectors/sql-gate/vectors.json#cap-union",
12
+ "expect": "allow",
13
+ "expectRewritten": "limit\\s+\\(?50"
14
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "implementation": "conarium",
3
+ "version": "0.2.20",
4
+ "claims": [
5
+ "table-policy",
6
+ "row-cap",
7
+ "masking",
8
+ "receipts",
9
+ "reconciliation"
10
+ ],
11
+ "verify": ["node", "bin/conarium-verify.mjs"]
12
+ }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Two regimes. Mixing their words is how a suite starts lying.
3
+ *
4
+ * conformance → PASS / FAIL (frozen expectation matched or not)
5
+ * resistance → ENFORCED | BOUNDED | NOT_COVERED | DECLARED_ONLY |
6
+ * DETECTED_WITH_EXTERNAL_PIN | NOT_CLAIMED
7
+ * never PASS
8
+ */
9
+
10
+ export const RESISTANCE_STATUSES = [
11
+ 'ENFORCED',
12
+ 'BOUNDED',
13
+ 'NOT_COVERED',
14
+ 'DECLARED_ONLY',
15
+ 'DETECTED_WITH_EXTERNAL_PIN',
16
+ 'NOT_CLAIMED',
17
+ ]
18
+
19
+ export function claimed(claimsFile, claim) {
20
+ return (claimsFile.claims || []).includes(claim)
21
+ }
22
+
23
+ export function resistanceStatus({ allowed, expectedStatus, claimListed }) {
24
+ if (!claimListed) return 'NOT_CLAIMED'
25
+ if (expectedStatus && expectedStatus !== 'ENFORCED' && expectedStatus !== 'BOUNDED') {
26
+ return expectedStatus
27
+ }
28
+ if (allowed === false) return 'ENFORCED'
29
+ if (expectedStatus === 'BOUNDED') return 'BOUNDED'
30
+ return 'NOT_COVERED'
31
+ }
32
+
33
+ export function conformanceStatus({ ok }) {
34
+ return ok ? 'PASS' : 'FAIL'
35
+ }
36
+
37
+ export function label(regime, status) {
38
+ if (regime === 'resistance' && status === 'PASS') {
39
+ throw new Error('resistance regime must not use PASS')
40
+ }
41
+ return status
42
+ }
43
+
44
+ export function noScore(report) {
45
+ if (report.score != null || report.percent != null || report.grade != null) {
46
+ throw new Error('GACS must not produce a single score')
47
+ }
48
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "allowTables": ["public.customers"],
3
+ "maskColumns": ["*.email"],
4
+ "maxRows": 100
5
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "allowTables": ["public.customers"],
3
+ "maskColumns": ["*.email"],
4
+ "protectedColumns": ["*.email"],
5
+ "maxRows": 100
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "allowTables": ["public.customers"],
3
+ "denyTables": ["public.secrets"],
4
+ "maskColumns": ["*.email"],
5
+ "maxRows": 50
6
+ }
@@ -0,0 +1,15 @@
1
+ # GACS profiles
2
+
3
+ A profile is a named slice of the suite. A procurement text can say
4
+ "the solution SHALL satisfy GACS-E1 and GACS-C1" without inventing a
5
+ score.
6
+
7
+ | Profile | Name | What it covers |
8
+ |---|---|---|
9
+ | GACS-D1 | Disclosure integrity | Receipt chain, signature, tamper, mid-chain deletion, sequence gaps |
10
+ | GACS-E1 | Enforcement | Table and column policy, row cap, masking |
11
+ | GACS-C1 | Coverage | Source-side reconciliation and tail pins |
12
+ | GACS-I1 | Bounded inference | Inference channels. Today these are listed, not claimed. |
13
+
14
+ The runner prints one block per profile. It does not add the blocks into
15
+ a grade.