@nodatachat/guard 2.6.0 → 2.6.1

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/cli.js CHANGED
@@ -26,7 +26,7 @@ const reporter_1 = require("./reporter");
26
26
  const scheduler_1 = require("./fixers/scheduler");
27
27
  const vault_crypto_1 = require("./vault-crypto");
28
28
  const capsule_dir_1 = require("./capsule-dir");
29
- const VERSION = "2.6.0";
29
+ const VERSION = "2.6.1";
30
30
  async function main() {
31
31
  const args = process.argv.slice(2);
32
32
  // ── Subcommand routing ──
@@ -148,16 +148,12 @@ async function scanDatabase(connectionString, onProgress) {
148
148
  }
149
149
  else if (!isCompanion) {
150
150
  field.row_count = total;
151
- // Mark as encrypted if:
152
- // - At least 1 row has an encryption prefix, AND
153
- // - At least 30% of non-null rows are encrypted (threshold for partial encryption)
154
- // OR at least 1 row has encryption AND total rows < 10 (small table — any encryption counts)
155
- const threshold = nonNull > 0 ? encCount / nonNull : 0;
156
- if (encCount > 0 && (threshold >= 0.3 || (nonNull < 10 && encCount > 0))) {
151
+ // If even ONE row has an encryption prefix → encryption is implemented.
152
+ // Coverage (what % of rows) is tracked separately for the report.
153
+ if (encCount > 0) {
157
154
  field.encrypted = true;
158
155
  field.encryption_pattern = pattern;
159
156
  field.encrypted_count = encCount;
160
- // Also record the sentinel prefix for proof.json
161
157
  field.sentinel_prefix = pattern;
162
158
  }
163
159
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodatachat/guard",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "NoData Guard — continuous security scanner. Runs locally, reports only metadata. Your data never leaves your machine.",
5
5
  "main": "./dist/cli.js",
6
6
  "types": "./dist/cli.d.ts",