@conarium-ai/core 0.2.5 → 0.2.7

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 (49) hide show
  1. package/CHANGELOG.md +51 -1
  2. package/README.md +70 -21
  3. package/SECURITY.md +87 -41
  4. package/bin/conarium-init.mjs +1 -1
  5. package/bin/conarium-suggest-policy.mjs +143 -0
  6. package/dist/audit.d.ts +5 -0
  7. package/dist/audit.d.ts.map +1 -1
  8. package/dist/audit.js +12 -2
  9. package/dist/audit.js.map +1 -1
  10. package/dist/config.d.ts +52 -0
  11. package/dist/config.d.ts.map +1 -1
  12. package/dist/config.js +9 -0
  13. package/dist/config.js.map +1 -1
  14. package/dist/console.d.ts +2 -0
  15. package/dist/console.d.ts.map +1 -1
  16. package/dist/console.js +29 -1
  17. package/dist/console.js.map +1 -1
  18. package/dist/digit_pii.d.ts +7 -0
  19. package/dist/digit_pii.d.ts.map +1 -1
  20. package/dist/digit_pii.js +30 -5
  21. package/dist/digit_pii.js.map +1 -1
  22. package/dist/governance.d.ts.map +1 -1
  23. package/dist/governance.js +21 -2
  24. package/dist/governance.js.map +1 -1
  25. package/dist/ip_detect.d.ts +28 -0
  26. package/dist/ip_detect.d.ts.map +1 -0
  27. package/dist/ip_detect.js +91 -0
  28. package/dist/ip_detect.js.map +1 -0
  29. package/dist/keys.js +1 -1
  30. package/dist/keys.js.map +1 -1
  31. package/dist/llm-gate.d.ts +4 -2
  32. package/dist/llm-gate.d.ts.map +1 -1
  33. package/dist/llm-gate.js +4 -2
  34. package/dist/llm-gate.js.map +1 -1
  35. package/dist/mrz.d.ts +7 -0
  36. package/dist/mrz.d.ts.map +1 -0
  37. package/dist/mrz.js +73 -0
  38. package/dist/mrz.js.map +1 -0
  39. package/dist/server.d.ts.map +1 -1
  40. package/dist/server.js +2 -0
  41. package/dist/server.js.map +1 -1
  42. package/dist/tckn.d.ts +21 -0
  43. package/dist/tckn.d.ts.map +1 -0
  44. package/dist/tckn.js +68 -0
  45. package/dist/tckn.js.map +1 -0
  46. package/dist/types.d.ts +21 -0
  47. package/dist/types.d.ts.map +1 -1
  48. package/examples/per-user-identity/mint-token.mjs +3 -2
  49. package/package.json +4 -3
package/CHANGELOG.md CHANGED
@@ -2,7 +2,57 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- Nothing yet — 0.2.5 is the current cut.
5
+ Nothing yet — 0.2.7 is the current cut.
6
+
7
+ ## 0.2.7 — 2026-08-14
8
+
9
+ CodeQL #16 was real. `mint-token.mjs` wrote the per-user token file at
10
+ the process umask (usually 0644) and only then `chmod 0600`. The window
11
+ is the product's identity store. The file is now born with `mode: 0o600`;
12
+ `chmod` remains a backstop for an already-wide file. The same birth
13
+ permission is applied to `writeKeyPairFiles` (private PEM) and
14
+ `conarium-init`'s signing key.
15
+
16
+ Console config saves go through a same-directory temp file + `rename`
17
+ so a crash cannot leave a half-written policy.
18
+
19
+ ### Fixed
20
+
21
+ - **Token / signing-key files no longer exist world-readable, even briefly.**
22
+ - **Console `POST /api/config` is an atomic replace.**
23
+
24
+ **Not published. Not deployed to Hetzner.**
25
+
26
+ ## 0.2.6 — 2026-08-14
27
+
28
+ Detector coverage plus two operator knobs. Address and bare-name *content*
29
+ detectors were not added: both need a dictionary or a model, which this
30
+ product refuses. Those gaps stay documented. `conarium-suggest-policy`
31
+ guesses `maskColumns` from column names and does not write config.
32
+
33
+ ### Added
34
+
35
+ - **`policy.scanCharCap`** (default 16 384) and env `CONARIUM_SCAN_CHAR_CAP`.
36
+ Oversize fields are still replaced whole with `[MASKED_PII]`; they are
37
+ never skipped. Raising the cap grows scan cost quadratically. Ceiling
38
+ 1 048 576.
39
+ - **`policy.detectors`**: `ip` (default **false**), `mrz` (default **true**).
40
+ TCKN / card / IBAN / email are not keys; a config that tries to disable
41
+ them is rejected at load.
42
+ - **IPv4 / IPv6** when `detectors.ip` is true. Octets 0–255, no leading
43
+ zeros. `1.2.3.4` is structurally IPv4 and is masked; dates and amounts
44
+ are not. Loopback and private ranges are masked too — leave `ip` off
45
+ if SOC needs them in the clear.
46
+ - **Passport MRZ (TD3)** — 2×44, 7-3-1 check digits. Checksum miss → not
47
+ an MRZ. TD1/TD2 not implemented.
48
+ - **JSON `\u0040` and `%40`** join HTML `@` as scan-only encoded `@`.
49
+ Non-email encodings are left unchanged. `@` is not chased.
50
+ - **Split TCKN** on similarly named fields of the same row when the
51
+ concatenation checksums. No combinatorial scan.
52
+ - **`conarium-suggest-policy`** — `--sql` / `--json`. Prints a guess.
53
+ Refuses `--write`.
54
+
55
+ **Not published. Not deployed to Hetzner.**
6
56
 
7
57
  ## 0.2.5 — 2026-08-14
8
58
 
package/README.md CHANGED
@@ -111,10 +111,13 @@ Deliberately narrow, because this is the one feature that can *loosen* protectio
111
111
  the failure this product exists to prevent.
112
112
  - **Fail-closed everywhere else:** no actor, unlisted actor, or a profile name that
113
113
  does not exist all fall back to the base policy, never to a wider one.
114
- - **The content scanners still run.** The email / national-ID / phone / card /
115
- IBAN / secret detectors are not overridable at all, so those stay masked in free text
116
- no matter which profile applied. IBAN is accepted only when ISO 7064 mod-97-10
117
- holds — a random 26-character run is not an IBAN. Name masking is the one detector a profile can
114
+ - **The content scanners still run.** Email / national-ID / phone / card /
115
+ IBAN / secret detectors are not overridable at all, so those stay masked in free
116
+ text no matter which profile applied. IBAN is accepted only when ISO 7064
117
+ mod-97-10 holds. Passport MRZ (TD3, 7-3-1 check digits) is on by default and
118
+ likewise cannot be turned off by a profile — only `policy.detectors.mrz: false`
119
+ on the **base** policy opts it out. IP addresses are **off** until
120
+ `policy.detectors.ip: true`. Name masking is the one detector a profile can
118
121
  switch off (`maskLabelledNames: false`), because the controller reading their
119
122
  own customer list is the case this feature exists for.
120
123
  - **The receipt says which profile applied** — `policy.id` becomes
@@ -146,21 +149,44 @@ that do run NER (Presidio-based ones, for instance) cover more entity types; the
146
149
  buy that with a confidence threshold. Neither position dominates — this one is
147
150
  stated so an auditor knows which one they are holding.
148
151
 
149
- **Still not caught by content scanners:** street addresses, IP addresses, and
150
- passport numbers. Split identifiers (a TCKN broken across two fields) and
151
- JSON `\u0040` escapes are also out. HTML `@` is masked only when it sits
152
- inside an email-shaped token; a lone `5@ store` is left alone. Zero-width
153
- characters, fullwidth digits / `@`, and unicode dashes are stripped or mapped
154
- to ASCII *before* the detectors as of this cut — that pass is not a general
155
- encoding decoder; wrapped base64/hex *tokens* inside a field are masked only
156
- when they decode to an existing detector hit. Column policy can still mask
157
- those other fields by name.
158
-
159
- **Scan length.** A single text field longer than 16 384 characters is replaced
160
- with `[MASKED_PII]` as a whole, even when it contains no identifier. The
161
- scanner is not skipped: skipping would mean a long note, JSON blob, or log
162
- line is the way past masking. `maskedCount` records that a decision was
163
- made. Fields at or under the cap are scanned as before.
152
+ **Still not caught by content scanners — by design, not by omission:** street
153
+ addresses and bare names. An address detector cannot tell "Atatürk Caddesi No:15"
154
+ from "Atatürk Barajı" without a gazetteer. A name detector cannot tell Deniz /
155
+ Güneş / Umut from the words. Both would need a dictionary or a model; this
156
+ gateway's decisions are deterministic. Close those gaps with `maskColumns` (column
157
+ names) and `conarium-suggest-policy` (a name-based *guess* that does not write
158
+ your config).
159
+
160
+ IP addresses are caught **when you turn them on** (`policy.detectors.ip: true`).
161
+ They are off by default: a server IP is not always personal data, and a mask you
162
+ cannot disable breaks SOC work. `1.2.3.4` is structurally a valid IPv4 address;
163
+ when the detector is on it is masked, even if you meant a version number. Dates
164
+ (`13.08.2026`) and amounts (`1.250,00`) are not IPv4.
165
+
166
+ Passport numbers in free text are not caught. **MRZ is:** two TD3 lines × 44
167
+ characters, `P` in position 1, 7-3-1 check digits. A checksum miss is not an MRZ
168
+ and is left alone. TD1/TD2 are not implemented.
169
+
170
+ HTML `@` / `@`, JSON `\u0040`, and `%40` are masked when they sit inside
171
+ an email-shaped token. A lone `5@ store` or `C:\path\u0040abc` is left alone.
172
+ One decode pass; `@` is not chased.
173
+
174
+ A TCKN split across two similarly named fields on the same row (`tckn_1` /
175
+ `tckn_2`) is masked when the concatenation checksums. Unrelated columns are not
176
+ combined.
177
+
178
+ Zero-width characters, fullwidth digits / `@`, and unicode dashes are stripped
179
+ or mapped to ASCII *before* the detectors — that pass is not a general encoding
180
+ decoder; wrapped base64/hex *tokens* inside a field are masked only when they
181
+ decode to an existing detector hit.
182
+
183
+ **Scan length.** A single text field longer than `policy.scanCharCap` (default
184
+ 16 384; env `CONARIUM_SCAN_CHAR_CAP` overrides) is replaced with `[MASKED_PII]`
185
+ as a whole, even when it contains no identifier. The scanner is not skipped:
186
+ skipping would mean a long note, JSON blob, or log line is the way past masking.
187
+ This is a **usability** setting. Raising it grows scan cost quadratically — a
188
+ 40 KB alphanumeric field was ~1 s on the unbounded email regex before that regex
189
+ was bounded. `maskedCount` records that a decision was made.
164
190
 
165
191
  Carry-over ignores values under three characters (a two-character value matches
166
192
  everywhere and would shred the output) and matches on Unicode word boundaries, so
@@ -355,8 +381,8 @@ npm start
355
381
  It never prints the private key — only its path.
356
382
 
357
383
  When the package is on npm, the same binaries will ship in the tarball
358
- (`conarium-init`, `conarium-doctor`, `conarium-verify`). Until then, run them
359
- from this repository as above.
384
+ (`conarium-init`, `conarium-doctor`, `conarium-verify`, `conarium-suggest-policy`).
385
+ Until then, run them from this repository as above.
360
386
 
361
387
  ### Before you file a bug: run the doctor
362
388
 
@@ -408,6 +434,29 @@ Anything not in `allowTables` is denied by default; matched `maskColumns` are re
408
434
  > otherwise the server refuses to start and tells you exactly which field to add.
409
435
  > `denyConnectors` still takes precedence over `allowConnectors`.
410
436
 
437
+ ### `policy.detectors` and `policy.scanCharCap`
438
+
439
+ Identity detectors — TCKN, card, IBAN, email — cannot be switched off. A config
440
+ that tries (`detectors: { tckn: false }`) is rejected at load. That is the
441
+ product: masking that a bank can disable from a JSON file is not masking.
442
+
443
+ | Key | Default | Why |
444
+ |---|---|---|
445
+ | `detectors.ip` | `false` | A server IP is not always personal data. A mask with no off switch breaks SOC ("how many requests from this address?"). Opt in when the column really is a client address. |
446
+ | `detectors.mrz` | `true` | A passport MRZ is identity and has check digits. Turn off on the base policy if you do not handle travel documents. |
447
+ | `scanCharCap` | `16384` | Usability. Fields longer than this are replaced whole (`[MASKED_PII]`), never skipped. Env `CONARIUM_SCAN_CHAR_CAP` overrides. Raise it and scan cost grows quadratically. Ceiling 1 048 576. |
448
+
449
+ ```json
450
+ {
451
+ "scanCharCap": 32768,
452
+ "detectors": { "ip": true }
453
+ }
454
+ ```
455
+
456
+ `conarium-suggest-policy --sql schema.sql` prints a `maskColumns` guess from
457
+ column names (`*name*`, `*address*`, `*tckn*`, …). It does not write your
458
+ config. The first line of the output says so.
459
+
411
460
  ## 🗺️ Roadmap
412
461
 
413
462
  Conarium is **early access** — and honest about what's real:
package/SECURITY.md CHANGED
@@ -60,6 +60,14 @@ log, verification — is local to your infrastructure by construction.
60
60
  - Anything at the operating-system level: file permissions, process isolation,
61
61
  the security of the host running Conarium.
62
62
 
63
+ **Content scanners — what we do not guess.** Street addresses and bare names
64
+ have no deterministic shape. We do not ship a gazetteer or a name list; a
65
+ half-working detector would turn the documented gap into a lie. Close those
66
+ fields with `maskColumns` / `conarium-suggest-policy`. IP addresses are an
67
+ opt-in detector (`policy.detectors.ip`) because a server IP is not always
68
+ personal data. Passport MRZ is checksummed (TD3); a free-text "letter plus
69
+ eight digits" pattern is not shipped.
70
+
63
71
  **We do not have** SOC 2, an external penetration test, or a formal security
64
72
  certification. We are one person. That is not a footnote we would rather you missed;
65
73
  it is the reason the code is MIT-licensed and runs entirely inside your own
@@ -160,47 +168,85 @@ this reason — the scope was narrowed to be correct, not to make the number sma
160
168
 
161
169
  ## CodeQL findings, triaged
162
170
 
163
- CodeQL ran for the first time on 2026-08-12 and raised twelve alerts. Each was
164
- checked against the code rather than accepted or dismissed on sight. One was real
165
- and is fixed; the rest are false positives and are dismissed in the Security tab
166
- with the reasoning recorded there, not silently closed.
167
-
168
- **Fixed — `js/missing-rate-limiting` in `src/console.ts` (4 alerts).** The console
169
- had no rate limit. It binds to `127.0.0.1` and requires a token plus a CSRF header,
170
- so the exposure was narrow — but `CONARIUM_CONSOLE_HOST` can publish it, and in that
171
- configuration nothing slowed a token brute force. A limiter now runs **before**
172
- authentication, deliberately: in `src/http.ts` the limit runs *after* auth so an
173
- unauthorized flood cannot burn a real client's budget, whereas here the thing being
174
- protected is the token itself, and a limit placed after auth would never count the
175
- failed attempts. Same library, opposite order, different reason. Test: case `4b` in
176
- `test/security_hardening_14.mjs`, which sends deliberately wrong tokens.
177
-
178
- One honest wrinkle: **CodeQL still flags these four after the fix.** The analysis
179
- re-ran on the fixed commit and the alerts moved to the new line numbers but stayed
180
- open, because the query looks for a recognised middleware and ours is hand-written —
181
- exactly the situation as the `anchor-service` alerts below. They are dismissed with
182
- that stated on each one. If you are auditing this, do not read "12 dismissed" as
183
- "12 non-issues": one of them was real, and the fix is in `270ac54` with a test that
184
- fails without it.
185
-
186
- **False positive — `js/xss-through-dom` (2 alerts, dismissed 2026-08-12).** Those
187
- alerts pointed at a marketing `index.html` that no longer lives in this
188
- repository. The site is `conarium.dev` (private `nexus` repo). The demo SQL box
189
- there still goes through `hlsql()` → `esc()` before `innerHTML`.
190
-
191
- **False positive — `js/missing-rate-limiting` in `src/anchor-service.ts` (2 alerts).**
192
- The service does rate limit, per owner, returning 429 (`src/anchor-service.ts:135-188`).
193
- The limiter is hand-written rather than a recognised middleware, so the query does
194
- not match it.
195
-
196
- **False positive — `js/http-to-file-access` in `src/anchor-service.ts` (1 alert).**
197
- The write target is the fixed configured `storePath`; the record id is server-generated
198
- (`randomBytes(9)`), and `req.params.id` is only ever used to *search* stored records,
199
- never to build a path. There is no traversal.
200
-
201
- **False positive — `js/file-system-race` in `scripts/` and `bin/` (3 alerts).** These
202
- are developer and CLI tools. Exploiting the check-then-use window requires local write
203
- access to the same filesystem, at which point the tool is not the weakest link.
171
+ Measured **2026-08-14** against `main` (`4be8e82`, after the 0.2.7 fixes and a
172
+ fresh CodeQL run): **0 open**, **17 dismissed**, every dismissal carrying its
173
+ reasoning in the Security tab. The numbers are that query, not a remembered
174
+ total. A stale count is the same class of lie this product exists to refuse.
175
+
176
+ ⚠️ **Alert numbers are not stable.** A fix moves a line, CodeQL closes the old
177
+ alert and opens a new one at the new position — during 0.2.7 the `mint-token`
178
+ finding closed as `#16` and reopened as `#18`, and the new regression test
179
+ raised `#19` of its own. Read the classes below, not the numbers.
180
+
181
+ ### What was actually found
182
+
183
+ **`js/file-system-race` in `examples/per-user-identity/mint-token.mjs` — real, fixed in 0.2.7.**
184
+ The file was created at the process umask (usually 0644) and only then
185
+ `chmod 0600`. Between those two calls, per-user identity tokens were readable
186
+ by another local account. That file is the store behind "a shared credential
187
+ does not name a person". It now births with `writeFileSync(..., { mode: 0o600 })`;
188
+ `chmod` is a backstop, not the only defence. The same birth permission is on
189
+ `src/keys.ts` (`writeKeyPairFiles` private PEM) and `bin/conarium-init.mjs`
190
+ (signing key). Measured on ext4 with `umask 0022`: with `mode` present the file
191
+ is born `600` even when `chmod` is disabled; with `mode` removed it is born
192
+ `644`. Do not read "everything dismissed" as "nothing was real".
193
+
194
+ **`js/missing-rate-limiting` in `src/console.ts`.**
195
+ False positive. A limiter runs **before** authentication, deliberately: in
196
+ `src/http.ts` the limit runs *after* auth so an unauthorized flood cannot burn
197
+ a real client's budget; here the thing being protected is the token itself
198
+ (`test/security_hardening_14.mjs` case `4b`). The query looks for a recognised
199
+ middleware; ours is hand-written. Dismiss is a GitHub Security-tab action, not
200
+ a code change.
201
+
202
+ **`js/file-system-race` in `src/console.ts` (config save).** Weak, local tool —
203
+ but 0.2.7 closed the practical hole anyway: the save is now temp-file + `rename`
204
+ in the same directory, so a crash cannot leave a half-written policy. This alert
205
+ **closed on its own** after the fix; it is the one finding here that CodeQL
206
+ agreed was resolved rather than dismissed.
207
+
208
+ **`js/file-system-race` in `bin/conarium-suggest-policy.mjs`.** New file, new
209
+ alert — that is normal. The tool is read-only (`--sql`), wrapped in try/catch,
210
+ and refuses to write config. There is no privileged sink after the check, so the
211
+ window has no consequence. Noise.
212
+
213
+ **`js/file-system-race` in `test/mint_token_mode.mjs`.** The regression test for
214
+ the finding above: it creates a file in a temp directory and stats it to assert
215
+ the `0600` birth permission. Dismissed as *used in tests*.
216
+
217
+ ### Earlier rounds
218
+
219
+ First CodeQL run was 2026-08-12 (twelve alerts). One of those (`js/missing-rate-limiting`
220
+ on the console with **no** limiter) was real and was fixed in `270ac54`. The
221
+ others were false positives and are dismissed in the Security tab with the
222
+ reasoning recorded there:
223
+
224
+ **`js/missing-rate-limiting` in `src/console.ts` (the original four, plus
225
+ follow-ups).** Limiter exists; query does not see a hand-written one.
226
+
227
+ **`js/xss-through-dom` (2, dismissed 2026-08-12).** Marketing `index.html` that
228
+ no longer lives in this repository. The site is `conarium.dev` (private `nexus`
229
+ repo). The demo SQL box there still goes through `hlsql()` → `esc()` before
230
+ `innerHTML`.
231
+
232
+ **`js/missing-rate-limiting` in `src/anchor-service.ts` (2).** The service does
233
+ rate limit, per owner, returning 429. Hand-written limiter.
234
+
235
+ **`js/http-to-file-access` in `src/anchor-service.ts` (1).** The write target is
236
+ the fixed configured `storePath`; the record id is server-generated
237
+ (`randomBytes(9)`), and `req.params.id` is only ever used to *search* stored
238
+ records, never to build a path.
239
+
240
+ **`js/file-system-race` in `scripts/` and `bin/` (3).** Developer and CLI tools.
241
+ Exploiting the check-then-use window requires local write access to the same
242
+ filesystem, at which point the tool is not the weakest link.
243
+
244
+ If you are auditing this, do not read "17 dismissed" as "17 non-issues". Two of
245
+ them were real and were fixed, not argued away: the console with no rate limiter
246
+ (`270ac54`), and the token file that was born world-readable and narrowed
247
+ afterwards (0.2.7). Everything else is dismissed with its reasoning attached,
248
+ and a dismissal in this repository means *"we looked and wrote down why"*, not
249
+ *"we closed it"*.
204
250
 
205
251
  ## Secrets in git history
206
252
 
@@ -127,7 +127,7 @@ if (!NO_KEYS) {
127
127
  const publicPem = pair.publicKey.export({ type: 'spki', format: 'pem' }).toString()
128
128
  keyId = keyIdFromPublicPem(publicPem)
129
129
  try {
130
- writeFileSync(signingKeyPath, signingPem, writeOpts)
130
+ writeFileSync(signingKeyPath, signingPem, { ...writeOpts, mode: 0o600 })
131
131
  writeFileSync(publicPath, publicPem, writeOpts)
132
132
  writeFileSync(signingKeyIdPath, keyId + '\n', writeOpts)
133
133
  writeFileSync(publicKeyIdPath, keyId + '\n', writeOpts)
@@ -0,0 +1,143 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * conarium-suggest-policy — column-name guess for maskColumns.
4
+ *
5
+ * Standalone: Node builtins only. Does not import src/ or dist/.
6
+ * Does not write conarium.config.json. The operator copies what they accept.
7
+ *
8
+ * "This is a guess; it looks at column names, not data."
9
+ *
10
+ * Exit: 0 printed · 1 refused (missing file / cannot read) · 2 usage
11
+ */
12
+ import { readFileSync, existsSync, statSync } from 'node:fs'
13
+ import { resolve } from 'node:path'
14
+
15
+ const HONESTY = 'This is a guess; it looks at column names, not data.'
16
+
17
+ const HINTS = [
18
+ /adres/i,
19
+ /address/i,
20
+ /name/i,
21
+ /ad_soyad/i,
22
+ /soyad/i,
23
+ /mahalle/i,
24
+ /ilce/i,
25
+ /passport/i,
26
+ /pasaport/i,
27
+ /(?:^|[._-])ip(?:$|[._-])/i,
28
+ /tckn/i,
29
+ /email/i,
30
+ /iban/i,
31
+ /phone/i,
32
+ /telefon/i,
33
+ /holder/i,
34
+ /(?:^|[._-])pan(?:$|[._-])/i,
35
+ /cvv/i,
36
+ /tc_no/i,
37
+ /tcno/i,
38
+ ]
39
+
40
+ const ARGS = process.argv.slice(2)
41
+ const has = (f) => ARGS.includes(f)
42
+ const valueOf = (f) => {
43
+ const i = ARGS.indexOf(f)
44
+ return i >= 0 && ARGS[i + 1] ? ARGS[i + 1] : null
45
+ }
46
+
47
+ function usage(msg) {
48
+ if (msg) console.error(msg)
49
+ console.error(`conarium-suggest-policy — suggest maskColumns from column names
50
+
51
+ --sql <file> CREATE TABLE script (no database needed)
52
+ --json machine-readable output
53
+ --help this text
54
+
55
+ Does not write config. Does not look at row values.
56
+ Exit: 0 printed · 1 refused · 2 usage`)
57
+ }
58
+
59
+ if (has('--help') || has('-h')) {
60
+ usage()
61
+ process.exit(0)
62
+ }
63
+
64
+ if (has('--write') || has('--apply') || has('--out')) {
65
+ console.error('conarium-suggest-policy does not write config. Copy the suggestion yourself.')
66
+ process.exit(1)
67
+ }
68
+
69
+ const sqlPath = valueOf('--sql')
70
+ if (!sqlPath) {
71
+ usage('missing --sql <file>')
72
+ process.exit(2)
73
+ }
74
+
75
+ const abs = resolve(sqlPath)
76
+ if (!existsSync(abs)) {
77
+ console.error(`no such file: ${abs}`)
78
+ process.exit(1)
79
+ }
80
+ try {
81
+ if (!statSync(abs).isFile()) {
82
+ console.error(`not a file: ${abs}`)
83
+ process.exit(1)
84
+ }
85
+ } catch (err) {
86
+ console.error(err.message)
87
+ process.exit(1)
88
+ }
89
+
90
+ let sql
91
+ try {
92
+ sql = readFileSync(abs, 'utf8')
93
+ } catch (err) {
94
+ console.error(err.message)
95
+ process.exit(1)
96
+ }
97
+
98
+ function columnsFromSql(text) {
99
+ const cols = []
100
+ const re = /CREATE TABLE\s+(?:IF NOT EXISTS\s+)?(?:"?(\w+)"?\.)?"?(\w+)"?\s*\(([\s\S]*?)\)\s*;/gi
101
+ let m
102
+ while ((m = re.exec(text))) {
103
+ const table = m[2]
104
+ const body = m[3]
105
+ for (const part of body.split(',')) {
106
+ const trimmed = part.trim()
107
+ if (!trimmed) continue
108
+ if (/^(PRIMARY|FOREIGN|UNIQUE|CHECK|CONSTRAINT)\b/i.test(trimmed)) continue
109
+ const col = trimmed.split(/\s+/)[0]?.replace(/"/g, '')
110
+ if (col) cols.push({ table, column: col })
111
+ }
112
+ }
113
+ return cols
114
+ }
115
+
116
+ function suggest(columns) {
117
+ const seen = new Set()
118
+ const maskColumns = []
119
+ for (const { column } of columns) {
120
+ if (!HINTS.some((re) => re.test(column))) continue
121
+ const glob = `*.${column}`
122
+ if (seen.has(glob)) continue
123
+ seen.add(glob)
124
+ maskColumns.push(glob)
125
+ }
126
+ return maskColumns
127
+ }
128
+
129
+ const maskColumns = suggest(columnsFromSql(sql))
130
+
131
+ if (has('--json')) {
132
+ process.stdout.write(
133
+ JSON.stringify({ honesty: HONESTY, maskColumns, wroteConfig: false }, null, 2) + '\n',
134
+ )
135
+ } else {
136
+ process.stdout.write(`${HONESTY}\n\nwroteConfig: false\n\nSuggested maskColumns:\n`)
137
+ if (maskColumns.length === 0) {
138
+ process.stdout.write(' (none)\n')
139
+ } else {
140
+ for (const c of maskColumns) process.stdout.write(` ${c}\n`)
141
+ }
142
+ }
143
+ process.exit(0)
package/dist/audit.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { ActorAssurance } from './tokens.js';
2
2
  import { type MetaSource } from './receipt.js';
3
+ import type { DetectorToggles } from './types.js';
3
4
  export interface AuditEntry {
4
5
  timestamp: string;
5
6
  actor: string;
@@ -73,12 +74,16 @@ export declare class Audit {
73
74
  private receiptMeta?;
74
75
  private receiptLastHash;
75
76
  private receiptSeq;
77
+ private scanCharCap?;
78
+ private detectors?;
76
79
  constructor(opts?: {
77
80
  sink?: string;
78
81
  consumer?: string;
79
82
  failClosed?: boolean;
80
83
  receiptSink?: string;
81
84
  receiptMeta?: ReceiptMeta;
85
+ scanCharCap?: number;
86
+ detectors?: DetectorToggles;
82
87
  });
83
88
  private requireSigningCapability;
84
89
  private currentSinkSize;
@@ -1 +1 @@
1
- {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../src/audit.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAajD,OAAO,EAIL,KAAK,UAAU,EAIhB,MAAM,cAAc,CAAA;AAGrB,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,iFAAiF;IACjF,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,gFAAgF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AAU;IAyDb,mEAAmE;IACnE,OAAO,CAAC,YAAY;IA8BpB,OAAO,CAAC,aAAa;CAoGtB"}
package/dist/audit.js CHANGED
@@ -4,7 +4,9 @@ import { computeEntryHash, GENESIS_HASH } from './audit-hash.js';
4
4
  import { loadSigningKey, loadTrustStore, signHash, verifyHash, } from './keys.js';
5
5
  import { maskIbansInText, prepareIbanPass } from './iban.js';
6
6
  import { collapsePartialMask, maskEmbeddedEncodedPii, normalizePiiText, } from './pii_normalize.js';
7
- import { PII_SCAN_CHAR_CAP, maskEmails, maskEntityEncodedEmails, maskNumericPii, } from './digit_pii.js';
7
+ import { resolveScanCharCap, maskEmails, maskEntityEncodedEmails, maskNumericPii, } from './digit_pii.js';
8
+ import { maskIps } from './ip_detect.js';
9
+ import { maskMrz } from './mrz.js';
8
10
  import { buildReceipt, hashArgs, RECEIPT_GENESIS_HASH, } from './receipt.js';
9
11
  /**
10
12
  * AuditEntry + governance metadata → ReceiptInput.
@@ -93,9 +95,13 @@ export class Audit {
93
95
  receiptMeta;
94
96
  receiptLastHash = RECEIPT_GENESIS_HASH;
95
97
  receiptSeq = 0;
98
+ scanCharCap;
99
+ detectors;
96
100
  constructor(opts = {}) {
97
101
  this.sink = opts.sink;
98
102
  this.consumer = opts.consumer || 'unknown';
103
+ this.scanCharCap = opts.scanCharCap;
104
+ this.detectors = opts.detectors;
99
105
  // Fail CLOSED by default: docs promise "every access is appended". A sink write
100
106
  // failure must stop the request, not silently drop the trail. Opt out explicitly
101
107
  // with failClosed: false for throwaway/demo setups.
@@ -202,7 +208,7 @@ export class Audit {
202
208
  if (!args)
203
209
  return args;
204
210
  const str = typeof args === 'string' ? args : JSON.stringify(args);
205
- if (str.length > PII_SCAN_CHAR_CAP) {
211
+ if (str.length > resolveScanCharCap(this.scanCharCap)) {
206
212
  return typeof args === 'string' ? '[MASKED_PII]' : { _audit: 'masked-oversize', length: str.length };
207
213
  }
208
214
  let masked = normalizePiiText(str);
@@ -211,6 +217,10 @@ export class Audit {
211
217
  masked = maskEmails(masked).text;
212
218
  masked = maskEntityEncodedEmails(masked).text;
213
219
  masked = maskNumericPii(masked).text;
220
+ if (this.detectors?.ip === true)
221
+ masked = maskIps(masked).text;
222
+ if (this.detectors?.mrz !== false)
223
+ masked = maskMrz(masked).text;
214
224
  // Credentials / secrets — not just PII. Keeps API keys, tokens, passwords
215
225
  // and connection-string credentials out of the audit log.
216
226
  masked = masked.replace(/\b(?:sk-[A-Za-z0-9]{12,}|sk_live_[A-Za-z0-9]{6,}|AKIA[0-9A-Z]{16}|ghp_[A-Za-z0-9]{20,}|gsk_[A-Za-z0-9]{20,}|xox[baprs]-[A-Za-z0-9-]{8,}|eyJ[A-Za-z0-9._-]{20,})\b/g, '[MASKED_SECRET]');
package/dist/audit.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"audit.js","sourceRoot":"","sources":["../src/audit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAA;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACnC,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAChE,OAAO,EACL,cAAc,EACd,cAAc,EACd,QAAQ,EACR,UAAU,GAIX,MAAM,WAAW,CAAA;AAElB,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAC5D,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,uBAAuB,EACvB,cAAc,GACf,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,oBAAoB,GAKrB,MAAM,cAAc,CAAA;AA8CrB;;;;GAIG;AACH,SAAS,mBAAmB,CAAC,KAAiB,EAAE,IAAiB;IAC/D,MAAM,CA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