@solongate/proxy 0.82.47 → 0.82.48

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.js CHANGED
@@ -9516,7 +9516,6 @@ var init_Policies = __esm({
9516
9516
  { label: "Effect", kind: "effect", get: (r) => r.effect },
9517
9517
  { label: "Enabled", kind: "enabled", get: (r) => r.enabled ? "yes" : "no" },
9518
9518
  { label: "Priority", kind: "priority", get: (r) => String(r.priority) },
9519
- { label: "Tool pattern", kind: "text", get: (r) => r.toolPattern, set: (r, v) => ({ ...r, toolPattern: v || "*" }) },
9520
9519
  { label: "Description", kind: "text", get: (r) => r.description ?? "", set: (r, v) => ({ ...r, description: v }) },
9521
9520
  { label: "Cmd allow", kind: "text", get: (r) => constr(r, "commandConstraints", "allowed"), set: (r, v) => setConstr(r, "commandConstraints", "allowed", v) },
9522
9521
  { label: "Cmd deny", kind: "text", get: (r) => constr(r, "commandConstraints", "denied"), set: (r, v) => setConstr(r, "commandConstraints", "denied", v) },
@@ -13476,13 +13475,20 @@ function analyzeSecurityWarnings(policySet) {
13476
13475
  const allowRules = policySet.rules.filter(
13477
13476
  (r) => r.effect === "ALLOW" && r.enabled
13478
13477
  );
13479
- const wildcardAllows = allowRules.filter((r) => r.toolPattern === "*");
13478
+ const hasNoConstraint = (r) => {
13479
+ const groups = ["commandConstraints", "pathConstraints", "filenameConstraints", "urlConstraints"];
13480
+ return !groups.some((g) => {
13481
+ const c2 = r[g];
13482
+ return c2 ? (c2.allowed?.length ?? 0) + (c2.denied?.length ?? 0) > 0 : false;
13483
+ });
13484
+ };
13485
+ const wildcardAllows = allowRules.filter(hasNoConstraint);
13480
13486
  if (wildcardAllows.length > 0) {
13481
13487
  warnings.push({
13482
13488
  level: "CRITICAL",
13483
13489
  code: "WILDCARD_ALLOW",
13484
13490
  message: UNSAFE_CONFIGURATION_WARNINGS.WILDCARD_ALLOW,
13485
- recommendation: "Replace wildcard ALLOW rules with specific tool patterns."
13491
+ recommendation: "Add command or path constraints so an ALLOW rule does not permit everything."
13486
13492
  });
13487
13493
  }
13488
13494
  return warnings;
package/dist/lib.js CHANGED
@@ -7019,13 +7019,20 @@ function analyzeSecurityWarnings(policySet) {
7019
7019
  const allowRules = policySet.rules.filter(
7020
7020
  (r) => r.effect === "ALLOW" && r.enabled
7021
7021
  );
7022
- const wildcardAllows = allowRules.filter((r) => r.toolPattern === "*");
7022
+ const hasNoConstraint = (r) => {
7023
+ const groups = ["commandConstraints", "pathConstraints", "filenameConstraints", "urlConstraints"];
7024
+ return !groups.some((g) => {
7025
+ const c = r[g];
7026
+ return c ? (c.allowed?.length ?? 0) + (c.denied?.length ?? 0) > 0 : false;
7027
+ });
7028
+ };
7029
+ const wildcardAllows = allowRules.filter(hasNoConstraint);
7023
7030
  if (wildcardAllows.length > 0) {
7024
7031
  warnings.push({
7025
7032
  level: "CRITICAL",
7026
7033
  code: "WILDCARD_ALLOW",
7027
7034
  message: UNSAFE_CONFIGURATION_WARNINGS.WILDCARD_ALLOW,
7028
- recommendation: "Replace wildcard ALLOW rules with specific tool patterns."
7035
+ recommendation: "Add command or path constraints so an ALLOW rule does not permit everything."
7029
7036
  });
7030
7037
  }
7031
7038
  return warnings;
@@ -11,8 +11,9 @@ export declare function createDefaultDenyPolicySet(): PolicySet;
11
11
  */
12
12
  export declare function createPermissivePolicySet(): PolicySet;
13
13
  /**
14
- * Creates a read-only policy set for a specific tool pattern.
15
- * Allows reads for VERIFIED requests only.
14
+ * Internal helper. Builds a read-only policy set scoped by an internal tool
15
+ * selector fixed to "*" in the shipped product; no UI or CLI exposes it, so
16
+ * users can neither see nor change it. Allows reads for VERIFIED requests only.
16
17
  */
17
18
  export declare function createReadOnlyPolicySet(toolPattern: string): PolicySet;
18
19
  /**
package/dist/tui/index.js CHANGED
@@ -2430,7 +2430,6 @@ var FIELDS = [
2430
2430
  { label: "Effect", kind: "effect", get: (r) => r.effect },
2431
2431
  { label: "Enabled", kind: "enabled", get: (r) => r.enabled ? "yes" : "no" },
2432
2432
  { label: "Priority", kind: "priority", get: (r) => String(r.priority) },
2433
- { label: "Tool pattern", kind: "text", get: (r) => r.toolPattern, set: (r, v) => ({ ...r, toolPattern: v || "*" }) },
2434
2433
  { label: "Description", kind: "text", get: (r) => r.description ?? "", set: (r, v) => ({ ...r, description: v }) },
2435
2434
  { label: "Cmd allow", kind: "text", get: (r) => constr(r, "commandConstraints", "allowed"), set: (r, v) => setConstr(r, "commandConstraints", "allowed", v) },
2436
2435
  { label: "Cmd deny", kind: "text", get: (r) => constr(r, "commandConstraints", "denied"), set: (r, v) => setConstr(r, "commandConstraints", "denied", v) },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.82.47",
3
+ "version": "0.82.48",
4
4
  "description": "AI tool security proxy: protect any AI tool server with customizable policies, path/command constraints, rate limiting, and audit logging. No code changes required.",
5
5
  "type": "module",
6
6
  "bin": {