@node9/policy-engine 2.49.0 → 2.50.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.
package/dist/index.d.mts CHANGED
@@ -2429,7 +2429,7 @@ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v36";
2429
2429
  * files changed, this hash must change too, and you must consciously
2430
2430
  * decide whether to bump CANONICAL_EXTRACTOR_VERSION."
2431
2431
  */
2432
- declare const CANONICAL_EXTRACTOR_HASH = "814655319cb53ff9";
2432
+ declare const CANONICAL_EXTRACTOR_HASH = "5ed06e803cc1d365";
2433
2433
  declare function extractCanonicalFindings(call: ToolCallEntry, ctx: ExtractContext): CanonicalFinding[];
2434
2434
  declare function extractSessionLevelFindings(calls: ReadonlyArray<SessionToolCall>, ctx: SessionExtractContext): CanonicalFinding[];
2435
2435
  /**
package/dist/index.d.ts CHANGED
@@ -2429,7 +2429,7 @@ declare const CANONICAL_EXTRACTOR_VERSION = "canonical-v36";
2429
2429
  * files changed, this hash must change too, and you must consciously
2430
2430
  * decide whether to bump CANONICAL_EXTRACTOR_VERSION."
2431
2431
  */
2432
- declare const CANONICAL_EXTRACTOR_HASH = "814655319cb53ff9";
2432
+ declare const CANONICAL_EXTRACTOR_HASH = "5ed06e803cc1d365";
2433
2433
  declare function extractCanonicalFindings(call: ToolCallEntry, ctx: ExtractContext): CanonicalFinding[];
2434
2434
  declare function extractSessionLevelFindings(calls: ReadonlyArray<SessionToolCall>, ctx: SessionExtractContext): CanonicalFinding[];
2435
2435
  /**
package/dist/index.js CHANGED
@@ -3523,12 +3523,13 @@ function packRows() {
3523
3523
  if (!rule.name || SHIELD_RULES_FOLDED_INTO_PRODUCT[rule.name]) continue;
3524
3524
  const id = packRowId(shield.name, rule.name);
3525
3525
  if (!id) continue;
3526
- const owasp = packRowOwasp(id, shield.name);
3527
- if (!owasp) throw new Error(`pack row ${id} has no OWASP risk: add the shield to owasp.ts`);
3528
3526
  rows.push({
3529
3527
  id,
3530
3528
  group: "commands",
3531
- owasp,
3529
+ // A shield missing from the table falls back to tool misuse instead of
3530
+ // throwing here: this module loads on every hook call, and a mapping
3531
+ // omission must fail a test (owasp.spec.ts), never the gate.
3532
+ owasp: packRowOwasp(id, shield.name) ?? "ASI02",
3532
3533
  title: rule.name.replace(SHIELD_RULE_NAME, "$3").replace(/-/g, " "),
3533
3534
  catches: rule.description ?? rule.reason ?? "",
3534
3535
  values: ALL,
@@ -19727,7 +19728,7 @@ function matchCanaryArgs(args, values) {
19727
19728
  // src/scan/canonical.ts
19728
19729
  var LONG_OUTPUT_THRESHOLD_BYTES = 100 * 1024;
19729
19730
  var CANONICAL_EXTRACTOR_VERSION = "canonical-v36";
19730
- var CANONICAL_EXTRACTOR_HASH = "814655319cb53ff9";
19731
+ var CANONICAL_EXTRACTOR_HASH = "5ed06e803cc1d365";
19731
19732
  var DEDUPE_PREVIEW_LEN = 120;
19732
19733
  function extractCanonicalFindings(call, ctx) {
19733
19734
  const out = [];
package/dist/index.mjs CHANGED
@@ -3261,12 +3261,13 @@ function packRows() {
3261
3261
  if (!rule.name || SHIELD_RULES_FOLDED_INTO_PRODUCT[rule.name]) continue;
3262
3262
  const id = packRowId(shield.name, rule.name);
3263
3263
  if (!id) continue;
3264
- const owasp = packRowOwasp(id, shield.name);
3265
- if (!owasp) throw new Error(`pack row ${id} has no OWASP risk: add the shield to owasp.ts`);
3266
3264
  rows.push({
3267
3265
  id,
3268
3266
  group: "commands",
3269
- owasp,
3267
+ // A shield missing from the table falls back to tool misuse instead of
3268
+ // throwing here: this module loads on every hook call, and a mapping
3269
+ // omission must fail a test (owasp.spec.ts), never the gate.
3270
+ owasp: packRowOwasp(id, shield.name) ?? "ASI02",
3270
3271
  title: rule.name.replace(SHIELD_RULE_NAME, "$3").replace(/-/g, " "),
3271
3272
  catches: rule.description ?? rule.reason ?? "",
3272
3273
  values: ALL,
@@ -19465,7 +19466,7 @@ function matchCanaryArgs(args, values) {
19465
19466
  // src/scan/canonical.ts
19466
19467
  var LONG_OUTPUT_THRESHOLD_BYTES = 100 * 1024;
19467
19468
  var CANONICAL_EXTRACTOR_VERSION = "canonical-v36";
19468
- var CANONICAL_EXTRACTOR_HASH = "814655319cb53ff9";
19469
+ var CANONICAL_EXTRACTOR_HASH = "5ed06e803cc1d365";
19469
19470
  var DEDUPE_PREVIEW_LEN = 120;
19470
19471
  function extractCanonicalFindings(call, ctx) {
19471
19472
  const out = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node9/policy-engine",
3
- "version": "2.49.0",
3
+ "version": "2.50.0",
4
4
  "description": "Shared policy evaluation engine for node9 — DLP, smart rules, AST shell parsing, shields, loop detection. Pure functions, no I/O. Used by both node9-proxy and the node9 SaaS firewall.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://node9.ai",