@node9/policy-engine 2.14.2 → 2.14.3

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
@@ -571,6 +571,19 @@ interface PolicyVerdict {
571
571
  matchedField?: string;
572
572
  matchedWord?: string;
573
573
  tier?: 1 | 2 | 3 | 4 | 5 | 6 | 7;
574
+ /**
575
+ * False when NO human may override this verdict: the SSRF tier-1 floors,
576
+ * whose own reason string already tells the user "This address cannot be
577
+ * allowlisted". Absent means an override is a legitimate product decision,
578
+ * which is every other verdict.
579
+ *
580
+ * It exists because the host downgrades a hard block into a review whenever a
581
+ * human approver is reachable (orchestrator.ts, `mayDowngrade`). That is right
582
+ * for a smart-rule block and wrong for a floor, and the host could not tell
583
+ * the two apart: `overridable` was computed in egress/ssrf.ts, rendered into
584
+ * the reason sentence, and then dropped here.
585
+ */
586
+ overridable?: boolean;
574
587
  ruleName?: string;
575
588
  /** State predicates from the matched smart rule (only when decision is 'block'). */
576
589
  dependsOnStatePredicates?: string[];
package/dist/index.d.ts CHANGED
@@ -571,6 +571,19 @@ interface PolicyVerdict {
571
571
  matchedField?: string;
572
572
  matchedWord?: string;
573
573
  tier?: 1 | 2 | 3 | 4 | 5 | 6 | 7;
574
+ /**
575
+ * False when NO human may override this verdict: the SSRF tier-1 floors,
576
+ * whose own reason string already tells the user "This address cannot be
577
+ * allowlisted". Absent means an override is a legitimate product decision,
578
+ * which is every other verdict.
579
+ *
580
+ * It exists because the host downgrades a hard block into a review whenever a
581
+ * human approver is reachable (orchestrator.ts, `mayDowngrade`). That is right
582
+ * for a smart-rule block and wrong for a floor, and the host could not tell
583
+ * the two apart: `overridable` was computed in egress/ssrf.ts, rendered into
584
+ * the reason sentence, and then dropped here.
585
+ */
586
+ overridable?: boolean;
574
587
  ruleName?: string;
575
588
  /** State predicates from the matched smart rule (only when decision is 'block'). */
576
589
  dependsOnStatePredicates?: string[];
package/dist/index.js CHANGED
@@ -4009,7 +4009,8 @@ async function evaluatePolicy(config, toolName, args, context = {}, hooks = {})
4009
4009
  reason: dest.reason,
4010
4010
  ruleName: `ssrf:${dest.tier}:${toolName}:${dest.host}`,
4011
4011
  ruleDescription: dest.reason,
4012
- tier: 3
4012
+ tier: 3,
4013
+ overridable: dest.overridable
4013
4014
  };
4014
4015
  }
4015
4016
  }
@@ -4158,7 +4159,8 @@ async function evaluatePolicy(config, toolName, args, context = {}, hooks = {})
4158
4159
  reason: ssrf.reason,
4159
4160
  ruleName: `ssrf:${ssrf.tier}:${ssrf.binary}:${ssrf.host}`,
4160
4161
  ruleDescription: ssrf.reason,
4161
- tier: 3
4162
+ tier: 3,
4163
+ overridable: ssrf.overridable
4162
4164
  };
4163
4165
  }
4164
4166
  }
package/dist/index.mjs CHANGED
@@ -3869,7 +3869,8 @@ async function evaluatePolicy(config, toolName, args, context = {}, hooks = {})
3869
3869
  reason: dest.reason,
3870
3870
  ruleName: `ssrf:${dest.tier}:${toolName}:${dest.host}`,
3871
3871
  ruleDescription: dest.reason,
3872
- tier: 3
3872
+ tier: 3,
3873
+ overridable: dest.overridable
3873
3874
  };
3874
3875
  }
3875
3876
  }
@@ -4018,7 +4019,8 @@ async function evaluatePolicy(config, toolName, args, context = {}, hooks = {})
4018
4019
  reason: ssrf.reason,
4019
4020
  ruleName: `ssrf:${ssrf.tier}:${ssrf.binary}:${ssrf.host}`,
4020
4021
  ruleDescription: ssrf.reason,
4021
- tier: 3
4022
+ tier: 3,
4023
+ overridable: ssrf.overridable
4022
4024
  };
4023
4025
  }
4024
4026
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node9/policy-engine",
3
- "version": "2.14.2",
3
+ "version": "2.14.3",
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",